@fugood/bricks-ctor 2.25.0-beta.7 → 2.25.0-beta.70

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 (135) 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/action-name-map.ts +0 -1015
  11. package/compile/index.ts +0 -1278
  12. package/compile/util.ts +0 -358
  13. package/index.ts +0 -6
  14. package/skills/bricks-ctor/SKILL.md +0 -32
  15. package/skills/bricks-ctor/rules/animation.md +0 -159
  16. package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
  17. package/skills/bricks-ctor/rules/automations.md +0 -221
  18. package/skills/bricks-ctor/rules/buttress.md +0 -156
  19. package/skills/bricks-ctor/rules/data-calculation.md +0 -209
  20. package/skills/bricks-ctor/rules/local-sync.md +0 -129
  21. package/skills/bricks-ctor/rules/media-flow.md +0 -158
  22. package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
  23. package/skills/bricks-ctor/rules/standby-transition.md +0 -124
  24. package/skills/bricks-design/LICENSE.txt +0 -180
  25. package/skills/bricks-design/SKILL.md +0 -66
  26. package/skills/rive-marketplace/SKILL.md +0 -99
  27. package/tools/_git-author.ts +0 -29
  28. package/tools/_shell.ts +0 -173
  29. package/tools/icons/.gitattributes +0 -1
  30. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  31. package/tools/icons/fa6pro-meta.json +0 -1
  32. package/tools/mcp-tools/compile.ts +0 -92
  33. package/tools/mcp-tools/huggingface.ts +0 -762
  34. package/tools/mcp-tools/icons.ts +0 -81
  35. package/tools/mcp-tools/lottie.ts +0 -102
  36. package/tools/mcp-tools/media.ts +0 -110
  37. package/tools/preview-main.mjs +0 -293
  38. package/tools/preview.ts +0 -150
  39. package/types/animation.ts +0 -100
  40. package/types/automation.ts +0 -235
  41. package/types/brick-base.ts +0 -80
  42. package/types/bricks/Camera.ts +0 -246
  43. package/types/bricks/Chart.ts +0 -372
  44. package/types/bricks/GenerativeMedia.ts +0 -290
  45. package/types/bricks/Icon.ts +0 -98
  46. package/types/bricks/Image.ts +0 -126
  47. package/types/bricks/Items.ts +0 -476
  48. package/types/bricks/Lottie.ts +0 -168
  49. package/types/bricks/Maps.ts +0 -262
  50. package/types/bricks/QrCode.ts +0 -117
  51. package/types/bricks/Rect.ts +0 -150
  52. package/types/bricks/RichText.ts +0 -128
  53. package/types/bricks/Rive.ts +0 -220
  54. package/types/bricks/Sketch.ts +0 -254
  55. package/types/bricks/Slideshow.ts +0 -201
  56. package/types/bricks/Svg.ts +0 -99
  57. package/types/bricks/Text.ts +0 -148
  58. package/types/bricks/TextInput.ts +0 -242
  59. package/types/bricks/Video.ts +0 -175
  60. package/types/bricks/VideoStreaming.ts +0 -112
  61. package/types/bricks/WebRtcStream.ts +0 -65
  62. package/types/bricks/WebView.ts +0 -168
  63. package/types/bricks/index.ts +0 -22
  64. package/types/canvas.ts +0 -82
  65. package/types/common.ts +0 -144
  66. package/types/data-calc-command.ts +0 -7005
  67. package/types/data-calc-script.ts +0 -21
  68. package/types/data-calc.ts +0 -11
  69. package/types/data.ts +0 -95
  70. package/types/generators/AlarmClock.ts +0 -110
  71. package/types/generators/Assistant.ts +0 -621
  72. package/types/generators/BleCentral.ts +0 -247
  73. package/types/generators/BlePeripheral.ts +0 -208
  74. package/types/generators/CanvasMap.ts +0 -74
  75. package/types/generators/CastlesPay.ts +0 -87
  76. package/types/generators/DataBank.ts +0 -160
  77. package/types/generators/File.ts +0 -432
  78. package/types/generators/GraphQl.ts +0 -132
  79. package/types/generators/Http.ts +0 -222
  80. package/types/generators/HttpServer.ts +0 -176
  81. package/types/generators/Information.ts +0 -103
  82. package/types/generators/Intent.ts +0 -168
  83. package/types/generators/Iterator.ts +0 -108
  84. package/types/generators/Keyboard.ts +0 -105
  85. package/types/generators/LlmAnthropicCompat.ts +0 -212
  86. package/types/generators/LlmAppleBuiltin.ts +0 -159
  87. package/types/generators/LlmGgml.ts +0 -861
  88. package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
  89. package/types/generators/LlmMlx.ts +0 -227
  90. package/types/generators/LlmOnnx.ts +0 -213
  91. package/types/generators/LlmOpenAiCompat.ts +0 -312
  92. package/types/generators/LlmQualcommAiEngine.ts +0 -247
  93. package/types/generators/Mcp.ts +0 -637
  94. package/types/generators/McpServer.ts +0 -289
  95. package/types/generators/MediaFlow.ts +0 -170
  96. package/types/generators/MqttBroker.ts +0 -141
  97. package/types/generators/MqttClient.ts +0 -141
  98. package/types/generators/Question.ts +0 -408
  99. package/types/generators/RealtimeTranscription.ts +0 -287
  100. package/types/generators/RerankerGgml.ts +0 -191
  101. package/types/generators/SerialPort.ts +0 -151
  102. package/types/generators/SoundPlayer.ts +0 -94
  103. package/types/generators/SoundRecorder.ts +0 -130
  104. package/types/generators/SpeechToTextGgml.ts +0 -419
  105. package/types/generators/SpeechToTextOnnx.ts +0 -236
  106. package/types/generators/SpeechToTextPlatform.ts +0 -85
  107. package/types/generators/SqLite.ts +0 -159
  108. package/types/generators/Step.ts +0 -107
  109. package/types/generators/SttAppleBuiltin.ts +0 -130
  110. package/types/generators/Tcp.ts +0 -126
  111. package/types/generators/TcpServer.ts +0 -147
  112. package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
  113. package/types/generators/TextToSpeechGgml.ts +0 -221
  114. package/types/generators/TextToSpeechOnnx.ts +0 -178
  115. package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
  116. package/types/generators/ThermalPrinter.ts +0 -191
  117. package/types/generators/Tick.ts +0 -83
  118. package/types/generators/Udp.ts +0 -120
  119. package/types/generators/VadGgml.ts +0 -250
  120. package/types/generators/VadOnnx.ts +0 -231
  121. package/types/generators/VadTraditional.ts +0 -138
  122. package/types/generators/VectorStore.ts +0 -257
  123. package/types/generators/Watchdog.ts +0 -107
  124. package/types/generators/WebCrawler.ts +0 -103
  125. package/types/generators/WebRtc.ts +0 -181
  126. package/types/generators/WebSocket.ts +0 -148
  127. package/types/generators/index.ts +0 -57
  128. package/types/index.ts +0 -13
  129. package/types/subspace.ts +0 -60
  130. package/types/switch.ts +0 -51
  131. package/types/system.ts +0 -707
  132. package/utils/calc.ts +0 -126
  133. package/utils/data.ts +0 -497
  134. package/utils/event-props.ts +0 -886
  135. package/utils/id.ts +0 -80
@@ -1,21 +0,0 @@
1
- /* Auto generated by build script */
2
- import type { Data } from './data'
3
- import type { DataCalculation } from './data-calc'
4
-
5
- export type DataCalculationScript = DataCalculation & {
6
- __typename: 'DataCalculationScript'
7
- note?: string
8
- enableAsync: boolean
9
- code: string
10
- inputs: Array<{
11
- data: () => Data
12
- key: string
13
- trigger?: boolean
14
- }>
15
- error: (() => Data) | null
16
- output: (() => Data) | null
17
- outputs: Array<{
18
- key: string
19
- data: () => Data
20
- }>
21
- }
@@ -1,11 +0,0 @@
1
- /* DataCalculation has two types: DataCalculationScript and DataCalculationMap */
2
- export interface DataCalculation {
3
- __typename: string
4
- id: string
5
- title?: string
6
- description?: string
7
- hideShortRef?: boolean
8
- // Auto: Run the calculation when inputs change and allow triggers. Careful with circular dependencies!
9
- // Manual: Only run the calculation when manually triggered by System Action PROPERTY_BANK_COMMAND
10
- triggerMode?: 'auto' | 'manual'
11
- }
package/types/data.ts DELETED
@@ -1,95 +0,0 @@
1
- /* Auto generated by build script */
2
- import type { SubspaceID, EventAction, LocalSyncStrategy } from './common'
3
-
4
- interface DataDef {
5
- events?: {
6
- /* Event on update */
7
- update?: Array<EventAction>
8
- /* Event on value change */
9
- valueChange?: Array<EventAction>
10
- /* Event on value change and value matched the `Hit Regex` */
11
- valueHit?: Array<EventAction>
12
- /* Event on value change and value `not` matched the `Hit Regex` */
13
- valueNotHit?: Array<EventAction>
14
- }
15
- }
16
-
17
- export type Data<T = any> = DataDef & {
18
- __typename: 'Data'
19
- id: string
20
- alias?: string
21
- title?: string
22
- description?: string
23
- hideShortRef?: boolean
24
- metadata?: {
25
- linked?: Array<SubspaceID>
26
- linkedFrom?: SubspaceID
27
- [key: string]: any
28
- }
29
- remoteUpdate?: { type: 'auto' | 'device-specific' } | { type: 'global-data'; id: string }
30
- // Determine how the property is changed via another subspaces.
31
- routing?: 'default' | 'read-only'
32
- // Persist data, so that the data will be keep after refresh.
33
- persistData?: boolean
34
- localSyncUpdateMode?: LocalSyncStrategy
35
- type: 'string' | 'number' | 'bool' | 'array' | 'object' | 'any'
36
- schema?: object
37
- hit_equal?: any
38
- hit_regex?: string
39
- kind?:
40
- | {
41
- type: 'id'
42
- idType?: 'brick' | 'generator' | 'canvas' | 'animation'
43
- }
44
- | {
45
- type: 'auto-generated-item-id'
46
- idType?: 'canvas'
47
- }
48
- | {
49
- type: 'unit'
50
- unit?: 'ms' | 'grid' | 'px'
51
- max?: number
52
- min?: number
53
- step?: number
54
- }
55
- | DataAssetKind
56
- | {
57
- type:
58
- | 'color'
59
- | 'datetime'
60
- | 'graphql'
61
- | 'rich-text-content'
62
- | 'sandbox-script'
63
- | 'llm-prompt'
64
- | 'llm-messages'
65
- | 'llm-tools'
66
- | 'mcp-server-resources'
67
- | 'mcp-server-tools'
68
- | 'mcp-server-prompts'
69
- }
70
- value: T
71
- }
72
-
73
- export type DataAssetKind = {
74
- type:
75
- | 'media-resource-image'
76
- | 'media-resource-video'
77
- | 'media-resource-audio'
78
- | 'media-resource-file'
79
- | 'lottie-file-uri'
80
- | 'rive-file-uri'
81
- | 'ggml-model-asset'
82
- | 'gguf-model-asset'
83
- | 'binary-asset'
84
- preload?: {
85
- type: 'url'
86
- hashType: 'md5' | 'sha256' | 'sha1'
87
- hash: string
88
- }
89
- metadata?: { [key: string]: any }
90
- }
91
-
92
- export type DataLink = {
93
- __typename: 'DataLink'
94
- data: () => Data
95
- }
@@ -1,110 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Schedule events using cron expressions (e.g. daily, hourly)
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Start the alarm clock */
19
- export type GeneratorAlarmClockActionStart = Action & {
20
- __actionName: 'GENERATOR_ALARM_CLOCK_START'
21
- }
22
-
23
- /* Pause the alarm clock */
24
- export type GeneratorAlarmClockActionPause = Action & {
25
- __actionName: 'GENERATOR_ALARM_CLOCK_PAUSE'
26
- }
27
-
28
- interface GeneratorAlarmClockDef {
29
- /*
30
- Default property:
31
- {
32
- "init": false,
33
- "timezone": "UTC",
34
- "cron": "* * * * *",
35
- "min": "",
36
- "hour": "",
37
- "dom": "",
38
- "mon": "",
39
- "dow": ""
40
- }
41
- */
42
- property?: {
43
- /* Start alarm clock on generator initialized */
44
- init?: boolean | DataLink
45
- /* Timezone */
46
- timezone?: string | DataLink
47
- /* Max count of alarm clock trigs */
48
- maxTrigs?: number | DataLink
49
- /* Time to start alarm clock */
50
- startAt?: string | DataLink | string | DataLink | DataLink
51
- /* Time to end alarm clock (Empty for not end) */
52
- stopAt?: string | DataLink | string | DataLink | DataLink
53
- /* Setting trigger rule by cron tab (Ref: https://crontab.guru/) */
54
- cron?: string | DataLink
55
- /* minute */
56
- min?: string | DataLink
57
- /* hour */
58
- hour?: string | DataLink
59
- /* day (month) */
60
- dom?: string | DataLink
61
- /* month */
62
- mon?: string | DataLink
63
- /* day (week) */
64
- dow?: string | DataLink
65
- }
66
- events?: {
67
- /* Event for cron rule is not invalid */
68
- onRuleInvalid?: Array<
69
- EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onRuleInvalid']>
70
- >
71
- /* Event for alarm clock start */
72
- onStart?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onStart']>>
73
- /* Event for alarm clock trig */
74
- onTrig?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onTrig']>>
75
- /* Event for alarm clock stop */
76
- onEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onEnd']>>
77
- }
78
- outlets?: {
79
- /* Current time of each alarm clock trig */
80
- trigTime?: () => Data<string>
81
- /* Current timestamp (unix time) of each alarm clock trig */
82
- trigTimestamp?: () => Data<string | number>
83
- /* Count of alarm clock trigs */
84
- trigCount?: () => Data<string | number>
85
- /* Is alarm clock running? */
86
- running?: () => Data<boolean | string | number>
87
- }
88
- }
89
-
90
- /* Schedule events using cron expressions (e.g. daily, hourly) */
91
- export type GeneratorAlarmClock = Generator &
92
- GeneratorAlarmClockDef & {
93
- templateKey: 'GENERATOR_ALARM_CLOCK'
94
- switches?: Array<
95
- SwitchDef &
96
- GeneratorAlarmClockDef & {
97
- conds?: Array<{
98
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
99
- cond:
100
- | SwitchCondInnerStateCurrentCanvas
101
- | SwitchCondData
102
- | {
103
- __typename: 'SwitchCondInnerStateOutlet'
104
- outlet: 'trigTime' | 'trigTimestamp' | 'trigCount' | 'running'
105
- value: any
106
- }
107
- }>
108
- }
109
- >
110
- }