@fugood/bricks-project 2.21.0-beta.14.test0
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/api/application.ts +65 -0
- package/api/index.ts +1 -0
- package/compile/index.ts +485 -0
- package/compile/util.ts +347 -0
- package/index.ts +10 -0
- package/package.json +15 -0
- package/types/animation.ts +95 -0
- package/types/bricks.ts +3052 -0
- package/types/canvas.ts +78 -0
- package/types/common.ts +116 -0
- package/types/data-calc.ts +6950 -0
- package/types/data.ts +33 -0
- package/types/generators.ts +6633 -0
- package/types/index.ts +10 -0
- package/types/subspace.ts +33 -0
- package/types/switch.ts +45 -0
- package/types/system.ts +397 -0
- package/uuid.ts +58 -0
package/types/data.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EventAction } from './common'
|
|
2
|
+
|
|
3
|
+
interface DataDef {
|
|
4
|
+
events?: {
|
|
5
|
+
/* Event on update */
|
|
6
|
+
update?: Array<EventAction>
|
|
7
|
+
/* Event on value change */
|
|
8
|
+
valueChange?: Array<EventAction>
|
|
9
|
+
/* Event on value change and value matched the `Hit Regex` */
|
|
10
|
+
valueHit?: Array<EventAction>
|
|
11
|
+
/* Event on value change and value `not` matched the `Hit Regex` */
|
|
12
|
+
valueNotHit?: Array<EventAction>
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type Data<T = any> = DataDef & {
|
|
17
|
+
__typename: 'Data'
|
|
18
|
+
type: 'string' | 'number' | 'bool' | 'array' | 'object' | 'any'
|
|
19
|
+
id: string
|
|
20
|
+
title: string
|
|
21
|
+
description?: string
|
|
22
|
+
// Determine how the property is changed via another subspaces.
|
|
23
|
+
routing?: 'default' | 'read-only'
|
|
24
|
+
// Persist data, so that the data will be keep after refresh.
|
|
25
|
+
persistData?: boolean
|
|
26
|
+
schema: object
|
|
27
|
+
value: T
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type DataLink = {
|
|
31
|
+
__typename: 'DataLink'
|
|
32
|
+
data: () => Data
|
|
33
|
+
}
|