@fugood/bricks-ctor 2.25.0-beta.8 → 2.25.0-beta.81

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 (137) hide show
  1. package/package.json +4 -24
  2. package/tools/__tests__/legacy-forwarder.test.js +91 -0
  3. package/tools/_forward.ts +26 -0
  4. package/tools/deploy.ts +3 -164
  5. package/tools/mcp-server.ts +3 -27
  6. package/tools/postinstall.ts +3 -234
  7. package/tools/pull.ts +3 -121
  8. package/tools/push-config.ts +4 -0
  9. package/tools/simulator.ts +4 -0
  10. package/compile/__tests__/index.test.js +0 -115
  11. package/compile/action-name-map.ts +0 -1015
  12. package/compile/index.ts +0 -1458
  13. package/compile/util.ts +0 -358
  14. package/index.ts +0 -6
  15. package/skills/bricks-ctor/SKILL.md +0 -32
  16. package/skills/bricks-ctor/rules/animation.md +0 -160
  17. package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
  18. package/skills/bricks-ctor/rules/automations.md +0 -221
  19. package/skills/bricks-ctor/rules/buttress.md +0 -156
  20. package/skills/bricks-ctor/rules/data-calculation.md +0 -209
  21. package/skills/bricks-ctor/rules/local-sync.md +0 -129
  22. package/skills/bricks-ctor/rules/media-flow.md +0 -158
  23. package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
  24. package/skills/bricks-ctor/rules/standby-transition.md +0 -124
  25. package/skills/bricks-design/LICENSE.txt +0 -180
  26. package/skills/bricks-design/SKILL.md +0 -66
  27. package/skills/rive-marketplace/SKILL.md +0 -99
  28. package/tools/_git-author.ts +0 -29
  29. package/tools/_shell.ts +0 -173
  30. package/tools/icons/.gitattributes +0 -1
  31. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  32. package/tools/icons/fa6pro-meta.json +0 -1
  33. package/tools/mcp-tools/compile.ts +0 -92
  34. package/tools/mcp-tools/huggingface.ts +0 -762
  35. package/tools/mcp-tools/icons.ts +0 -81
  36. package/tools/mcp-tools/lottie.ts +0 -102
  37. package/tools/mcp-tools/media.ts +0 -110
  38. package/tools/preview-main.mjs +0 -306
  39. package/tools/preview.ts +0 -150
  40. package/types/animation.ts +0 -111
  41. package/types/automation.ts +0 -235
  42. package/types/brick-base.ts +0 -80
  43. package/types/bricks/Camera.ts +0 -246
  44. package/types/bricks/Chart.ts +0 -372
  45. package/types/bricks/GenerativeMedia.ts +0 -290
  46. package/types/bricks/Icon.ts +0 -98
  47. package/types/bricks/Image.ts +0 -126
  48. package/types/bricks/Items.ts +0 -476
  49. package/types/bricks/Lottie.ts +0 -168
  50. package/types/bricks/Maps.ts +0 -262
  51. package/types/bricks/QrCode.ts +0 -117
  52. package/types/bricks/Rect.ts +0 -150
  53. package/types/bricks/RichText.ts +0 -128
  54. package/types/bricks/Rive.ts +0 -220
  55. package/types/bricks/Sketch.ts +0 -254
  56. package/types/bricks/Slideshow.ts +0 -201
  57. package/types/bricks/Svg.ts +0 -99
  58. package/types/bricks/Text.ts +0 -148
  59. package/types/bricks/TextInput.ts +0 -242
  60. package/types/bricks/Video.ts +0 -175
  61. package/types/bricks/VideoStreaming.ts +0 -112
  62. package/types/bricks/WebRtcStream.ts +0 -65
  63. package/types/bricks/WebView.ts +0 -168
  64. package/types/bricks/index.ts +0 -22
  65. package/types/canvas.ts +0 -82
  66. package/types/common.ts +0 -144
  67. package/types/data-calc-command.ts +0 -7005
  68. package/types/data-calc-script.ts +0 -21
  69. package/types/data-calc.ts +0 -11
  70. package/types/data.ts +0 -95
  71. package/types/generators/AlarmClock.ts +0 -110
  72. package/types/generators/Assistant.ts +0 -621
  73. package/types/generators/BleCentral.ts +0 -247
  74. package/types/generators/BlePeripheral.ts +0 -208
  75. package/types/generators/CanvasMap.ts +0 -74
  76. package/types/generators/CastlesPay.ts +0 -87
  77. package/types/generators/DataBank.ts +0 -160
  78. package/types/generators/File.ts +0 -432
  79. package/types/generators/GraphQl.ts +0 -132
  80. package/types/generators/Http.ts +0 -222
  81. package/types/generators/HttpServer.ts +0 -176
  82. package/types/generators/Information.ts +0 -103
  83. package/types/generators/Intent.ts +0 -168
  84. package/types/generators/Iterator.ts +0 -108
  85. package/types/generators/Keyboard.ts +0 -105
  86. package/types/generators/LlmAnthropicCompat.ts +0 -212
  87. package/types/generators/LlmAppleBuiltin.ts +0 -159
  88. package/types/generators/LlmGgml.ts +0 -861
  89. package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
  90. package/types/generators/LlmMlx.ts +0 -227
  91. package/types/generators/LlmOnnx.ts +0 -213
  92. package/types/generators/LlmOpenAiCompat.ts +0 -312
  93. package/types/generators/LlmQualcommAiEngine.ts +0 -247
  94. package/types/generators/Mcp.ts +0 -637
  95. package/types/generators/McpServer.ts +0 -289
  96. package/types/generators/MediaFlow.ts +0 -170
  97. package/types/generators/MqttBroker.ts +0 -141
  98. package/types/generators/MqttClient.ts +0 -141
  99. package/types/generators/Question.ts +0 -408
  100. package/types/generators/RealtimeTranscription.ts +0 -287
  101. package/types/generators/RerankerGgml.ts +0 -191
  102. package/types/generators/SerialPort.ts +0 -151
  103. package/types/generators/SoundPlayer.ts +0 -94
  104. package/types/generators/SoundRecorder.ts +0 -130
  105. package/types/generators/SpeechToTextGgml.ts +0 -419
  106. package/types/generators/SpeechToTextOnnx.ts +0 -236
  107. package/types/generators/SpeechToTextPlatform.ts +0 -85
  108. package/types/generators/SqLite.ts +0 -159
  109. package/types/generators/Step.ts +0 -107
  110. package/types/generators/SttAppleBuiltin.ts +0 -130
  111. package/types/generators/Tcp.ts +0 -126
  112. package/types/generators/TcpServer.ts +0 -147
  113. package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
  114. package/types/generators/TextToSpeechGgml.ts +0 -221
  115. package/types/generators/TextToSpeechOnnx.ts +0 -178
  116. package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
  117. package/types/generators/ThermalPrinter.ts +0 -191
  118. package/types/generators/Tick.ts +0 -83
  119. package/types/generators/Udp.ts +0 -120
  120. package/types/generators/VadGgml.ts +0 -250
  121. package/types/generators/VadOnnx.ts +0 -231
  122. package/types/generators/VadTraditional.ts +0 -138
  123. package/types/generators/VectorStore.ts +0 -257
  124. package/types/generators/Watchdog.ts +0 -107
  125. package/types/generators/WebCrawler.ts +0 -103
  126. package/types/generators/WebRtc.ts +0 -181
  127. package/types/generators/WebSocket.ts +0 -148
  128. package/types/generators/index.ts +0 -57
  129. package/types/index.ts +0 -13
  130. package/types/subspace.ts +0 -60
  131. package/types/switch.ts +0 -51
  132. package/types/system.ts +0 -707
  133. package/utils/__tests__/id.test.js +0 -58
  134. package/utils/calc.ts +0 -126
  135. package/utils/data.ts +0 -497
  136. package/utils/event-props.ts +0 -886
  137. package/utils/id.ts +0 -80
@@ -1,476 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Data-driven list/grid. Maps items array to brick templates via propertyMapping, with pagination and detail mode support
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } 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
- /* prev page */
21
- export type BrickItemsActionPrevPage = Action & {
22
- __actionName: 'BRICK_ITEMS_PREV_PAGE'
23
- }
24
-
25
- /* next page */
26
- export type BrickItemsActionNextPage = Action & {
27
- __actionName: 'BRICK_ITEMS_NEXT_PAGE'
28
- }
29
-
30
- /* jump page */
31
- export type BrickItemsActionJumpPage = ActionWithParams & {
32
- __actionName: 'BRICK_ITEMS_JUMP_PAGE'
33
- params?: Array<{
34
- input: 'pageIndex'
35
- value?: number | DataLink | EventProperty
36
- mapping?: string
37
- }>
38
- }
39
-
40
- /* open detail */
41
- export type BrickItemsActionOpenDetail = ActionWithParams & {
42
- __actionName: 'BRICK_ITEMS_OPEN_DETAIL'
43
- params?: Array<{
44
- input: 'detailIndex'
45
- value?: number | DataLink | EventProperty
46
- mapping?: string
47
- }>
48
- }
49
-
50
- /* back list */
51
- export type BrickItemsActionBackList = Action & {
52
- __actionName: 'BRICK_ITEMS_BACK_LIST'
53
- }
54
-
55
- /* Trigger dynamic animation of item by data id or index */
56
- export type BrickItemsActionDynamicAnimation = ActionWithParams & {
57
- __actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION'
58
- params?: Array<
59
- | {
60
- input: 'mode'
61
- value?: 'list' | 'detail' | DataLink | EventProperty
62
- mapping?: string
63
- }
64
- | {
65
- input: 'brickId'
66
- value?: string | DataLink | EventProperty
67
- mapping?: string
68
- }
69
- | {
70
- input: 'dataId'
71
- value?: string | DataLink | EventProperty
72
- mapping?: string
73
- }
74
- | {
75
- input: 'index'
76
- value?: number | DataLink | EventProperty
77
- mapping?: string
78
- }
79
- | {
80
- input: 'animationId'
81
- value?: string | DataLink | (() => Animation) | EventProperty
82
- mapping?: string
83
- }
84
- | {
85
- input: 'animationType'
86
- value?: 'once' | 'loop' | DataLink | EventProperty
87
- mapping?: string
88
- }
89
- | {
90
- input: 'animationResetInitialValue'
91
- value?: boolean | DataLink | EventProperty
92
- mapping?: string
93
- }
94
- >
95
- }
96
-
97
- /* Reset dynamic action of item by data id or index */
98
- export type BrickItemsActionDynamicAnimationReset = ActionWithParams & {
99
- __actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION_RESET'
100
- params?: Array<
101
- | {
102
- input: 'mode'
103
- value?: 'list' | 'detail' | DataLink | EventProperty
104
- mapping?: string
105
- }
106
- | {
107
- input: 'brickId'
108
- value?: string | DataLink | EventProperty
109
- mapping?: string
110
- }
111
- | {
112
- input: 'dataId'
113
- value?: string | DataLink | EventProperty
114
- mapping?: string
115
- }
116
- | {
117
- input: 'index'
118
- value?: number | DataLink | EventProperty
119
- mapping?: string
120
- }
121
- >
122
- }
123
-
124
- /* Stop dynamic action of item by data id or index */
125
- export type BrickItemsActionDynamicAnimationStop = ActionWithParams & {
126
- __actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION_STOP'
127
- params?: Array<
128
- | {
129
- input: 'mode'
130
- value?: 'list' | 'detail' | DataLink | EventProperty
131
- mapping?: string
132
- }
133
- | {
134
- input: 'brickId'
135
- value?: string | DataLink | EventProperty
136
- mapping?: string
137
- }
138
- | {
139
- input: 'dataId'
140
- value?: string | DataLink | EventProperty
141
- mapping?: string
142
- }
143
- | {
144
- input: 'index'
145
- value?: number | DataLink | EventProperty
146
- mapping?: string
147
- }
148
- >
149
- }
150
-
151
- interface BrickItemsDef {
152
- /*
153
- Default property:
154
- {
155
- "mode": "list",
156
- "items": [],
157
- "transformScriptEnabled": false,
158
- "transformScriptCode": "\/\* Global variable: inputs = { items, variables } \*\/\nreturn inputs.items",
159
- "transformScriptVariables": {},
160
- "postTransformScriptEnabled": false,
161
- "postTransformScriptCode": "\/\*\n * Global variable: inputs = {\n * itemsLength, // items data length\n * collections, // [{ index, item, renderList }] (all items data)\n * collectionsCurrentPage, // [{ index, item, renderList }] (current page items data)\n * renderList, // Flattened bricks of current page { frame: { x, y, width, height ... }, ... }\n * variables\n * }\n \*\/\nreturn inputs.renderList",
162
- "postTransformScriptVariables": {},
163
- "pageIndex": 0,
164
- "selectedItemIndex": 0,
165
- "allowPageOutOfBound": true,
166
- "standbySequenceInterval": 500,
167
- "standbySequenceRandom": 0,
168
- "brickEditWidth": 10,
169
- "brickEditHeight": 10,
170
- "detailBrickEditWidth": 50,
171
- "detailBrickEditHeight": 50,
172
- "orderMode": "horizontal",
173
- "resizeMode": "auto",
174
- "justifyContent": "start",
175
- "alignContent": "stretch",
176
- "detailResizeMode": "auto",
177
- "detailJustifyContent": "start",
178
- "detailAlignContent": "stretch"
179
- }
180
- */
181
- property?: BrickBasicProperty & {
182
- /* Set current display to `list` or `detail` mode */
183
- mode?: 'list' | 'detail' | DataLink
184
- /* Items to generate bricks for rendering */
185
- items?: Array<any> | DataLink
186
- /* Enable Transform Script */
187
- transformScriptEnabled?: boolean | DataLink
188
- /* Code of Transform Script */
189
- transformScriptCode?: string | DataLink
190
- /* Variables used in Transform Script (object) */
191
- transformScriptVariables?: {} | DataLink
192
- /* Enable Post Transform Script */
193
- postTransformScriptEnabled?: boolean | DataLink
194
- /* Code of Post Transform Script */
195
- postTransformScriptCode?: string | DataLink
196
- /* Variables used in Post Transform Script (object) */
197
- postTransformScriptVariables?: {} | DataLink
198
- /* Path to get item property for generate brick id instead of use index */
199
- dataKeyPath?: string | DataLink
200
- /* Items per page (Default: Items size) */
201
- itemsPerPage?: number | DataLink
202
- /* Current page index for `list` mode */
203
- pageIndex?: number | DataLink
204
- /* Current selected item index for `detail` mode */
205
- selectedItemIndex?: number | DataLink
206
- /* Allow page out of bound */
207
- allowPageOutOfBound?: boolean | DataLink
208
- /* Sequentially run Standby Transition for each item */
209
- standbySequenceEnabled?: boolean | DataLink
210
- /* Delay time (ms) between each item */
211
- standbySequenceInterval?: number | DataLink
212
- /* Random delay time (ms) increase or decrease between each item (e.g. if 100ms then delay time will be -100ms ~ 100ms) */
213
- standbySequenceRandom?: number | DataLink
214
- /* Define frame width of Brick List editor */
215
- brickEditWidth?: number | DataLink
216
- /* Define frame height of Brick List editor */
217
- brickEditHeight?: number | DataLink
218
- /* Define frame width of Brick List editor for detail mode */
219
- detailBrickEditWidth?: number | DataLink
220
- /* Define frame height of Brick List editor */
221
- detailBrickEditHeight?: number | DataLink
222
- /* order of horizontal first or vertical first */
223
- orderMode?: 'horizontal' | 'vertical' | DataLink
224
- /* Max horizontal item quantity */
225
- horizontalMaxQuantity?: number | DataLink
226
- /* Max vertical item quantity */
227
- verticalMaxQuantity?: number | DataLink
228
- /* Resize mode */
229
- resizeMode?: 'auto' | 'fix' | DataLink
230
- /* Justify Content */
231
- justifyContent?: 'start' | 'end' | 'center' | 'space-between' | 'space-around' | DataLink
232
- /* Align Content */
233
- alignContent?:
234
- | 'stretch'
235
- | 'start'
236
- | 'end'
237
- | 'center'
238
- | 'space-between'
239
- | 'space-around'
240
- | DataLink
241
- /* Resize mode for detail mode */
242
- detailResizeMode?: 'auto' | 'fix' | DataLink
243
- /* Align Content for detail mode */
244
- detailJustifyContent?: 'start' | 'end' | 'center' | DataLink
245
- /* Align Content for detail mode */
246
- detailAlignContent?: 'stretch' | 'start' | 'end' | 'center' | DataLink
247
- }
248
- /* Brick Definitions for render bricks for each item of `items` on `list` mode */
249
- brickList?:
250
- | Array<
251
- | DataLink
252
- | {
253
- title?: string | DataLink
254
- description?: string | DataLink
255
- hidden?: boolean | DataLink
256
- brickId?: string | DataLink
257
- brickIdPrefix?: string | DataLink
258
- templateKey?: string | DataLink
259
- property?: {} | DataLink
260
- animation?: {} | DataLink
261
- eventMap?: {} | DataLink
262
- outlet?: {} | DataLink
263
- stateGroup?: any
264
- propertyMapping?: {} | DataLink
265
- frame?:
266
- | DataLink
267
- | {
268
- x?: number | DataLink
269
- y?: number | DataLink
270
- width?: number | DataLink
271
- height?: number | DataLink
272
- standbyMode?: 'custom' | 'top' | 'bottom' | 'left' | 'right' | DataLink
273
- standbyFrame?: DataLink | {}
274
- standbyOpacity?: number | DataLink
275
- standbyDelay?: number | DataLink
276
- standbyDelayRandom?: number | DataLink
277
- standbyEasing?:
278
- | DataLink
279
- | {
280
- default?:
281
- | DataLink
282
- | {
283
- method?: string | DataLink
284
- duration?: number | DataLink
285
- }
286
- x?:
287
- | DataLink
288
- | {
289
- method?: string | DataLink
290
- duration?: number | DataLink
291
- }
292
- y?:
293
- | DataLink
294
- | {
295
- method?: string | DataLink
296
- duration?: number | DataLink
297
- }
298
- width?:
299
- | DataLink
300
- | {
301
- method?: string | DataLink
302
- duration?: number | DataLink
303
- }
304
- height?:
305
- | DataLink
306
- | {
307
- method?: string | DataLink
308
- duration?: number | DataLink
309
- }
310
- opacity?:
311
- | DataLink
312
- | {
313
- method?: string | DataLink
314
- duration?: number | DataLink
315
- }
316
- }
317
- showingDelay?: number | DataLink
318
- renderOutOfViewport?: boolean | DataLink
319
- }
320
- show?: string | DataLink
321
- pressToOpenDetail?: boolean | DataLink
322
- }
323
- >
324
- | DataLink
325
- /* Brick Definitions for render bricks for each item of `items` on `detail` mode */
326
- brickDetails?:
327
- | Array<
328
- | DataLink
329
- | {
330
- title?: string | DataLink
331
- description?: string | DataLink
332
- hidden?: boolean | DataLink
333
- brickId?: string | DataLink
334
- brickIdPrefix?: string | DataLink
335
- templateKey?: string | DataLink
336
- property?: {} | DataLink
337
- animation?: {} | DataLink
338
- eventMap?: {} | DataLink
339
- outlet?: {} | DataLink
340
- stateGroup?: any
341
- propertyMapping?: {} | DataLink
342
- frame?:
343
- | DataLink
344
- | {
345
- x?: number | DataLink
346
- y?: number | DataLink
347
- width?: number | DataLink
348
- height?: number | DataLink
349
- standbyMode?: 'custom' | 'top' | 'bottom' | 'left' | 'right' | DataLink
350
- standbyFrame?: DataLink | {}
351
- standbyOpacity?: number | DataLink
352
- standbyDelay?: number | DataLink
353
- standbyDelayRandom?: number | DataLink
354
- standbyEasing?:
355
- | DataLink
356
- | {
357
- default?:
358
- | DataLink
359
- | {
360
- method?: string | DataLink
361
- duration?: number | DataLink
362
- }
363
- x?:
364
- | DataLink
365
- | {
366
- method?: string | DataLink
367
- duration?: number | DataLink
368
- }
369
- y?:
370
- | DataLink
371
- | {
372
- method?: string | DataLink
373
- duration?: number | DataLink
374
- }
375
- width?:
376
- | DataLink
377
- | {
378
- method?: string | DataLink
379
- duration?: number | DataLink
380
- }
381
- height?:
382
- | DataLink
383
- | {
384
- method?: string | DataLink
385
- duration?: number | DataLink
386
- }
387
- opacity?:
388
- | DataLink
389
- | {
390
- method?: string | DataLink
391
- duration?: number | DataLink
392
- }
393
- }
394
- showingDelay?: number | DataLink
395
- renderOutOfViewport?: boolean | DataLink
396
- }
397
- show?: string | DataLink
398
- pressToBackList?: boolean | DataLink
399
- }
400
- >
401
- | DataLink
402
- events?: BrickBasicEventsForItem & {
403
- /* Event on page render finished */
404
- onPageRender?: Array<
405
- EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageRender']>
406
- >
407
- /* Event on page change. */
408
- onPageChange?: Array<
409
- EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageChange']>
410
- >
411
- /* Event on page index out of bound. */
412
- onPageOutOfBound?: Array<
413
- EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onPageOutOfBound']>
414
- >
415
- /* Event on into `detail` mode */
416
- onIntoDetailMode?: Array<
417
- EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onIntoDetailMode']>
418
- >
419
- /* Event on into `list` mode. */
420
- onIntoListMode?: Array<
421
- EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onIntoListMode']>
422
- >
423
- /* Event on render error */
424
- onError?: Array<EventActionForItem<string & keyof TemplateEventPropsMap['Items']['onError']>>
425
- }
426
- outlets?: {
427
- /* Catched error message */
428
- error?: () => Data<string>
429
- /* Current render mode */
430
- mode?: () => Data<string>
431
- /* Current page index */
432
- pageIndex?: () => Data<number>
433
- /* Current page size */
434
- pageSize?: () => Data<number>
435
- /* Selected item index of detail mode */
436
- selectedItemIndex?: () => Data<number>
437
- /* Page is out of bound */
438
- pageIsOutOfBound?: () => Data<boolean>
439
- }
440
- animation?: AnimationBasicEvents & {
441
- onPageRender?: Animation
442
- onPageChange?: Animation
443
- onPageOutOfBound?: Animation
444
- onIntoDetailMode?: Animation
445
- onIntoListMode?: Animation
446
- onError?: Animation
447
- }
448
- }
449
-
450
- /* Data-driven list/grid. Maps items array to brick templates via propertyMapping, with pagination and detail mode support */
451
- export type BrickItems = Brick &
452
- BrickItemsDef & {
453
- templateKey: 'BRICK_ITEMS'
454
- switches?: Array<
455
- SwitchDef &
456
- BrickItemsDef & {
457
- conds?: Array<{
458
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
459
- cond:
460
- | SwitchCondInnerStateCurrentCanvas
461
- | SwitchCondData
462
- | {
463
- __typename: 'SwitchCondInnerStateOutlet'
464
- outlet:
465
- | 'error'
466
- | 'mode'
467
- | 'pageIndex'
468
- | 'pageSize'
469
- | 'selectedItemIndex'
470
- | 'pageIsOutOfBound'
471
- value: any
472
- }
473
- }>
474
- }
475
- >
476
- }
@@ -1,168 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Lottie animation player supporting .json and .dotlottie formats. Supports speed, loop, frame range control, color/text filters, and hardware rendering
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } 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
- /* Play animation */
21
- export type BrickLottieActionPlay = ActionWithParams & {
22
- __actionName: 'BRICK_LOTTIE_PLAY'
23
- params?: Array<
24
- | {
25
- input: 'startFrame'
26
- value?: number | DataLink | EventProperty
27
- mapping?: string
28
- }
29
- | {
30
- input: 'endFrame'
31
- value?: number | DataLink | EventProperty
32
- mapping?: string
33
- }
34
- >
35
- }
36
-
37
- /* Pause animation */
38
- export type BrickLottieActionPause = Action & {
39
- __actionName: 'BRICK_LOTTIE_PAUSE'
40
- }
41
-
42
- /* Resume animation */
43
- export type BrickLottieActionResume = Action & {
44
- __actionName: 'BRICK_LOTTIE_RESUME'
45
- }
46
-
47
- /* Stop animation */
48
- export type BrickLottieActionStop = Action & {
49
- __actionName: 'BRICK_LOTTIE_STOP'
50
- }
51
-
52
- /* Reset animation */
53
- export type BrickLottieActionReset = Action & {
54
- __actionName: 'BRICK_LOTTIE_RESET'
55
- }
56
-
57
- interface BrickLottieDef {
58
- /*
59
- Default property:
60
- {
61
- "loop": true,
62
- "autoPlay": true,
63
- "resizeMode": "contain",
64
- "renderMode": "auto"
65
- }
66
- */
67
- property?: BrickBasicProperty & {
68
- /* The animation json config content from uri */
69
- uri?: string | DataLink
70
- /* The checksum of `uri` */
71
- md5?: string | DataLink
72
- /* The animation json config content(The `uri` will be ignored if `source` is defined) */
73
- source?: {} | DataLink
74
- /* The speed the animation will progress. This only affects the imperative API. Sending a negative value will reverse the animation. */
75
- speed?: number | DataLink
76
- /* A boolean flag indicating whether or not the animation should loop. */
77
- loop?: boolean | DataLink
78
- /* A boolean flag indicating whether or not the animation should start automatically when mounted. This only affects the imperative API. */
79
- autoPlay?: boolean | DataLink
80
- /* The animation resize mode */
81
- resizeMode?: 'cover' | 'contain' | 'center' | DataLink
82
- /* A flag to set whether or not to render with hardware or software acceleration (Not supported for iOS) */
83
- renderMode?: 'auto' | 'hardware' | 'software' | DataLink
84
- /* Replace color (as hex string) by keypath */
85
- colorFilters?:
86
- | Array<
87
- | DataLink
88
- | {
89
- keypath?: string | DataLink
90
- color?: string | DataLink
91
- }
92
- >
93
- | DataLink
94
- /* Replace color (as hex string) by find text. Use text filters will disable glyphs text render / force software render mode, This means that a specific font needs to be loaded. */
95
- textFilters?:
96
- | Array<
97
- | DataLink
98
- | {
99
- find?: string | DataLink
100
- replace?: string | DataLink
101
- }
102
- >
103
- | DataLink
104
- }
105
- events?: BrickBasicEvents & {
106
- /* Event of the brick press */
107
- onPress?: Array<EventAction>
108
- /* Event of the brick press in */
109
- onPressIn?: Array<EventAction>
110
- /* Event of the brick press out */
111
- onPressOut?: Array<EventAction>
112
- /* Event of the brick long press */
113
- onLongPress?: Array<EventAction>
114
- /* Event of the brick focus (Use TV Device with controller) */
115
- onFocus?: Array<EventAction>
116
- /* Event of the brick blur (Use TV Device with controller) */
117
- onBlur?: Array<EventAction>
118
- /* Event of the animation finished */
119
- onAnimationFinish?: Array<
120
- EventAction<string & keyof TemplateEventPropsMap['Lottie']['onAnimationFinish']>
121
- >
122
- /* Event of the uri on load failed */
123
- onAnimationFailure?: Array<
124
- EventAction<string & keyof TemplateEventPropsMap['Lottie']['onAnimationFailure']>
125
- >
126
- /* Event of the animation on loop */
127
- onAnimationLoop?: Array<EventAction>
128
- }
129
- outlets?: {
130
- /* Brick is pressing */
131
- brickPressing?: () => Data<boolean>
132
- /* Brick is focusing (Use TV Device with controller) */
133
- brickFocusing?: () => Data<boolean>
134
- }
135
- animation?: AnimationBasicEvents & {
136
- onPress?: Animation
137
- onPressIn?: Animation
138
- onPressOut?: Animation
139
- onLongPress?: Animation
140
- onFocus?: Animation
141
- onBlur?: Animation
142
- onAnimationFinish?: Animation
143
- onAnimationFailure?: Animation
144
- onAnimationLoop?: Animation
145
- }
146
- }
147
-
148
- /* Lottie animation player supporting .json and .dotlottie formats. Supports speed, loop, frame range control, color/text filters, and hardware rendering */
149
- export type BrickLottie = Brick &
150
- BrickLottieDef & {
151
- templateKey: 'BRICK_LOTTIE'
152
- switches?: Array<
153
- SwitchDef &
154
- BrickLottieDef & {
155
- conds?: Array<{
156
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
157
- cond:
158
- | SwitchCondInnerStateCurrentCanvas
159
- | SwitchCondData
160
- | {
161
- __typename: 'SwitchCondInnerStateOutlet'
162
- outlet: 'brickPressing' | 'brickFocusing'
163
- value: any
164
- }
165
- }>
166
- }
167
- >
168
- }