@fugood/bricks-project 2.25.0-beta.18 → 2.25.0-beta.20
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.
- package/compile/action-name-map.ts +56 -0
- package/compile/index.ts +6 -2
- package/package.json +2 -2
- package/package.json.bak +2 -2
- package/skills/bricks-design/SKILL.md +1 -1
- package/skills/bricks-design/references/architecture-truths.md +10 -3
- package/types/animation.ts +8 -3
- package/types/brick-base.ts +1 -1
- package/types/bricks/Camera.ts +8 -8
- package/types/bricks/Chart.ts +4 -4
- package/types/bricks/GenerativeMedia.ts +15 -15
- package/types/bricks/Icon.ts +7 -7
- package/types/bricks/Image.ts +9 -9
- package/types/bricks/Items.ts +7 -7
- package/types/bricks/Lottie.ts +10 -10
- package/types/bricks/Maps.ts +11 -11
- package/types/bricks/QrCode.ts +7 -7
- package/types/bricks/Rect.ts +7 -7
- package/types/bricks/RichText.ts +7 -7
- package/types/bricks/Rive.ts +9 -9
- package/types/bricks/Scene3D.ts +596 -0
- package/types/bricks/Sketch.ts +6 -6
- package/types/bricks/Slideshow.ts +7 -7
- package/types/bricks/Svg.ts +7 -7
- package/types/bricks/Text.ts +9 -9
- package/types/bricks/TextInput.ts +10 -10
- package/types/bricks/Video.ts +12 -12
- package/types/bricks/VideoStreaming.ts +10 -10
- package/types/bricks/WebRtcStream.ts +1 -1
- package/types/bricks/WebView.ts +4 -4
- package/types/bricks/index.ts +1 -0
- package/types/data.ts +2 -0
- package/utils/event-props.ts +17 -0
|
@@ -350,6 +350,62 @@ export const templateActionNameMap = {
|
|
|
350
350
|
strokeWidth: 'BRICK_SKETCH_STROKE_WIDTH',
|
|
351
351
|
},
|
|
352
352
|
},
|
|
353
|
+
BRICK_SCENE_3D: {
|
|
354
|
+
BRICK_SCENE_3D_ADD_OBJECT: {
|
|
355
|
+
objectId: 'BRICK_SCENE_3D_OBJECT_ID',
|
|
356
|
+
objectType: 'BRICK_SCENE_3D_OBJECT_TYPE',
|
|
357
|
+
objectUrl: 'BRICK_SCENE_3D_OBJECT_URL',
|
|
358
|
+
objectMd5: 'BRICK_SCENE_3D_OBJECT_MD5',
|
|
359
|
+
objectPosition: 'BRICK_SCENE_3D_OBJECT_POSITION',
|
|
360
|
+
objectRotation: 'BRICK_SCENE_3D_OBJECT_ROTATION',
|
|
361
|
+
objectScale: 'BRICK_SCENE_3D_OBJECT_SCALE',
|
|
362
|
+
objectColor: 'BRICK_SCENE_3D_OBJECT_COLOR',
|
|
363
|
+
},
|
|
364
|
+
BRICK_SCENE_3D_REMOVE_OBJECT: {
|
|
365
|
+
objectId: 'BRICK_SCENE_3D_OBJECT_ID',
|
|
366
|
+
},
|
|
367
|
+
BRICK_SCENE_3D_UPDATE_OBJECT: {
|
|
368
|
+
objectId: 'BRICK_SCENE_3D_OBJECT_ID',
|
|
369
|
+
objectPosition: 'BRICK_SCENE_3D_OBJECT_POSITION',
|
|
370
|
+
objectRotation: 'BRICK_SCENE_3D_OBJECT_ROTATION',
|
|
371
|
+
objectScale: 'BRICK_SCENE_3D_OBJECT_SCALE',
|
|
372
|
+
objectVisible: 'BRICK_SCENE_3D_OBJECT_VISIBLE',
|
|
373
|
+
objectColor: 'BRICK_SCENE_3D_OBJECT_COLOR',
|
|
374
|
+
},
|
|
375
|
+
BRICK_SCENE_3D_SET_CAMERA: {
|
|
376
|
+
cameraPosition: 'BRICK_SCENE_3D_CAMERA_POSITION',
|
|
377
|
+
cameraTarget: 'BRICK_SCENE_3D_CAMERA_TARGET',
|
|
378
|
+
cameraFov: 'BRICK_SCENE_3D_CAMERA_FOV',
|
|
379
|
+
cameraAnimateMs: 'BRICK_SCENE_3D_CAMERA_ANIMATE_MS',
|
|
380
|
+
},
|
|
381
|
+
BRICK_SCENE_3D_LOOK_AT: {
|
|
382
|
+
objectId: 'BRICK_SCENE_3D_OBJECT_ID',
|
|
383
|
+
},
|
|
384
|
+
BRICK_SCENE_3D_PLAY_ANIMATION: {
|
|
385
|
+
objectId: 'BRICK_SCENE_3D_OBJECT_ID',
|
|
386
|
+
animationName: 'BRICK_SCENE_3D_ANIMATION_NAME',
|
|
387
|
+
animationLoop: 'BRICK_SCENE_3D_ANIMATION_LOOP',
|
|
388
|
+
animationSpeed: 'BRICK_SCENE_3D_ANIMATION_SPEED',
|
|
389
|
+
},
|
|
390
|
+
BRICK_SCENE_3D_STOP_ANIMATION: {
|
|
391
|
+
objectId: 'BRICK_SCENE_3D_OBJECT_ID',
|
|
392
|
+
animationName: 'BRICK_SCENE_3D_ANIMATION_NAME',
|
|
393
|
+
},
|
|
394
|
+
BRICK_SCENE_3D_SET_BACKGROUND: {
|
|
395
|
+
backgroundColor: 'BRICK_SCENE_3D_BACKGROUND_COLOR',
|
|
396
|
+
backgroundHdrUrl: 'BRICK_SCENE_3D_BACKGROUND_HDR_URL',
|
|
397
|
+
backgroundMd5: 'BRICK_SCENE_3D_BACKGROUND_MD5',
|
|
398
|
+
},
|
|
399
|
+
BRICK_SCENE_3D_SET_CONTROLS: {
|
|
400
|
+
controlsEnabled: 'BRICK_SCENE_3D_CONTROLS_ENABLED',
|
|
401
|
+
controlsAutoRotate: 'BRICK_SCENE_3D_CONTROLS_AUTO_ROTATE',
|
|
402
|
+
controlsAutoRotateSpeed: 'BRICK_SCENE_3D_CONTROLS_AUTO_ROTATE_SPEED',
|
|
403
|
+
},
|
|
404
|
+
BRICK_SCENE_3D_SCREENSHOT: {
|
|
405
|
+
screenshotFormat: 'BRICK_SCENE_3D_SCREENSHOT_FORMAT',
|
|
406
|
+
screenshotQuality: 'BRICK_SCENE_3D_SCREENSHOT_QUALITY',
|
|
407
|
+
},
|
|
408
|
+
},
|
|
353
409
|
|
|
354
410
|
GENERATOR_FILE: {
|
|
355
411
|
GENERATOR_FILE_READ_CONTENT: {
|
package/compile/index.ts
CHANGED
|
@@ -154,11 +154,13 @@ const basicAnimationEvents = ['show', 'standby', 'breatheStart']
|
|
|
154
154
|
|
|
155
155
|
const compileAnimations = (
|
|
156
156
|
templateKey: string,
|
|
157
|
-
animations: { [key: string]: Animation },
|
|
157
|
+
animations: { [key: string]: Animation | (() => Animation) },
|
|
158
158
|
errorReference: string,
|
|
159
159
|
) =>
|
|
160
160
|
Object.entries(animations).reduce((acc, [key, animation]) => {
|
|
161
|
-
|
|
161
|
+
// Animation events accept either a direct Animation or a getter; unwrap.
|
|
162
|
+
const resolved = typeof animation === 'function' ? animation() : animation
|
|
163
|
+
const animationId = assertEntryId(resolved?.id, 'ANIMATION', errorReference)
|
|
162
164
|
acc[convertEventKey(basicAnimationEvents.includes(key) ? 'BRICK' : templateKey, key)] =
|
|
163
165
|
`ANIMATION#${animationId}`
|
|
164
166
|
return acc
|
|
@@ -483,6 +485,8 @@ const preloadTypes = [
|
|
|
483
485
|
'ggml-model-asset',
|
|
484
486
|
'gguf-model-asset',
|
|
485
487
|
'binary-asset',
|
|
488
|
+
'mlx-model-asset',
|
|
489
|
+
'scene3d-objects',
|
|
486
490
|
]
|
|
487
491
|
|
|
488
492
|
const compileKind = (kind: Data['kind']) => {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-project",
|
|
3
|
-
"version": "2.25.0-beta.
|
|
3
|
+
"version": "2.25.0-beta.20",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsc --noEmit",
|
|
7
7
|
"build": "bun scripts/build.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@fugood/bricks-cli": "^2.25.0-beta.
|
|
10
|
+
"@fugood/bricks-cli": "^2.25.0-beta.20",
|
|
11
11
|
"@huggingface/gguf": "^0.3.2",
|
|
12
12
|
"@iarna/toml": "^3.0.0",
|
|
13
13
|
"@modelcontextprotocol/sdk": "^1.15.0",
|
package/package.json.bak
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-ctor",
|
|
3
|
-
"version": "2.25.0-beta.
|
|
3
|
+
"version": "2.25.0-beta.20",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsc --noEmit",
|
|
7
7
|
"build": "bun scripts/build.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@fugood/bricks-cli": "^2.25.0-beta.
|
|
10
|
+
"@fugood/bricks-cli": "^2.25.0-beta.20",
|
|
11
11
|
"@huggingface/gguf": "^0.3.2",
|
|
12
12
|
"@iarna/toml": "^3.0.0",
|
|
13
13
|
"@modelcontextprotocol/sdk": "^1.15.0",
|
|
@@ -84,7 +84,7 @@ The load-bearing laws. Each is unpacked in [`references/architecture-truths.md`]
|
|
|
84
84
|
6. **Frames are grid units.** Off-grid placement is legal but only ever intentional (overflow effects, anchor-at-origin tricks). It is never a nudge to escape the grid. Bricks fully outside the grid are auto-culled.
|
|
85
85
|
7. **Standby Transition is part of the design language.** Every visible Brick gets an entrance offset (`standbyMode` + `standbyOpacity` + `standbyDelay`); the runtime's auto-tween handles in-flight motion. Snap-cuts are reserved for emphasis (alarm states), never for routine navigation.
|
|
86
86
|
8. **Subspace is a typed module.** Inputs are call-by-value-on-host-change; outlets emit update + value-change events on the host. Extract a Subspace only when the same flow appears 2+ times or when the boundary scopes Data meaningfully — never as a "tidy up" tactic.
|
|
87
|
-
9. **DataCalculation is for derivation
|
|
87
|
+
9. **DataCalculation is for derivation, not orchestration.** Inputs → outputs via DataCalculationScript or DataCalculationMap. Keep scripts pure by default; `enableAsync: true` (Promise / timers / async libs) and Map `FILE_*` commands are available when derivation genuinely needs them. Network calls, navigation, and DataCalc-triggers-DataCalc fanout belong in Event Action chains or Generators.
|
|
88
88
|
10. **No scroll, no overflow, no responsive reflow.** Frames are fixed; what doesn't fit doesn't show. Design within the Canvas; don't import web habits.
|
|
89
89
|
|
|
90
90
|
## Commit to a design language
|
|
@@ -96,19 +96,26 @@ A Subspace is a self-contained mini-Application: own Canvases, own Bricks, own G
|
|
|
96
96
|
|
|
97
97
|
**Failure mode:** Subspaces with leaky contracts (every host Data exposed as a Prop). Tighten the contract; if you can't, the boundary is wrong.
|
|
98
98
|
|
|
99
|
-
## 9. DataCalculation is for derivation
|
|
99
|
+
## 9. DataCalculation is for derivation, not orchestration
|
|
100
100
|
|
|
101
|
-
Two flavours:
|
|
101
|
+
Two flavours:
|
|
102
|
+
|
|
103
|
+
- **`DataCalculationScript`** — a sandboxed JS function with named inputs / outputs. Default is sync + pure; opt into async with `enableAsync: true`, which unlocks `Promise`, `setTimeout` / `setInterval` / `setImmediate`, `requestAnimationFrame`, and the full lodash surface (`debounce`, `delay`, `defer`). Bundled libraries include lodash, voca, mathjs, chroma, moment, json5, qs, url, bytes, ms, base45, iconv, nanoid, md5, crypto-browserify, jsrsasign (JWS), cose-js, fflate (gzip/zlib), cbor, fs (limited; no download/upload), officeparser, turndown, opencc-js, toon-format. Runs on Hermes (Android) and JavaScriptCore (iOS) — keep that in mind for engine pitfalls.
|
|
104
|
+
- **`DataCalculationMap`** — a node-graph of `DataCommand`s spanning these categories: `COLLECTION`, `COLOR`, `CONSTANT`, `DATETIME`, `FILE` (file-system ops: `READ` / `WRITE` / `APPEND` / `MKDIR` / `COPY_FILE` / `MOVE_FILE` / `UNLINK` / `EXISTS` / `STAT` / etc.), `ITERATEE`, `LOGICTYPE`, `MATH`, `OBJECT`, `SANDBOX` (`SANDBOX_RUN_JAVASCRIPT` runs a script node inside the graph), `STRING`.
|
|
105
|
+
|
|
106
|
+
Derivation is the intent. Purity is a strong default and the right framing for the common case, but it is a best practice — not a hard runtime restriction. `enableAsync` and `FILE_*` exist because some derivation work (document parsing, decompression, signing, reading a cached file) genuinely needs them.
|
|
102
107
|
|
|
103
108
|
**Use it for**:
|
|
104
109
|
- Format conversion (date → human-readable, currency → localized string).
|
|
105
110
|
- Combining Data values into a derived display value.
|
|
106
111
|
- Reductions / iterations over a collection.
|
|
107
112
|
- Boolean conditions feeding a Switch.
|
|
113
|
+
- Async derivation pipelines: decode → decompress → parse → verify (cbor, fflate, cose-js, officeparser, turndown).
|
|
114
|
+
- Reading cached files written earlier in the flow (Map `FILE_*` commands or Script `fs`).
|
|
108
115
|
|
|
109
116
|
**Triggering**: `triggerMode: 'auto'` re-runs on input change (watch for circular dependencies); `'manual'` only runs on `PROPERTY_BANK_COMMAND` action.
|
|
110
117
|
|
|
111
|
-
**Do not use** for orchestration,
|
|
118
|
+
**Do not use** for orchestration, navigation, network calls (no `fetch` / XHR in the sandbox — that's a Generator's job), or anything that should be in an Event Action chain or a Generator. A DataCalc that triggers DataCalc that triggers DataCalc is an orchestration system in the wrong primitive — promote to event chains. `enableAsync` and `FILE_*` are tools for derivation, not a licence to smuggle flow control into the calc layer.
|
|
112
119
|
|
|
113
120
|
**Failure mode:** spinning up a Generator just to do a string concat or unit conversion. That's a DataCalc job; the inverse misuse is just as common.
|
|
114
121
|
|
package/types/animation.ts
CHANGED
|
@@ -104,8 +104,13 @@ export interface AnimationComposeDef {
|
|
|
104
104
|
|
|
105
105
|
export type Animation = AnimationDef | AnimationComposeDef
|
|
106
106
|
|
|
107
|
+
// Animation event handlers accept either a direct Animation or a getter that
|
|
108
|
+
// returns one. The getter form is useful for lazy/forward references between
|
|
109
|
+
// animations defined across files.
|
|
110
|
+
export type AnimationOrGetter = Animation | (() => Animation)
|
|
111
|
+
|
|
107
112
|
export interface AnimationBasicEvents {
|
|
108
|
-
showStart?:
|
|
109
|
-
standby?:
|
|
110
|
-
breatheStart?:
|
|
113
|
+
showStart?: AnimationOrGetter
|
|
114
|
+
standby?: AnimationOrGetter
|
|
115
|
+
breatheStart?: AnimationOrGetter
|
|
111
116
|
}
|
package/types/brick-base.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Auto generated by build script */
|
|
2
2
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
|
|
3
3
|
import type { Data, DataLink } from './data'
|
|
4
|
-
import type { Animation, AnimationBasicEvents } from './animation'
|
|
4
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from './animation'
|
|
5
5
|
import type {
|
|
6
6
|
Brick,
|
|
7
7
|
EventAction,
|
package/types/bricks/Camera.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -213,13 +213,13 @@ Default property:
|
|
|
213
213
|
faceDetected?: () => Data<Array<{ [key: string]: any }>>
|
|
214
214
|
}
|
|
215
215
|
animation?: AnimationBasicEvents & {
|
|
216
|
-
stateChange?:
|
|
217
|
-
recordStart?:
|
|
218
|
-
recordEnd?:
|
|
219
|
-
barcodeRead?:
|
|
220
|
-
pictureTaken?:
|
|
221
|
-
recordFinish?:
|
|
222
|
-
mountError?:
|
|
216
|
+
stateChange?: AnimationOrGetter
|
|
217
|
+
recordStart?: AnimationOrGetter
|
|
218
|
+
recordEnd?: AnimationOrGetter
|
|
219
|
+
barcodeRead?: AnimationOrGetter
|
|
220
|
+
pictureTaken?: AnimationOrGetter
|
|
221
|
+
recordFinish?: AnimationOrGetter
|
|
222
|
+
mountError?: AnimationOrGetter
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
package/types/bricks/Chart.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -343,9 +343,9 @@ Default property:
|
|
|
343
343
|
>
|
|
344
344
|
}
|
|
345
345
|
animation?: AnimationBasicEvents & {
|
|
346
|
-
onRender?:
|
|
347
|
-
onPress?:
|
|
348
|
-
onLegendSelectChanged?:
|
|
346
|
+
onRender?: AnimationOrGetter
|
|
347
|
+
onPress?: AnimationOrGetter
|
|
348
|
+
onLegendSelectChanged?: AnimationOrGetter
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -250,20 +250,20 @@ Default property:
|
|
|
250
250
|
loading?: () => Data<boolean>
|
|
251
251
|
}
|
|
252
252
|
animation?: AnimationBasicEvents & {
|
|
253
|
-
generativeMediaOnPress?:
|
|
254
|
-
generativeMediaOnPressIn?:
|
|
255
|
-
generativeMediaOnPressOut?:
|
|
256
|
-
generativeMediaOnLongPress?:
|
|
257
|
-
generativeMediaOnFocus?:
|
|
258
|
-
generativeMediaOnBlur?:
|
|
259
|
-
onSuccess?:
|
|
260
|
-
onError?:
|
|
261
|
-
promptStart?:
|
|
262
|
-
promptSuccess?:
|
|
263
|
-
promptError?:
|
|
264
|
-
loadStart?:
|
|
265
|
-
loadSuccess?:
|
|
266
|
-
loadError?:
|
|
253
|
+
generativeMediaOnPress?: AnimationOrGetter
|
|
254
|
+
generativeMediaOnPressIn?: AnimationOrGetter
|
|
255
|
+
generativeMediaOnPressOut?: AnimationOrGetter
|
|
256
|
+
generativeMediaOnLongPress?: AnimationOrGetter
|
|
257
|
+
generativeMediaOnFocus?: AnimationOrGetter
|
|
258
|
+
generativeMediaOnBlur?: AnimationOrGetter
|
|
259
|
+
onSuccess?: AnimationOrGetter
|
|
260
|
+
onError?: AnimationOrGetter
|
|
261
|
+
promptStart?: AnimationOrGetter
|
|
262
|
+
promptSuccess?: AnimationOrGetter
|
|
263
|
+
promptError?: AnimationOrGetter
|
|
264
|
+
loadStart?: AnimationOrGetter
|
|
265
|
+
loadSuccess?: AnimationOrGetter
|
|
266
|
+
loadError?: AnimationOrGetter
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
|
package/types/bricks/Icon.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -66,12 +66,12 @@ Default property:
|
|
|
66
66
|
brickFocusing?: () => Data<boolean>
|
|
67
67
|
}
|
|
68
68
|
animation?: AnimationBasicEvents & {
|
|
69
|
-
onPress?:
|
|
70
|
-
onPressIn?:
|
|
71
|
-
onPressOut?:
|
|
72
|
-
onLongPress?:
|
|
73
|
-
onFocus?:
|
|
74
|
-
onBlur?:
|
|
69
|
+
onPress?: AnimationOrGetter
|
|
70
|
+
onPressIn?: AnimationOrGetter
|
|
71
|
+
onPressOut?: AnimationOrGetter
|
|
72
|
+
onLongPress?: AnimationOrGetter
|
|
73
|
+
onFocus?: AnimationOrGetter
|
|
74
|
+
onBlur?: AnimationOrGetter
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
package/types/bricks/Image.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -92,14 +92,14 @@ Default property:
|
|
|
92
92
|
brickFocusing?: () => Data<boolean>
|
|
93
93
|
}
|
|
94
94
|
animation?: AnimationBasicEvents & {
|
|
95
|
-
onPress?:
|
|
96
|
-
onPressIn?:
|
|
97
|
-
onPressOut?:
|
|
98
|
-
onLongPress?:
|
|
99
|
-
onFocus?:
|
|
100
|
-
onBlur?:
|
|
101
|
-
onLoad?:
|
|
102
|
-
onError?:
|
|
95
|
+
onPress?: AnimationOrGetter
|
|
96
|
+
onPressIn?: AnimationOrGetter
|
|
97
|
+
onPressOut?: AnimationOrGetter
|
|
98
|
+
onLongPress?: AnimationOrGetter
|
|
99
|
+
onFocus?: AnimationOrGetter
|
|
100
|
+
onBlur?: AnimationOrGetter
|
|
101
|
+
onLoad?: AnimationOrGetter
|
|
102
|
+
onError?: AnimationOrGetter
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
package/types/bricks/Items.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -438,12 +438,12 @@ Default property:
|
|
|
438
438
|
pageIsOutOfBound?: () => Data<boolean>
|
|
439
439
|
}
|
|
440
440
|
animation?: AnimationBasicEvents & {
|
|
441
|
-
onPageRender?:
|
|
442
|
-
onPageChange?:
|
|
443
|
-
onPageOutOfBound?:
|
|
444
|
-
onIntoDetailMode?:
|
|
445
|
-
onIntoListMode?:
|
|
446
|
-
onError?:
|
|
441
|
+
onPageRender?: AnimationOrGetter
|
|
442
|
+
onPageChange?: AnimationOrGetter
|
|
443
|
+
onPageOutOfBound?: AnimationOrGetter
|
|
444
|
+
onIntoDetailMode?: AnimationOrGetter
|
|
445
|
+
onIntoListMode?: AnimationOrGetter
|
|
446
|
+
onError?: AnimationOrGetter
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
|
package/types/bricks/Lottie.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -133,15 +133,15 @@ Default property:
|
|
|
133
133
|
brickFocusing?: () => Data<boolean>
|
|
134
134
|
}
|
|
135
135
|
animation?: AnimationBasicEvents & {
|
|
136
|
-
onPress?:
|
|
137
|
-
onPressIn?:
|
|
138
|
-
onPressOut?:
|
|
139
|
-
onLongPress?:
|
|
140
|
-
onFocus?:
|
|
141
|
-
onBlur?:
|
|
142
|
-
onAnimationFinish?:
|
|
143
|
-
onAnimationFailure?:
|
|
144
|
-
onAnimationLoop?:
|
|
136
|
+
onPress?: AnimationOrGetter
|
|
137
|
+
onPressIn?: AnimationOrGetter
|
|
138
|
+
onPressOut?: AnimationOrGetter
|
|
139
|
+
onLongPress?: AnimationOrGetter
|
|
140
|
+
onFocus?: AnimationOrGetter
|
|
141
|
+
onBlur?: AnimationOrGetter
|
|
142
|
+
onAnimationFinish?: AnimationOrGetter
|
|
143
|
+
onAnimationFailure?: AnimationOrGetter
|
|
144
|
+
onAnimationLoop?: AnimationOrGetter
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
package/types/bricks/Maps.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -226,16 +226,16 @@ Default property:
|
|
|
226
226
|
brickFocusing?: () => Data<boolean>
|
|
227
227
|
}
|
|
228
228
|
animation?: AnimationBasicEvents & {
|
|
229
|
-
onPress?:
|
|
230
|
-
onPressIn?:
|
|
231
|
-
onPressOut?:
|
|
232
|
-
onLongPress?:
|
|
233
|
-
onFocus?:
|
|
234
|
-
onBlur?:
|
|
235
|
-
onMarkerPress?:
|
|
236
|
-
onMapPress?:
|
|
237
|
-
onRegionChange?:
|
|
238
|
-
onReady?:
|
|
229
|
+
onPress?: AnimationOrGetter
|
|
230
|
+
onPressIn?: AnimationOrGetter
|
|
231
|
+
onPressOut?: AnimationOrGetter
|
|
232
|
+
onLongPress?: AnimationOrGetter
|
|
233
|
+
onFocus?: AnimationOrGetter
|
|
234
|
+
onBlur?: AnimationOrGetter
|
|
235
|
+
onMarkerPress?: AnimationOrGetter
|
|
236
|
+
onMapPress?: AnimationOrGetter
|
|
237
|
+
onRegionChange?: AnimationOrGetter
|
|
238
|
+
onReady?: AnimationOrGetter
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
package/types/bricks/QrCode.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -85,12 +85,12 @@ Default property:
|
|
|
85
85
|
brickFocusing?: () => Data<boolean>
|
|
86
86
|
}
|
|
87
87
|
animation?: AnimationBasicEvents & {
|
|
88
|
-
onPress?:
|
|
89
|
-
onPressIn?:
|
|
90
|
-
onPressOut?:
|
|
91
|
-
onLongPress?:
|
|
92
|
-
onFocus?:
|
|
93
|
-
onBlur?:
|
|
88
|
+
onPress?: AnimationOrGetter
|
|
89
|
+
onPressIn?: AnimationOrGetter
|
|
90
|
+
onPressOut?: AnimationOrGetter
|
|
91
|
+
onLongPress?: AnimationOrGetter
|
|
92
|
+
onFocus?: AnimationOrGetter
|
|
93
|
+
onBlur?: AnimationOrGetter
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
package/types/bricks/Rect.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -118,12 +118,12 @@ Default property:
|
|
|
118
118
|
brickFocusing?: () => Data<boolean>
|
|
119
119
|
}
|
|
120
120
|
animation?: AnimationBasicEvents & {
|
|
121
|
-
onPress?:
|
|
122
|
-
onPressIn?:
|
|
123
|
-
onPressOut?:
|
|
124
|
-
onLongPress?:
|
|
125
|
-
onFocus?:
|
|
126
|
-
onBlur?:
|
|
121
|
+
onPress?: AnimationOrGetter
|
|
122
|
+
onPressIn?: AnimationOrGetter
|
|
123
|
+
onPressOut?: AnimationOrGetter
|
|
124
|
+
onLongPress?: AnimationOrGetter
|
|
125
|
+
onFocus?: AnimationOrGetter
|
|
126
|
+
onBlur?: AnimationOrGetter
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
package/types/bricks/RichText.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -96,12 +96,12 @@ Default property:
|
|
|
96
96
|
brickFocusing?: () => Data<boolean>
|
|
97
97
|
}
|
|
98
98
|
animation?: AnimationBasicEvents & {
|
|
99
|
-
onPress?:
|
|
100
|
-
onPressIn?:
|
|
101
|
-
onPressOut?:
|
|
102
|
-
onLongPress?:
|
|
103
|
-
onFocus?:
|
|
104
|
-
onBlur?:
|
|
99
|
+
onPress?: AnimationOrGetter
|
|
100
|
+
onPressIn?: AnimationOrGetter
|
|
101
|
+
onPressOut?: AnimationOrGetter
|
|
102
|
+
onLongPress?: AnimationOrGetter
|
|
103
|
+
onFocus?: AnimationOrGetter
|
|
104
|
+
onBlur?: AnimationOrGetter
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
package/types/bricks/Rive.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
7
|
-
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
7
|
+
import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
|
|
8
8
|
import type {
|
|
9
9
|
Brick,
|
|
10
10
|
EventAction,
|
|
@@ -186,14 +186,14 @@ Default property:
|
|
|
186
186
|
>
|
|
187
187
|
}
|
|
188
188
|
animation?: AnimationBasicEvents & {
|
|
189
|
-
onPlay?:
|
|
190
|
-
onPause?:
|
|
191
|
-
onStop?:
|
|
192
|
-
onLoopEnd?:
|
|
193
|
-
onStateChanged?:
|
|
194
|
-
onError?:
|
|
195
|
-
onRiveGeneralEvent?:
|
|
196
|
-
onRiveOpenUrlEvent?:
|
|
189
|
+
onPlay?: AnimationOrGetter
|
|
190
|
+
onPause?: AnimationOrGetter
|
|
191
|
+
onStop?: AnimationOrGetter
|
|
192
|
+
onLoopEnd?: AnimationOrGetter
|
|
193
|
+
onStateChanged?: AnimationOrGetter
|
|
194
|
+
onError?: AnimationOrGetter
|
|
195
|
+
onRiveGeneralEvent?: AnimationOrGetter
|
|
196
|
+
onRiveOpenUrlEvent?: AnimationOrGetter
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|