This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#471): type definition for poll
- Loading branch information
1 parent
da47dc2
commit 23e4b28
Showing
19 changed files
with
210 additions
and
179 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// A bar | ||
export interface DeckdeckgoBarChartDataValue { | ||
// The key of a bar, use for the style | ||
key: number | string; | ||
// A title for the bar | ||
label: string; | ||
// Its value | ||
value: number; | ||
} | ||
|
||
// A chart | ||
export interface DeckdeckgoBarChartData { | ||
// The chart label | ||
label: string | Date | number; | ||
// 1 or multiple bars | ||
values: DeckdeckgoBarChartDataValue[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,3 @@ | ||
export enum DeckdeckgoDrawAction { | ||
PENCIL, | ||
CIRCLE | ||
} | ||
|
||
export enum DeckdeckgoSlideAction { | ||
PLAY = 'play', | ||
PAUSE = 'pause' | ||
} | ||
|
||
export interface DeckdeckgoAttributeDefinition { | ||
name: string; | ||
value?: any; | ||
} | ||
|
||
export interface DeckdeckgoSlideDefinition { | ||
template: string; | ||
content?: string; | ||
attributes?: DeckdeckgoAttributeDefinition[]; | ||
} | ||
|
||
export interface DeckdeckgoDeckDefinition { | ||
slides: DeckdeckgoSlideDefinition[]; | ||
attributes?: DeckdeckgoAttributeDefinition[]; | ||
background?: string; | ||
|
||
reveal: boolean; | ||
revealOnMobile: boolean; | ||
} | ||
|
||
export enum DeckdeckgoEventType { | ||
SLIDES_REQUEST = 'slides_request', | ||
SLIDES_ANSWER = 'slides_answer', | ||
DECK_UPDATE = 'deck_update', | ||
SLIDE_UPDATE = 'slide_update', | ||
NEXT_SLIDE = 'next_slide', | ||
PREV_SLIDE = 'prev_slide', | ||
SLIDE_TO = 'slide_to', | ||
CLEAR_SLIDE = 'clear_slide', | ||
START_DRAWING = 'start_drawing', | ||
DRAW = 'draw', | ||
END_DRAWING = 'end_drawing', | ||
SLIDE_ACTION = 'slide_action', | ||
DELETE_SLIDE = 'delete_slide', | ||
DECK_REVEAL_UPDATE = 'deck_reveal_update' | ||
} | ||
|
||
export enum DeckdeckgoEventEmitter { | ||
DECK = 'deck', | ||
APP = 'app' | ||
} | ||
|
||
export interface DeckdeckgoEvent { | ||
type: DeckdeckgoEventType; | ||
emitter: DeckdeckgoEventEmitter | ||
} | ||
|
||
export interface DeckdeckgoEventDraw extends DeckdeckgoEvent { | ||
action: DeckdeckgoDrawAction; | ||
|
||
clientX: number; | ||
clientY: number; | ||
|
||
windowWidth: number; | ||
windowHeight: number; | ||
|
||
color?: string; | ||
} | ||
|
||
export interface DeckdeckgoEventNextPrevSlide extends DeckdeckgoEvent { | ||
slideAnimation: boolean; | ||
} | ||
|
||
export interface DeckdeckgoEventDeckReveal extends DeckdeckgoEvent { | ||
reveal: boolean; | ||
} | ||
|
||
export interface DeckdeckgoEventSlideTo extends DeckdeckgoEvent { | ||
index: number; | ||
speed?: number | ||
} | ||
|
||
export interface DeckdeckgoEventDeck extends DeckdeckgoEvent { | ||
length: number; | ||
mobile: boolean; | ||
deck: DeckdeckgoDeckDefinition; | ||
} | ||
|
||
export interface DeckdeckgoEventSlide extends DeckdeckgoEvent { | ||
index: number; | ||
slide: DeckdeckgoSlideDefinition; | ||
} | ||
|
||
export interface DeckdeckgoEventSlideAction extends DeckdeckgoEvent { | ||
action: DeckdeckgoSlideAction; | ||
} | ||
export * from './remote'; | ||
export * from './chart'; | ||
export * from './poll'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export interface DeckdeckgoPollAnswer { | ||
key: number | string; | ||
label: string; | ||
} | ||
|
||
export interface DeckdeckgoPollQuestion { | ||
label: string; | ||
values: DeckdeckgoPollAnswer[]; | ||
} | ||
|
||
export interface DeckdeckgoPoll { | ||
key: string; | ||
poll: DeckdeckgoPollQuestion; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
export enum DeckdeckgoDrawAction { | ||
PENCIL, | ||
CIRCLE | ||
} | ||
|
||
export enum DeckdeckgoSlideAction { | ||
PLAY = 'play', | ||
PAUSE = 'pause' | ||
} | ||
|
||
export interface DeckdeckgoAttributeDefinition { | ||
name: string; | ||
value?: any; | ||
} | ||
|
||
export interface DeckdeckgoSlideDefinition { | ||
template: string; | ||
content?: string; | ||
attributes?: DeckdeckgoAttributeDefinition[]; | ||
} | ||
|
||
export interface DeckdeckgoDeckDefinition { | ||
slides: DeckdeckgoSlideDefinition[]; | ||
attributes?: DeckdeckgoAttributeDefinition[]; | ||
background?: string; | ||
|
||
reveal: boolean; | ||
revealOnMobile: boolean; | ||
} | ||
|
||
export enum DeckdeckgoEventType { | ||
SLIDES_REQUEST = 'slides_request', | ||
SLIDES_ANSWER = 'slides_answer', | ||
DECK_UPDATE = 'deck_update', | ||
SLIDE_UPDATE = 'slide_update', | ||
NEXT_SLIDE = 'next_slide', | ||
PREV_SLIDE = 'prev_slide', | ||
SLIDE_TO = 'slide_to', | ||
CLEAR_SLIDE = 'clear_slide', | ||
START_DRAWING = 'start_drawing', | ||
DRAW = 'draw', | ||
END_DRAWING = 'end_drawing', | ||
SLIDE_ACTION = 'slide_action', | ||
DELETE_SLIDE = 'delete_slide', | ||
DECK_REVEAL_UPDATE = 'deck_reveal_update' | ||
} | ||
|
||
export enum DeckdeckgoEventEmitter { | ||
DECK = 'deck', | ||
APP = 'app' | ||
} | ||
|
||
export interface DeckdeckgoEvent { | ||
type: DeckdeckgoEventType; | ||
emitter: DeckdeckgoEventEmitter | ||
} | ||
|
||
export interface DeckdeckgoEventDraw extends DeckdeckgoEvent { | ||
action: DeckdeckgoDrawAction; | ||
|
||
clientX: number; | ||
clientY: number; | ||
|
||
windowWidth: number; | ||
windowHeight: number; | ||
|
||
color?: string; | ||
} | ||
|
||
export interface DeckdeckgoEventNextPrevSlide extends DeckdeckgoEvent { | ||
slideAnimation: boolean; | ||
} | ||
|
||
export interface DeckdeckgoEventDeckReveal extends DeckdeckgoEvent { | ||
reveal: boolean; | ||
} | ||
|
||
export interface DeckdeckgoEventSlideTo extends DeckdeckgoEvent { | ||
index: number; | ||
speed?: number | ||
} | ||
|
||
export interface DeckdeckgoEventDeck extends DeckdeckgoEvent { | ||
length: number; | ||
mobile: boolean; | ||
deck: DeckdeckgoDeckDefinition; | ||
} | ||
|
||
export interface DeckdeckgoEventSlide extends DeckdeckgoEvent { | ||
index: number; | ||
slide: DeckdeckgoSlideDefinition; | ||
} | ||
|
||
export interface DeckdeckgoEventSlideAction extends DeckdeckgoEvent { | ||
action: DeckdeckgoSlideAction; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.