/
appOptions.js
235 lines (224 loc) · 7.34 KB
/
appOptions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/* JSDoc annotations for appOptions and related object types. */
/**
* Object representing everything in window.appOptions.
*
* @typedef {Object} AppOptionsConfig
* @property {boolean} embedded
* @property {string} scriptName
* @property {string} stagePosition
* @property {string} levelPosition
* @property {AutoplayVideo} autoplayVideo
* @property {SerializedAnimationList} initialAnimationList
* @property {string} levelGameName
* @property {string} skinId
* @property {string} baseUrl
* @property {string} app
* @property {boolean} droplet
* @property {'.min'|''} pretty - todo: no longer used?
* @property {Level|Artist|Blockly} level
* @property {boolean} showUnusedBlocks
* @property {boolean} fullWidth
* @property {boolean} noHeader
* @property {boolean} noFooter
* @property {boolean} smallFooter
* @property {boolean} codeStudioLogo
* @property {boolean} hasI18n
* @property {boolean} whiteBackground
* @property {Object[]} callouts
* @property {string} channel
* @property {boolean} readonlyWorkspace
* @property {boolean} isExternalProjectLevel
* @property {boolean} isChannelBacked
* @property {boolean} isLegacyShare
* @property {boolean} legacyShareStyle
* @property {PostMileStoneMode} postMilestoneMode
* @property {string} puzzleRatingsUrl
* @property {string} authoredHintViewRequestsUrl
* @property {?} authoredHintsUsedIds
* @property {number} serverLevelId
* @property {number} serverProjectLevelId
* @property {string} gameDisplayName
* @property {boolean} publicCaching
* @property {?boolean} is13Plus - Will be true if the user is 13 or older,
* false if they are 12 or younger, and undefined if we don't know
* (such as when they are not signed in).
* @property {boolean} hasContainedLevels
* @property {boolean} hideSource
* @property {string} share
* @property {string} labUserId
* @property {string} firebaseName
* @property {string} firebaseAuthToken
* @property {string} firebaseChannelIdSuffix
* @property {boolean} isSignedIn
* @property {boolean} pinWorkspaceToBottom
* @property {boolean} hasVerticalScrollbars
* @property {boolean} showExampleTestButtons
* @property {ReportOptions} report
* @property {boolean} sendToPhone
* @property {string} send_to_phone_url
* @property {CopyrightStrings} copyrightStrings
* @property {string} teacherMarkdown
* @property {DialogOptions} dialog
* @property {string} locale
*/
/**
* @typedef {Object} ReportOptions
* @property {FallbackResponse} fallback_response
* @property {MilestoneReport} lastReport
* @property {?} callback
* @property {?} sublevelCallback
*/
/**
* @typedef {Object} FallbackResponse
* @property {MilestoneResponse} success
* @property {MilestoneResponse} failure
*/
/**
* @typedef {Object} Level
* @property {string} skin
* @property {boolean} editCode
* @property {boolean} embed
* @property {boolean} isK1
* @property {boolean} isProjectLevel
* @property {boolean} skipInstructionsPopup
* @property {boolean} disableParamEditing
* @property {boolean} disableVariableEditing
* @property {boolean} useModalFunctionEditor
* @property {boolean} useContractEditor
* @property {boolean} contractHighlight
* @property {boolean} contractCollapse
* @property {boolean} examplesHighlight
* @property {boolean} examplesCollapse
* @property {boolean} definitionHighlight
* @property {boolean} definitionCollapse
* @property {boolean} freePlay
* @property {number} appWidth
* @property {number} appHeight
* @property {number} sliderSpeed
* @property {string} calloutJson
* @property {boolean} disableExamples
* @property {boolean} showTurtleBeforeRun
* @property {boolean} autocompletePaletteApisOnly
* @property {boolean} textModeAtStart
* @property {boolean} designModeAtStart
* @property {boolean} hideDesignMode
* @property {boolean} beginnerMode
* @property {string} levelId
* @property {number} puzzle_number
* @property {number} stage_total
* @property {boolean} iframeEmbed
* @property {?} lastAttempt
* @property {boolean} submittable
* @property {boolean} final_level
* @property {array} levelVideos
* @property {string} mapReference
* @property {array} referenceLinks
*/
/**
* @typedef {Object} Artist
* @property {string} startDirection
* @property {number} initialX
* @property {number} initialY
* @property predraw_blocks
* @property images
* @property free_play
* @property permitted_errors
* @property impressive
* @property discard_background
* @property shapeways_url
* @property disable_sharing
*/
/**
* @typedef {Object} Blockly
* @property levelUrl
* @property skin
* @property initializationBlocks
* @property startBlocks
* @property toolboxBlocks
* @property requiredBlocks
* @property recommendedBlocks
* @property solutionBlocks
* @property aniGifUrl
* @property isK1
* @property skipInstructionsPopup
* @property neverAutoplayVideo
* @property scrollbars
* @property ideal
* @property minWorkspaceHeight
* @property stepSpeed
* @property sliderSpeed
* @property disableParamEditing
* @property disableVariableEditing
* @property disableProcedureAutopopulate
* @property use_modalFunctionEditor
* @property useContractEditor
* @property defaultNumExampleBlocks
* @property openFunctionDefinition
* @property contractHighlight
* @property contractCollapse
* @property examplesHighlight
* @property examplesCollapse
* @property examplesRequired
* @property definitionHighlight
* @property definitionCollapse
* @property disableExamples
* @property projectTemplateLevelName
* @property hideShareAndRemix
* @property isProjectLevel
* @property editCode
* @property codeFunctions
* @property paletteCategoryAtStart
* @property failureMessageOverride
* @property dropletTooltipsDisabled
* @property lockZeroParamFunctions
* @property containedLevelNames
* @property encryptedExamples
* @property disableIfElseEditing
*/
/**
* @typedef {Object} CopyrightStrings
* @property {string} thank_you
* @property {string} help_from_html
* @property {string} art_from_html
* @property {string} code_from_html
* @property {string} powered_by_aws
* @property {string} trademark
*/
/**
* @typedef {Object} DialogOptions
* @property {boolean} skipSound
* @property {string} preTitle
* @property {FallbackResponse} fallbackResponse
* @property {function} callback
* @property {function} sublevelCallback
* @property {string} app
* @property {?} level
* @property {boolean} shouldShowDialog
*/
/**
* @typedef {Object} LiveMilestoneResponse
* @augments MilestoneResponse
* @property {?} timestamp
* @property {{message: ?, type: ?, contents: ?}} share_failure
* @property {string} save_to_gallery_url - URL to save this submission to the gallery.
* @property {string} level_source
* @property {string} level_source_id
* @property {string} level_source_image_url
*/
/**
* @typedef {Object} MilestoneResponse
* @property {?} script_id
* @property {?} level_id
* @property {?} total_lines
* @property {AutoplayVideo} video_info
* @property {string} redirect - path to 'next' level in the stage/script sequence.
* @property {{previous: {position: number, name: string}}} stage_changing
* @property {boolean} end_of_stage_experience
* @property {HintViewRequest[]} hint_view_requests
* @property {string} hint_view_request_url
* @property {string} message
* @property {boolean} puzzle_ratings_enabled
*/
/**
* @typedef {{feedback_type: TestResult, feedback_xml: string}} HintViewRequest
*/