@inf-monkeys-tech/monkeys 1.0.72 → 1.1.1
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/lib/contracts/aggregate-commit.d.ts +155 -0
- package/lib/contracts/aggregate-commit.d.ts.map +1 -0
- package/lib/contracts/aggregate-commit.js +112 -0
- package/lib/contracts/aggregate-commit.js.map +1 -0
- package/lib/contracts/capability.d.ts +3 -0
- package/lib/contracts/capability.d.ts.map +1 -1
- package/lib/contracts/capability.js +1 -1
- package/lib/contracts/capability.js.map +1 -1
- package/lib/contracts/common.d.ts +2 -0
- package/lib/contracts/common.d.ts.map +1 -1
- package/lib/contracts/common.js +34 -1
- package/lib/contracts/common.js.map +1 -1
- package/lib/contracts/component-assembly.d.ts +118 -0
- package/lib/contracts/component-assembly.d.ts.map +1 -0
- package/lib/contracts/component-assembly.js +61 -0
- package/lib/contracts/component-assembly.js.map +1 -0
- package/lib/contracts/declarative-control-http.d.ts +80610 -41684
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control-http.js +1596 -165
- package/lib/contracts/declarative-control-http.js.map +1 -1
- package/lib/contracts/declarative-control.d.ts +12525 -4613
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +3792 -422
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/index.d.ts +6 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +6 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/legacy-route.d.ts +15 -0
- package/lib/contracts/legacy-route.d.ts.map +1 -0
- package/lib/contracts/legacy-route.js +13 -0
- package/lib/contracts/legacy-route.js.map +1 -0
- package/lib/contracts/menu.d.ts +12 -0
- package/lib/contracts/menu.d.ts.map +1 -1
- package/lib/contracts/page-binding-dependencies.d.ts +25 -0
- package/lib/contracts/page-binding-dependencies.d.ts.map +1 -0
- package/lib/contracts/page-binding-dependencies.js +54 -0
- package/lib/contracts/page-binding-dependencies.js.map +1 -0
- package/lib/contracts/page-expression.d.ts +106 -0
- package/lib/contracts/page-expression.d.ts.map +1 -0
- package/lib/contracts/page-expression.js +136 -0
- package/lib/contracts/page-expression.js.map +1 -0
- package/lib/contracts/page-stream.d.ts +101 -0
- package/lib/contracts/page-stream.d.ts.map +1 -0
- package/lib/contracts/page-stream.js +66 -0
- package/lib/contracts/page-stream.js.map +1 -0
- package/lib/contracts/page.d.ts +24 -0
- package/lib/contracts/page.d.ts.map +1 -1
- package/lib/contracts/page.js +2 -0
- package/lib/contracts/page.js.map +1 -1
- package/lib/contracts/record-editor-draft.d.ts +95 -0
- package/lib/contracts/record-editor-draft.d.ts.map +1 -0
- package/lib/contracts/record-editor-draft.js +35 -0
- package/lib/contracts/record-editor-draft.js.map +1 -0
- package/lib/contracts/render.d.ts +607 -1
- package/lib/contracts/render.d.ts.map +1 -1
- package/lib/contracts/render.js +332 -133
- package/lib/contracts/render.js.map +1 -1
- package/lib/contracts/semantic.d.ts +48 -1
- package/lib/contracts/semantic.d.ts.map +1 -1
- package/lib/contracts/semantic.js +22 -19
- package/lib/contracts/semantic.js.map +1 -1
- package/lib/contracts/tenant.d.ts +115 -9
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +14 -1
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/contracts/theme.d.ts +1 -1
- package/lib/esm/contracts/index.mjs +8466 -3114
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +13809 -5067
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +13964 -4515
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +8779 -2614
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/aggregate-commit-request.schema.json +426 -0
- package/lib/json-schema/capability-manifest.schema.json +1 -0
- package/lib/json-schema/capability-registry.schema.json +1 -0
- package/lib/json-schema/declarative-route-owner-index.schema.json +1092 -0
- package/lib/json-schema/declarative-workbench-catalog.schema.json +769 -0
- package/lib/json-schema/design-capability-catalog-artifact.schema.json +2787 -0
- package/lib/json-schema/domain-command-definition.schema.json +18 -0
- package/lib/json-schema/domain-query-definition.schema.json +1406 -0
- package/lib/json-schema/index.json +7 -0
- package/lib/json-schema/legacy-route-takeover-authorization.schema.json +601 -0
- package/lib/json-schema/navigation-release.schema.json +296 -0
- package/lib/json-schema/navigation-runtime-bundle.schema.json +48 -8
- package/lib/json-schema/navigation.schema.json +47 -8
- package/lib/json-schema/overlay-node.schema.json +883 -0
- package/lib/json-schema/page-definition.schema.json +34 -0
- package/lib/json-schema/page-release.schema.json +1520 -626
- package/lib/json-schema/page-runtime-bundle.schema.json +7334 -1153
- package/lib/json-schema/page-runtime-descriptor.schema.json +34 -0
- package/lib/json-schema/page.schema.json +6329 -6602
- package/lib/json-schema/permission-alternative-policy.schema.json +60 -0
- package/lib/json-schema/product-declaration.schema.json +53 -0
- package/lib/json-schema/render-node.schema.json +883 -0
- package/lib/json-schema/render-tree.schema.json +883 -0
- package/lib/json-schema/tenant-product-config.schema.json +88 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +88 -0
- package/lib/json-schema/view-provider-descriptor.schema.json +1 -0
- package/lib/json-schema/workbench-release.schema.json +1520 -626
- package/lib/json-schema/workbench-runtime-bundle.schema.json +686 -20
- package/lib/json-schema/workbench.schema.json +1196 -0
- package/lib/runtime/component-assembly.d.ts +4 -0
- package/lib/runtime/component-assembly.d.ts.map +1 -0
- package/lib/runtime/component-assembly.js +126 -0
- package/lib/runtime/component-assembly.js.map +1 -0
- package/lib/runtime/declarative-control-compiler.d.ts +106 -20
- package/lib/runtime/declarative-control-compiler.d.ts.map +1 -1
- package/lib/runtime/declarative-control-compiler.js +1525 -280
- package/lib/runtime/declarative-control-compiler.js.map +1 -1
- package/lib/runtime/index.d.ts +5 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +7 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/page-expression.d.ts +9 -0
- package/lib/runtime/page-expression.d.ts.map +1 -0
- package/lib/runtime/page-expression.js +257 -0
- package/lib/runtime/page-expression.js.map +1 -0
- package/lib/runtime/page-stream.d.ts +24 -0
- package/lib/runtime/page-stream.d.ts.map +1 -0
- package/lib/runtime/page-stream.js +65 -0
- package/lib/runtime/page-stream.js.map +1 -0
- package/lib/runtime/record-editor-draft.d.ts +29 -0
- package/lib/runtime/record-editor-draft.d.ts.map +1 -0
- package/lib/runtime/record-editor-draft.js +161 -0
- package/lib/runtime/record-editor-draft.js.map +1 -0
- package/lib/runtime/target-render-model.d.ts +4 -0
- package/lib/runtime/target-render-model.d.ts.map +1 -0
- package/lib/runtime/target-render-model.js +28 -0
- package/lib/runtime/target-render-model.js.map +1 -0
- package/lib/runtime/tenant-config.d.ts +2 -0
- package/lib/runtime/tenant-config.d.ts.map +1 -1
- package/lib/runtime/tenant-config.js +6 -1
- package/lib/runtime/tenant-config.js.map +1 -1
- package/lib/schemas/index.d.ts +5969 -2731
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +174 -95
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
package/lib/contracts/render.js
CHANGED
|
@@ -1,81 +1,101 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ViewProviderDescriptorSchema = exports.ApplicationHandoffSchema = exports.ApplicationHandoffEndpointSchema = exports.OverlayNodeSchema = exports.OverlayZIndexLaneSchema = exports.RenderTreeSchema = exports.RenderNodeSchema = exports.RenderResponsiveRuleSchema = exports.RenderLayoutSchema = exports.RenderLifecycleSchema = exports.RenderActivationSchema = exports.RenderScrollSchema = exports.RenderSurfaceSchema = exports.RenderNodeKindSchema = exports.RenderNodeStateSchema = exports.ProductContextSchema = void 0;
|
|
3
|
+
exports.ViewProviderDescriptorSchema = exports.ApplicationHandoffSchema = exports.ApplicationHandoffEndpointSchema = exports.OverlayNodeSchema = exports.OverlayZIndexLaneSchema = exports.RenderTreeSchema = exports.RenderNodeSchema = exports.RenderStyleSchema = exports.RenderStyleValueSchema = exports.RenderResponsiveRuleSchema = exports.RenderLayoutSchema = exports.RenderLifecycleSchema = exports.RenderActivationSchema = exports.RenderScrollSchema = exports.RenderSurfaceSchema = exports.RenderNodeKindSchema = exports.RenderNodeStateSchema = exports.ProductContextSchema = void 0;
|
|
4
|
+
const page_expression_1 = require("./page-expression");
|
|
4
5
|
const zod_1 = require("zod");
|
|
5
6
|
const common_1 = require("./common");
|
|
6
|
-
exports.ProductContextSchema = zod_1.z.enum([
|
|
7
|
+
exports.ProductContextSchema = zod_1.z.enum(["studio", "kernel"]);
|
|
7
8
|
exports.RenderNodeStateSchema = zod_1.z.enum([
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
"idle",
|
|
10
|
+
"loading",
|
|
11
|
+
"empty",
|
|
12
|
+
"error",
|
|
13
|
+
"success",
|
|
14
|
+
"disabled",
|
|
15
|
+
"selected",
|
|
15
16
|
]);
|
|
16
17
|
exports.RenderNodeKindSchema = zod_1.z.enum([
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
"shell",
|
|
19
|
+
"page",
|
|
20
|
+
"navigation",
|
|
21
|
+
"view",
|
|
22
|
+
"record",
|
|
23
|
+
"control",
|
|
24
|
+
"detail",
|
|
25
|
+
"action",
|
|
26
|
+
"overlay",
|
|
27
|
+
"professional-provider",
|
|
27
28
|
]);
|
|
28
29
|
exports.RenderSurfaceSchema = zod_1.z
|
|
29
30
|
.object({
|
|
30
|
-
frameOwner: zod_1.z.enum([
|
|
31
|
+
frameOwner: zod_1.z.enum(["host", "provider", "none"]),
|
|
31
32
|
tone: common_1.ContractIdentifierSchema.optional(),
|
|
32
|
-
density: zod_1.z.enum([
|
|
33
|
+
density: zod_1.z.enum(["compact", "default", "comfortable"]),
|
|
33
34
|
})
|
|
34
35
|
.strict();
|
|
35
36
|
exports.RenderScrollSchema = zod_1.z
|
|
36
37
|
.object({
|
|
37
|
-
owner: zod_1.z.enum([
|
|
38
|
-
axis: zod_1.z.enum([
|
|
38
|
+
owner: zod_1.z.enum(["page", "surface", "provider"]),
|
|
39
|
+
axis: zod_1.z.enum(["x", "y", "both", "none"]),
|
|
39
40
|
restoreKey: common_1.ContractIdentifierSchema.optional(),
|
|
40
41
|
virtualizationBoundary: zod_1.z.boolean(),
|
|
41
42
|
})
|
|
42
43
|
.strict()
|
|
43
44
|
.superRefine((scroll, context) => {
|
|
44
|
-
if (scroll.owner ===
|
|
45
|
+
if (scroll.owner === "provider" && scroll.restoreKey) {
|
|
45
46
|
context.addIssue({
|
|
46
|
-
code:
|
|
47
|
-
path: [
|
|
48
|
-
message:
|
|
47
|
+
code: "custom",
|
|
48
|
+
path: ["restoreKey"],
|
|
49
|
+
message: "Provider-owned scroll state cannot declare a host restoreKey.",
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
if (scroll.virtualizationBoundary && scroll.owner !==
|
|
52
|
+
if (scroll.virtualizationBoundary && scroll.owner !== "provider") {
|
|
52
53
|
context.addIssue({
|
|
53
|
-
code:
|
|
54
|
-
path: [
|
|
55
|
-
message:
|
|
54
|
+
code: "custom",
|
|
55
|
+
path: ["owner"],
|
|
56
|
+
message: "A virtualization boundary must keep scroll ownership in the provider.",
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
exports.RenderActivationSchema = zod_1.z
|
|
60
61
|
.object({
|
|
61
62
|
activationId: common_1.ContractIdentifierSchema,
|
|
62
|
-
mode: zod_1.z.enum([
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
mode: zod_1.z.enum([
|
|
64
|
+
"navigate",
|
|
65
|
+
"select",
|
|
66
|
+
"drawer",
|
|
67
|
+
"modal",
|
|
68
|
+
"fullscreen",
|
|
69
|
+
"inline",
|
|
70
|
+
]),
|
|
71
|
+
targetPath: zod_1.z
|
|
72
|
+
.string()
|
|
73
|
+
.trim()
|
|
74
|
+
.regex(/^\/(?!\/)/, "Expected an application-relative path.")
|
|
75
|
+
.optional(),
|
|
76
|
+
history: zod_1.z.enum(["push", "replace"]).optional(),
|
|
65
77
|
})
|
|
66
78
|
.strict()
|
|
67
79
|
.superRefine((activation, context) => {
|
|
68
|
-
if (activation.mode ===
|
|
69
|
-
context.addIssue({
|
|
80
|
+
if (activation.mode === "navigate" && !activation.targetPath) {
|
|
81
|
+
context.addIssue({
|
|
82
|
+
code: "custom",
|
|
83
|
+
path: ["targetPath"],
|
|
84
|
+
message: "Navigate activation requires an application-relative targetPath.",
|
|
85
|
+
});
|
|
70
86
|
}
|
|
71
|
-
if (activation.mode !==
|
|
72
|
-
context.addIssue({
|
|
87
|
+
if (activation.mode !== "navigate" && activation.targetPath) {
|
|
88
|
+
context.addIssue({
|
|
89
|
+
code: "custom",
|
|
90
|
+
path: ["targetPath"],
|
|
91
|
+
message: "Only navigate activation may declare targetPath.",
|
|
92
|
+
});
|
|
73
93
|
}
|
|
74
94
|
});
|
|
75
95
|
exports.RenderLifecycleSchema = zod_1.z
|
|
76
96
|
.object({
|
|
77
|
-
mountPolicy: zod_1.z.enum([
|
|
78
|
-
queryPolicy: zod_1.z.enum([
|
|
97
|
+
mountPolicy: zod_1.z.enum(["always", "when-visible", "when-active"]),
|
|
98
|
+
queryPolicy: zod_1.z.enum(["always", "when-visible", "when-active", "manual"]),
|
|
79
99
|
retainOnDeactivate: zod_1.z.boolean(),
|
|
80
100
|
deepLink: zod_1.z.boolean(),
|
|
81
101
|
focusReturn: zod_1.z.boolean(),
|
|
@@ -83,23 +103,35 @@ exports.RenderLifecycleSchema = zod_1.z
|
|
|
83
103
|
.strict();
|
|
84
104
|
exports.RenderLayoutSchema = zod_1.z
|
|
85
105
|
.object({
|
|
86
|
-
mode: zod_1.z.enum([
|
|
87
|
-
direction: zod_1.z.enum([
|
|
106
|
+
mode: zod_1.z.enum(["contents", "block", "flex", "grid", "absolute"]),
|
|
107
|
+
direction: zod_1.z.enum(["row", "column"]).optional(),
|
|
88
108
|
columns: zod_1.z.number().int().positive().optional(),
|
|
89
|
-
align: zod_1.z.enum([
|
|
90
|
-
justify: zod_1.z.enum([
|
|
109
|
+
align: zod_1.z.enum(["start", "center", "end", "stretch"]).optional(),
|
|
110
|
+
justify: zod_1.z.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
91
111
|
gapTokenRef: common_1.EntityRefSchema.optional(),
|
|
92
112
|
})
|
|
93
113
|
.strict()
|
|
94
114
|
.superRefine((layout, context) => {
|
|
95
|
-
if (layout.direction && layout.mode !==
|
|
96
|
-
context.addIssue({
|
|
115
|
+
if (layout.direction && layout.mode !== "flex") {
|
|
116
|
+
context.addIssue({
|
|
117
|
+
code: "custom",
|
|
118
|
+
path: ["direction"],
|
|
119
|
+
message: "direction is only valid for flex layout.",
|
|
120
|
+
});
|
|
97
121
|
}
|
|
98
|
-
if (layout.columns && layout.mode !==
|
|
99
|
-
context.addIssue({
|
|
122
|
+
if (layout.columns && layout.mode !== "grid") {
|
|
123
|
+
context.addIssue({
|
|
124
|
+
code: "custom",
|
|
125
|
+
path: ["columns"],
|
|
126
|
+
message: "columns is only valid for grid layout.",
|
|
127
|
+
});
|
|
100
128
|
}
|
|
101
|
-
if (layout.gapTokenRef && layout.gapTokenRef.kind !==
|
|
102
|
-
context.addIssue({
|
|
129
|
+
if (layout.gapTokenRef && layout.gapTokenRef.kind !== "design-token") {
|
|
130
|
+
context.addIssue({
|
|
131
|
+
code: "custom",
|
|
132
|
+
path: ["gapTokenRef", "kind"],
|
|
133
|
+
message: "gapTokenRef must reference design-token.",
|
|
134
|
+
});
|
|
103
135
|
}
|
|
104
136
|
});
|
|
105
137
|
exports.RenderResponsiveRuleSchema = zod_1.z
|
|
@@ -111,20 +143,143 @@ exports.RenderResponsiveRuleSchema = zod_1.z
|
|
|
111
143
|
.strict()
|
|
112
144
|
.superRefine((rule, context) => {
|
|
113
145
|
if (rule.minWidthPx === undefined && rule.maxWidthPx === undefined) {
|
|
114
|
-
context.addIssue({
|
|
146
|
+
context.addIssue({
|
|
147
|
+
code: "custom",
|
|
148
|
+
path: [],
|
|
149
|
+
message: "Responsive rule must declare minWidthPx or maxWidthPx.",
|
|
150
|
+
});
|
|
115
151
|
}
|
|
116
|
-
if (rule.minWidthPx !== undefined &&
|
|
117
|
-
|
|
152
|
+
if (rule.minWidthPx !== undefined &&
|
|
153
|
+
rule.maxWidthPx !== undefined &&
|
|
154
|
+
rule.minWidthPx > rule.maxWidthPx) {
|
|
155
|
+
context.addIssue({
|
|
156
|
+
code: "custom",
|
|
157
|
+
path: ["maxWidthPx"],
|
|
158
|
+
message: "maxWidthPx must be greater than or equal to minWidthPx.",
|
|
159
|
+
});
|
|
118
160
|
}
|
|
119
161
|
});
|
|
162
|
+
exports.RenderStyleValueSchema = zod_1.z.union([
|
|
163
|
+
zod_1.z.number().finite(),
|
|
164
|
+
zod_1.z
|
|
165
|
+
.string()
|
|
166
|
+
.trim()
|
|
167
|
+
.min(1)
|
|
168
|
+
.max(256)
|
|
169
|
+
.superRefine((value, context) => {
|
|
170
|
+
if (/[;{}]/.test(value) ||
|
|
171
|
+
/(?:url|expression|javascript|var)\s*\(/i.test(value)) {
|
|
172
|
+
context.addIssue({
|
|
173
|
+
code: "custom",
|
|
174
|
+
message: "Render style values must be bounded CSS values or $ Design Token references.",
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}),
|
|
178
|
+
]);
|
|
179
|
+
exports.RenderStyleSchema = zod_1.z
|
|
180
|
+
.object({
|
|
181
|
+
width: exports.RenderStyleValueSchema.optional(),
|
|
182
|
+
height: exports.RenderStyleValueSchema.optional(),
|
|
183
|
+
minWidth: exports.RenderStyleValueSchema.optional(),
|
|
184
|
+
maxWidth: exports.RenderStyleValueSchema.optional(),
|
|
185
|
+
minHeight: exports.RenderStyleValueSchema.optional(),
|
|
186
|
+
maxHeight: exports.RenderStyleValueSchema.optional(),
|
|
187
|
+
padding: exports.RenderStyleValueSchema.optional(),
|
|
188
|
+
paddingBlock: exports.RenderStyleValueSchema.optional(),
|
|
189
|
+
paddingInline: exports.RenderStyleValueSchema.optional(),
|
|
190
|
+
margin: exports.RenderStyleValueSchema.optional(),
|
|
191
|
+
marginBlockStart: exports.RenderStyleValueSchema.optional(),
|
|
192
|
+
marginBlockEnd: exports.RenderStyleValueSchema.optional(),
|
|
193
|
+
marginInlineStart: exports.RenderStyleValueSchema.optional(),
|
|
194
|
+
marginInlineEnd: exports.RenderStyleValueSchema.optional(),
|
|
195
|
+
display: zod_1.z
|
|
196
|
+
.enum([
|
|
197
|
+
"none",
|
|
198
|
+
"block",
|
|
199
|
+
"inline",
|
|
200
|
+
"inline-block",
|
|
201
|
+
"flex",
|
|
202
|
+
"inline-flex",
|
|
203
|
+
"grid",
|
|
204
|
+
"contents",
|
|
205
|
+
])
|
|
206
|
+
.optional(),
|
|
207
|
+
gap: exports.RenderStyleValueSchema.optional(),
|
|
208
|
+
rowGap: exports.RenderStyleValueSchema.optional(),
|
|
209
|
+
columnGap: exports.RenderStyleValueSchema.optional(),
|
|
210
|
+
background: exports.RenderStyleValueSchema.optional(),
|
|
211
|
+
color: exports.RenderStyleValueSchema.optional(),
|
|
212
|
+
borderColor: exports.RenderStyleValueSchema.optional(),
|
|
213
|
+
borderWidth: exports.RenderStyleValueSchema.optional(),
|
|
214
|
+
borderStyle: zod_1.z.enum(["none", "solid", "dashed", "dotted"]).optional(),
|
|
215
|
+
borderRadius: exports.RenderStyleValueSchema.optional(),
|
|
216
|
+
boxShadow: exports.RenderStyleValueSchema.optional(),
|
|
217
|
+
fontSize: exports.RenderStyleValueSchema.optional(),
|
|
218
|
+
fontFamily: exports.RenderStyleValueSchema.optional(),
|
|
219
|
+
fontWeight: exports.RenderStyleValueSchema.optional(),
|
|
220
|
+
lineHeight: exports.RenderStyleValueSchema.optional(),
|
|
221
|
+
textAlign: zod_1.z.enum(["start", "center", "end", "left", "right"]).optional(),
|
|
222
|
+
whiteSpace: zod_1.z
|
|
223
|
+
.enum(["normal", "nowrap", "pre", "pre-wrap", "pre-line", "break-spaces"])
|
|
224
|
+
.optional(),
|
|
225
|
+
overflow: zod_1.z
|
|
226
|
+
.enum(["visible", "hidden", "auto", "scroll", "clip"])
|
|
227
|
+
.optional(),
|
|
228
|
+
overflowX: zod_1.z
|
|
229
|
+
.enum(["visible", "hidden", "auto", "scroll", "clip"])
|
|
230
|
+
.optional(),
|
|
231
|
+
overflowY: zod_1.z
|
|
232
|
+
.enum(["visible", "hidden", "auto", "scroll", "clip"])
|
|
233
|
+
.optional(),
|
|
234
|
+
position: zod_1.z
|
|
235
|
+
.enum(["static", "relative", "absolute", "sticky", "fixed"])
|
|
236
|
+
.optional(),
|
|
237
|
+
inset: exports.RenderStyleValueSchema.optional(),
|
|
238
|
+
top: exports.RenderStyleValueSchema.optional(),
|
|
239
|
+
right: exports.RenderStyleValueSchema.optional(),
|
|
240
|
+
bottom: exports.RenderStyleValueSchema.optional(),
|
|
241
|
+
left: exports.RenderStyleValueSchema.optional(),
|
|
242
|
+
gridTemplateColumns: exports.RenderStyleValueSchema.optional(),
|
|
243
|
+
gridColumn: exports.RenderStyleValueSchema.optional(),
|
|
244
|
+
gridRow: exports.RenderStyleValueSchema.optional(),
|
|
245
|
+
flex: exports.RenderStyleValueSchema.optional(),
|
|
246
|
+
flexDirection: zod_1.z
|
|
247
|
+
.enum(["row", "row-reverse", "column", "column-reverse"])
|
|
248
|
+
.optional(),
|
|
249
|
+
flexWrap: zod_1.z.enum(["nowrap", "wrap", "wrap-reverse"]).optional(),
|
|
250
|
+
alignItems: zod_1.z
|
|
251
|
+
.enum(["start", "center", "end", "stretch", "baseline"])
|
|
252
|
+
.optional(),
|
|
253
|
+
justifyContent: zod_1.z
|
|
254
|
+
.enum([
|
|
255
|
+
"start",
|
|
256
|
+
"center",
|
|
257
|
+
"end",
|
|
258
|
+
"space-between",
|
|
259
|
+
"space-around",
|
|
260
|
+
"space-evenly",
|
|
261
|
+
])
|
|
262
|
+
.optional(),
|
|
263
|
+
flexGrow: zod_1.z.number().finite().nonnegative().optional(),
|
|
264
|
+
flexShrink: zod_1.z.number().finite().nonnegative().optional(),
|
|
265
|
+
alignSelf: zod_1.z.enum(["auto", "start", "center", "end", "stretch"]).optional(),
|
|
266
|
+
justifySelf: zod_1.z
|
|
267
|
+
.enum(["auto", "start", "center", "end", "stretch"])
|
|
268
|
+
.optional(),
|
|
269
|
+
objectFit: zod_1.z
|
|
270
|
+
.enum(["contain", "cover", "fill", "none", "scale-down"])
|
|
271
|
+
.optional(),
|
|
272
|
+
opacity: zod_1.z.number().finite().min(0).max(1).optional(),
|
|
273
|
+
})
|
|
274
|
+
.strict();
|
|
120
275
|
const requireRef = (reference, expectedKind, path, context) => {
|
|
121
276
|
if (!reference)
|
|
122
277
|
return;
|
|
123
278
|
if (reference.kind !== expectedKind) {
|
|
124
279
|
context.addIssue({
|
|
125
|
-
code:
|
|
126
|
-
path: [...path,
|
|
127
|
-
message: `${path.join(
|
|
280
|
+
code: "custom",
|
|
281
|
+
path: [...path, "kind"],
|
|
282
|
+
message: `${path.join(".")} must reference ${expectedKind}.`,
|
|
128
283
|
});
|
|
129
284
|
}
|
|
130
285
|
};
|
|
@@ -134,22 +289,22 @@ const requirePinnedOwnedRef = (reference, expectedKind, path, context) => {
|
|
|
134
289
|
return;
|
|
135
290
|
if (reference.version === undefined) {
|
|
136
291
|
context.addIssue({
|
|
137
|
-
code:
|
|
138
|
-
path: [...path,
|
|
139
|
-
message: `${path.join(
|
|
292
|
+
code: "custom",
|
|
293
|
+
path: [...path, "version"],
|
|
294
|
+
message: `${path.join(".")} must pin a version.`,
|
|
140
295
|
});
|
|
141
296
|
}
|
|
142
297
|
if (reference.ownerRepo === undefined) {
|
|
143
298
|
context.addIssue({
|
|
144
|
-
code:
|
|
145
|
-
path: [...path,
|
|
146
|
-
message: `${path.join(
|
|
299
|
+
code: "custom",
|
|
300
|
+
path: [...path, "ownerRepo"],
|
|
301
|
+
message: `${path.join(".")} must declare its owner repository.`,
|
|
147
302
|
});
|
|
148
303
|
}
|
|
149
304
|
};
|
|
150
305
|
exports.RenderNodeSchema = zod_1.z
|
|
151
306
|
.object({
|
|
152
|
-
contract: zod_1.z.literal(
|
|
307
|
+
contract: zod_1.z.literal("RenderNode"),
|
|
153
308
|
nodeId: common_1.ContractIdentifierSchema,
|
|
154
309
|
kind: exports.RenderNodeKindSchema,
|
|
155
310
|
version: common_1.ContractVersionSchema,
|
|
@@ -168,43 +323,60 @@ exports.RenderNodeSchema = zod_1.z
|
|
|
168
323
|
activation: exports.RenderActivationSchema,
|
|
169
324
|
lifecycle: exports.RenderLifecycleSchema,
|
|
170
325
|
layout: exports.RenderLayoutSchema,
|
|
326
|
+
style: exports.RenderStyleSchema.optional(),
|
|
171
327
|
responsive: zod_1.z.array(exports.RenderResponsiveRuleSchema),
|
|
172
328
|
accessRef: common_1.EntityRefSchema.optional(),
|
|
173
329
|
evidenceRef: common_1.EntityRefSchema.optional(),
|
|
174
330
|
state: exports.RenderNodeStateSchema,
|
|
175
331
|
renderModel: common_1.JsonObjectSchema,
|
|
332
|
+
repeat: zod_1.z
|
|
333
|
+
.object({
|
|
334
|
+
source: page_expression_1.PageExpressionSchema,
|
|
335
|
+
keyPath: page_expression_1.PageValuePathSchema.min(1),
|
|
336
|
+
limit: zod_1.z.number().int().min(1).max(1000).default(200),
|
|
337
|
+
})
|
|
338
|
+
.strict()
|
|
339
|
+
.optional(),
|
|
176
340
|
})
|
|
177
341
|
.strict()
|
|
178
342
|
.superRefine((node, context) => {
|
|
179
|
-
requireRef(node.pageRef,
|
|
180
|
-
requirePinnedOwnedRef(node.capabilityRef,
|
|
181
|
-
requirePinnedOwnedRef(node.providerRef,
|
|
182
|
-
requireRef(node.accessRef,
|
|
183
|
-
requireRef(node.evidenceRef,
|
|
343
|
+
requireRef(node.pageRef, "page", ["pageRef"], context);
|
|
344
|
+
requirePinnedOwnedRef(node.capabilityRef, "capability", ["capabilityRef"], context);
|
|
345
|
+
requirePinnedOwnedRef(node.providerRef, "view-provider", ["providerRef"], context);
|
|
346
|
+
requireRef(node.accessRef, "access-policy", ["accessRef"], context);
|
|
347
|
+
requireRef(node.evidenceRef, "evidence", ["evidenceRef"], context);
|
|
184
348
|
if (node.parentNodeId === node.nodeId) {
|
|
185
349
|
context.addIssue({
|
|
186
|
-
code:
|
|
187
|
-
path: [
|
|
188
|
-
message:
|
|
350
|
+
code: "custom",
|
|
351
|
+
path: ["parentNodeId"],
|
|
352
|
+
message: "RenderNode cannot be its own parent.",
|
|
189
353
|
});
|
|
190
354
|
}
|
|
191
355
|
if (new Set(node.children).size !== node.children.length) {
|
|
192
|
-
context.addIssue({
|
|
356
|
+
context.addIssue({
|
|
357
|
+
code: "custom",
|
|
358
|
+
path: ["children"],
|
|
359
|
+
message: "RenderNode children must be unique.",
|
|
360
|
+
});
|
|
193
361
|
}
|
|
194
362
|
if (node.children.includes(node.nodeId)) {
|
|
195
|
-
context.addIssue({
|
|
363
|
+
context.addIssue({
|
|
364
|
+
code: "custom",
|
|
365
|
+
path: ["children"],
|
|
366
|
+
message: "RenderNode cannot be its own child.",
|
|
367
|
+
});
|
|
196
368
|
}
|
|
197
|
-
if (node.surface.frameOwner ===
|
|
369
|
+
if (node.surface.frameOwner === "provider" && !node.providerRef) {
|
|
198
370
|
context.addIssue({
|
|
199
|
-
code:
|
|
200
|
-
path: [
|
|
201
|
-
message:
|
|
371
|
+
code: "custom",
|
|
372
|
+
path: ["providerRef"],
|
|
373
|
+
message: "Provider-owned surfaces require providerRef.",
|
|
202
374
|
});
|
|
203
375
|
}
|
|
204
376
|
});
|
|
205
377
|
exports.RenderTreeSchema = zod_1.z
|
|
206
378
|
.object({
|
|
207
|
-
contract: zod_1.z.literal(
|
|
379
|
+
contract: zod_1.z.literal("RenderTree"),
|
|
208
380
|
treeId: common_1.ContractIdentifierSchema,
|
|
209
381
|
product: exports.ProductContextSchema,
|
|
210
382
|
rootNodeId: common_1.ContractIdentifierSchema,
|
|
@@ -212,30 +384,30 @@ exports.RenderTreeSchema = zod_1.z
|
|
|
212
384
|
})
|
|
213
385
|
.strict();
|
|
214
386
|
exports.OverlayZIndexLaneSchema = zod_1.z.enum([
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
387
|
+
"popover",
|
|
388
|
+
"drawer",
|
|
389
|
+
"modal",
|
|
390
|
+
"fullscreen",
|
|
391
|
+
"system",
|
|
220
392
|
]);
|
|
221
393
|
exports.OverlayNodeSchema = zod_1.z
|
|
222
394
|
.object({
|
|
223
|
-
contract: zod_1.z.literal(
|
|
395
|
+
contract: zod_1.z.literal("OverlayNode"),
|
|
224
396
|
overlayId: common_1.ContractIdentifierSchema,
|
|
225
397
|
renderNode: exports.RenderNodeSchema,
|
|
226
|
-
presentation: zod_1.z.enum([
|
|
398
|
+
presentation: zod_1.z.enum(["drawer", "modal", "fullscreen"]),
|
|
227
399
|
zIndexLane: exports.OverlayZIndexLaneSchema,
|
|
228
400
|
url: zod_1.z
|
|
229
401
|
.object({
|
|
230
402
|
parameter: common_1.ContractIdentifierSchema,
|
|
231
403
|
value: common_1.ContractIdentifierSchema,
|
|
232
|
-
openMode: zod_1.z.enum([
|
|
233
|
-
closeMode: zod_1.z.enum([
|
|
404
|
+
openMode: zod_1.z.enum(["push", "replace"]),
|
|
405
|
+
closeMode: zod_1.z.enum(["back", "replace"]),
|
|
234
406
|
})
|
|
235
407
|
.strict(),
|
|
236
408
|
focus: zod_1.z
|
|
237
409
|
.object({
|
|
238
|
-
initial: zod_1.z.enum([
|
|
410
|
+
initial: zod_1.z.enum(["first-interactive", "container", "explicit"]),
|
|
239
411
|
trap: zod_1.z.boolean(),
|
|
240
412
|
})
|
|
241
413
|
.strict(),
|
|
@@ -248,46 +420,48 @@ exports.OverlayNodeSchema = zod_1.z
|
|
|
248
420
|
})
|
|
249
421
|
.strict()
|
|
250
422
|
.superRefine((value, context) => {
|
|
251
|
-
if (value.renderNode.kind !==
|
|
423
|
+
if (value.renderNode.kind !== "overlay") {
|
|
252
424
|
context.addIssue({
|
|
253
|
-
code:
|
|
254
|
-
path: [
|
|
255
|
-
message:
|
|
425
|
+
code: "custom",
|
|
426
|
+
path: ["renderNode", "kind"],
|
|
427
|
+
message: "OverlayNode renderNode.kind must be overlay.",
|
|
256
428
|
});
|
|
257
429
|
}
|
|
258
430
|
if (value.renderNode.activation.mode !== value.presentation) {
|
|
259
431
|
context.addIssue({
|
|
260
|
-
code:
|
|
261
|
-
path: [
|
|
262
|
-
message:
|
|
432
|
+
code: "custom",
|
|
433
|
+
path: ["renderNode", "activation", "mode"],
|
|
434
|
+
message: "OverlayNode presentation must match the RenderNode activation mode.",
|
|
263
435
|
});
|
|
264
436
|
}
|
|
265
|
-
if (value.presentation ===
|
|
437
|
+
if (value.presentation === "drawer" && value.zIndexLane !== "drawer") {
|
|
266
438
|
context.addIssue({
|
|
267
|
-
code:
|
|
268
|
-
path: [
|
|
269
|
-
message:
|
|
439
|
+
code: "custom",
|
|
440
|
+
path: ["zIndexLane"],
|
|
441
|
+
message: "Drawer overlays must use the drawer z-index lane.",
|
|
270
442
|
});
|
|
271
443
|
}
|
|
272
|
-
if (value.presentation ===
|
|
444
|
+
if (value.presentation === "modal" && value.zIndexLane !== "modal") {
|
|
273
445
|
context.addIssue({
|
|
274
|
-
code:
|
|
275
|
-
path: [
|
|
276
|
-
message:
|
|
446
|
+
code: "custom",
|
|
447
|
+
path: ["zIndexLane"],
|
|
448
|
+
message: "Modal overlays must use the modal z-index lane.",
|
|
277
449
|
});
|
|
278
450
|
}
|
|
279
|
-
if (value.presentation ===
|
|
451
|
+
if (value.presentation === "fullscreen" &&
|
|
452
|
+
value.zIndexLane !== "fullscreen" &&
|
|
453
|
+
value.zIndexLane !== "system") {
|
|
280
454
|
context.addIssue({
|
|
281
|
-
code:
|
|
282
|
-
path: [
|
|
283
|
-
message:
|
|
455
|
+
code: "custom",
|
|
456
|
+
path: ["zIndexLane"],
|
|
457
|
+
message: "Fullscreen overlays must use the fullscreen or system z-index lane.",
|
|
284
458
|
});
|
|
285
459
|
}
|
|
286
460
|
});
|
|
287
461
|
const ProductPathSchema = zod_1.z
|
|
288
462
|
.string()
|
|
289
463
|
.trim()
|
|
290
|
-
.regex(/^\/(?!\/)/,
|
|
464
|
+
.regex(/^\/(?!\/)/, "Expected an application-relative path.");
|
|
291
465
|
exports.ApplicationHandoffEndpointSchema = zod_1.z
|
|
292
466
|
.object({
|
|
293
467
|
product: exports.ProductContextSchema,
|
|
@@ -301,7 +475,7 @@ exports.ApplicationHandoffEndpointSchema = zod_1.z
|
|
|
301
475
|
.strict();
|
|
302
476
|
exports.ApplicationHandoffSchema = zod_1.z
|
|
303
477
|
.object({
|
|
304
|
-
contract: zod_1.z.literal(
|
|
478
|
+
contract: zod_1.z.literal("ApplicationHandoff"),
|
|
305
479
|
handoffId: common_1.ContractIdentifierSchema,
|
|
306
480
|
source: exports.ApplicationHandoffEndpointSchema,
|
|
307
481
|
target: exports.ApplicationHandoffEndpointSchema,
|
|
@@ -311,17 +485,18 @@ exports.ApplicationHandoffSchema = zod_1.z
|
|
|
311
485
|
})
|
|
312
486
|
.strict()
|
|
313
487
|
.superRefine((value, context) => {
|
|
314
|
-
if (value.source.product === value.target.product &&
|
|
488
|
+
if (value.source.product === value.target.product &&
|
|
489
|
+
value.source.pageId === value.target.pageId) {
|
|
315
490
|
context.addIssue({
|
|
316
|
-
code:
|
|
317
|
-
path: [
|
|
318
|
-
message:
|
|
491
|
+
code: "custom",
|
|
492
|
+
path: ["target"],
|
|
493
|
+
message: "ApplicationHandoff target must identify a different product page.",
|
|
319
494
|
});
|
|
320
495
|
}
|
|
321
496
|
});
|
|
322
497
|
exports.ViewProviderDescriptorSchema = zod_1.z
|
|
323
498
|
.object({
|
|
324
|
-
contract: zod_1.z.literal(
|
|
499
|
+
contract: zod_1.z.literal("ViewProviderDescriptor"),
|
|
325
500
|
providerId: common_1.ContractIdentifierSchema,
|
|
326
501
|
providerVersion: common_1.ContractIdentifierSchema,
|
|
327
502
|
ownerRepo: common_1.ContractIdentifierSchema,
|
|
@@ -329,15 +504,29 @@ exports.ViewProviderDescriptorSchema = zod_1.z
|
|
|
329
504
|
rendererKey: common_1.ContractIdentifierSchema,
|
|
330
505
|
renderModelSchemaRef: common_1.ContractIdentifierSchema,
|
|
331
506
|
intentSchemaRef: common_1.ContractIdentifierSchema.optional(),
|
|
332
|
-
loading: zod_1.z.enum([
|
|
333
|
-
stateOwner: zod_1.z.enum([
|
|
507
|
+
loading: zod_1.z.enum(["eager", "lazy", "viewport", "on-activation"]),
|
|
508
|
+
stateOwner: zod_1.z.enum(["host", "provider", "external"]),
|
|
334
509
|
supportedPageTypes: zod_1.z.array(common_1.ContractIdentifierSchema).min(1),
|
|
335
510
|
supportedSurfaces: zod_1.z
|
|
336
|
-
.array(zod_1.z.enum([
|
|
511
|
+
.array(zod_1.z.enum([
|
|
512
|
+
"page",
|
|
513
|
+
"workspace",
|
|
514
|
+
"view",
|
|
515
|
+
"record",
|
|
516
|
+
"action",
|
|
517
|
+
"overlay",
|
|
518
|
+
"agent",
|
|
519
|
+
]))
|
|
337
520
|
.min(1),
|
|
338
|
-
frameOwner: zod_1.z.enum([
|
|
339
|
-
sideEffects: zod_1.z
|
|
340
|
-
|
|
521
|
+
frameOwner: zod_1.z.enum(["host", "provider", "none"]),
|
|
522
|
+
sideEffects: zod_1.z.array(zod_1.z.enum([
|
|
523
|
+
"network",
|
|
524
|
+
"storage",
|
|
525
|
+
"navigation",
|
|
526
|
+
"clipboard",
|
|
527
|
+
"worker",
|
|
528
|
+
"websocket",
|
|
529
|
+
])),
|
|
341
530
|
sideEffectAdapterRef: common_1.EntityRefSchema.optional(),
|
|
342
531
|
lifecycle: zod_1.z
|
|
343
532
|
.object({
|
|
@@ -358,29 +547,39 @@ exports.ViewProviderDescriptorSchema = zod_1.z
|
|
|
358
547
|
})
|
|
359
548
|
.strict()
|
|
360
549
|
.superRefine((provider, context) => {
|
|
361
|
-
requirePinnedOwnedRef(provider.capabilityRef,
|
|
362
|
-
requirePinnedOwnedRef(provider.sideEffectAdapterRef,
|
|
363
|
-
requireRef(provider.accessRef,
|
|
364
|
-
requireRef(provider.evidenceRef,
|
|
550
|
+
requirePinnedOwnedRef(provider.capabilityRef, "capability", ["capabilityRef"], context);
|
|
551
|
+
requirePinnedOwnedRef(provider.sideEffectAdapterRef, "side-effect-adapter", ["sideEffectAdapterRef"], context);
|
|
552
|
+
requireRef(provider.accessRef, "access-policy", ["accessRef"], context);
|
|
553
|
+
requireRef(provider.evidenceRef, "evidence", ["evidenceRef"], context);
|
|
365
554
|
if (provider.capabilityRef.version === undefined) {
|
|
366
555
|
context.addIssue({
|
|
367
|
-
code:
|
|
368
|
-
path: [
|
|
369
|
-
message:
|
|
556
|
+
code: "custom",
|
|
557
|
+
path: ["capabilityRef", "version"],
|
|
558
|
+
message: "Provider capabilityRef must pin an active capability version.",
|
|
370
559
|
});
|
|
371
560
|
}
|
|
372
|
-
if (provider.frameOwner ===
|
|
561
|
+
if (provider.frameOwner === "provider" &&
|
|
562
|
+
provider.stateOwner === "host" &&
|
|
563
|
+
!provider.lifecycle.preserveMount) {
|
|
373
564
|
context.addIssue({
|
|
374
|
-
code:
|
|
375
|
-
path: [
|
|
376
|
-
message:
|
|
565
|
+
code: "custom",
|
|
566
|
+
path: ["lifecycle", "preserveMount"],
|
|
567
|
+
message: "Host-owned state on a provider-owned frame must preserve the provider mount.",
|
|
377
568
|
});
|
|
378
569
|
}
|
|
379
570
|
if (provider.sideEffects.length > 0 && !provider.sideEffectAdapterRef) {
|
|
380
|
-
context.addIssue({
|
|
571
|
+
context.addIssue({
|
|
572
|
+
code: "custom",
|
|
573
|
+
path: ["sideEffectAdapterRef"],
|
|
574
|
+
message: "Providers with side effects require a pinned side-effect adapter.",
|
|
575
|
+
});
|
|
381
576
|
}
|
|
382
577
|
if (provider.sideEffects.length === 0 && provider.sideEffectAdapterRef) {
|
|
383
|
-
context.addIssue({
|
|
578
|
+
context.addIssue({
|
|
579
|
+
code: "custom",
|
|
580
|
+
path: ["sideEffectAdapterRef"],
|
|
581
|
+
message: "Pure providers cannot declare a side-effect adapter.",
|
|
582
|
+
});
|
|
384
583
|
}
|
|
385
584
|
});
|
|
386
585
|
//# sourceMappingURL=render.js.map
|