@ankhorage/contracts 1.10.0 → 1.12.0
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/CHANGELOG.md +12 -0
- package/dist/bindings.d.ts +80 -25
- package/dist/bindings.d.ts.map +1 -1
- package/dist/bindings.js.map +1 -1
- package/dist/types.d.ts +4 -79
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ui.d.ts +37 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
- package/src/bindings.test.ts +290 -70
- package/src/bindings.ts +101 -25
- package/src/contracts.test.ts +0 -172
- package/src/types.ts +4 -118
- package/src/ui.test.ts +169 -0
- package/src/ui.ts +53 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/contracts
|
|
2
2
|
|
|
3
|
+
## 1.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 440f28e: Replace node-local prop bindings with app-level component data-binding contracts that reference data-source operations.
|
|
8
|
+
|
|
9
|
+
## 1.11.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 17b8d75: Add bindable component metadata contracts for declaring data-bindable component props and events.
|
|
14
|
+
|
|
3
15
|
## 1.10.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/bindings.d.ts
CHANGED
|
@@ -1,38 +1,93 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DataSourceId, EndpointId, OperationId } from './data';
|
|
2
|
+
export type ComponentInstanceId = string;
|
|
3
|
+
export type ComponentTypeId = string;
|
|
2
4
|
export type BindingValue = string | number | boolean | null | readonly BindingValue[] | {
|
|
3
5
|
readonly [key: string]: BindingValue;
|
|
4
6
|
};
|
|
5
|
-
export type
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly sort?: readonly DbSort[];
|
|
12
|
-
readonly page?: DbPage;
|
|
13
|
-
readonly refresh?: BindingRefreshMode;
|
|
14
|
-
readonly pollIntervalMs?: number;
|
|
7
|
+
export type BindingDataPath = string;
|
|
8
|
+
export type BindingValueTransform = 'lowercase' | 'trim' | 'uppercase';
|
|
9
|
+
export interface BindingOperationRef {
|
|
10
|
+
readonly dataSourceId: DataSourceId;
|
|
11
|
+
readonly operationId: OperationId;
|
|
12
|
+
readonly endpointId?: EndpointId;
|
|
15
13
|
}
|
|
16
14
|
export type BindingValueSource = {
|
|
17
|
-
readonly
|
|
18
|
-
readonly path:
|
|
15
|
+
readonly kind: 'context';
|
|
16
|
+
readonly path: BindingDataPath;
|
|
17
|
+
} | {
|
|
18
|
+
readonly kind: 'event';
|
|
19
|
+
readonly path: BindingDataPath;
|
|
19
20
|
} | {
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
21
|
+
readonly kind: 'literal';
|
|
22
|
+
readonly value: BindingValue;
|
|
22
23
|
} | {
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
24
|
+
readonly kind: 'operation';
|
|
25
|
+
readonly operation: BindingOperationRef;
|
|
26
|
+
readonly path?: BindingDataPath;
|
|
25
27
|
} | {
|
|
26
|
-
readonly
|
|
28
|
+
readonly kind: 'state';
|
|
29
|
+
readonly path: BindingDataPath;
|
|
30
|
+
};
|
|
31
|
+
export interface BindingValueExpression {
|
|
32
|
+
readonly source: BindingValueSource;
|
|
33
|
+
readonly transforms?: readonly BindingValueTransform[];
|
|
34
|
+
}
|
|
35
|
+
export interface BindingFallback {
|
|
36
|
+
readonly value?: BindingValue;
|
|
37
|
+
readonly source?: BindingValueSource;
|
|
38
|
+
}
|
|
39
|
+
export type BindingLifecycleState = 'empty' | 'error' | 'loading';
|
|
40
|
+
export interface BindingLifecycleBehavior {
|
|
41
|
+
readonly state: BindingLifecycleState;
|
|
42
|
+
readonly fallback?: BindingFallback;
|
|
43
|
+
readonly message?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface PropBinding {
|
|
46
|
+
readonly source: BindingValueSource;
|
|
47
|
+
readonly fallback?: BindingFallback;
|
|
48
|
+
readonly loading?: BindingLifecycleBehavior;
|
|
49
|
+
readonly error?: BindingLifecycleBehavior;
|
|
50
|
+
readonly empty?: BindingLifecycleBehavior;
|
|
51
|
+
readonly transforms?: readonly BindingValueTransform[];
|
|
52
|
+
}
|
|
53
|
+
export type BindingInputValue = {
|
|
54
|
+
readonly kind: 'array';
|
|
55
|
+
readonly items: readonly BindingInputValue[];
|
|
56
|
+
} | {
|
|
57
|
+
readonly kind: 'literal';
|
|
27
58
|
readonly value: BindingValue;
|
|
28
59
|
} | {
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
60
|
+
readonly kind: 'object';
|
|
61
|
+
readonly fields: Readonly<Record<string, BindingInputValue>>;
|
|
62
|
+
} | {
|
|
63
|
+
readonly kind: 'source';
|
|
64
|
+
readonly source: BindingValueSource;
|
|
65
|
+
readonly transforms?: readonly BindingValueTransform[];
|
|
31
66
|
};
|
|
32
|
-
export type
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
67
|
+
export type BindingInputMap = Readonly<Record<string, BindingInputValue>>;
|
|
68
|
+
export type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';
|
|
69
|
+
export interface BindingCondition {
|
|
70
|
+
readonly source: BindingValueSource;
|
|
71
|
+
readonly operator: BindingConditionOperator;
|
|
72
|
+
readonly value?: BindingValue;
|
|
73
|
+
}
|
|
74
|
+
export type EventBindingTarget = {
|
|
75
|
+
readonly kind: 'action';
|
|
76
|
+
readonly type: string;
|
|
77
|
+
} | {
|
|
78
|
+
readonly kind: 'operation';
|
|
79
|
+
readonly operation: BindingOperationRef;
|
|
80
|
+
};
|
|
81
|
+
export interface EventBinding {
|
|
82
|
+
readonly target: EventBindingTarget;
|
|
83
|
+
readonly input?: BindingInputMap;
|
|
84
|
+
readonly when?: BindingCondition;
|
|
85
|
+
}
|
|
86
|
+
export interface ComponentDataBinding {
|
|
87
|
+
readonly componentId: ComponentInstanceId;
|
|
88
|
+
readonly componentType?: ComponentTypeId;
|
|
89
|
+
readonly props?: Readonly<Record<string, PropBinding>>;
|
|
90
|
+
readonly events?: Readonly<Record<string, readonly EventBinding[]>>;
|
|
37
91
|
}
|
|
92
|
+
export type ComponentDataBindingRegistry = Readonly<Record<ComponentInstanceId, ComponentDataBinding>>;
|
|
38
93
|
//# sourceMappingURL=bindings.d.ts.map
|
package/dist/bindings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,YAAY,EAAE,GACvB;IACE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CACtC,CAAC;AAEN,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;CAClC;AAED,MAAM,MAAM,kBA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,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC,CAAC;AAEN,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC,CAAC,CAAC;CACrE;AAED,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CACjD,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAClD,CAAC"}
|
package/dist/bindings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataSourceId, EndpointId, OperationId } from './data';\n\nexport type ComponentInstanceId = string;\nexport type ComponentTypeId = string;\n\nexport type BindingValue =\n | string\n | number\n | boolean\n | null\n | readonly BindingValue[]\n | {\n readonly [key: string]: BindingValue;\n };\n\nexport type BindingDataPath = string;\n\nexport type BindingValueTransform = 'lowercase' | 'trim' | 'uppercase';\n\nexport interface BindingOperationRef {\n readonly dataSourceId: DataSourceId;\n readonly operationId: OperationId;\n readonly endpointId?: EndpointId;\n}\n\nexport type BindingValueSource =\n | {\n readonly kind: 'context';\n readonly path: BindingDataPath;\n }\n | {\n readonly kind: 'event';\n readonly path: BindingDataPath;\n }\n | {\n readonly kind: 'literal';\n readonly value: BindingValue;\n }\n | {\n readonly kind: 'operation';\n readonly operation: BindingOperationRef;\n readonly path?: BindingDataPath;\n }\n | {\n readonly kind: 'state';\n readonly path: BindingDataPath;\n };\n\nexport interface BindingValueExpression {\n readonly source: BindingValueSource;\n readonly transforms?: readonly BindingValueTransform[];\n}\n\nexport interface BindingFallback {\n readonly value?: BindingValue;\n readonly source?: BindingValueSource;\n}\n\nexport type BindingLifecycleState = 'empty' | 'error' | 'loading';\n\nexport interface BindingLifecycleBehavior {\n readonly state: BindingLifecycleState;\n readonly fallback?: BindingFallback;\n readonly message?: string;\n}\n\nexport interface PropBinding {\n readonly source: BindingValueSource;\n readonly fallback?: BindingFallback;\n readonly loading?: BindingLifecycleBehavior;\n readonly error?: BindingLifecycleBehavior;\n readonly empty?: BindingLifecycleBehavior;\n readonly transforms?: readonly BindingValueTransform[];\n}\n\nexport type BindingInputValue =\n | {\n readonly kind: 'array';\n readonly items: readonly BindingInputValue[];\n }\n | {\n readonly kind: 'literal';\n readonly value: BindingValue;\n }\n | {\n readonly kind: 'object';\n readonly fields: Readonly<Record<string, BindingInputValue>>;\n }\n | {\n readonly kind: 'source';\n readonly source: BindingValueSource;\n readonly transforms?: readonly BindingValueTransform[];\n };\n\nexport type BindingInputMap = Readonly<Record<string, BindingInputValue>>;\n\nexport type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\nexport interface BindingCondition {\n readonly source: BindingValueSource;\n readonly operator: BindingConditionOperator;\n readonly value?: BindingValue;\n}\n\nexport type EventBindingTarget =\n | {\n readonly kind: 'action';\n readonly type: string;\n }\n | {\n readonly kind: 'operation';\n readonly operation: BindingOperationRef;\n };\n\nexport interface EventBinding {\n readonly target: EventBindingTarget;\n readonly input?: BindingInputMap;\n readonly when?: BindingCondition;\n}\n\nexport interface ComponentDataBinding {\n readonly componentId: ComponentInstanceId;\n readonly componentType?: ComponentTypeId;\n readonly props?: Readonly<Record<string, PropBinding>>;\n readonly events?: Readonly<Record<string, readonly EventBinding[]>>;\n}\n\nexport type ComponentDataBindingRegistry = Readonly<\n Record<ComponentInstanceId, ComponentDataBinding>\n>;\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ColorHarmony } from '@ankhorage/color-theory';
|
|
2
2
|
import type { AuthFlowConfig, AuthIdentifierKind, AuthSignUpField } from './auth';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ComponentDataBindingRegistry } from './bindings';
|
|
4
|
+
import type { DataSourceRegistry } from './data';
|
|
4
5
|
export interface ThemeModeConfig {
|
|
5
6
|
primaryColor: string;
|
|
6
7
|
harmony: ColorHarmony;
|
|
@@ -57,82 +58,6 @@ export type Action = AlertAction | ConsoleAction | FilterAction | NavigateAction
|
|
|
57
58
|
export type ManifestValue = string | number | boolean | null | readonly ManifestValue[] | {
|
|
58
59
|
readonly [key: string]: ManifestValue;
|
|
59
60
|
};
|
|
60
|
-
export type ActionValue = ManifestValue;
|
|
61
|
-
export type ActionBindingPayload = Record<string, ActionValue>;
|
|
62
|
-
export type ActionConditionSource = 'context' | 'event' | 'state';
|
|
63
|
-
export type ActionConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';
|
|
64
|
-
export interface ActionCondition {
|
|
65
|
-
readonly source: ActionConditionSource;
|
|
66
|
-
readonly path: string;
|
|
67
|
-
readonly operator: ActionConditionOperator;
|
|
68
|
-
readonly value?: ActionValue;
|
|
69
|
-
}
|
|
70
|
-
export type ActionValueSource = {
|
|
71
|
-
readonly source: 'context';
|
|
72
|
-
readonly path: string;
|
|
73
|
-
} | {
|
|
74
|
-
readonly source: 'event';
|
|
75
|
-
readonly path: string;
|
|
76
|
-
} | {
|
|
77
|
-
readonly source: 'literal';
|
|
78
|
-
readonly value: ActionValue;
|
|
79
|
-
} | {
|
|
80
|
-
readonly source: 'state';
|
|
81
|
-
readonly path: string;
|
|
82
|
-
};
|
|
83
|
-
export type ActionValueTransform = 'lowercase' | 'trim' | 'uppercase';
|
|
84
|
-
export interface ActionValueBinding {
|
|
85
|
-
readonly valueFrom: ActionValueSource;
|
|
86
|
-
readonly transform?: ActionValueTransform | readonly ActionValueTransform[];
|
|
87
|
-
}
|
|
88
|
-
export interface ActionBinding<TType extends string = string, TPayload extends object = ActionBindingPayload> {
|
|
89
|
-
readonly type: TType;
|
|
90
|
-
readonly payload?: TPayload;
|
|
91
|
-
readonly when?: ActionCondition;
|
|
92
|
-
}
|
|
93
|
-
export type DbPersistMode = 'columns' | 'json';
|
|
94
|
-
export interface DbPersistFieldBinding {
|
|
95
|
-
readonly field: string;
|
|
96
|
-
readonly valueFrom: ActionValueSource;
|
|
97
|
-
readonly transform?: ActionValueTransform | readonly ActionValueTransform[];
|
|
98
|
-
}
|
|
99
|
-
export interface DbPersistActionPayload {
|
|
100
|
-
readonly collection: string;
|
|
101
|
-
readonly kind?: string;
|
|
102
|
-
readonly mode?: DbPersistMode;
|
|
103
|
-
readonly jsonField?: string;
|
|
104
|
-
readonly values: readonly DbPersistFieldBinding[];
|
|
105
|
-
}
|
|
106
|
-
export interface DbPersistActionBinding extends ActionBinding<'db.persist', DbPersistActionPayload> {
|
|
107
|
-
readonly payload: DbPersistActionPayload;
|
|
108
|
-
}
|
|
109
|
-
export interface EmailSendActionPayload {
|
|
110
|
-
readonly to: string;
|
|
111
|
-
readonly subject?: string;
|
|
112
|
-
readonly body?: string;
|
|
113
|
-
readonly bodyFrom?: ActionValueSource;
|
|
114
|
-
}
|
|
115
|
-
export interface EmailSendActionBinding extends ActionBinding<'email.send', EmailSendActionPayload> {
|
|
116
|
-
readonly payload: EmailSendActionPayload;
|
|
117
|
-
}
|
|
118
|
-
export type KnownActionBinding = DbPersistActionBinding | EmailSendActionBinding;
|
|
119
|
-
export type UiNodeEventBindings = Record<string, readonly ActionBinding<string, object>[]>;
|
|
120
|
-
export interface CommandDto<TType extends string = string, TPayload extends object = Record<string, ActionValue>> {
|
|
121
|
-
readonly type: TType;
|
|
122
|
-
readonly payload: TPayload;
|
|
123
|
-
}
|
|
124
|
-
export type DbPersistOperation = 'insert';
|
|
125
|
-
export type DbPersistCommandValues = Record<string, ActionValue>;
|
|
126
|
-
export interface DbPersistCommandPayload {
|
|
127
|
-
readonly operation: DbPersistOperation;
|
|
128
|
-
readonly collection: string;
|
|
129
|
-
readonly kind?: string;
|
|
130
|
-
readonly mode?: DbPersistMode;
|
|
131
|
-
readonly jsonField?: string;
|
|
132
|
-
readonly values: DbPersistCommandValues;
|
|
133
|
-
}
|
|
134
|
-
export type DbPersistCommand = CommandDto<'db.persist.command', DbPersistCommandPayload>;
|
|
135
|
-
export type KnownCommandDto = DbPersistCommand;
|
|
136
61
|
export type ComponentEventPayloadValue = ManifestValue;
|
|
137
62
|
export interface ComponentEventDto<TType extends string = string, TPayload extends object = Record<string, ComponentEventPayloadValue>> {
|
|
138
63
|
readonly type: TType;
|
|
@@ -192,10 +117,8 @@ export interface UiNode {
|
|
|
192
117
|
type: string;
|
|
193
118
|
alias?: string;
|
|
194
119
|
props?: Record<string, unknown>;
|
|
195
|
-
bindings?: readonly NodePropBinding[];
|
|
196
120
|
children?: UiNode[];
|
|
197
121
|
style?: Record<string, number | string>;
|
|
198
|
-
events?: UiNodeEventBindings;
|
|
199
122
|
}
|
|
200
123
|
export interface ScreenSpec {
|
|
201
124
|
id: string;
|
|
@@ -284,6 +207,8 @@ export interface AppManifest {
|
|
|
284
207
|
infra: InfraManifest;
|
|
285
208
|
navigator: NavigatorSpec;
|
|
286
209
|
screens: Record<string, ScreenSpec>;
|
|
210
|
+
dataSources?: DataSourceRegistry;
|
|
211
|
+
dataBindings?: ComponentDataBindingRegistry;
|
|
287
212
|
settings: {
|
|
288
213
|
apiBaseUrl?: string;
|
|
289
214
|
localization: {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAClF,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,OAAO,GACP,SAAS,GACT,gBAAgB,GAChB,aAAa,GACb,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;KAC1C,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAA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mony } from '@ankhorage/color-theory';\n\nimport type { AuthFlowConfig, AuthIdentifierKind, AuthSignUpField } from './auth';\nimport type { NodePropBinding } from './bindings';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport interface ThemeConfig {\n id: string;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n}\n\nexport type ActionType =\n | 'navigate'\n | 'alert'\n | 'console'\n | 'toggleDarkMode'\n | 'setLanguage'\n | 'search'\n | 'filter';\n\nexport interface NavigateAction {\n type: 'navigate';\n payload: {\n route: string;\n params?: Record<string, number | string>;\n };\n}\n\nexport interface AlertAction {\n type: 'alert';\n payload?: {\n message?: string;\n };\n}\n\nexport interface ConsoleAction {\n type: 'console';\n payload?: Record<string, unknown>;\n}\n\nexport interface ToggleDarkModeAction {\n type: 'toggleDarkMode';\n payload?: never;\n}\n\nexport interface SetLanguageAction {\n type: 'setLanguage';\n payload: {\n locale: string;\n };\n}\n\nexport interface SearchAction {\n type: 'search';\n payload: {\n query: string;\n scope?: string;\n };\n}\n\nexport interface FilterAction {\n type: 'filter';\n payload: {\n filterKey: string;\n filterValue: string;\n };\n}\n\nexport type Action =\n | AlertAction\n | ConsoleAction\n | FilterAction\n | NavigateAction\n | SearchAction\n | SetLanguageAction\n | ToggleDarkModeAction;\n\nexport type ManifestValue =\n | string\n | number\n | boolean\n | null\n | readonly ManifestValue[]\n | { readonly [key: string]: ManifestValue };\n\nexport type ActionValue = ManifestValue;\n\nexport type ActionBindingPayload = Record<string, ActionValue>;\n\nexport type ActionConditionSource = 'context' | 'event' | 'state';\n\nexport type ActionConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\nexport interface ActionCondition {\n readonly source: ActionConditionSource;\n readonly path: string;\n readonly operator: ActionConditionOperator;\n readonly value?: ActionValue;\n}\n\nexport type ActionValueSource =\n | {\n readonly source: 'context';\n readonly path: string;\n }\n | {\n readonly source: 'event';\n readonly path: string;\n }\n | {\n readonly source: 'literal';\n readonly value: ActionValue;\n }\n | {\n readonly source: 'state';\n readonly path: string;\n };\n\nexport type ActionValueTransform = 'lowercase' | 'trim' | 'uppercase';\n\nexport interface ActionValueBinding {\n readonly valueFrom: ActionValueSource;\n readonly transform?: ActionValueTransform | readonly ActionValueTransform[];\n}\n\nexport interface ActionBinding<\n TType extends string = string,\n TPayload extends object = ActionBindingPayload,\n> {\n readonly type: TType;\n readonly payload?: TPayload;\n readonly when?: ActionCondition;\n}\n\nexport type DbPersistMode = 'columns' | 'json';\n\nexport interface DbPersistFieldBinding {\n readonly field: string;\n readonly valueFrom: ActionValueSource;\n readonly transform?: ActionValueTransform | readonly ActionValueTransform[];\n}\n\nexport interface DbPersistActionPayload {\n readonly collection: string;\n readonly kind?: string;\n readonly mode?: DbPersistMode;\n readonly jsonField?: string;\n readonly values: readonly DbPersistFieldBinding[];\n}\n\nexport interface DbPersistActionBinding extends ActionBinding<\n 'db.persist',\n DbPersistActionPayload\n> {\n readonly payload: DbPersistActionPayload;\n}\n\nexport interface EmailSendActionPayload {\n readonly to: string;\n readonly subject?: string;\n readonly body?: string;\n readonly bodyFrom?: ActionValueSource;\n}\n\nexport interface EmailSendActionBinding extends ActionBinding<\n 'email.send',\n EmailSendActionPayload\n> {\n readonly payload: EmailSendActionPayload;\n}\n\nexport type KnownActionBinding = DbPersistActionBinding | EmailSendActionBinding;\n\nexport type UiNodeEventBindings = Record<string, readonly ActionBinding<string, object>[]>;\n\nexport interface CommandDto<\n TType extends string = string,\n TPayload extends object = Record<string, ActionValue>,\n> {\n readonly type: TType;\n readonly payload: TPayload;\n}\n\nexport type DbPersistOperation = 'insert';\n\nexport type DbPersistCommandValues = Record<string, ActionValue>;\n\nexport interface DbPersistCommandPayload {\n readonly operation: DbPersistOperation;\n readonly collection: string;\n readonly kind?: string;\n readonly mode?: DbPersistMode;\n readonly jsonField?: string;\n readonly values: DbPersistCommandValues;\n}\n\nexport type DbPersistCommand = CommandDto<'db.persist.command', DbPersistCommandPayload>;\n\nexport type KnownCommandDto = DbPersistCommand;\n\nexport type ComponentEventPayloadValue = ManifestValue;\n\nexport interface ComponentEventDto<\n TType extends string = string,\n TPayload extends object = Record<string, ComponentEventPayloadValue>,\n> {\n readonly type: TType;\n readonly sourceNodeId: string;\n readonly payload: TPayload;\n}\n\nexport type FormSubmitValues = Record<string, ComponentEventPayloadValue>;\n\nexport type FormSubmitEventDto = ComponentEventDto<\n 'form.submit',\n {\n readonly values: FormSubmitValues;\n }\n>;\n\nexport type ButtonPressEventDto = ComponentEventDto<'button.press', Record<string, never>>;\n\nexport interface CollectionItemPressPayload {\n readonly itemId: string | number;\n readonly item: Record<string, ComponentEventPayloadValue>;\n}\n\nexport type CollectionItemPressEventDto = ComponentEventDto<\n 'collection.itemPress',\n CollectionItemPressPayload\n>;\n\nexport type ComponentEventDtoKind =\n | ButtonPressEventDto['type']\n | CollectionItemPressEventDto['type']\n | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n | ButtonPressEventDto\n | CollectionItemPressEventDto\n | FormSubmitEventDto;\n\nexport const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\n\nexport const APP_CATEGORIES = [\n 'books_reading',\n 'business_productivity',\n 'developer_tools',\n 'education_learning',\n 'entertainment_media',\n 'finance_money',\n 'food_drink',\n 'games',\n 'graphics_design',\n 'health_fitness',\n 'kids_family',\n 'lifestyle',\n 'medical',\n 'music_audio',\n 'navigation_travel',\n 'news_magazines',\n 'photo_video',\n 'reference',\n 'shopping_commerce',\n 'social_community',\n 'sports',\n 'utilities_tools',\n 'weather',\n] as const;\nexport type AppCategory = (typeof APP_CATEGORIES)[number];\n\nexport const DEPLOYMENT_TARGETS = ['minikube'] as const;\nexport type KnownDeploymentTarget = (typeof DEPLOYMENT_TARGETS)[number];\nexport type DeploymentTarget = KnownDeploymentTarget | (string & {});\n\nexport const DATABASE_PROVIDERS = ['supabase'] as const;\nexport type KnownDatabaseProvider = (typeof DATABASE_PROVIDERS)[number];\nexport type DatabaseProvider = KnownDatabaseProvider | (string & {});\n\nexport const DATABASE_TIERS = ['dev', 'prod'] as const;\nexport type DatabaseTier = (typeof DATABASE_TIERS)[number];\n\nexport const STORAGE_PROVIDERS = ['auto', 's3', 'r2'] as const;\nexport type StorageProvider = (typeof STORAGE_PROVIDERS)[number];\n\nexport const AUTHZ_KINDS = ['RBAC', 'ABAC'] as const;\nexport type AuthzKind = (typeof AUTHZ_KINDS)[number];\n\nexport const AUTHZ_ENGINES = ['cerbos', 'native'] as const;\nexport type AuthzEngine = (typeof AUTHZ_ENGINES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_PROVIDERS = ['supabase'] as const;\nexport type KnownAuthProvider = (typeof AUTH_PROVIDERS)[number];\nexport type AuthProvider = KnownAuthProvider | (string & {});\n\nexport const AUTH_SIGN_IN_IDENTIFIERS = ['email', 'username', 'phone'] as const;\nexport type AuthSignInIdentifier = AuthIdentifierKind;\n\nexport const AUTH_SIGN_UP_POLICIES = ['autoSignIn', 'requireVerification'] as const;\nexport type AuthSignUpPolicy = (typeof AUTH_SIGN_UP_POLICIES)[number];\n\nexport const AUTH_PROFILE_FIELDS = [\n ...AUTH_SIGN_IN_IDENTIFIERS,\n 'firstName',\n 'lastName',\n 'displayName',\n 'avatarUrl',\n] as const;\nexport type KnownAuthProfileField = (typeof AUTH_PROFILE_FIELDS)[number];\nexport type AuthProfileField = KnownAuthProfileField | (string & {});\n\nexport interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n bindings?: readonly NodePropBinding[];\n children?: UiNode[];\n style?: Record<string, number | string>;\n events?: UiNodeEventBindings;\n}\n\nexport interface ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\n}\n\nexport interface NavigatorSpec {\n type: NavigatorType;\n initialRouteName?: string;\n routes: RouteDefinition[];\n options?: Record<string, unknown>;\n}\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n hideInTabBar?: boolean;\n guards?: string[];\n screenId?: string;\n navigator?: NavigatorSpec;\n}\n\nexport interface DeploymentSpec {\n target: DeploymentTarget;\n monitoring: boolean;\n}\n\nexport interface DatabaseSpec {\n provider: DatabaseProvider;\n tier: DatabaseTier;\n}\n\nexport interface StorageSpec {\n provider: StorageProvider;\n buckets: string[];\n}\n\nexport interface AuthzSpec {\n kind: AuthzKind;\n engine: AuthzEngine;\n}\n\nexport interface AuthSignInSpec {\n identifiers: AuthSignInIdentifier[];\n}\n\nexport interface AuthSignUpSpec {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n signUpPolicy?: AuthSignUpPolicy;\n}\n\nexport interface AuthProfileSpec {\n fields: AuthProfileField[];\n}\n\nexport interface AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\n profile?: AuthProfileSpec;\n}\n\nexport interface NetworkingSpec {\n domain?: string;\n cdn: boolean;\n}\n\nexport interface InfraManifest {\n deployment?: DeploymentSpec;\n auth?: AuthSpec;\n database?: DatabaseSpec;\n storage?: StorageSpec;\n networking?: NetworkingSpec;\n plugins: string[];\n pluginsConfig?: Record<string, unknown>;\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n settings: {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n authFlow: AuthFlowConfig;\n };\n}\n"]}
|
|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CAAU,CAAC;AAGpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,wBAAwB;IAC3B,WAAW;IACX,UAAU;IACV,aAAa;IACb,WAAW;CACH,CAAC","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthFlowConfig, AuthIdentifierKind, AuthSignUpField } from './auth';\nimport type { ComponentDataBindingRegistry } from './bindings';\nimport type { DataSourceRegistry } from './data';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport interface ThemeConfig {\n id: string;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n}\n\nexport type ActionType =\n | 'navigate'\n | 'alert'\n | 'console'\n | 'toggleDarkMode'\n | 'setLanguage'\n | 'search'\n | 'filter';\n\nexport interface NavigateAction {\n type: 'navigate';\n payload: {\n route: string;\n params?: Record<string, number | string>;\n };\n}\n\nexport interface AlertAction {\n type: 'alert';\n payload?: {\n message?: string;\n };\n}\n\nexport interface ConsoleAction {\n type: 'console';\n payload?: Record<string, unknown>;\n}\n\nexport interface ToggleDarkModeAction {\n type: 'toggleDarkMode';\n payload?: never;\n}\n\nexport interface SetLanguageAction {\n type: 'setLanguage';\n payload: {\n locale: string;\n };\n}\n\nexport interface SearchAction {\n type: 'search';\n payload: {\n query: string;\n scope?: string;\n };\n}\n\nexport interface FilterAction {\n type: 'filter';\n payload: {\n filterKey: string;\n filterValue: string;\n };\n}\n\nexport type Action =\n | AlertAction\n | ConsoleAction\n | FilterAction\n | NavigateAction\n | SearchAction\n | SetLanguageAction\n | ToggleDarkModeAction;\n\nexport type ManifestValue =\n | string\n | number\n | boolean\n | null\n | readonly ManifestValue[]\n | { readonly [key: string]: ManifestValue };\n\nexport type ComponentEventPayloadValue = ManifestValue;\n\nexport interface ComponentEventDto<\n TType extends string = string,\n TPayload extends object = Record<string, ComponentEventPayloadValue>,\n> {\n readonly type: TType;\n readonly sourceNodeId: string;\n readonly payload: TPayload;\n}\n\nexport type FormSubmitValues = Record<string, ComponentEventPayloadValue>;\n\nexport type FormSubmitEventDto = ComponentEventDto<\n 'form.submit',\n {\n readonly values: FormSubmitValues;\n }\n>;\n\nexport type ButtonPressEventDto = ComponentEventDto<'button.press', Record<string, never>>;\n\nexport interface CollectionItemPressPayload {\n readonly itemId: string | number;\n readonly item: Record<string, ComponentEventPayloadValue>;\n}\n\nexport type CollectionItemPressEventDto = ComponentEventDto<\n 'collection.itemPress',\n CollectionItemPressPayload\n>;\n\nexport type ComponentEventDtoKind =\n | ButtonPressEventDto['type']\n | CollectionItemPressEventDto['type']\n | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n | ButtonPressEventDto\n | CollectionItemPressEventDto\n | FormSubmitEventDto;\n\nexport const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\n\nexport const APP_CATEGORIES = [\n 'books_reading',\n 'business_productivity',\n 'developer_tools',\n 'education_learning',\n 'entertainment_media',\n 'finance_money',\n 'food_drink',\n 'games',\n 'graphics_design',\n 'health_fitness',\n 'kids_family',\n 'lifestyle',\n 'medical',\n 'music_audio',\n 'navigation_travel',\n 'news_magazines',\n 'photo_video',\n 'reference',\n 'shopping_commerce',\n 'social_community',\n 'sports',\n 'utilities_tools',\n 'weather',\n] as const;\nexport type AppCategory = (typeof APP_CATEGORIES)[number];\n\nexport const DEPLOYMENT_TARGETS = ['minikube'] as const;\nexport type KnownDeploymentTarget = (typeof DEPLOYMENT_TARGETS)[number];\nexport type DeploymentTarget = KnownDeploymentTarget | (string & {});\n\nexport const DATABASE_PROVIDERS = ['supabase'] as const;\nexport type KnownDatabaseProvider = (typeof DATABASE_PROVIDERS)[number];\nexport type DatabaseProvider = KnownDatabaseProvider | (string & {});\n\nexport const DATABASE_TIERS = ['dev', 'prod'] as const;\nexport type DatabaseTier = (typeof DATABASE_TIERS)[number];\n\nexport const STORAGE_PROVIDERS = ['auto', 's3', 'r2'] as const;\nexport type StorageProvider = (typeof STORAGE_PROVIDERS)[number];\n\nexport const AUTHZ_KINDS = ['RBAC', 'ABAC'] as const;\nexport type AuthzKind = (typeof AUTHZ_KINDS)[number];\n\nexport const AUTHZ_ENGINES = ['cerbos', 'native'] as const;\nexport type AuthzEngine = (typeof AUTHZ_ENGINES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_PROVIDERS = ['supabase'] as const;\nexport type KnownAuthProvider = (typeof AUTH_PROVIDERS)[number];\nexport type AuthProvider = KnownAuthProvider | (string & {});\n\nexport const AUTH_SIGN_IN_IDENTIFIERS = ['email', 'username', 'phone'] as const;\nexport type AuthSignInIdentifier = AuthIdentifierKind;\n\nexport const AUTH_SIGN_UP_POLICIES = ['autoSignIn', 'requireVerification'] as const;\nexport type AuthSignUpPolicy = (typeof AUTH_SIGN_UP_POLICIES)[number];\n\nexport const AUTH_PROFILE_FIELDS = [\n ...AUTH_SIGN_IN_IDENTIFIERS,\n 'firstName',\n 'lastName',\n 'displayName',\n 'avatarUrl',\n] as const;\nexport type KnownAuthProfileField = (typeof AUTH_PROFILE_FIELDS)[number];\nexport type AuthProfileField = KnownAuthProfileField | (string & {});\n\nexport interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n children?: UiNode[];\n style?: Record<string, number | string>;\n}\n\nexport interface ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\n}\n\nexport interface NavigatorSpec {\n type: NavigatorType;\n initialRouteName?: string;\n routes: RouteDefinition[];\n options?: Record<string, unknown>;\n}\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n hideInTabBar?: boolean;\n guards?: string[];\n screenId?: string;\n navigator?: NavigatorSpec;\n}\n\nexport interface DeploymentSpec {\n target: DeploymentTarget;\n monitoring: boolean;\n}\n\nexport interface DatabaseSpec {\n provider: DatabaseProvider;\n tier: DatabaseTier;\n}\n\nexport interface StorageSpec {\n provider: StorageProvider;\n buckets: string[];\n}\n\nexport interface AuthzSpec {\n kind: AuthzKind;\n engine: AuthzEngine;\n}\n\nexport interface AuthSignInSpec {\n identifiers: AuthSignInIdentifier[];\n}\n\nexport interface AuthSignUpSpec {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n signUpPolicy?: AuthSignUpPolicy;\n}\n\nexport interface AuthProfileSpec {\n fields: AuthProfileField[];\n}\n\nexport interface AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\n profile?: AuthProfileSpec;\n}\n\nexport interface NetworkingSpec {\n domain?: string;\n cdn: boolean;\n}\n\nexport interface InfraManifest {\n deployment?: DeploymentSpec;\n auth?: AuthSpec;\n database?: DatabaseSpec;\n storage?: StorageSpec;\n networking?: NetworkingSpec;\n plugins: string[];\n pluginsConfig?: Record<string, unknown>;\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n settings: {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n authFlow: AuthFlowConfig;\n };\n}\n"]}
|
package/dist/ui.d.ts
CHANGED
|
@@ -46,6 +46,42 @@ export interface UiComponentEventMeta {
|
|
|
46
46
|
readonly description?: string;
|
|
47
47
|
readonly payloadFields?: readonly UiComponentEventPayloadFieldMeta[];
|
|
48
48
|
}
|
|
49
|
+
export type UiBindableValueType = 'array' | 'boolean' | 'date' | 'imageAsset' | 'number' | 'object' | 'record' | 'string' | 'unknown';
|
|
50
|
+
export interface UiBindableValueFieldMeta {
|
|
51
|
+
readonly path: string;
|
|
52
|
+
readonly type: UiBindableValueType;
|
|
53
|
+
readonly label?: string;
|
|
54
|
+
readonly description?: string;
|
|
55
|
+
readonly required?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface UiBindableValueMeta {
|
|
58
|
+
readonly type: UiBindableValueType;
|
|
59
|
+
readonly label?: string;
|
|
60
|
+
readonly description?: string;
|
|
61
|
+
readonly fields?: readonly UiBindableValueFieldMeta[];
|
|
62
|
+
readonly itemType?: UiBindableValueType;
|
|
63
|
+
}
|
|
64
|
+
export interface UiBindablePropMeta {
|
|
65
|
+
readonly value: UiBindableValueMeta;
|
|
66
|
+
readonly label?: string;
|
|
67
|
+
readonly description?: string;
|
|
68
|
+
readonly required?: boolean;
|
|
69
|
+
readonly acceptsFallback?: boolean;
|
|
70
|
+
readonly acceptsTransforms?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface UiBindableEventPayloadMeta {
|
|
73
|
+
readonly eventType: UiComponentEventPayloadKind;
|
|
74
|
+
readonly fields?: readonly UiComponentEventPayloadFieldMeta[];
|
|
75
|
+
}
|
|
76
|
+
export interface UiBindableEventMeta {
|
|
77
|
+
readonly label?: string;
|
|
78
|
+
readonly description?: string;
|
|
79
|
+
readonly payload?: UiBindableEventPayloadMeta;
|
|
80
|
+
}
|
|
81
|
+
export interface UiComponentBindingMeta {
|
|
82
|
+
readonly props?: Readonly<Record<string, UiBindablePropMeta>>;
|
|
83
|
+
readonly events?: Readonly<Record<string, UiBindableEventMeta>>;
|
|
84
|
+
}
|
|
49
85
|
export interface UiComponentSlotMeta {
|
|
50
86
|
readonly label?: string;
|
|
51
87
|
readonly allowedChildren?: readonly string[];
|
|
@@ -56,6 +92,7 @@ export interface UiComponentMeta {
|
|
|
56
92
|
readonly description?: string;
|
|
57
93
|
readonly directManifestNode: boolean;
|
|
58
94
|
readonly allowedChildren: readonly string[];
|
|
95
|
+
readonly bindings?: UiComponentBindingMeta;
|
|
59
96
|
readonly blueprint?: UiComponentBlueprint;
|
|
60
97
|
readonly events?: Readonly<Record<string, UiComponentEventMeta>>;
|
|
61
98
|
readonly i18n?: UiComponentI18nMeta;
|
package/dist/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpF,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,OAAO,GACP,SAAS,GACT,OAAO,GACP,MAAM,GACN,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,oBAAoB,EAAE,GAC/B;IACE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;CAC9C,CAAC;AAEN,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;CACxC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC7C,QAAQ,CAAC,OAAO,CAAC,E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C;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,uBAAuB,CAAC;CAC9C"}
|
package/dist/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentEventDtoKind } from './types';\n\nexport type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';\n\nexport type UiComponentPropType =\n | 'action'\n | 'array'\n | 'boolean'\n | 'color'\n | 'enum'\n | 'imageAsset'\n | 'number'\n | 'radius'\n | 'shadow'\n | 'spacing'\n | 'string'\n | 'typographySize'\n | 'typographyWeight';\n\nexport type UiComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly UiComponentPropValue[]\n | {\n readonly [key: string]: UiComponentPropValue;\n };\n\nexport interface UiComponentPropArrayItemSchema {\n readonly key: string;\n readonly schema: UiComponentPropSchema;\n}\n\nexport interface UiComponentPropSchema {\n readonly type: UiComponentPropType;\n readonly category: string;\n readonly label?: string;\n readonly enum?: readonly (number | string)[];\n readonly default?: UiComponentPropValue;\n readonly itemSchema?: readonly UiComponentPropArrayItemSchema[];\n}\n\nexport interface UiComponentBlueprintIcon {\n readonly name: string;\n readonly provider?: string;\n}\n\nexport interface UiComponentBlueprint {\n readonly label: string;\n readonly icon?: UiComponentBlueprintIcon;\n readonly defaultProps?: Readonly<Record<string, UiComponentPropValue>>;\n}\n\nexport interface UiComponentI18nFieldMeta {\n readonly keyProp: string;\n readonly defaultTextProp: string;\n}\n\nexport interface UiComponentI18nMeta {\n readonly fields: readonly UiComponentI18nFieldMeta[];\n}\n\nexport type UiComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\n\nexport type UiComponentEventPayloadFieldType =\n | 'boolean'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: UiComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface UiComponentEventMeta {\n readonly label: string;\n readonly eventType: UiComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport interface UiComponentSlotMeta {\n readonly label?: string;\n readonly allowedChildren?: readonly string[];\n}\n\nexport interface UiComponentMeta {\n readonly name: string;\n readonly category: UiComponentCategory;\n readonly description?: string;\n readonly directManifestNode: boolean;\n readonly allowedChildren: readonly string[];\n readonly blueprint?: UiComponentBlueprint;\n readonly events?: Readonly<Record<string, UiComponentEventMeta>>;\n readonly i18n?: UiComponentI18nMeta;\n readonly slots?: Readonly<Record<string, UiComponentSlotMeta>>;\n readonly note?: string;\n readonly props: Readonly<Record<string, UiComponentPropSchema>>;\n}\n\nexport type UiComponentMetaRegistry = Readonly<Record<string, UiComponentMeta>>;\n\nexport interface UiComponentPackageManifest {\n readonly packageName: string;\n readonly displayName?: string;\n readonly components: UiComponentMetaRegistry;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentEventDtoKind } from './types';\n\nexport type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';\n\nexport type UiComponentPropType =\n | 'action'\n | 'array'\n | 'boolean'\n | 'color'\n | 'enum'\n | 'imageAsset'\n | 'number'\n | 'radius'\n | 'shadow'\n | 'spacing'\n | 'string'\n | 'typographySize'\n | 'typographyWeight';\n\nexport type UiComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly UiComponentPropValue[]\n | {\n readonly [key: string]: UiComponentPropValue;\n };\n\nexport interface UiComponentPropArrayItemSchema {\n readonly key: string;\n readonly schema: UiComponentPropSchema;\n}\n\nexport interface UiComponentPropSchema {\n readonly type: UiComponentPropType;\n readonly category: string;\n readonly label?: string;\n readonly enum?: readonly (number | string)[];\n readonly default?: UiComponentPropValue;\n readonly itemSchema?: readonly UiComponentPropArrayItemSchema[];\n}\n\nexport interface UiComponentBlueprintIcon {\n readonly name: string;\n readonly provider?: string;\n}\n\nexport interface UiComponentBlueprint {\n readonly label: string;\n readonly icon?: UiComponentBlueprintIcon;\n readonly defaultProps?: Readonly<Record<string, UiComponentPropValue>>;\n}\n\nexport interface UiComponentI18nFieldMeta {\n readonly keyProp: string;\n readonly defaultTextProp: string;\n}\n\nexport interface UiComponentI18nMeta {\n readonly fields: readonly UiComponentI18nFieldMeta[];\n}\n\nexport type UiComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\n\nexport type UiComponentEventPayloadFieldType =\n | 'boolean'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: UiComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface UiComponentEventMeta {\n readonly label: string;\n readonly eventType: UiComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport type UiBindableValueType =\n | 'array'\n | 'boolean'\n | 'date'\n | 'imageAsset'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiBindableValueFieldMeta {\n readonly path: string;\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n}\n\nexport interface UiBindableValueMeta {\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly fields?: readonly UiBindableValueFieldMeta[];\n readonly itemType?: UiBindableValueType;\n}\n\nexport interface UiBindablePropMeta {\n readonly value: UiBindableValueMeta;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n readonly acceptsFallback?: boolean;\n readonly acceptsTransforms?: boolean;\n}\n\nexport interface UiBindableEventPayloadMeta {\n readonly eventType: UiComponentEventPayloadKind;\n readonly fields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport interface UiBindableEventMeta {\n readonly label?: string;\n readonly description?: string;\n readonly payload?: UiBindableEventPayloadMeta;\n}\n\nexport interface UiComponentBindingMeta {\n readonly props?: Readonly<Record<string, UiBindablePropMeta>>;\n readonly events?: Readonly<Record<string, UiBindableEventMeta>>;\n}\n\nexport interface UiComponentSlotMeta {\n readonly label?: string;\n readonly allowedChildren?: readonly string[];\n}\n\nexport interface UiComponentMeta {\n readonly name: string;\n readonly category: UiComponentCategory;\n readonly description?: string;\n readonly directManifestNode: boolean;\n readonly allowedChildren: readonly string[];\n readonly bindings?: UiComponentBindingMeta;\n readonly blueprint?: UiComponentBlueprint;\n readonly events?: Readonly<Record<string, UiComponentEventMeta>>;\n readonly i18n?: UiComponentI18nMeta;\n readonly slots?: Readonly<Record<string, UiComponentSlotMeta>>;\n readonly note?: string;\n readonly props: Readonly<Record<string, UiComponentPropSchema>>;\n}\n\nexport type UiComponentMetaRegistry = Readonly<Record<string, UiComponentMeta>>;\n\nexport interface UiComponentPackageManifest {\n readonly packageName: string;\n readonly displayName?: string;\n readonly components: UiComponentMetaRegistry;\n}\n"]}
|