@fugood/bricks-ctor 2.25.0-beta.60 → 2.25.0-beta.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/package.json +4 -28
  2. package/tools/deploy.ts +19 -176
  3. package/tools/mcp-server.ts +16 -33
  4. package/tools/postinstall.ts +21 -292
  5. package/tools/pull.ts +15 -195
  6. package/tools/push-config.ts +18 -113
  7. package/tools/simulator.ts +19 -148
  8. package/compile/__tests__/config-diff.test.js +0 -100
  9. package/compile/__tests__/index.test.js +0 -461
  10. package/compile/__tests__/util.test.js +0 -450
  11. package/compile/action-name-map.ts +0 -1079
  12. package/compile/config-diff.ts +0 -155
  13. package/compile/index.ts +0 -1594
  14. package/compile/util.ts +0 -482
  15. package/index.ts +0 -6
  16. package/skills/bricks-ctor/SKILL.md +0 -38
  17. package/skills/bricks-ctor/references/animation.md +0 -160
  18. package/skills/bricks-ctor/references/architecture-patterns.md +0 -88
  19. package/skills/bricks-ctor/references/automations.md +0 -232
  20. package/skills/bricks-ctor/references/buttress.md +0 -245
  21. package/skills/bricks-ctor/references/data-calculation.md +0 -252
  22. package/skills/bricks-ctor/references/local-sync.md +0 -129
  23. package/skills/bricks-ctor/references/media-flow.md +0 -165
  24. package/skills/bricks-ctor/references/remote-data-bank.md +0 -196
  25. package/skills/bricks-ctor/references/simulator.md +0 -132
  26. package/skills/bricks-ctor/references/source-editing-tools.md +0 -81
  27. package/skills/bricks-ctor/references/standby-transition.md +0 -124
  28. package/skills/bricks-ctor/references/verification-toolchain.md +0 -200
  29. package/skills/bricks-design/SKILL.md +0 -171
  30. package/skills/bricks-design/references/architecture-truths.md +0 -132
  31. package/skills/bricks-design/references/avoiding-complexity.md +0 -91
  32. package/skills/bricks-design/references/design-critique.md +0 -195
  33. package/skills/bricks-design/references/design-languages.md +0 -265
  34. package/skills/bricks-design/references/performance.md +0 -116
  35. package/skills/bricks-design/references/presentation-and-slideshow.md +0 -137
  36. package/skills/bricks-design/references/translating-inputs.md +0 -152
  37. package/skills/bricks-design/references/variations-and-tweaks.md +0 -124
  38. package/skills/bricks-design/references/when-the-brief-is-branded.md +0 -284
  39. package/skills/bricks-design/references/when-the-brief-is-vague.md +0 -85
  40. package/skills/bricks-design/references/workflow.md +0 -134
  41. package/skills/bricks-ux/SKILL.md +0 -114
  42. package/skills/bricks-ux/references/accessibility.md +0 -162
  43. package/skills/bricks-ux/references/flow-states.md +0 -175
  44. package/skills/bricks-ux/references/interaction-archetypes.md +0 -189
  45. package/skills/bricks-ux/references/monitoring-screens.md +0 -153
  46. package/skills/bricks-ux/references/pressable-composition.md +0 -126
  47. package/skills/bricks-ux/references/user-journey.md +0 -168
  48. package/skills/bricks-ux/references/ux-critique.md +0 -256
  49. package/skills/rive-marketplace/SKILL.md +0 -99
  50. package/tools/__tests__/_cli-error.test.ts +0 -35
  51. package/tools/__tests__/_mcp-config.test.ts +0 -67
  52. package/tools/__tests__/pull.test.ts +0 -108
  53. package/tools/_cli-error.ts +0 -17
  54. package/tools/_edits-log.ts +0 -41
  55. package/tools/_git-author.ts +0 -37
  56. package/tools/_last-pushed-commit.ts +0 -28
  57. package/tools/_mcp-config.ts +0 -42
  58. package/tools/_shell.ts +0 -180
  59. package/tools/icons/.gitattributes +0 -1
  60. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  61. package/tools/icons/fa6pro-meta.json +0 -1
  62. package/tools/mcp-env.ts +0 -13
  63. package/tools/mcp-tools/__tests__/data-calc-editing.test.js +0 -516
  64. package/tools/mcp-tools/__tests__/entry-editing.test.js +0 -866
  65. package/tools/mcp-tools/__tests__/huggingface.test.ts +0 -49
  66. package/tools/mcp-tools/__tests__/icons.test.ts +0 -21
  67. package/tools/mcp-tools/__tests__/mcp-env.test.js +0 -19
  68. package/tools/mcp-tools/_editing-helpers.ts +0 -98
  69. package/tools/mcp-tools/_verify.ts +0 -50
  70. package/tools/mcp-tools/compile.ts +0 -104
  71. package/tools/mcp-tools/data-calc-editing.ts +0 -1311
  72. package/tools/mcp-tools/entry-editing.ts +0 -2297
  73. package/tools/mcp-tools/huggingface.ts +0 -772
  74. package/tools/mcp-tools/icons.ts +0 -97
  75. package/tools/mcp-tools/lottie.ts +0 -102
  76. package/tools/mcp-tools/media.ts +0 -113
  77. package/tools/simulator-main.mjs +0 -488
  78. package/tools/simulator-preload.cjs +0 -16
  79. package/types/animation.d.ts +0 -116
  80. package/types/automation.d.ts +0 -231
  81. package/types/brick-base.d.ts +0 -80
  82. package/types/bricks/Camera.d.ts +0 -246
  83. package/types/bricks/Chart.d.ts +0 -372
  84. package/types/bricks/GenerativeMedia.d.ts +0 -290
  85. package/types/bricks/Icon.d.ts +0 -98
  86. package/types/bricks/Image.d.ts +0 -126
  87. package/types/bricks/Items.d.ts +0 -480
  88. package/types/bricks/Lottie.d.ts +0 -168
  89. package/types/bricks/Maps.d.ts +0 -262
  90. package/types/bricks/QrCode.d.ts +0 -117
  91. package/types/bricks/Rect.d.ts +0 -150
  92. package/types/bricks/RichText.d.ts +0 -131
  93. package/types/bricks/Rive.d.ts +0 -220
  94. package/types/bricks/Scene3D.d.ts +0 -676
  95. package/types/bricks/Sketch.d.ts +0 -256
  96. package/types/bricks/Slideshow.d.ts +0 -201
  97. package/types/bricks/Svg.d.ts +0 -99
  98. package/types/bricks/Text.d.ts +0 -148
  99. package/types/bricks/TextInput.d.ts +0 -242
  100. package/types/bricks/Video.d.ts +0 -242
  101. package/types/bricks/VideoStreaming.d.ts +0 -112
  102. package/types/bricks/WebRtcStream.d.ts +0 -65
  103. package/types/bricks/WebView.d.ts +0 -168
  104. package/types/bricks/index.d.ts +0 -23
  105. package/types/canvas.d.ts +0 -82
  106. package/types/common.d.ts +0 -141
  107. package/types/data-calc-command/base.d.ts +0 -57
  108. package/types/data-calc-command/collection.d.ts +0 -418
  109. package/types/data-calc-command/color.d.ts +0 -432
  110. package/types/data-calc-command/constant.d.ts +0 -50
  111. package/types/data-calc-command/datetime.d.ts +0 -147
  112. package/types/data-calc-command/file.d.ts +0 -129
  113. package/types/data-calc-command/index.d.ts +0 -13
  114. package/types/data-calc-command/iteratee.d.ts +0 -23
  115. package/types/data-calc-command/logictype.d.ts +0 -190
  116. package/types/data-calc-command/math.d.ts +0 -275
  117. package/types/data-calc-command/object.d.ts +0 -119
  118. package/types/data-calc-command/sandbox.d.ts +0 -66
  119. package/types/data-calc-command/string.d.ts +0 -407
  120. package/types/data-calc-script.d.ts +0 -21
  121. package/types/data-calc.d.ts +0 -12
  122. package/types/data.d.ts +0 -97
  123. package/types/generators/AlarmClock.d.ts +0 -110
  124. package/types/generators/Assistant.d.ts +0 -640
  125. package/types/generators/BleCentral.d.ts +0 -247
  126. package/types/generators/BlePeripheral.d.ts +0 -208
  127. package/types/generators/CanvasMap.d.ts +0 -74
  128. package/types/generators/CastlesPay.d.ts +0 -87
  129. package/types/generators/DataBank.d.ts +0 -160
  130. package/types/generators/File.d.ts +0 -432
  131. package/types/generators/GraphQl.d.ts +0 -132
  132. package/types/generators/Http.d.ts +0 -222
  133. package/types/generators/HttpServer.d.ts +0 -230
  134. package/types/generators/Information.d.ts +0 -103
  135. package/types/generators/Intent.d.ts +0 -168
  136. package/types/generators/Iterator.d.ts +0 -108
  137. package/types/generators/Keyboard.d.ts +0 -105
  138. package/types/generators/LlmAnthropicCompat.d.ts +0 -212
  139. package/types/generators/LlmAppleBuiltin.d.ts +0 -159
  140. package/types/generators/LlmGgml.d.ts +0 -903
  141. package/types/generators/LlmMediaTekNeuroPilot.d.ts +0 -235
  142. package/types/generators/LlmMlx.d.ts +0 -228
  143. package/types/generators/LlmOnnx.d.ts +0 -213
  144. package/types/generators/LlmOpenAiCompat.d.ts +0 -312
  145. package/types/generators/LlmQualcommAiEngine.d.ts +0 -247
  146. package/types/generators/Mcp.d.ts +0 -637
  147. package/types/generators/McpServer.d.ts +0 -289
  148. package/types/generators/MediaFlow.d.ts +0 -170
  149. package/types/generators/MqttBroker.d.ts +0 -141
  150. package/types/generators/MqttClient.d.ts +0 -141
  151. package/types/generators/Question.d.ts +0 -408
  152. package/types/generators/RealtimeTranscription.d.ts +0 -287
  153. package/types/generators/RerankerGgml.d.ts +0 -195
  154. package/types/generators/SerialPort.d.ts +0 -151
  155. package/types/generators/SoundPlayer.d.ts +0 -94
  156. package/types/generators/SoundRecorder.d.ts +0 -139
  157. package/types/generators/SpeechToTextGgml.d.ts +0 -424
  158. package/types/generators/SpeechToTextOnnx.d.ts +0 -236
  159. package/types/generators/SpeechToTextPlatform.d.ts +0 -85
  160. package/types/generators/SqLite.d.ts +0 -159
  161. package/types/generators/Step.d.ts +0 -107
  162. package/types/generators/SttAppleBuiltin.d.ts +0 -153
  163. package/types/generators/Tcp.d.ts +0 -126
  164. package/types/generators/TcpServer.d.ts +0 -147
  165. package/types/generators/TextToSpeechAppleBuiltin.d.ts +0 -127
  166. package/types/generators/TextToSpeechGgml.d.ts +0 -221
  167. package/types/generators/TextToSpeechOnnx.d.ts +0 -178
  168. package/types/generators/TextToSpeechOpenAiLike.d.ts +0 -121
  169. package/types/generators/ThermalPrinter.d.ts +0 -193
  170. package/types/generators/Tick.d.ts +0 -83
  171. package/types/generators/Udp.d.ts +0 -120
  172. package/types/generators/VadGgml.d.ts +0 -260
  173. package/types/generators/VadOnnx.d.ts +0 -231
  174. package/types/generators/VadTraditional.d.ts +0 -138
  175. package/types/generators/VectorStore.d.ts +0 -257
  176. package/types/generators/Watchdog.d.ts +0 -107
  177. package/types/generators/WebCrawler.d.ts +0 -103
  178. package/types/generators/WebRtc.d.ts +0 -181
  179. package/types/generators/WebSocket.d.ts +0 -148
  180. package/types/generators/index.d.ts +0 -57
  181. package/types/index.d.ts +0 -13
  182. package/types/subspace.d.ts +0 -60
  183. package/types/switch.d.ts +0 -51
  184. package/types/system.d.ts +0 -707
  185. package/utils/__tests__/calc.test.js +0 -25
  186. package/utils/__tests__/id.test.js +0 -154
  187. package/utils/calc.ts +0 -130
  188. package/utils/data.ts +0 -495
  189. package/utils/event-props.ts +0 -912
  190. package/utils/id.ts +0 -133
@@ -1,372 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Chart brick, based on [Apache ECharts](https://echarts.apache.org/en/index.html).
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- /* Data highlight */
21
- export type BrickChartActionDataHighlight = ActionWithParams & {
22
- __actionName: 'BRICK_CHART_DATA_HIGHLIGHT'
23
- params?: Array<
24
- | {
25
- input: 'seriesName'
26
- value?: string | DataLink | EventProperty
27
- mapping?: string
28
- }
29
- | {
30
- input: 'seriesId'
31
- value?: string | DataLink | EventProperty
32
- mapping?: string
33
- }
34
- | {
35
- input: 'seriesIndex'
36
- value?: number | DataLink | EventProperty
37
- mapping?: string
38
- }
39
- | {
40
- input: 'dataIndex'
41
- value?: number | DataLink | EventProperty
42
- mapping?: string
43
- }
44
- | {
45
- input: 'name'
46
- value?: string | DataLink | EventProperty
47
- mapping?: string
48
- }
49
- >
50
- }
51
-
52
- /* Data downplay */
53
- export type BrickChartActionDataDownplay = ActionWithParams & {
54
- __actionName: 'BRICK_CHART_DATA_DOWNPLAY'
55
- params?: Array<
56
- | {
57
- input: 'seriesName'
58
- value?: string | DataLink | EventProperty
59
- mapping?: string
60
- }
61
- | {
62
- input: 'seriesId'
63
- value?: string | DataLink | EventProperty
64
- mapping?: string
65
- }
66
- | {
67
- input: 'seriesIndex'
68
- value?: number | DataLink | EventProperty
69
- mapping?: string
70
- }
71
- | {
72
- input: 'dataIndex'
73
- value?: number | DataLink | EventProperty
74
- mapping?: string
75
- }
76
- | {
77
- input: 'name'
78
- value?: string | DataLink | EventProperty
79
- mapping?: string
80
- }
81
- >
82
- }
83
-
84
- /* Data select */
85
- export type BrickChartActionDataSelect = ActionWithParams & {
86
- __actionName: 'BRICK_CHART_DATA_SELECT'
87
- params?: Array<
88
- | {
89
- input: 'seriesName'
90
- value?: string | DataLink | EventProperty
91
- mapping?: string
92
- }
93
- | {
94
- input: 'seriesId'
95
- value?: string | DataLink | EventProperty
96
- mapping?: string
97
- }
98
- | {
99
- input: 'seriesIndex'
100
- value?: number | DataLink | EventProperty
101
- mapping?: string
102
- }
103
- | {
104
- input: 'dataIndex'
105
- value?: number | DataLink | EventProperty
106
- mapping?: string
107
- }
108
- | {
109
- input: 'name'
110
- value?: string | DataLink | EventProperty
111
- mapping?: string
112
- }
113
- >
114
- }
115
-
116
- /* Data unselect */
117
- export type BrickChartActionDataUnselect = ActionWithParams & {
118
- __actionName: 'BRICK_CHART_DATA_UNSELECT'
119
- params?: Array<
120
- | {
121
- input: 'seriesName'
122
- value?: string | DataLink | EventProperty
123
- mapping?: string
124
- }
125
- | {
126
- input: 'seriesId'
127
- value?: string | DataLink | EventProperty
128
- mapping?: string
129
- }
130
- | {
131
- input: 'seriesIndex'
132
- value?: number | DataLink | EventProperty
133
- mapping?: string
134
- }
135
- | {
136
- input: 'dataIndex'
137
- value?: number | DataLink | EventProperty
138
- mapping?: string
139
- }
140
- | {
141
- input: 'name'
142
- value?: string | DataLink | EventProperty
143
- mapping?: string
144
- }
145
- >
146
- }
147
-
148
- /* Data toggle select */
149
- export type BrickChartActionDataToggleSelect = ActionWithParams & {
150
- __actionName: 'BRICK_CHART_DATA_TOGGLE_SELECT'
151
- params?: Array<
152
- | {
153
- input: 'seriesName'
154
- value?: string | DataLink | EventProperty
155
- mapping?: string
156
- }
157
- | {
158
- input: 'seriesId'
159
- value?: string | DataLink | EventProperty
160
- mapping?: string
161
- }
162
- | {
163
- input: 'seriesIndex'
164
- value?: number | DataLink | EventProperty
165
- mapping?: string
166
- }
167
- | {
168
- input: 'dataIndex'
169
- value?: number | DataLink | EventProperty
170
- mapping?: string
171
- }
172
- | {
173
- input: 'name'
174
- value?: string | DataLink | EventProperty
175
- mapping?: string
176
- }
177
- >
178
- }
179
-
180
- /* Legend select */
181
- export type BrickChartActionLegendSelect = ActionWithParams & {
182
- __actionName: 'BRICK_CHART_LEGEND_SELECT'
183
- params?: Array<{
184
- input: 'name'
185
- value?: string | DataLink | EventProperty
186
- mapping?: string
187
- }>
188
- }
189
-
190
- /* Legend unselect */
191
- export type BrickChartActionLegendUnselect = ActionWithParams & {
192
- __actionName: 'BRICK_CHART_LEGEND_UNSELECT'
193
- params?: Array<{
194
- input: 'name'
195
- value?: string | DataLink | EventProperty
196
- mapping?: string
197
- }>
198
- }
199
-
200
- /* Legend toggle select */
201
- export type BrickChartActionLegendToggleSelect = Action & {
202
- __actionName: 'BRICK_CHART_LEGEND_TOGGLE_SELECT'
203
- }
204
-
205
- /* Legend all select */
206
- export type BrickChartActionLegendAllSelect = Action & {
207
- __actionName: 'BRICK_CHART_LEGEND_ALL_SELECT'
208
- }
209
-
210
- /* Legend inverse select */
211
- export type BrickChartActionLegendInverseSelect = Action & {
212
- __actionName: 'BRICK_CHART_LEGEND_INVERSE_SELECT'
213
- }
214
-
215
- /* Tooltip show */
216
- export type BrickChartActionTooltipShow = ActionWithParams & {
217
- __actionName: 'BRICK_CHART_TOOLTIP_SHOW'
218
- params?: Array<
219
- | {
220
- input: 'seriesIndex'
221
- value?: number | DataLink | EventProperty
222
- mapping?: string
223
- }
224
- | {
225
- input: 'dataIndex'
226
- value?: number | DataLink | EventProperty
227
- mapping?: string
228
- }
229
- | {
230
- input: 'name'
231
- value?: string | DataLink | EventProperty
232
- mapping?: string
233
- }
234
- >
235
- }
236
-
237
- /* Tooltip hide */
238
- export type BrickChartActionTooltipHide = ActionWithParams & {
239
- __actionName: 'BRICK_CHART_TOOLTIP_HIDE'
240
- params?: Array<
241
- | {
242
- input: 'seriesIndex'
243
- value?: number | DataLink | EventProperty
244
- mapping?: string
245
- }
246
- | {
247
- input: 'dataIndex'
248
- value?: number | DataLink | EventProperty
249
- mapping?: string
250
- }
251
- | {
252
- input: 'name'
253
- value?: string | DataLink | EventProperty
254
- mapping?: string
255
- }
256
- >
257
- }
258
-
259
- interface BrickChartDef {
260
- /*
261
- Default property:
262
- {
263
- "renderMode": "svg",
264
- "legendShow": true,
265
- "xAxisShow": true,
266
- "xAxisType": "category",
267
- "yAxisShow": true,
268
- "yAxisType": "value",
269
- "tooltipShow": true,
270
- "tooltipTrigger": "item"
271
- }
272
- */
273
- property?: BrickBasicProperty & {
274
- /* The render mode */
275
- renderMode?: 'svg' | 'skia' | DataLink
276
- /* Theme. You can use https://echarts.apache.org/en/theme-builder.html to generate theme */
277
- themeEntry?: {} | DataLink
278
- /* Theme of URL (.json) */
279
- themeUrl?: string | DataLink
280
- /* Theme of MD5 */
281
- themeMd5?: string | DataLink
282
- /* Title text */
283
- titleText?: string | DataLink
284
- /* Subtitle text */
285
- titleSubtext?: string | DataLink
286
- /* Full configuration of title, see https://echarts.apache.org/en/option.html#title */
287
- titleOptions?: {} | DataLink
288
- /* Show legend */
289
- legendShow?: boolean | DataLink
290
- /* Legend data */
291
- legendData?: Array<string | DataLink> | DataLink
292
- /* Full configuration of legend, see https://echarts.apache.org/en/option.html#legend */
293
- legendOptions?: {} | DataLink
294
- /* Show grid */
295
- gridShow?: boolean | DataLink
296
- /* Full configuration of grid, see https://echarts.apache.org/en/option.html#grid */
297
- gridOptions?: {} | DataLink
298
- /* Dataset (see https://echarts.apache.org/en/option.html#dataset) */
299
- dataset?: Array<any> | DataLink
300
- /* Show x axis */
301
- xAxisShow?: boolean | DataLink
302
- /* Type of x axis */
303
- xAxisType?: 'category' | 'value' | 'time' | 'log' | DataLink
304
- /* Name of x axis */
305
- xAxisName?: string | DataLink
306
- /* Data of x axis */
307
- xAxisData?: Array<string | DataLink> | DataLink
308
- /* Full configuration of x axis, see https://echarts.apache.org/en/option.html#xAxis */
309
- xAxisOptions?: {} | DataLink
310
- /* Show y axis */
311
- yAxisShow?: boolean | DataLink
312
- /* Type of x axis */
313
- yAxisType?: 'value' | 'category' | 'time' | 'log' | DataLink
314
- /* Name of x axis */
315
- yAxisName?: string | DataLink
316
- /* Data of y axis */
317
- yAxisData?: Array<string | DataLink> | DataLink
318
- /* Full configuration of y axis, see https://echarts.apache.org/en/option.html#yAxis */
319
- yAxisOptions?: {} | DataLink
320
- /* Show axis pointer */
321
- axisPointerShow?: boolean | DataLink
322
- /* Full configuration of axis pointer, see https://echarts.apache.org/en/option.html#axisPointer */
323
- axisPointerOptions?: {} | DataLink
324
- /* data series (see https://echarts.apache.org/en/option.html#series-line) */
325
- series?: Array<any> | DataLink
326
- /* Show tooltip */
327
- tooltipShow?: boolean | DataLink
328
- /* Trigger type of tooltip */
329
- tooltipTrigger?: 'item' | 'axis' | 'none' | DataLink
330
- /* data series (see https://echarts.apache.org/en/option.html#tooltip) */
331
- tooltipOptions?: {} | DataLink
332
- /* Full configuration of options, see https://echarts.apache.org/en/option.html */
333
- options?: {} | DataLink
334
- }
335
- events?: BrickBasicEvents & {
336
- /* Event of chart render */
337
- onRender?: Array<EventAction>
338
- /* Event of data point on press */
339
- onPress?: Array<EventAction<string & keyof TemplateEventPropsMap['Chart']['onPress']>>
340
- /* Event of legend select changed */
341
- onLegendSelectChanged?: Array<
342
- EventAction<string & keyof TemplateEventPropsMap['Chart']['onLegendSelectChanged']>
343
- >
344
- }
345
- animation?: AnimationBasicEvents & {
346
- onRender?: AnimationOrGetter
347
- onPress?: AnimationOrGetter
348
- onLegendSelectChanged?: AnimationOrGetter
349
- }
350
- }
351
-
352
- /* Chart brick, based on [Apache ECharts](https://echarts.apache.org/en/index.html). */
353
- export type BrickChart = Brick &
354
- BrickChartDef & {
355
- templateKey: 'BRICK_CHART'
356
- switches?: Array<
357
- SwitchDef &
358
- BrickChartDef & {
359
- conds?: Array<{
360
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
361
- cond:
362
- | SwitchCondInnerStateCurrentCanvas
363
- | SwitchCondData
364
- | {
365
- __typename: 'SwitchCondInnerStateOutlet'
366
- outlet: ''
367
- value: any
368
- }
369
- }>
370
- }
371
- >
372
- }
@@ -1,290 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Generative Media brick - Generate images and videos using AI
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- interface GenerativeMediaDef {
21
- /*
22
- Default property:
23
- {
24
- "enableCache": true,
25
- "type": "image",
26
- "resizeMode": "cover",
27
- "provider": "openai",
28
- "openaiModel": "dall-e-3",
29
- "freepikClassicImageSize": "square_1_1",
30
- "geminiVeoModel": "veo-3.1-generate-preview",
31
- "geminiVeoResolution": "720p",
32
- "geminiVeoDuration": 8
33
- }
34
- */
35
- property?: BrickBasicProperty & {
36
- /* The text prompt to generate media from */
37
- prompt?: string | DataLink
38
- /* Enable cache */
39
- enableCache?: boolean | DataLink
40
- /* The type of media to generate (image or video) */
41
- type?: 'image' | 'video' | DataLink
42
- /* Default image to display when no generated image is available */
43
- defaultImage?: string | DataLink
44
- /* The hash of the default image */
45
- defaultImageHash?: string | DataLink
46
- /* The type of the default image hash */
47
- defaultImageHashType?: 'md5' | 'sha1' | 'sha256' | DataLink
48
- /* The Lottie animation to show while generating */
49
- loadingAnimation?: string | DataLink
50
- /* The Lottie animation to show when an error occurs */
51
- errorAnimation?: string | DataLink
52
- /* The resize mode for the generated media */
53
- resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
54
- /* The API key for the generative media service */
55
- apiKey?: string | DataLink
56
- /* The AI provider to use for generation (openai, freepik-classic, deepai, or gemini) */
57
- provider?: 'openai' | 'freepik-classic' | 'deepai' | 'gemini' | DataLink
58
- /* OpenAI model to use for image generation */
59
- openaiModel?: 'dall-e-3' | 'gpt-image-1.5' | 'gpt-image-2' | DataLink
60
- /* OpenAI image size. DALL-E 3 uses 1024x1024, 1024x1792, or 1792x1024; GPT Image models use 1024x1024, 1024x1536, 1536x1024, auto, and GPT Image 2 supports larger listed sizes. */
61
- openaiSize?:
62
- | '1024x1024'
63
- | '1024x1792'
64
- | '1792x1024'
65
- | '1024x1536'
66
- | '1536x1024'
67
- | '2048x2048'
68
- | '2048x1152'
69
- | '3840x2160'
70
- | '2160x3840'
71
- | 'auto'
72
- | DataLink
73
- /* OpenAI image style for DALL-E 3 (vivid or natural) */
74
- openaiStyle?: 'vivid' | 'natural' | DataLink
75
- /* OpenAI image quality. DALL-E 3 uses standard or hd; GPT Image models use low, medium, high, or auto. */
76
- openaiQuality?: 'standard' | 'hd' | 'low' | 'medium' | 'high' | 'auto' | DataLink
77
- /* Freepik image size */
78
- freepikClassicImageSize?:
79
- | 'square_1_1'
80
- | 'classic_4_3'
81
- | 'traditional_3_4'
82
- | 'widescreen_16_9'
83
- | 'social_story_9_16'
84
- | 'smartphone_horizontal_20_9'
85
- | 'smartphone_vertical_9_20'
86
- | 'standard_3_2'
87
- | 'portrait_2_3'
88
- | 'horizontal_2_1'
89
- | 'vertical_1_2'
90
- | 'social_5_4'
91
- | 'social_post_4_5'
92
- | DataLink
93
- /* Freepik image style */
94
- freepikClassicStyle?:
95
- | 'photo'
96
- | 'digital-art'
97
- | '3d'
98
- | 'painting'
99
- | 'low-poly'
100
- | 'pixel-art'
101
- | 'anime'
102
- | 'cyberpunk'
103
- | 'comic'
104
- | 'vintage'
105
- | 'cartoon'
106
- | 'vector'
107
- | 'studio-shot'
108
- | 'dark'
109
- | 'sketch'
110
- | 'mockup'
111
- | '2000s-pone'
112
- | '70s-vibe'
113
- | 'watercolor'
114
- | 'art-nouveau'
115
- | 'origami'
116
- | 'surreal'
117
- | 'fantasy'
118
- | 'traditional-japan'
119
- | DataLink
120
- /* Freepik color scheme */
121
- freepikClassicStyleColor?:
122
- | 'b&w'
123
- | 'pastel'
124
- | 'sepia'
125
- | 'dramatic'
126
- | 'vibrant'
127
- | 'orange&teal'
128
- | 'film-filter'
129
- | 'split'
130
- | 'electric'
131
- | 'pastel-pink'
132
- | 'gold-glow'
133
- | 'autumn'
134
- | 'muted-green'
135
- | 'deep-teal'
136
- | 'duotone'
137
- | 'terracotta&teal'
138
- | 'red&blue'
139
- | 'cold-neon'
140
- | 'burgundy&blue'
141
- | DataLink
142
- /* Freepik lighting style */
143
- freepikClassicStyleLighting?:
144
- | 'studio'
145
- | 'warm'
146
- | 'cinematic'
147
- | 'volumetric'
148
- | 'golden-hour'
149
- | 'long-exposure'
150
- | 'cold'
151
- | 'iridescent'
152
- | 'dramatic'
153
- | 'hardlight'
154
- | 'redscale'
155
- | 'indoor-light'
156
- | DataLink
157
- /* Freepik framing style */
158
- freepikClassicStyleFraming?:
159
- | 'portrait'
160
- | 'macro'
161
- | 'panoramic'
162
- | 'aerial-view'
163
- | 'close-up'
164
- | 'cinematic'
165
- | 'high-angle'
166
- | 'low-angle'
167
- | 'symmetry'
168
- | 'fish-eye'
169
- | 'first-person'
170
- | DataLink
171
- /* Freepik guidance scale (level of fidelity to prompt) */
172
- freepikClassicGuidanceScale?: number | DataLink
173
- /* Freepik negative prompt (attributes to avoid) */
174
- freepikClassicNegativePrompt?: string | DataLink
175
- /* DeepAI negative prompt (attributes to avoid) */
176
- deepaiNegativePrompt?: string | DataLink
177
- /* DeepAI image generator version */
178
- deepaiImageGeneratorVersion?: 'standard' | 'hd' | DataLink
179
- /* DeepAI output image width */
180
- deepaiWidth?: number | DataLink
181
- /* DeepAI output image height */
182
- deepaiHeight?: number | DataLink
183
- /* Gemini aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3) */
184
- geminiAspectRatio?: '1:1' | '16:9' | '9:16' | '3:2' | '2:3' | DataLink
185
- /* Gemini model to use for image generation */
186
- geminiModel?: 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | DataLink
187
- /* Gemini Veo model to use for video generation */
188
- geminiVeoModel?: 'veo-3.1-generate-preview' | 'veo-3.1-fast-generate-preview' | DataLink
189
- /* Gemini Veo video resolution (720p or 1080p) */
190
- geminiVeoResolution?: '720p' | '1080p' | DataLink
191
- /* Gemini Veo video duration in seconds (4, 6, 8) */
192
- geminiVeoDuration?: 4 | 6 | 8 | DataLink
193
- /* Gemini Veo negative prompt (attributes to avoid) */
194
- geminiVeoNegativePrompt?: string | DataLink
195
- /* Gemini Veo person generation control */
196
- geminiVeoPersonGeneration?: 'allow_all' | 'allow_adult' | DataLink
197
- }
198
- events?: BrickBasicEvents & {
199
- /* Event of the brick press */
200
- generativeMediaOnPress?: Array<EventAction>
201
- /* Event of the brick press in */
202
- generativeMediaOnPressIn?: Array<EventAction>
203
- /* Event of the brick press out */
204
- generativeMediaOnPressOut?: Array<EventAction>
205
- /* Event of the brick long press */
206
- generativeMediaOnLongPress?: Array<EventAction>
207
- /* Event of the brick focus (Use TV Device with controller) */
208
- generativeMediaOnFocus?: Array<EventAction>
209
- /* Event of the brick blur (Use TV Device with controller) */
210
- generativeMediaOnBlur?: Array<EventAction>
211
- /* Event when media generation succeeds */
212
- onSuccess?: Array<
213
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['onSuccess']>
214
- >
215
- /* Event when media generation fails */
216
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['onError']>>
217
- /* Event when media prompt request starts */
218
- promptStart?: Array<
219
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['promptStart']>
220
- >
221
- /* Event when media prompt request succeeds */
222
- promptSuccess?: Array<
223
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['promptSuccess']>
224
- >
225
- /* Event when media prompt request fails */
226
- promptError?: Array<
227
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['promptError']>
228
- >
229
- /* Event when media loading starts */
230
- loadStart?: Array<EventAction>
231
- /* Event when media loading succeeds */
232
- loadSuccess?: Array<
233
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['loadSuccess']>
234
- >
235
- /* Event when media loading fails */
236
- loadError?: Array<
237
- EventAction<string & keyof TemplateEventPropsMap['GenerativeMedia']['loadError']>
238
- >
239
- }
240
- outlets?: {
241
- /* Brick is pressing */
242
- brickPressing?: () => Data<boolean>
243
- /* Brick is focusing (Use TV Device with controller) */
244
- brickFocusing?: () => Data<boolean>
245
- /* Generated media URL */
246
- url?: () => Data<string>
247
- /* Generated media error */
248
- error?: () => Data<string>
249
- /* Loading state */
250
- loading?: () => Data<boolean>
251
- }
252
- animation?: AnimationBasicEvents & {
253
- generativeMediaOnPress?: AnimationOrGetter
254
- generativeMediaOnPressIn?: AnimationOrGetter
255
- generativeMediaOnPressOut?: AnimationOrGetter
256
- generativeMediaOnLongPress?: AnimationOrGetter
257
- generativeMediaOnFocus?: AnimationOrGetter
258
- generativeMediaOnBlur?: AnimationOrGetter
259
- onSuccess?: AnimationOrGetter
260
- onError?: AnimationOrGetter
261
- promptStart?: AnimationOrGetter
262
- promptSuccess?: AnimationOrGetter
263
- promptError?: AnimationOrGetter
264
- loadStart?: AnimationOrGetter
265
- loadSuccess?: AnimationOrGetter
266
- loadError?: AnimationOrGetter
267
- }
268
- }
269
-
270
- /* Generative Media brick - Generate images and videos using AI */
271
- export type GenerativeMedia = Brick &
272
- GenerativeMediaDef & {
273
- templateKey: 'BRICK_GENERATIVE_MEDIA'
274
- switches?: Array<
275
- SwitchDef &
276
- GenerativeMediaDef & {
277
- conds?: Array<{
278
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
279
- cond:
280
- | SwitchCondInnerStateCurrentCanvas
281
- | SwitchCondData
282
- | {
283
- __typename: 'SwitchCondInnerStateOutlet'
284
- outlet: 'brickPressing' | 'brickFocusing' | 'url' | 'error' | 'loading'
285
- value: any
286
- }
287
- }>
288
- }
289
- >
290
- }