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

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,99 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * SVG is an XML-based vector image format for 2D graphics
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
- interface BrickSvgDef {
21
- /*
22
- Default property:
23
- {
24
- "source": "",
25
- "uri": "",
26
- "renderMode": "general"
27
- }
28
- */
29
- property?: BrickBasicProperty & {
30
- /* The SVG XML content */
31
- source?: string | DataLink
32
- /* The svg source location (URL or LocalPath) */
33
- uri?: string | DataLink
34
- /* The checksum of file */
35
- md5?: string | DataLink
36
- /* The rules of replacing origin colour */
37
- colorMapping?:
38
- | Array<
39
- | DataLink
40
- | {
41
- findItem?: string | DataLink
42
- replaceItem?: string | DataLink
43
- }
44
- >
45
- | DataLink
46
- /* The render mode */
47
- renderMode?: 'general' | 'legacy' | DataLink
48
- }
49
- events?: BrickBasicEvents & {
50
- /* Event of the brick press */
51
- onPress?: Array<EventAction>
52
- /* Event of the brick press in */
53
- onPressIn?: Array<EventAction>
54
- /* Event of the brick press out */
55
- onPressOut?: Array<EventAction>
56
- /* Event of the brick long press */
57
- onLongPress?: Array<EventAction>
58
- /* Event of the brick focus (Use TV Device with controller) */
59
- onFocus?: Array<EventAction>
60
- /* Event of the brick blur (Use TV Device with controller) */
61
- onBlur?: Array<EventAction>
62
- }
63
- outlets?: {
64
- /* Brick is pressing */
65
- brickPressing?: () => Data<boolean>
66
- /* Brick is focusing (Use TV Device with controller) */
67
- brickFocusing?: () => Data<boolean>
68
- }
69
- animation?: AnimationBasicEvents & {
70
- onPress?: Animation
71
- onPressIn?: Animation
72
- onPressOut?: Animation
73
- onLongPress?: Animation
74
- onFocus?: Animation
75
- onBlur?: Animation
76
- }
77
- }
78
-
79
- /* SVG is an XML-based vector image format for 2D graphics */
80
- export type BrickSvg = Brick &
81
- BrickSvgDef & {
82
- templateKey: 'BRICK_SVG'
83
- switches?: Array<
84
- SwitchDef &
85
- BrickSvgDef & {
86
- conds?: Array<{
87
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
88
- cond:
89
- | SwitchCondInnerStateCurrentCanvas
90
- | SwitchCondData
91
- | {
92
- __typename: 'SwitchCondInnerStateOutlet'
93
- outlet: 'brickPressing' | 'brickFocusing'
94
- value: any
95
- }
96
- }>
97
- }
98
- >
99
- }
@@ -1,148 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Display styled text with font, color, alignment, and truncation controls
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
- interface BrickTextDef {
21
- /*
22
- Default property:
23
- {
24
- "text": "",
25
- "templateType": "${}",
26
- "color": "#000",
27
- "fontWeight": "normal",
28
- "fontStyle": "normal",
29
- "fontPadding": true,
30
- "fontSizeVector": 0.5,
31
- "lineNumber": 1,
32
- "textAlign": "center",
33
- "textAlignVertical": "center"
34
- }
35
- */
36
- property?: BrickBasicProperty & {
37
- /* The text content */
38
- text?: string | DataLink | number | DataLink | boolean | DataLink | string | DataLink | DataLink
39
- /* Data to be used in the text template (e.g. `Hello ${name}`). Supports nested data, such as `Hello ${user.name}`. */
40
- templateData?: {} | DataLink
41
- /* The text template type */
42
- templateType?: '${}' | '{{}}' | DataLink
43
- /* The text replacement (Regular Expression), can be multiple. */
44
- replace?:
45
- | Array<
46
- | DataLink
47
- | {
48
- regex?: string | DataLink
49
- replaceWith?: string | DataLink
50
- }
51
- >
52
- | DataLink
53
- /* The text color */
54
- color?: string | DataLink
55
- /* Specifies font weight. The values 'normal' and are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen. */
56
- fontWeight?:
57
- | 'normal'
58
- | 'bold'
59
- | '100'
60
- | '200'
61
- | '300'
62
- | '400'
63
- | '500'
64
- | '600'
65
- | '700'
66
- | '800'
67
- | '900'
68
- | DataLink
69
- /* The text font style */
70
- fontStyle?: 'normal' | 'italic' | DataLink
71
- /* The text font family */
72
- fontFamily?: string | DataLink
73
- /* [Android only] Set to No to remove extra font padding intended to make space for certain ascenders / descenders. */
74
- fontPadding?: boolean | DataLink
75
- /* The text font size (grid) */
76
- fontSize?: number | DataLink
77
- /* The text font size vector. If the font size is not specified, the font size will be calculated by the height of the text box. */
78
- fontSizeVector?: number | DataLink
79
- /* The text letter spacing (grid) */
80
- letterSpacing?: number | DataLink
81
- /* The line height of text content (grid) */
82
- lineHeight?: number | DataLink
83
- /* The line number limit of text content */
84
- lineNumber?: number | DataLink
85
- /* The text align */
86
- textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify' | DataLink
87
- /* The text align vertical */
88
- textAlignVertical?: 'auto' | 'top' | 'bottom' | 'center' | DataLink
89
- /* Enable vertical rendering */
90
- verticalRendering?: boolean | DataLink
91
- }
92
- events?: BrickBasicEvents & {
93
- /* Event of the brick press */
94
- onPress?: Array<EventAction>
95
- /* Event of the brick press in */
96
- onPressIn?: Array<EventAction>
97
- /* Event of the brick press out */
98
- onPressOut?: Array<EventAction>
99
- /* Event of the brick long press */
100
- onLongPress?: Array<EventAction>
101
- /* Event of the brick focus (Use TV Device with controller) */
102
- onFocus?: Array<EventAction>
103
- /* Event of the brick blur (Use TV Device with controller) */
104
- onBlur?: Array<EventAction>
105
- /* Event of the text content on change start */
106
- beforeValueChange?: Array<EventAction>
107
- /* Event of the text content on change end */
108
- valueChange?: Array<EventAction>
109
- }
110
- outlets?: {
111
- /* Brick is pressing */
112
- brickPressing?: () => Data<boolean>
113
- /* Brick is focusing (Use TV Device with controller) */
114
- brickFocusing?: () => Data<boolean>
115
- }
116
- animation?: AnimationBasicEvents & {
117
- onPress?: Animation
118
- onPressIn?: Animation
119
- onPressOut?: Animation
120
- onLongPress?: Animation
121
- onFocus?: Animation
122
- onBlur?: Animation
123
- beforeValueChange?: Animation
124
- valueChange?: Animation
125
- }
126
- }
127
-
128
- /* Display styled text with font, color, alignment, and truncation controls */
129
- export type BrickText = Brick &
130
- BrickTextDef & {
131
- templateKey: 'BRICK_TEXT'
132
- switches?: Array<
133
- SwitchDef &
134
- BrickTextDef & {
135
- conds?: Array<{
136
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
137
- cond:
138
- | SwitchCondInnerStateCurrentCanvas
139
- | SwitchCondData
140
- | {
141
- __typename: 'SwitchCondInnerStateOutlet'
142
- outlet: 'brickPressing' | 'brickFocusing'
143
- value: any
144
- }
145
- }>
146
- }
147
- >
148
- }
@@ -1,242 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Editable text input field with keyboard type, placeholder, and validation 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
- /* Focus TextInput */
21
- export type BrickTextInputActionFocus = Action & {
22
- __actionName: 'BRICK_TEXT_INPUT_FOCUS'
23
- }
24
-
25
- /* Blur TextInput */
26
- export type BrickTextInputActionBlur = Action & {
27
- __actionName: 'BRICK_TEXT_INPUT_BLUR'
28
- }
29
-
30
- /* Clear TextInput */
31
- export type BrickTextInputActionClear = Action & {
32
- __actionName: 'BRICK_TEXT_INPUT_CLEAR'
33
- }
34
-
35
- /* Reset TextInput to default value */
36
- export type BrickTextInputActionResetToDefault = Action & {
37
- __actionName: 'BRICK_TEXT_INPUT_RESET_TO_DEFAULT'
38
- }
39
-
40
- /* Focus the input and select text with regex or start/end */
41
- export type BrickTextInputActionSelectText = ActionWithParams & {
42
- __actionName: 'BRICK_TEXT_INPUT_SELECT_TEXT'
43
- params?: Array<
44
- | {
45
- input: 'regex'
46
- value?: string | DataLink | EventProperty
47
- mapping?: string
48
- }
49
- | {
50
- input: 'start'
51
- value?: number | DataLink | EventProperty
52
- mapping?: string
53
- }
54
- | {
55
- input: 'end'
56
- value?: number | DataLink | EventProperty
57
- mapping?: string
58
- }
59
- >
60
- }
61
-
62
- /* Set text value of the TextInput */
63
- export type BrickTextInputActionSetText = ActionWithParams & {
64
- __actionName: 'BRICK_TEXT_INPUT_SET_TEXT'
65
- params?: Array<{
66
- input: 'text'
67
- value?: string | DataLink | EventProperty
68
- mapping?: string
69
- }>
70
- }
71
-
72
- /* Append text value of the TextInput */
73
- export type BrickTextInputActionAppendText = ActionWithParams & {
74
- __actionName: 'BRICK_TEXT_INPUT_APPEND_TEXT'
75
- params?: Array<{
76
- input: 'text'
77
- value?: string | DataLink | EventProperty
78
- mapping?: string
79
- }>
80
- }
81
-
82
- /* Trigger regex */
83
- export type BrickTextInputActionTrySubmit = Action & {
84
- __actionName: 'BRICK_TEXT_INPUT_TRY_SUBMIT'
85
- }
86
-
87
- interface BrickTextInputDef {
88
- /*
89
- Default property:
90
- {
91
- "editable": true,
92
- "defaultValue": "",
93
- "color": "#000",
94
- "fontWeight": "normal",
95
- "fontStyle": "normal",
96
- "fontSizeVector": 0.5,
97
- "lineNumber": 1,
98
- "textAlign": "center",
99
- "textAlignVertical": "center",
100
- "keyboardType": "default",
101
- "returnKeyType": "done"
102
- }
103
- */
104
- property?: BrickBasicProperty & {
105
- /* Allow to edit */
106
- editable?: boolean | DataLink
107
- /* The default value of the text input */
108
- defaultValue?: string | DataLink
109
- /* The text color */
110
- color?: string | DataLink
111
- /* Specifies font weight. The values 'normal' and are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen. */
112
- fontWeight?:
113
- | 'normal'
114
- | 'bold'
115
- | '100'
116
- | '200'
117
- | '300'
118
- | '400'
119
- | '500'
120
- | '600'
121
- | '700'
122
- | '800'
123
- | '900'
124
- | DataLink
125
- /* The text font style */
126
- fontStyle?: 'normal' | 'italic' | DataLink
127
- /* The text font family */
128
- fontFamily?: string | DataLink
129
- /* The text font size (grid) */
130
- fontSize?: number | DataLink
131
- /* The text font size vector. If the font size is not specified, the font size will be calculated by the height of the text box. */
132
- fontSizeVector?: number | DataLink
133
- /* The text letter spacing (grid) */
134
- letterSpacing?: number | DataLink
135
- /* The line height of text content (grid) */
136
- lineHeight?: number | DataLink
137
- /* The line number limit of text content (Use 0 to unlimited) */
138
- lineNumber?: number | DataLink
139
- /* The text align */
140
- textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify' | DataLink
141
- /* The text align vertical */
142
- textAlignVertical?: 'auto' | 'top' | 'bottom' | 'center' | DataLink
143
- /* The placeholder text */
144
- placeholder?: string | DataLink
145
- /* Color of the placeholder text */
146
- placeholderTextColor?: string | DataLink
147
- /* Limits the maximum number of characters that can be entered */
148
- maxLength?: number | DataLink
149
- /* The virtual keyboard type */
150
- keyboardType?:
151
- | 'default'
152
- | 'number-pad'
153
- | 'decimal-pad'
154
- | 'numeric'
155
- | 'email-address'
156
- | 'phone-pad'
157
- | DataLink
158
- /* The virtual keyboard return key type The line number should be 1. */
159
- returnKeyType?: 'done' | 'go' | 'next' | 'search' | 'send' | DataLink
160
- /* Trigger event on input change after debounce time */
161
- debounce?: number | DataLink
162
- /* Regular Expression to match */
163
- regex?: string | DataLink
164
- /* The regex matching complete mode */
165
- completeMode?: 'allMatch' | 'oneMatch' | DataLink
166
- /* Auto submit when regex match */
167
- autoSubmitWhenMatch?: boolean | DataLink
168
- /* Blur TextInput on submit */
169
- blurOnSubmit?: boolean | DataLink
170
- }
171
- events?: BrickBasicEvents & {
172
- /* Event of the TextInput is focused */
173
- onFocus?: Array<EventAction>
174
- /* Event of the input field is blurred */
175
- onBlur?: Array<EventAction>
176
- /* Event of the TextInput is empty */
177
- onEmpty?: Array<EventAction>
178
- /* Event of the TextInput value change */
179
- onChange?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onChange']>>
180
- /* Event of the TextInput submit */
181
- onSubmit?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onSubmit']>>
182
- /* Event of the TextInput match regex (check every value change) */
183
- onMatch?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onMatch']>>
184
- /* Event of the TextInput not match regex (check every value change) */
185
- onNotMatch?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onNotMatch']>>
186
- /* Event of the TextInput not match regex (check every submit) */
187
- onResultNotMatch?: Array<
188
- EventAction<string & keyof TemplateEventPropsMap['TextInput']['onResultNotMatch']>
189
- >
190
- /* Event of the TextInput reach max length or match regex */
191
- onFullFill?: Array<EventAction>
192
- }
193
- outlets?: {
194
- /* The raw input */
195
- rawInput?: () => Data<any>
196
- /* The regex result */
197
- resultVariable?: () => Data<{ [key: string]: any }>
198
- /* Last key in */
199
- lastKey?: () => Data<any>
200
- /* Selection of the TextInput (start, end, text) */
201
- selection?: () => Data<{
202
- start?: number
203
- end?: number
204
- text?: string
205
- }>
206
- /* Selection text of the TextInput */
207
- selectionText?: () => Data<string>
208
- }
209
- animation?: AnimationBasicEvents & {
210
- onFocus?: Animation
211
- onBlur?: Animation
212
- onEmpty?: Animation
213
- onChange?: Animation
214
- onSubmit?: Animation
215
- onMatch?: Animation
216
- onNotMatch?: Animation
217
- onResultNotMatch?: Animation
218
- onFullFill?: Animation
219
- }
220
- }
221
-
222
- /* Editable text input field with keyboard type, placeholder, and validation support */
223
- export type BrickTextInput = Brick &
224
- BrickTextInputDef & {
225
- templateKey: 'BRICK_TEXT_INPUT'
226
- switches?: Array<
227
- SwitchDef &
228
- BrickTextInputDef & {
229
- conds?: Array<{
230
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
231
- cond:
232
- | SwitchCondInnerStateCurrentCanvas
233
- | SwitchCondData
234
- | {
235
- __typename: 'SwitchCondInnerStateOutlet'
236
- outlet: 'rawInput' | 'resultVariable' | 'lastKey' | 'selection' | 'selectionText'
237
- value: any
238
- }
239
- }>
240
- }
241
- >
242
- }
@@ -1,175 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Video playback with play/pause controls and streaming 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
- /* Play the video */
21
- export type BrickVideoActionPlay = Action & {
22
- __actionName: 'BRICK_VIDEO_PLAY'
23
- }
24
-
25
- /* Seek the video */
26
- export type BrickVideoActionSeek = ActionWithParams & {
27
- __actionName: 'BRICK_VIDEO_SEEK'
28
- params?: Array<
29
- | {
30
- input: 'seekTime'
31
- value?: number | DataLink | EventProperty
32
- mapping?: string
33
- }
34
- | {
35
- input: 'play'
36
- value?: boolean | DataLink | EventProperty
37
- mapping?: string
38
- }
39
- >
40
- }
41
-
42
- /* Pause the video */
43
- export type BrickVideoActionPause = Action & {
44
- __actionName: 'BRICK_VIDEO_PAUSE'
45
- }
46
-
47
- /* Replay the video */
48
- export type BrickVideoActionReplay = Action & {
49
- __actionName: 'BRICK_VIDEO_REPLAY'
50
- }
51
-
52
- /* Stop the video */
53
- export type BrickVideoActionStop = Action & {
54
- __actionName: 'BRICK_VIDEO_STOP'
55
- }
56
-
57
- interface BrickVideoDef {
58
- /*
59
- Default property:
60
- {
61
- "paused": false,
62
- "volume": 100,
63
- "muted": false,
64
- "progressUpdateInterval": 1000,
65
- "replayTimeout": 500,
66
- "renderMode": "auto"
67
- }
68
- */
69
- property?: BrickBasicProperty & {
70
- /* The video path list or single path (File, URL) */
71
- path?:
72
- | string
73
- | DataLink
74
- | DataLink
75
- | {
76
- url?: string | DataLink
77
- }
78
- | Array<
79
- | DataLink
80
- | {
81
- url?: string | DataLink
82
- }
83
- | string
84
- | DataLink
85
- | DataLink
86
- >
87
- | DataLink
88
- | DataLink
89
- /* The checksum of file */
90
- md5?: string | DataLink
91
- /* Controls whether the video is paused */
92
- paused?: boolean | DataLink
93
- /* Volume */
94
- volume?: number | DataLink
95
- /* Muted */
96
- muted?: boolean | DataLink
97
- /* Video resize mode */
98
- resizeMode?: 'contain' | 'cover' | 'stretch' | DataLink
99
- /* Repeat the video path list */
100
- repeat?: boolean | DataLink
101
- /* Progress Update Interval */
102
- progressUpdateInterval?: number | DataLink
103
- /* Replay on playing error */
104
- replayOnError?: boolean | DataLink
105
- /* Timeout to replay if repeat or replayOnError is true and video is end or error */
106
- replayTimeout?: number | DataLink
107
- /* Use what view type for render video (Auto / Texture or Surface). Notice: Although using surface has better performance, it also affects the Animation & Standby Transition used by itself */
108
- renderMode?: 'auto' | 'texture' | 'surface' | DataLink
109
- }
110
- events?: BrickBasicEvents & {
111
- /* Event of the brick press */
112
- onPress?: Array<EventAction>
113
- /* Event of the brick press in */
114
- onPressIn?: Array<EventAction>
115
- /* Event of the brick press out */
116
- onPressOut?: Array<EventAction>
117
- /* Event of the brick long press */
118
- onLongPress?: Array<EventAction>
119
- /* Event of the brick focus (Use TV Device with controller) */
120
- onFocus?: Array<EventAction>
121
- /* Event of the brick blur (Use TV Device with controller) */
122
- onBlur?: Array<EventAction>
123
- /* Event of the next video on change start */
124
- nextVideo?: Array<EventAction<string & keyof TemplateEventPropsMap['Video']['nextVideo']>>
125
- /* Event on plays of path are totally end */
126
- roundEnd?: Array<EventAction>
127
- /* Event on video load */
128
- onLoad?: Array<EventAction>
129
- /* Event of the video playing error */
130
- onError?: Array<EventAction>
131
- /* Event of the video progress interval */
132
- onProgress?: Array<EventAction<string & keyof TemplateEventPropsMap['Video']['onProgress']>>
133
- }
134
- outlets?: {
135
- /* Brick is pressing */
136
- brickPressing?: () => Data<boolean>
137
- /* Brick is focusing (Use TV Device with controller) */
138
- brickFocusing?: () => Data<boolean>
139
- }
140
- animation?: AnimationBasicEvents & {
141
- onPress?: Animation
142
- onPressIn?: Animation
143
- onPressOut?: Animation
144
- onLongPress?: Animation
145
- onFocus?: Animation
146
- onBlur?: Animation
147
- nextVideo?: Animation
148
- roundEnd?: Animation
149
- onLoad?: Animation
150
- onError?: Animation
151
- onProgress?: Animation
152
- }
153
- }
154
-
155
- /* Video playback with play/pause controls and streaming support */
156
- export type BrickVideo = Brick &
157
- BrickVideoDef & {
158
- templateKey: 'BRICK_VIDEO'
159
- switches?: Array<
160
- SwitchDef &
161
- BrickVideoDef & {
162
- conds?: Array<{
163
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
164
- cond:
165
- | SwitchCondInnerStateCurrentCanvas
166
- | SwitchCondData
167
- | {
168
- __typename: 'SwitchCondInnerStateOutlet'
169
- outlet: 'brickPressing' | 'brickFocusing'
170
- value: any
171
- }
172
- }>
173
- }
174
- >
175
- }