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

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 (192) hide show
  1. package/package.json +4 -28
  2. package/tools/__tests__/legacy-forwarder.test.js +91 -0
  3. package/tools/_forward.ts +26 -0
  4. package/tools/deploy.ts +3 -175
  5. package/tools/mcp-server.ts +3 -35
  6. package/tools/postinstall.ts +3 -291
  7. package/tools/pull.ts +3 -198
  8. package/tools/push-config.ts +3 -113
  9. package/tools/simulator.ts +3 -149
  10. package/compile/__tests__/config-diff.test.js +0 -100
  11. package/compile/__tests__/index.test.js +0 -461
  12. package/compile/__tests__/util.test.js +0 -450
  13. package/compile/action-name-map.ts +0 -1079
  14. package/compile/config-diff.ts +0 -155
  15. package/compile/index.ts +0 -1594
  16. package/compile/util.ts +0 -482
  17. package/index.ts +0 -6
  18. package/skills/bricks-ctor/SKILL.md +0 -38
  19. package/skills/bricks-ctor/references/animation.md +0 -160
  20. package/skills/bricks-ctor/references/architecture-patterns.md +0 -88
  21. package/skills/bricks-ctor/references/automations.md +0 -232
  22. package/skills/bricks-ctor/references/buttress.md +0 -245
  23. package/skills/bricks-ctor/references/data-calculation.md +0 -252
  24. package/skills/bricks-ctor/references/local-sync.md +0 -129
  25. package/skills/bricks-ctor/references/media-flow.md +0 -165
  26. package/skills/bricks-ctor/references/remote-data-bank.md +0 -196
  27. package/skills/bricks-ctor/references/simulator.md +0 -132
  28. package/skills/bricks-ctor/references/source-editing-tools.md +0 -81
  29. package/skills/bricks-ctor/references/standby-transition.md +0 -124
  30. package/skills/bricks-ctor/references/verification-toolchain.md +0 -200
  31. package/skills/bricks-design/SKILL.md +0 -171
  32. package/skills/bricks-design/references/architecture-truths.md +0 -132
  33. package/skills/bricks-design/references/avoiding-complexity.md +0 -91
  34. package/skills/bricks-design/references/design-critique.md +0 -195
  35. package/skills/bricks-design/references/design-languages.md +0 -265
  36. package/skills/bricks-design/references/performance.md +0 -116
  37. package/skills/bricks-design/references/presentation-and-slideshow.md +0 -137
  38. package/skills/bricks-design/references/translating-inputs.md +0 -152
  39. package/skills/bricks-design/references/variations-and-tweaks.md +0 -124
  40. package/skills/bricks-design/references/when-the-brief-is-branded.md +0 -284
  41. package/skills/bricks-design/references/when-the-brief-is-vague.md +0 -85
  42. package/skills/bricks-design/references/workflow.md +0 -134
  43. package/skills/bricks-ux/SKILL.md +0 -114
  44. package/skills/bricks-ux/references/accessibility.md +0 -162
  45. package/skills/bricks-ux/references/flow-states.md +0 -175
  46. package/skills/bricks-ux/references/interaction-archetypes.md +0 -189
  47. package/skills/bricks-ux/references/monitoring-screens.md +0 -153
  48. package/skills/bricks-ux/references/pressable-composition.md +0 -126
  49. package/skills/bricks-ux/references/user-journey.md +0 -168
  50. package/skills/bricks-ux/references/ux-critique.md +0 -256
  51. package/skills/rive-marketplace/SKILL.md +0 -99
  52. package/tools/__tests__/_cli-error.test.ts +0 -35
  53. package/tools/__tests__/_mcp-config.test.ts +0 -67
  54. package/tools/__tests__/pull.test.ts +0 -108
  55. package/tools/_cli-error.ts +0 -17
  56. package/tools/_edits-log.ts +0 -41
  57. package/tools/_git-author.ts +0 -37
  58. package/tools/_last-pushed-commit.ts +0 -28
  59. package/tools/_mcp-config.ts +0 -42
  60. package/tools/_shell.ts +0 -180
  61. package/tools/icons/.gitattributes +0 -1
  62. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  63. package/tools/icons/fa6pro-meta.json +0 -1
  64. package/tools/mcp-env.ts +0 -13
  65. package/tools/mcp-tools/__tests__/data-calc-editing.test.js +0 -516
  66. package/tools/mcp-tools/__tests__/entry-editing.test.js +0 -866
  67. package/tools/mcp-tools/__tests__/huggingface.test.ts +0 -49
  68. package/tools/mcp-tools/__tests__/icons.test.ts +0 -21
  69. package/tools/mcp-tools/__tests__/mcp-env.test.js +0 -19
  70. package/tools/mcp-tools/_editing-helpers.ts +0 -98
  71. package/tools/mcp-tools/_verify.ts +0 -50
  72. package/tools/mcp-tools/compile.ts +0 -104
  73. package/tools/mcp-tools/data-calc-editing.ts +0 -1311
  74. package/tools/mcp-tools/entry-editing.ts +0 -2297
  75. package/tools/mcp-tools/huggingface.ts +0 -772
  76. package/tools/mcp-tools/icons.ts +0 -97
  77. package/tools/mcp-tools/lottie.ts +0 -102
  78. package/tools/mcp-tools/media.ts +0 -113
  79. package/tools/simulator-main.mjs +0 -488
  80. package/tools/simulator-preload.cjs +0 -16
  81. package/types/animation.d.ts +0 -116
  82. package/types/automation.d.ts +0 -231
  83. package/types/brick-base.d.ts +0 -80
  84. package/types/bricks/Camera.d.ts +0 -246
  85. package/types/bricks/Chart.d.ts +0 -372
  86. package/types/bricks/GenerativeMedia.d.ts +0 -290
  87. package/types/bricks/Icon.d.ts +0 -98
  88. package/types/bricks/Image.d.ts +0 -126
  89. package/types/bricks/Items.d.ts +0 -480
  90. package/types/bricks/Lottie.d.ts +0 -168
  91. package/types/bricks/Maps.d.ts +0 -262
  92. package/types/bricks/QrCode.d.ts +0 -117
  93. package/types/bricks/Rect.d.ts +0 -150
  94. package/types/bricks/RichText.d.ts +0 -131
  95. package/types/bricks/Rive.d.ts +0 -220
  96. package/types/bricks/Scene3D.d.ts +0 -676
  97. package/types/bricks/Sketch.d.ts +0 -256
  98. package/types/bricks/Slideshow.d.ts +0 -201
  99. package/types/bricks/Svg.d.ts +0 -99
  100. package/types/bricks/Text.d.ts +0 -148
  101. package/types/bricks/TextInput.d.ts +0 -242
  102. package/types/bricks/Video.d.ts +0 -242
  103. package/types/bricks/VideoStreaming.d.ts +0 -112
  104. package/types/bricks/WebRtcStream.d.ts +0 -65
  105. package/types/bricks/WebView.d.ts +0 -168
  106. package/types/bricks/index.d.ts +0 -23
  107. package/types/canvas.d.ts +0 -82
  108. package/types/common.d.ts +0 -141
  109. package/types/data-calc-command/base.d.ts +0 -57
  110. package/types/data-calc-command/collection.d.ts +0 -418
  111. package/types/data-calc-command/color.d.ts +0 -432
  112. package/types/data-calc-command/constant.d.ts +0 -50
  113. package/types/data-calc-command/datetime.d.ts +0 -147
  114. package/types/data-calc-command/file.d.ts +0 -129
  115. package/types/data-calc-command/index.d.ts +0 -13
  116. package/types/data-calc-command/iteratee.d.ts +0 -23
  117. package/types/data-calc-command/logictype.d.ts +0 -190
  118. package/types/data-calc-command/math.d.ts +0 -275
  119. package/types/data-calc-command/object.d.ts +0 -119
  120. package/types/data-calc-command/sandbox.d.ts +0 -66
  121. package/types/data-calc-command/string.d.ts +0 -407
  122. package/types/data-calc-script.d.ts +0 -21
  123. package/types/data-calc.d.ts +0 -12
  124. package/types/data.d.ts +0 -97
  125. package/types/generators/AlarmClock.d.ts +0 -110
  126. package/types/generators/Assistant.d.ts +0 -640
  127. package/types/generators/BleCentral.d.ts +0 -247
  128. package/types/generators/BlePeripheral.d.ts +0 -208
  129. package/types/generators/CanvasMap.d.ts +0 -74
  130. package/types/generators/CastlesPay.d.ts +0 -87
  131. package/types/generators/DataBank.d.ts +0 -160
  132. package/types/generators/File.d.ts +0 -432
  133. package/types/generators/GraphQl.d.ts +0 -132
  134. package/types/generators/Http.d.ts +0 -222
  135. package/types/generators/HttpServer.d.ts +0 -230
  136. package/types/generators/Information.d.ts +0 -103
  137. package/types/generators/Intent.d.ts +0 -168
  138. package/types/generators/Iterator.d.ts +0 -108
  139. package/types/generators/Keyboard.d.ts +0 -105
  140. package/types/generators/LlmAnthropicCompat.d.ts +0 -212
  141. package/types/generators/LlmAppleBuiltin.d.ts +0 -159
  142. package/types/generators/LlmGgml.d.ts +0 -903
  143. package/types/generators/LlmMediaTekNeuroPilot.d.ts +0 -235
  144. package/types/generators/LlmMlx.d.ts +0 -228
  145. package/types/generators/LlmOnnx.d.ts +0 -213
  146. package/types/generators/LlmOpenAiCompat.d.ts +0 -312
  147. package/types/generators/LlmQualcommAiEngine.d.ts +0 -247
  148. package/types/generators/Mcp.d.ts +0 -637
  149. package/types/generators/McpServer.d.ts +0 -289
  150. package/types/generators/MediaFlow.d.ts +0 -170
  151. package/types/generators/MqttBroker.d.ts +0 -141
  152. package/types/generators/MqttClient.d.ts +0 -141
  153. package/types/generators/Question.d.ts +0 -408
  154. package/types/generators/RealtimeTranscription.d.ts +0 -287
  155. package/types/generators/RerankerGgml.d.ts +0 -195
  156. package/types/generators/SerialPort.d.ts +0 -151
  157. package/types/generators/SoundPlayer.d.ts +0 -94
  158. package/types/generators/SoundRecorder.d.ts +0 -139
  159. package/types/generators/SpeechToTextGgml.d.ts +0 -424
  160. package/types/generators/SpeechToTextOnnx.d.ts +0 -236
  161. package/types/generators/SpeechToTextPlatform.d.ts +0 -85
  162. package/types/generators/SqLite.d.ts +0 -159
  163. package/types/generators/Step.d.ts +0 -107
  164. package/types/generators/SttAppleBuiltin.d.ts +0 -153
  165. package/types/generators/Tcp.d.ts +0 -126
  166. package/types/generators/TcpServer.d.ts +0 -147
  167. package/types/generators/TextToSpeechAppleBuiltin.d.ts +0 -127
  168. package/types/generators/TextToSpeechGgml.d.ts +0 -221
  169. package/types/generators/TextToSpeechOnnx.d.ts +0 -178
  170. package/types/generators/TextToSpeechOpenAiLike.d.ts +0 -121
  171. package/types/generators/ThermalPrinter.d.ts +0 -193
  172. package/types/generators/Tick.d.ts +0 -83
  173. package/types/generators/Udp.d.ts +0 -120
  174. package/types/generators/VadGgml.d.ts +0 -260
  175. package/types/generators/VadOnnx.d.ts +0 -231
  176. package/types/generators/VadTraditional.d.ts +0 -138
  177. package/types/generators/VectorStore.d.ts +0 -257
  178. package/types/generators/Watchdog.d.ts +0 -107
  179. package/types/generators/WebCrawler.d.ts +0 -103
  180. package/types/generators/WebRtc.d.ts +0 -181
  181. package/types/generators/WebSocket.d.ts +0 -148
  182. package/types/generators/index.d.ts +0 -57
  183. package/types/index.d.ts +0 -13
  184. package/types/subspace.d.ts +0 -60
  185. package/types/switch.d.ts +0 -51
  186. package/types/system.d.ts +0 -707
  187. package/utils/__tests__/calc.test.js +0 -25
  188. package/utils/__tests__/id.test.js +0 -154
  189. package/utils/calc.ts +0 -130
  190. package/utils/data.ts +0 -495
  191. package/utils/event-props.ts +0 -912
  192. package/utils/id.ts +0 -133
@@ -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, 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 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?: AnimationOrGetter
118
- onPressIn?: AnimationOrGetter
119
- onPressOut?: AnimationOrGetter
120
- onLongPress?: AnimationOrGetter
121
- onFocus?: AnimationOrGetter
122
- onBlur?: AnimationOrGetter
123
- beforeValueChange?: AnimationOrGetter
124
- valueChange?: AnimationOrGetter
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, 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
- /* 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?: AnimationOrGetter
211
- onBlur?: AnimationOrGetter
212
- onEmpty?: AnimationOrGetter
213
- onChange?: AnimationOrGetter
214
- onSubmit?: AnimationOrGetter
215
- onMatch?: AnimationOrGetter
216
- onNotMatch?: AnimationOrGetter
217
- onResultNotMatch?: AnimationOrGetter
218
- onFullFill?: AnimationOrGetter
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,242 +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, 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
- /* 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
- "showSubtitles": true,
68
- "subtitleColor": "#FFFFFF",
69
- "subtitleBackgroundColor": "rgba(0, 0, 0, 0.6)",
70
- "subtitleFontSize": 2,
71
- "subtitlePosition": "bottom",
72
- "subtitleTextAlign": "center"
73
- }
74
- */
75
- property?: BrickBasicProperty & {
76
- /* The video path list or single path (File, URL) */
77
- path?:
78
- | string
79
- | DataLink
80
- | DataLink
81
- | {
82
- url?: string | DataLink
83
- }
84
- | Array<
85
- | DataLink
86
- | {
87
- url?: string | DataLink
88
- }
89
- | string
90
- | DataLink
91
- | DataLink
92
- >
93
- | DataLink
94
- | DataLink
95
- /* The checksum of file */
96
- md5?: string | DataLink
97
- /* Controls whether the video is paused */
98
- paused?: boolean | DataLink
99
- /* Volume */
100
- volume?: number | DataLink
101
- /* Muted */
102
- muted?: boolean | DataLink
103
- /* Video resize mode */
104
- resizeMode?: 'contain' | 'cover' | 'stretch' | DataLink
105
- /* Repeat the video path list */
106
- repeat?: boolean | DataLink
107
- /* Progress Update Interval */
108
- progressUpdateInterval?: number | DataLink
109
- /* Replay on playing error */
110
- replayOnError?: boolean | DataLink
111
- /* Timeout to replay if repeat or replayOnError is true and video is end or error */
112
- replayTimeout?: number | DataLink
113
- /* 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 */
114
- renderMode?: 'auto' | 'texture' | 'surface' | DataLink
115
- /* The subtitle file path list or single path (SRT/WebVTT), index-matched to the video path. Used when no inline subtitles are set for that video. */
116
- subtitlePath?:
117
- | string
118
- | DataLink
119
- | DataLink
120
- | {
121
- url?: string | DataLink
122
- }
123
- | Array<
124
- | DataLink
125
- | {
126
- url?: string | DataLink
127
- }
128
- | string
129
- | DataLink
130
- | DataLink
131
- >
132
- | DataLink
133
- | DataLink
134
- /* Inline subtitles per video, index-matched to the video path: each entry holds a `cues` list of { start, end, text } (start/end in seconds). Takes precedence over the subtitle file for that video. */
135
- subtitles?:
136
- | Array<
137
- | DataLink
138
- | {
139
- cues?:
140
- | Array<
141
- | DataLink
142
- | {
143
- start?: number | DataLink
144
- end?: number | DataLink
145
- text?: string | DataLink
146
- }
147
- >
148
- | DataLink
149
- }
150
- >
151
- | DataLink
152
- /* Render the subtitle overlay. Turn off to only trigger subtitle events without rendering text */
153
- showSubtitles?: boolean | DataLink
154
- /* Subtitle text color */
155
- subtitleColor?: string | DataLink
156
- /* Subtitle background color */
157
- subtitleBackgroundColor?: string | DataLink
158
- /* Subtitle font size, in grid units (same as Brick Text) */
159
- subtitleFontSize?: number | DataLink
160
- /* Subtitle font family */
161
- subtitleFontFamily?: string | DataLink
162
- /* Subtitle vertical position */
163
- subtitlePosition?: 'bottom' | 'top' | DataLink
164
- /* Subtitle text alignment */
165
- subtitleTextAlign?: 'left' | 'center' | 'right' | DataLink
166
- }
167
- events?: BrickBasicEvents & {
168
- /* Event of the brick press */
169
- onPress?: Array<EventAction>
170
- /* Event of the brick press in */
171
- onPressIn?: Array<EventAction>
172
- /* Event of the brick press out */
173
- onPressOut?: Array<EventAction>
174
- /* Event of the brick long press */
175
- onLongPress?: Array<EventAction>
176
- /* Event of the brick focus (Use TV Device with controller) */
177
- onFocus?: Array<EventAction>
178
- /* Event of the brick blur (Use TV Device with controller) */
179
- onBlur?: Array<EventAction>
180
- /* Event of the next video on change start */
181
- nextVideo?: Array<EventAction<string & keyof TemplateEventPropsMap['Video']['nextVideo']>>
182
- /* Event on plays of path are totally end */
183
- roundEnd?: Array<EventAction>
184
- /* Event on video load */
185
- onLoad?: Array<EventAction>
186
- /* Event of the video playing error */
187
- onError?: Array<EventAction>
188
- /* Event of the video progress interval */
189
- onProgress?: Array<EventAction<string & keyof TemplateEventPropsMap['Video']['onProgress']>>
190
- /* Event when a subtitle cue starts (appears) during playback */
191
- subtitleCueEnter?: Array<
192
- EventAction<string & keyof TemplateEventPropsMap['Video']['subtitleCueEnter']>
193
- >
194
- /* Event when a subtitle cue ends (disappears) during playback */
195
- subtitleCueExit?: Array<
196
- EventAction<string & keyof TemplateEventPropsMap['Video']['subtitleCueExit']>
197
- >
198
- }
199
- outlets?: {
200
- /* Brick is pressing */
201
- brickPressing?: () => Data<boolean>
202
- /* Brick is focusing (Use TV Device with controller) */
203
- brickFocusing?: () => Data<boolean>
204
- }
205
- animation?: AnimationBasicEvents & {
206
- onPress?: AnimationOrGetter
207
- onPressIn?: AnimationOrGetter
208
- onPressOut?: AnimationOrGetter
209
- onLongPress?: AnimationOrGetter
210
- onFocus?: AnimationOrGetter
211
- onBlur?: AnimationOrGetter
212
- nextVideo?: AnimationOrGetter
213
- roundEnd?: AnimationOrGetter
214
- onLoad?: AnimationOrGetter
215
- onError?: AnimationOrGetter
216
- onProgress?: AnimationOrGetter
217
- subtitleCueEnter?: AnimationOrGetter
218
- subtitleCueExit?: AnimationOrGetter
219
- }
220
- }
221
-
222
- /* Video playback with play/pause controls and streaming support */
223
- export type BrickVideo = Brick &
224
- BrickVideoDef & {
225
- templateKey: 'BRICK_VIDEO'
226
- switches?: Array<
227
- SwitchDef &
228
- BrickVideoDef & {
229
- conds?: Array<{
230
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
231
- cond:
232
- | SwitchCondInnerStateCurrentCanvas
233
- | SwitchCondData
234
- | {
235
- __typename: 'SwitchCondInnerStateOutlet'
236
- outlet: 'brickPressing' | 'brickFocusing'
237
- value: any
238
- }
239
- }>
240
- }
241
- >
242
- }