@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,112 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Brick video streaming component, supports RTSP / RTMP streaming.
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 BrickVideoStreamingDef {
21
- /*
22
- Default property:
23
- {
24
- "networkCaching": 300,
25
- "paused": false,
26
- "volume": 100,
27
- "muted": false,
28
- "replayTimeout": 500
29
- }
30
- */
31
- property?: BrickBasicProperty & {
32
- /* The video path list or single path (File, URL) */
33
- uri?: string | DataLink
34
- /* Set cache time from streaming (You can adjust according to network conditions), it will delay the playing. */
35
- networkCaching?: number | DataLink
36
- /* Controls whether the video is paused */
37
- paused?: boolean | DataLink
38
- /* Volume */
39
- volume?: number | DataLink
40
- /* Muted */
41
- muted?: boolean | DataLink
42
- /* Video Auto Aspect Ratio */
43
- autoAspectRatio?: boolean | DataLink
44
- /* Video Aspect Ratio */
45
- aspectRatio?: string | DataLink
46
- /* Repeat the video path list */
47
- repeat?: boolean | DataLink
48
- /* Replay on playing error */
49
- replayOnError?: boolean | DataLink
50
- /* Timeout to replay if repeat or replayOnError is true and video is end or error */
51
- replayTimeout?: number | DataLink
52
- }
53
- events?: BrickBasicEvents & {
54
- /* Event of the brick press */
55
- onPress?: Array<EventAction>
56
- /* Event of the brick press in */
57
- onPressIn?: Array<EventAction>
58
- /* Event of the brick press out */
59
- onPressOut?: Array<EventAction>
60
- /* Event of the brick long press */
61
- onLongPress?: Array<EventAction>
62
- /* Event of the brick focus (Use TV Device with controller) */
63
- onFocus?: Array<EventAction>
64
- /* Event of the brick blur (Use TV Device with controller) */
65
- onBlur?: Array<EventAction>
66
- /* Event on plays of path are end */
67
- onEnd?: Array<EventAction>
68
- /* Event on plays of path are end */
69
- onLoad?: Array<EventAction>
70
- /* Event of the video playing error */
71
- onError?: Array<EventAction>
72
- }
73
- outlets?: {
74
- /* Brick is pressing */
75
- brickPressing?: () => Data<boolean>
76
- /* Brick is focusing (Use TV Device with controller) */
77
- brickFocusing?: () => Data<boolean>
78
- }
79
- animation?: AnimationBasicEvents & {
80
- onPress?: AnimationOrGetter
81
- onPressIn?: AnimationOrGetter
82
- onPressOut?: AnimationOrGetter
83
- onLongPress?: AnimationOrGetter
84
- onFocus?: AnimationOrGetter
85
- onBlur?: AnimationOrGetter
86
- onEnd?: AnimationOrGetter
87
- onLoad?: AnimationOrGetter
88
- onError?: AnimationOrGetter
89
- }
90
- }
91
-
92
- /* Brick video streaming component, supports RTSP / RTMP streaming. */
93
- export type BrickVideoStreaming = Brick &
94
- BrickVideoStreamingDef & {
95
- templateKey: 'BRICK_VIDEO_STREAMING'
96
- switches?: Array<
97
- SwitchDef &
98
- BrickVideoStreamingDef & {
99
- conds?: Array<{
100
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
101
- cond:
102
- | SwitchCondInnerStateCurrentCanvas
103
- | SwitchCondData
104
- | {
105
- __typename: 'SwitchCondInnerStateOutlet'
106
- outlet: 'brickPressing' | 'brickFocusing'
107
- value: any
108
- }
109
- }>
110
- }
111
- >
112
- }
@@ -1,65 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Display WebRTC video/audio stream from a WebRTC generator connection
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 BrickWebRTCStreamDef {
21
- /*
22
- Default property:
23
- {
24
- "mirror": false,
25
- "resizeMode": "contain",
26
- "noStreamViewText": "no stream",
27
- "noStreamViewTextSize": 44,
28
- "noStreamViewTextColor": "#000"
29
- }
30
- */
31
- property?: BrickBasicProperty & {
32
- /* Mirror video */
33
- mirror?: boolean | DataLink
34
- /* The stream resize mode */
35
- resizeMode?: 'contain' | 'cover' | DataLink
36
- /* Show text content if no stream */
37
- noStreamViewText?: string | DataLink
38
- /* The font size of shown text content if no stream */
39
- noStreamViewTextSize?: number | DataLink
40
- /* The color of shown text content if no stream */
41
- noStreamViewTextColor?: string | DataLink
42
- }
43
- }
44
-
45
- /* Display WebRTC video/audio stream from a WebRTC generator connection */
46
- export type BrickWebRTCStream = Brick &
47
- BrickWebRTCStreamDef & {
48
- templateKey: 'BRICK_WEBRTC_STREAM'
49
- switches?: Array<
50
- SwitchDef &
51
- BrickWebRTCStreamDef & {
52
- conds?: Array<{
53
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
54
- cond:
55
- | SwitchCondInnerStateCurrentCanvas
56
- | SwitchCondData
57
- | {
58
- __typename: 'SwitchCondInnerStateOutlet'
59
- outlet: ''
60
- value: any
61
- }
62
- }>
63
- }
64
- >
65
- }
@@ -1,168 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Embedded web browser with JS injection, DOM query selectors, content cropping, navigation control, and permission management
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
- /* Run Javascript on the WebView */
21
- export type BrickWebViewActionInjectJavascript = ActionWithParams & {
22
- __actionName: 'BRICK_WEBVIEW_INJECT_JAVASCRIPT'
23
- params?: Array<{
24
- input: 'javascriptCode'
25
- value?: string | DataLink | EventProperty
26
- mapping?: string
27
- }>
28
- }
29
-
30
- /* Query selector on the WebView */
31
- export type BrickWebViewActionQuerySelector = ActionWithParams & {
32
- __actionName: 'BRICK_WEBVIEW_QUERY_SELECTOR'
33
- params?: Array<
34
- | {
35
- input: 'querySelector'
36
- value?: string | DataLink | EventProperty
37
- mapping?: string
38
- }
39
- | {
40
- input: 'expression'
41
- value?: string | DataLink | EventProperty
42
- mapping?: string
43
- }
44
- >
45
- }
46
-
47
- /* Do go forward on the WebView */
48
- export type BrickWebViewActionGoForward = Action & {
49
- __actionName: 'BRICK_WEBVIEW_GO_FORWARD'
50
- }
51
-
52
- /* Do go back on the webview */
53
- export type BrickWebViewActionGoBack = Action & {
54
- __actionName: 'BRICK_WEBVIEW_GO_BACK'
55
- }
56
-
57
- /* Do reload on the webview */
58
- export type BrickWebViewActionReload = Action & {
59
- __actionName: 'BRICK_WEBVIEW_RELOAD'
60
- }
61
-
62
- interface BrickWebViewDef {
63
- /*
64
- Default property:
65
- {
66
- "cropLeft": 0,
67
- "cropRight": 0,
68
- "cropTop": 0,
69
- "cropBottom": 0,
70
- "allowContentControl": true,
71
- "allowFileAccess": true,
72
- "domStorageEnabled": true,
73
- "cacheEnabled": true,
74
- "geolocationEnabled": true,
75
- "thirdPartyCookiesEnabled": true,
76
- "javaScriptEnabled": true,
77
- "scrollEnabled": true,
78
- "nestedScrollEnabled": true
79
- }
80
- */
81
- property?: BrickBasicProperty & {
82
- /* The WebView content URL */
83
- url?: string | DataLink
84
- /* The request headers to load content */
85
- headers?: Record<string, string | DataLink> | DataLink
86
- /* The request UserAgent */
87
- userAgent?: string | DataLink
88
- /* The webview content HTML (Use `url` first) */
89
- html?: string | DataLink
90
- /* Crop webview content left position (px) */
91
- cropLeft?: number | DataLink
92
- /* Crop webview content right position (px) */
93
- cropRight?: number | DataLink
94
- /* Crop webview content top position (px) */
95
- cropTop?: number | DataLink
96
- /* Crop webview content bottom position (px) */
97
- cropBottom?: number | DataLink
98
- /* Allow content control */
99
- allowContentControl?: boolean | DataLink
100
- /* List of origin strings to allow being navigated to. (Allowed all if not provided) */
101
- originAllowList?: Array<string | DataLink> | DataLink
102
- /* Allow file:// access */
103
- allowFileAccess?: boolean | DataLink
104
- /* Enable DOM Storage */
105
- domStorageEnabled?: boolean | DataLink
106
- /* Enable Cache */
107
- cacheEnabled?: boolean | DataLink
108
- /* Enable Geolocation */
109
- geolocationEnabled?: boolean | DataLink
110
- /* Enable Third Party Cookies */
111
- thirdPartyCookiesEnabled?: boolean | DataLink
112
- /* Enable JavaScript */
113
- javaScriptEnabled?: boolean | DataLink
114
- /* Inject JavaScript code */
115
- code?: string | DataLink
116
- /* Inject JavaScript code before content loaded */
117
- beforeContentLoaded?: string | DataLink
118
- /* Inject JavaScript code for main frame only (only `YES` supported for Android) */
119
- forMainFrameOnly?: boolean | DataLink
120
- /* Inject JavaScript code before content loaded for main frame only (only `YES` supported for Android) */
121
- beforeContentLoadedForMainFrameOnly?: boolean | DataLink
122
- /* Enable scroll in WebView */
123
- scrollEnabled?: boolean | DataLink
124
- /* Enable nested scroll in WebView (Android only) */
125
- nestedScrollEnabled?: boolean | DataLink
126
- }
127
- events?: BrickBasicEvents & {
128
- /* Event of the WebView on load */
129
- onLoad?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onLoad']>>
130
- /* Event when the WebView load fails */
131
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onError']>>
132
- /* Event of the webview on message by `window.ReactNativeWebView.postMessage` on you're injected javascript code */
133
- onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onMessage']>>
134
- }
135
- outlets?: {
136
- /* The result of the query selector action */
137
- queryResult?: () => Data<any>
138
- /* The error of the query selector action */
139
- queryError?: () => Data<string>
140
- }
141
- animation?: AnimationBasicEvents & {
142
- onLoad?: AnimationOrGetter
143
- onError?: AnimationOrGetter
144
- onMessage?: AnimationOrGetter
145
- }
146
- }
147
-
148
- /* Embedded web browser with JS injection, DOM query selectors, content cropping, navigation control, and permission management */
149
- export type BrickWebView = Brick &
150
- BrickWebViewDef & {
151
- templateKey: 'BRICK_WEBVIEW'
152
- switches?: Array<
153
- SwitchDef &
154
- BrickWebViewDef & {
155
- conds?: Array<{
156
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
157
- cond:
158
- | SwitchCondInnerStateCurrentCanvas
159
- | SwitchCondData
160
- | {
161
- __typename: 'SwitchCondInnerStateOutlet'
162
- outlet: 'queryResult' | 'queryError'
163
- value: any
164
- }
165
- }>
166
- }
167
- >
168
- }
@@ -1,23 +0,0 @@
1
- /* Auto generated by build script */
2
- export * from './Rect'
3
- export * from './Text'
4
- export * from './TextInput'
5
- export * from './RichText'
6
- export * from './Image'
7
- export * from './Svg'
8
- export * from './Icon'
9
- export * from './Video'
10
- export * from './VideoStreaming'
11
- export * from './QrCode'
12
- export * from './Slideshow'
13
- export * from './Chart'
14
- export * from './Items'
15
- export * from './Lottie'
16
- export * from './Rive'
17
- export * from './WebView'
18
- export * from './Camera'
19
- export * from './WebRtcStream'
20
- export * from './GenerativeMedia'
21
- export * from './Maps'
22
- export * from './Sketch'
23
- export * from './Scene3D'
package/types/canvas.d.ts DELETED
@@ -1,82 +0,0 @@
1
- /* Auto generated by build script */
2
- import type { Easing } from './animation'
3
- import type { Data, DataLink } from './data'
4
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
5
- import type { Brick, SubspaceID, EventAction } from './common'
6
-
7
- type StandbyEasing = {
8
- method: Easing
9
- duration: number
10
- }
11
-
12
- interface CanvasDef {
13
- property?: {
14
- /* The showing timeout of Canvas, need to set `Next Canvas ID` as well */
15
- showingTimeout?: number | DataLink
16
- /* Canvas ID for change next canvas on showing timeout */
17
- nextCanvasId?: string | DataLink | (() => Canvas)
18
- /* Background color of Canvas */
19
- backgroundColor?: string | DataLink
20
- /* Dismiss keyboard on press */
21
- dismissKeyboardOnPress?: boolean | DataLink
22
- }
23
- events?: {
24
- /* Event on Canvas first enter on Subspace */
25
- firstEnter?: Array<EventAction>
26
- /* Event on Canvas enter */
27
- enter?: Array<EventAction>
28
- /* Showing timeout event (If `Showing Timeout` is specified) */
29
- showingTimeout?: Array<EventAction>
30
- /* Event on Canvas exit */
31
- exit?: Array<EventAction>
32
- }
33
- }
34
-
35
- /* View renderer in subspace. */
36
- export type Canvas = CanvasDef & {
37
- __typename: 'Canvas'
38
- id: string
39
- alias?: string
40
- title?: string
41
- description?: string
42
- hideShortRef?: boolean
43
- switches?: Array<
44
- SwitchDef &
45
- CanvasDef & {
46
- conds?: Array<{
47
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
48
- cond: SwitchCondInnerStateCurrentCanvas | SwitchCondData
49
- }>
50
- }
51
- >
52
- items: Array<{
53
- item: (() => Brick) | SubspaceID
54
- frame: {
55
- x: number
56
- y: number
57
- width: number
58
- height: number
59
- standbyMode?: 'custom' | 'top' | 'left' | 'right' | 'bottom'
60
- standbyFrame?: {
61
- x?: number
62
- y?: number
63
- width?: number
64
- height?: number
65
- }
66
- standbyOpacity?: number
67
- standbyDelay?: number
68
- standbyDelayRandom?: number
69
- standbyEasing?: {
70
- default?: StandbyEasing
71
- x?: StandbyEasing
72
- y?: StandbyEasing
73
- width?: StandbyEasing
74
- height?: StandbyEasing
75
- opacity?: StandbyEasing
76
- }
77
- showingDelay?: number
78
- renderOutOfViewport?: boolean
79
- }
80
- hidden?: boolean // Hide in Editor
81
- }>
82
- }
package/types/common.d.ts DELETED
@@ -1,141 +0,0 @@
1
- import type { SwitchDef } from './switch'
2
- import type { Data } from './data'
3
- import type { Subspace } from './subspace'
4
- import type { AutomationMap } from './automation'
5
-
6
- export interface Brick {
7
- __typename: 'Brick'
8
- id: string
9
- alias?: string
10
- templateKey: string
11
- title?: string
12
- description?: string
13
- hideShortRef?: boolean
14
- property?: {}
15
- events?: {}
16
- outlets?: {}
17
- animation?: {}
18
- switches?: Array<SwitchDef>
19
- }
20
-
21
- export type LocalSyncStrategy = 'main-only' | 'minor-only'
22
-
23
- export interface Generator {
24
- __typename: 'Generator'
25
- id: string
26
- alias?: string
27
- templateKey: string
28
- title?: string
29
- description?: string
30
- hideShortRef?: boolean
31
- localSyncRunMode?: LocalSyncStrategy
32
- property?: {}
33
- events?: {}
34
- outlets?: {}
35
- switches?: Array<SwitchDef>
36
- }
37
-
38
- export type SubspaceID = string
39
- export type SubpsaceAction = string
40
-
41
- export type Action = {
42
- __actionName: string
43
- parent: 'Brick' | 'Generator' | 'Subspace' | 'System'
44
- name?: string
45
- }
46
-
47
- // For standalone action types where specific event properties are not known
48
- export type EventProperty = string
49
-
50
- export type ActionWithParams<EP extends string = string> = Action & {
51
- params?: Array<{
52
- input: string
53
- value?: any | EP
54
- mapping?: string
55
- }>
56
- }
57
-
58
- export type ActionWithDataParams<EP extends string = string> = Action & {
59
- dataParams?: Array<{
60
- input: () => Data
61
- value?: any | EP
62
- mapping?: string
63
- }>
64
- }
65
-
66
- export type ItemBrickID = string
67
-
68
- // EP carries available event property keys for this event context
69
- // Use: EventAction<string & keyof TemplateEventPropsMap['Name']['event']>
70
- export type EventAction<EP extends string = string> = {
71
- handler: 'system' | (() => Brick | Generator) | SubspaceID | ItemBrickID
72
- action: ActionWithParams<EP> | ActionWithDataParams<EP>
73
- waitAsync?: boolean
74
- }
75
-
76
- export type EventActionForItem<EP extends string = string> = {
77
- handler:
78
- | 'system'
79
- | (() => Brick | Generator | { brickId: string; templateKey: string })
80
- | SubspaceID
81
- | ItemBrickID
82
- action: Action
83
- waitAsync?: boolean
84
- }
85
-
86
- export type ApplicationFont = {
87
- name: string
88
- url: string
89
- md5?: string
90
- }
91
-
92
- export type ApplicationSettings = {
93
- internetReachabilityUrl?: string
94
- enableDataLock?: boolean
95
- showDeprecatedFeatures?: boolean
96
- enableUnstableFeatures?: boolean // enable_unstable_bricks
97
- runtimeCacheOptions?: {
98
- disabled?: boolean
99
- behavior?: 'initiative' | 'passive'
100
- retryAttemptForFailure?: number
101
- }
102
- tvOptions?: {
103
- disabledSelectable?: boolean
104
- selectableColor?: string
105
- selectableBorder?: {
106
- borderStyle?: 'solid' | 'dashed' | 'dotted'
107
- borderTopColor?: string
108
- borderLeftColor?: string
109
- borderRightColor?: string
110
- borderBottomColor?: string
111
- // BRICK Grid unit
112
- borderTopSize?: number
113
- borderLeftSize?: number
114
- borderRightSize?: number
115
- borderBottomSize?: number
116
- borderTopLeftRadius?: number
117
- borderTopRightRadius?: number
118
- borderBottomLeftRadius?: number
119
- borderBottomRightRadius?: number
120
- }
121
- }
122
- ai?: {
123
- useAnthropicApiKeySystemData?: boolean
124
- useOpenAiApiKeySystemData?: boolean
125
- useGeminiApiKeySystemData?: boolean
126
- }
127
- hideShortRefs?: boolean
128
- }
129
-
130
- export type Application = {
131
- name: string
132
- description?: string
133
- subspaces: Subspace[]
134
- rootSubspace: Subspace
135
- fonts?: ApplicationFont[]
136
- settings?: ApplicationSettings
137
- automationMap?: AutomationMap
138
- metadata?: {
139
- [key: string]: any
140
- }
141
- }
@@ -1,57 +0,0 @@
1
- /* Auto generated by build script */
2
- import type { Data } from '../data'
3
- import type { DataCalculation } from '../data-calc'
4
-
5
- // Shared helpers — every generated DataCommand{Name} reuses these to describe
6
- // its narrowed inputs/outputs, so the per-command files stay short.
7
- export type DataCalcInput<K extends string = string, T = any> = {
8
- key: K
9
- source: (() => DataCalculationData | DataCommand) | T
10
- sourceKey: string
11
- trigger?: boolean
12
- }
13
-
14
- export type DataCalcOutput<K extends string = string> = {
15
- key: K
16
- target: () => DataCalculationData | DataCommand
17
- targetKey: string
18
- }
19
-
20
- export interface DataCalculationData {
21
- __typename: 'DataCalculationData'
22
- title?: string
23
- description?: string
24
- hideShortRef?: boolean
25
- data: () => Data
26
- // 'change' is the only valid input port on a data node; the source must be
27
- // another node (no inline literals), hence `never` for the second type arg.
28
- inputs: Array<DataCalcInput<'change', never>>
29
- outputs: Array<DataCalcOutput<'value'>>
30
- }
31
-
32
- export interface DataCommand {
33
- __typename: 'DataCommand'
34
- __commandName: string
35
- id: string
36
- title?: string
37
- description?: string
38
- hideShortRef?: boolean
39
- inputs: Array<DataCalcInput>
40
- outputs: Array<DataCalcOutput>
41
- }
42
-
43
- export type DataCalculationMap = DataCalculation & {
44
- __typename: 'DataCalculationMap'
45
- nodes: Array<DataCalculationData | DataCommand>
46
- editorInfo: Array<{
47
- node: DataCalculationData | DataCommand
48
- position: { x: number; y: number }
49
- points: Array<{
50
- source: DataCalculationData | DataCommand
51
- sourceOutputKey: string
52
- target: DataCalculationData | DataCommand
53
- targetInputKey: string
54
- positions: Array<{ x: number; y: number }>
55
- }>
56
- }>
57
- }