@visual-platform/contracts 0.3.0 → 0.4.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/dist/app-sources.d.ts +206 -0
- package/dist/app-sources.d.ts.map +1 -0
- package/dist/app-sources.js +287 -0
- package/dist/app-sources.js.map +1 -0
- package/dist/component.d.ts +95 -0
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +20 -1
- package/dist/component.js.map +1 -1
- package/dist/data.d.ts +55 -2
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +17 -2
- package/dist/data.js.map +1 -1
- package/dist/design.d.ts +144 -0
- package/dist/design.d.ts.map +1 -1
- package/dist/design.js +9 -1
- package/dist/design.js.map +1 -1
- package/dist/events.d.ts +40 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +17 -0
- package/dist/events.js.map +1 -1
- package/dist/flow-sim.d.ts +36 -0
- package/dist/flow-sim.d.ts.map +1 -0
- package/dist/flow-sim.js +128 -0
- package/dist/flow-sim.js.map +1 -0
- package/dist/flows.d.ts +267 -0
- package/dist/flows.d.ts.map +1 -0
- package/dist/flows.js +387 -0
- package/dist/flows.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/motion.d.ts +161 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +228 -0
- package/dist/motion.js.map +1 -0
- package/dist/page-document.d.ts +128 -0
- package/dist/page-document.d.ts.map +1 -1
- package/dist/page-document.js +12 -1
- package/dist/page-document.js.map +1 -1
- package/dist/published.d.ts +365 -0
- package/dist/published.d.ts.map +1 -1
- package/dist/published.js +5 -0
- package/dist/published.js.map +1 -1
- package/dist/sources.d.ts +170 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/sources.js +236 -0
- package/dist/sources.js.map +1 -0
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +2 -1
- package/dist/tables.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type DataField } from "./data.js";
|
|
3
|
+
import type { ParamBindings } from "./sources.js";
|
|
4
|
+
/**
|
|
5
|
+
* App source registry (ADR-048 P2). `vp sources push` sends metadata only — name, params, fields,
|
|
6
|
+
* sample, visibility — never code or credentials. Studio lists them and lets editors pick one.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SOURCE_NAME: RegExp;
|
|
9
|
+
export declare const SOURCE_KINDS: readonly ["value", "sync", "async", "provided"];
|
|
10
|
+
export declare const SOURCE_VISIBILITIES: readonly ["public", "segment", "private"];
|
|
11
|
+
export declare const SOURCE_PARAM_TYPES: readonly ["text", "number", "boolean"];
|
|
12
|
+
export declare const MAX_APP_SOURCES = 100;
|
|
13
|
+
export declare const SourceParamSpecSchema: z.ZodObject<{
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
type: z.ZodEnum<{
|
|
16
|
+
boolean: "boolean";
|
|
17
|
+
number: "number";
|
|
18
|
+
text: "text";
|
|
19
|
+
}>;
|
|
20
|
+
required: z.ZodBoolean;
|
|
21
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
22
|
+
options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
23
|
+
label: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type SourceParamSpec = z.infer<typeof SourceParamSpecSchema>;
|
|
26
|
+
export declare const AppSourceManifestSchema: z.ZodObject<{
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
label: z.ZodOptional<z.ZodString>;
|
|
29
|
+
description: z.ZodOptional<z.ZodString>;
|
|
30
|
+
kind: z.ZodEnum<{
|
|
31
|
+
async: "async";
|
|
32
|
+
provided: "provided";
|
|
33
|
+
sync: "sync";
|
|
34
|
+
value: "value";
|
|
35
|
+
}>;
|
|
36
|
+
shape: z.ZodEnum<{
|
|
37
|
+
list: "list";
|
|
38
|
+
object: "object";
|
|
39
|
+
}>;
|
|
40
|
+
fields: z.ZodArray<z.ZodType<DataField, unknown, z.core.$ZodTypeInternals<DataField, unknown>>>;
|
|
41
|
+
sample: z.ZodOptional<z.ZodUnknown>;
|
|
42
|
+
params: z.ZodArray<z.ZodObject<{
|
|
43
|
+
name: z.ZodString;
|
|
44
|
+
type: z.ZodEnum<{
|
|
45
|
+
boolean: "boolean";
|
|
46
|
+
number: "number";
|
|
47
|
+
text: "text";
|
|
48
|
+
}>;
|
|
49
|
+
required: z.ZodBoolean;
|
|
50
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
51
|
+
options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
52
|
+
label: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strict>>;
|
|
54
|
+
visibility: z.ZodEnum<{
|
|
55
|
+
private: "private";
|
|
56
|
+
public: "public";
|
|
57
|
+
segment: "segment";
|
|
58
|
+
}>;
|
|
59
|
+
renamedFrom: z.ZodOptional<z.ZodString>;
|
|
60
|
+
untyped: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
export type AppSourceManifest = z.infer<typeof AppSourceManifestSchema>;
|
|
63
|
+
/** An app action (ADR-048 P4): a Server Action Studio events can trigger by name (onAddToCart…). */
|
|
64
|
+
export declare const AppActionManifestSchema: z.ZodObject<{
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
label: z.ZodOptional<z.ZodString>;
|
|
67
|
+
description: z.ZodOptional<z.ZodString>;
|
|
68
|
+
input: z.ZodArray<z.ZodObject<{
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
type: z.ZodEnum<{
|
|
71
|
+
boolean: "boolean";
|
|
72
|
+
number: "number";
|
|
73
|
+
text: "text";
|
|
74
|
+
}>;
|
|
75
|
+
required: z.ZodBoolean;
|
|
76
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
77
|
+
options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
78
|
+
label: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
from: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
81
|
+
revalidates: z.ZodArray<z.ZodString>;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
export type AppActionManifest = z.infer<typeof AppActionManifestSchema>;
|
|
84
|
+
export type AppActionRecord = AppActionManifest & {
|
|
85
|
+
status: "active" | "missing";
|
|
86
|
+
hash: string;
|
|
87
|
+
appVersion: string | null;
|
|
88
|
+
syncedAt: string;
|
|
89
|
+
};
|
|
90
|
+
export declare const AppSourcesPushSchema: z.ZodObject<{
|
|
91
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
label: z.ZodOptional<z.ZodString>;
|
|
94
|
+
description: z.ZodOptional<z.ZodString>;
|
|
95
|
+
kind: z.ZodEnum<{
|
|
96
|
+
async: "async";
|
|
97
|
+
provided: "provided";
|
|
98
|
+
sync: "sync";
|
|
99
|
+
value: "value";
|
|
100
|
+
}>;
|
|
101
|
+
shape: z.ZodEnum<{
|
|
102
|
+
list: "list";
|
|
103
|
+
object: "object";
|
|
104
|
+
}>;
|
|
105
|
+
fields: z.ZodArray<z.ZodType<DataField, unknown, z.core.$ZodTypeInternals<DataField, unknown>>>;
|
|
106
|
+
sample: z.ZodOptional<z.ZodUnknown>;
|
|
107
|
+
params: z.ZodArray<z.ZodObject<{
|
|
108
|
+
name: z.ZodString;
|
|
109
|
+
type: z.ZodEnum<{
|
|
110
|
+
boolean: "boolean";
|
|
111
|
+
number: "number";
|
|
112
|
+
text: "text";
|
|
113
|
+
}>;
|
|
114
|
+
required: z.ZodBoolean;
|
|
115
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
116
|
+
options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
117
|
+
label: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, z.core.$strict>>;
|
|
119
|
+
visibility: z.ZodEnum<{
|
|
120
|
+
private: "private";
|
|
121
|
+
public: "public";
|
|
122
|
+
segment: "segment";
|
|
123
|
+
}>;
|
|
124
|
+
renamedFrom: z.ZodOptional<z.ZodString>;
|
|
125
|
+
untyped: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
}, z.core.$strict>>;
|
|
127
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
label: z.ZodOptional<z.ZodString>;
|
|
130
|
+
description: z.ZodOptional<z.ZodString>;
|
|
131
|
+
input: z.ZodArray<z.ZodObject<{
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
type: z.ZodEnum<{
|
|
134
|
+
boolean: "boolean";
|
|
135
|
+
number: "number";
|
|
136
|
+
text: "text";
|
|
137
|
+
}>;
|
|
138
|
+
required: z.ZodBoolean;
|
|
139
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
140
|
+
options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
141
|
+
label: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strict>>;
|
|
143
|
+
from: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
144
|
+
revalidates: z.ZodArray<z.ZodString>;
|
|
145
|
+
}, z.core.$strict>>>;
|
|
146
|
+
appVersion: z.ZodOptional<z.ZodString>;
|
|
147
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
148
|
+
}, z.core.$strict>;
|
|
149
|
+
export type AppSourcesPush = z.infer<typeof AppSourcesPushSchema>;
|
|
150
|
+
/** A registry record as Studio sees it. */
|
|
151
|
+
export type AppSourceRecord = AppSourceManifest & {
|
|
152
|
+
status: "active" | "missing";
|
|
153
|
+
hash: string;
|
|
154
|
+
appVersion: string | null;
|
|
155
|
+
syncedAt: string;
|
|
156
|
+
};
|
|
157
|
+
/** Brand set by `defineSource` in @visual-platform/next (a contract between SDK and CLI). */
|
|
158
|
+
export declare const SOURCE_BRAND: unique symbol;
|
|
159
|
+
/** Brand set by `defineAction`. */
|
|
160
|
+
export declare const ACTION_BRAND: unique symbol;
|
|
161
|
+
type JsonSchema = {
|
|
162
|
+
type?: string | string[];
|
|
163
|
+
properties?: Record<string, JsonSchema>;
|
|
164
|
+
required?: string[];
|
|
165
|
+
items?: JsonSchema;
|
|
166
|
+
enum?: unknown[];
|
|
167
|
+
default?: unknown;
|
|
168
|
+
format?: string;
|
|
169
|
+
anyOf?: JsonSchema[];
|
|
170
|
+
oneOf?: JsonSchema[];
|
|
171
|
+
title?: string;
|
|
172
|
+
description?: string;
|
|
173
|
+
};
|
|
174
|
+
/** JSON Schema of a Standard Schema (zod ≥ 4.2, valibot/arktype with the JSON Schema extension), or null. */
|
|
175
|
+
export declare function jsonSchemaOf(schema: unknown, io: "input" | "output"): JsonSchema | null;
|
|
176
|
+
/** DataField[] of an object JSON Schema (depth ≤ 3, ≤ 40 fields). */
|
|
177
|
+
export declare function fieldsFromJsonSchema(s: JsonSchema, depth?: number): DataField[];
|
|
178
|
+
/** Param specs of an object JSON Schema (input side: defaults make params optional). */
|
|
179
|
+
export declare function paramsFromJsonSchema(s: JsonSchema): SourceParamSpec[];
|
|
180
|
+
/**
|
|
181
|
+
* Metadata of the app's sources (what `vp sources push` sends). Never calls `resolve`.
|
|
182
|
+
* Shape: the `shape` schema, else the sample, else the value; params: the `params` schema.
|
|
183
|
+
*/
|
|
184
|
+
export declare function describeSources(entries: Record<string, unknown>): {
|
|
185
|
+
sources: AppSourceManifest[];
|
|
186
|
+
warnings: string[];
|
|
187
|
+
};
|
|
188
|
+
/** Metadata of the app's actions (what `vp sources push` sends). Never calls `run`. */
|
|
189
|
+
export declare function describeActions(entries: Record<string, unknown>): {
|
|
190
|
+
actions: AppActionManifest[];
|
|
191
|
+
warnings: string[];
|
|
192
|
+
};
|
|
193
|
+
export type SourceBindingIssue = {
|
|
194
|
+
input: string;
|
|
195
|
+
code: "SOURCE_NOT_FOUND" | "SOURCE_MISSING" | "SOURCE_PARAM_INVALID";
|
|
196
|
+
message: string;
|
|
197
|
+
};
|
|
198
|
+
/** Check appSource inputs against the project's registry. */
|
|
199
|
+
export declare function checkSourceBindings(inputs: readonly {
|
|
200
|
+
name: string;
|
|
201
|
+
source: string;
|
|
202
|
+
sourceRef?: string | undefined;
|
|
203
|
+
params?: ParamBindings | undefined;
|
|
204
|
+
}[], registry: readonly Pick<AppSourceRecord, "name" | "status" | "params">[]): SourceBindingIssue[];
|
|
205
|
+
export {};
|
|
206
|
+
//# sourceMappingURL=app-sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-sources.d.ts","sourceRoot":"","sources":["../src/app-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAgC,KAAK,SAAS,EAAsB,MAAM,WAAW,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,WAAW,QAA6B,CAAC;AACtD,eAAO,MAAM,YAAY,YAAI,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AAC5E,eAAO,MAAM,mBAAmB,YAAI,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AAC7E,eAAO,MAAM,kBAAkB,YAAI,MAAM,EAAE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kB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,kBAAkB,GAAG,gBAAgB,GAAG,sBAAsB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1I,6DAA6D;AAC7D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;CAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAqB3P"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { DataFieldSchema, inferFields } from "./data.js";
|
|
3
|
+
/**
|
|
4
|
+
* App source registry (ADR-048 P2). `vp sources push` sends metadata only — name, params, fields,
|
|
5
|
+
* sample, visibility — never code or credentials. Studio lists them and lets editors pick one.
|
|
6
|
+
*/
|
|
7
|
+
export const SOURCE_NAME = /^[a-z][A-Za-z0-9]{0,39}$/;
|
|
8
|
+
export const SOURCE_KINDS = ["value", "sync", "async", "provided"];
|
|
9
|
+
export const SOURCE_VISIBILITIES = ["public", "segment", "private"];
|
|
10
|
+
export const SOURCE_PARAM_TYPES = ["text", "number", "boolean"];
|
|
11
|
+
export const MAX_APP_SOURCES = 100;
|
|
12
|
+
export const SourceParamSpecSchema = z.object({
|
|
13
|
+
name: z.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,39}$/),
|
|
14
|
+
type: z.enum(SOURCE_PARAM_TYPES),
|
|
15
|
+
required: z.boolean(),
|
|
16
|
+
default: z.union([z.string().max(500), z.number(), z.boolean()]).optional(),
|
|
17
|
+
/** Allowed values (enum). */
|
|
18
|
+
options: z.array(z.union([z.string().max(100), z.number()])).max(50).optional(),
|
|
19
|
+
label: z.string().max(60).optional(),
|
|
20
|
+
}).strict();
|
|
21
|
+
export const AppSourceManifestSchema = z.object({
|
|
22
|
+
name: z.string().regex(SOURCE_NAME, "source names are camelCase, e.g. products"),
|
|
23
|
+
label: z.string().max(60).optional(),
|
|
24
|
+
description: z.string().max(300).optional(),
|
|
25
|
+
kind: z.enum(SOURCE_KINDS),
|
|
26
|
+
shape: z.enum(["list", "object"]),
|
|
27
|
+
fields: z.array(DataFieldSchema).max(40),
|
|
28
|
+
sample: z.unknown().optional(),
|
|
29
|
+
params: z.array(SourceParamSpecSchema).max(20),
|
|
30
|
+
visibility: z.enum(SOURCE_VISIBILITIES),
|
|
31
|
+
/** Keep the record (and every binding) when the source was renamed in code. */
|
|
32
|
+
renamedFrom: z.string().regex(SOURCE_NAME).optional(),
|
|
33
|
+
/** No shape/sample/value: Studio shows it untyped (free paths). */
|
|
34
|
+
untyped: z.boolean().optional(),
|
|
35
|
+
}).strict().superRefine((s, ctx) => {
|
|
36
|
+
if (s.sample !== undefined && JSON.stringify(s.sample).length > 50_000)
|
|
37
|
+
ctx.addIssue({ code: "custom", path: ["sample"], message: "sample is limited to 50 KB" });
|
|
38
|
+
const names = new Set();
|
|
39
|
+
for (const p of s.params) {
|
|
40
|
+
if (names.has(p.name))
|
|
41
|
+
ctx.addIssue({ code: "custom", path: ["params"], message: `duplicate param "${p.name}"` });
|
|
42
|
+
names.add(p.name);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
/** An app action (ADR-048 P4): a Server Action Studio events can trigger by name (onAddToCart…). */
|
|
46
|
+
export const AppActionManifestSchema = z.object({
|
|
47
|
+
name: z.string().regex(/^on[A-Z][A-Za-z0-9]{0,47}$/, "action names are event names, e.g. onAddToCart"),
|
|
48
|
+
label: z.string().max(60).optional(),
|
|
49
|
+
description: z.string().max(300).optional(),
|
|
50
|
+
/** Typed input fields (from the input schema). */
|
|
51
|
+
input: z.array(SourceParamSpecSchema).max(20),
|
|
52
|
+
/** Input values the server reads from the block's data: field → path (item.id). */
|
|
53
|
+
from: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,39}$/), z.string().max(200)).optional(),
|
|
54
|
+
revalidates: z.array(z.string().regex(SOURCE_NAME)).max(20),
|
|
55
|
+
}).strict();
|
|
56
|
+
export const AppSourcesPushSchema = z.object({
|
|
57
|
+
sources: z.array(AppSourceManifestSchema).max(MAX_APP_SOURCES),
|
|
58
|
+
actions: z.array(AppActionManifestSchema).max(MAX_APP_SOURCES).optional(),
|
|
59
|
+
appVersion: z.string().max(60).optional(),
|
|
60
|
+
/** Commit or "local". */
|
|
61
|
+
origin: z.string().max(200).optional(),
|
|
62
|
+
}).strict().superRefine((b, ctx) => {
|
|
63
|
+
const seen = new Set();
|
|
64
|
+
for (const s of b.sources) {
|
|
65
|
+
if (seen.has(s.name))
|
|
66
|
+
ctx.addIssue({ code: "custom", message: `duplicate source "${s.name}"` });
|
|
67
|
+
seen.add(s.name);
|
|
68
|
+
}
|
|
69
|
+
const acts = new Set();
|
|
70
|
+
for (const a of b.actions ?? []) {
|
|
71
|
+
if (acts.has(a.name))
|
|
72
|
+
ctx.addIssue({ code: "custom", message: `duplicate action "${a.name}"` });
|
|
73
|
+
acts.add(a.name);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
// ---------- describing app sources (CLI side; no SDK import needed) ----------
|
|
77
|
+
/** Brand set by `defineSource` in @visual-platform/next (a contract between SDK and CLI). */
|
|
78
|
+
export const SOURCE_BRAND = Symbol.for("visual-platform.source");
|
|
79
|
+
/** Brand set by `defineAction`. */
|
|
80
|
+
export const ACTION_BRAND = Symbol.for("visual-platform.action");
|
|
81
|
+
/** JSON Schema of a Standard Schema (zod ≥ 4.2, valibot/arktype with the JSON Schema extension), or null. */
|
|
82
|
+
export function jsonSchemaOf(schema, io) {
|
|
83
|
+
const fn = schema?.["~standard"]?.jsonSchema?.[io];
|
|
84
|
+
if (typeof fn !== "function")
|
|
85
|
+
return null;
|
|
86
|
+
try {
|
|
87
|
+
return fn({ target: "draft-2020-12" });
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const nonNull = (s) => {
|
|
94
|
+
const alts = s.anyOf ?? s.oneOf;
|
|
95
|
+
if (alts)
|
|
96
|
+
return alts.find((a) => a.type !== "null") ?? s;
|
|
97
|
+
if (Array.isArray(s.type))
|
|
98
|
+
return { ...s, type: s.type.find((t) => t !== "null") ?? "string" };
|
|
99
|
+
return s;
|
|
100
|
+
};
|
|
101
|
+
function fieldType(s) {
|
|
102
|
+
s = nonNull(s);
|
|
103
|
+
if (s.type === "array")
|
|
104
|
+
return "list";
|
|
105
|
+
if (s.type === "number" || s.type === "integer")
|
|
106
|
+
return "number";
|
|
107
|
+
if (s.type === "boolean")
|
|
108
|
+
return "boolean";
|
|
109
|
+
if (s.type === "object") {
|
|
110
|
+
const keys = Object.keys(s.properties ?? {});
|
|
111
|
+
return keys.includes("url") ? "image" : keys.includes("href") ? "link" : "object";
|
|
112
|
+
}
|
|
113
|
+
if (s.format === "date" || s.format === "date-time")
|
|
114
|
+
return "date";
|
|
115
|
+
if (s.format === "uri" || s.format === "url")
|
|
116
|
+
return "link";
|
|
117
|
+
return "text";
|
|
118
|
+
}
|
|
119
|
+
/** DataField[] of an object JSON Schema (depth ≤ 3, ≤ 40 fields). */
|
|
120
|
+
export function fieldsFromJsonSchema(s, depth = 0) {
|
|
121
|
+
s = nonNull(s);
|
|
122
|
+
const out = [];
|
|
123
|
+
for (const [name, raw] of Object.entries(s.properties ?? {})) {
|
|
124
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]{0,39}$/.test(name) || out.length >= 40)
|
|
125
|
+
continue;
|
|
126
|
+
const p = nonNull(raw);
|
|
127
|
+
const type = fieldType(p);
|
|
128
|
+
const f = { name, type };
|
|
129
|
+
if (p.title)
|
|
130
|
+
f.label = p.title.slice(0, 60);
|
|
131
|
+
if (depth < 3 && type === "list" && p.items)
|
|
132
|
+
f.fields = fieldsFromJsonSchema(p.items, depth + 1);
|
|
133
|
+
if (depth < 3 && type === "object")
|
|
134
|
+
f.fields = fieldsFromJsonSchema(p, depth + 1);
|
|
135
|
+
out.push(f);
|
|
136
|
+
}
|
|
137
|
+
return out;
|
|
138
|
+
}
|
|
139
|
+
/** Param specs of an object JSON Schema (input side: defaults make params optional). */
|
|
140
|
+
export function paramsFromJsonSchema(s) {
|
|
141
|
+
s = nonNull(s);
|
|
142
|
+
const required = new Set(s.required ?? []);
|
|
143
|
+
return Object.entries(s.properties ?? {}).slice(0, 20).flatMap(([name, raw]) => {
|
|
144
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]{0,39}$/.test(name))
|
|
145
|
+
return [];
|
|
146
|
+
const p = nonNull(raw);
|
|
147
|
+
const t = p.type === "number" || p.type === "integer" ? "number" : p.type === "boolean" ? "boolean" : "text";
|
|
148
|
+
const spec = { name, type: t, required: required.has(name) && p.default === undefined };
|
|
149
|
+
if (typeof p.default === "string" || typeof p.default === "number" || typeof p.default === "boolean")
|
|
150
|
+
spec.default = p.default;
|
|
151
|
+
const opts = p.enum?.filter((x) => typeof x === "string" || typeof x === "number");
|
|
152
|
+
if (opts?.length)
|
|
153
|
+
spec.options = opts.slice(0, 50);
|
|
154
|
+
if (p.title)
|
|
155
|
+
spec.label = p.title.slice(0, 60);
|
|
156
|
+
return [spec];
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Metadata of the app's sources (what `vp sources push` sends). Never calls `resolve`.
|
|
161
|
+
* Shape: the `shape` schema, else the sample, else the value; params: the `params` schema.
|
|
162
|
+
*/
|
|
163
|
+
export function describeSources(entries) {
|
|
164
|
+
const sources = [];
|
|
165
|
+
const warnings = [];
|
|
166
|
+
for (const [name, entry] of Object.entries(entries)) {
|
|
167
|
+
if (!SOURCE_NAME.test(name)) {
|
|
168
|
+
warnings.push(`"${name}": names must be camelCase (skipped)`);
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
const branded = !!entry && typeof entry === "object" && entry[SOURCE_BRAND] === true;
|
|
172
|
+
const def = branded ? entry : typeof entry === "function" ? { resolve: entry } : { value: entry };
|
|
173
|
+
const kind = def.value !== undefined ? "value" : def.provided ? "provided" : "async";
|
|
174
|
+
const example = def.sample !== undefined ? def.sample : def.value;
|
|
175
|
+
const shapeJs = def.shape ? jsonSchemaOf(def.shape, "output") : null;
|
|
176
|
+
let shape = Array.isArray(example) ? "list" : "object";
|
|
177
|
+
let fields = [];
|
|
178
|
+
if (shapeJs) {
|
|
179
|
+
const s = nonNull(shapeJs);
|
|
180
|
+
shape = s.type === "array" ? "list" : "object";
|
|
181
|
+
fields = fieldsFromJsonSchema(s.type === "array" ? s.items ?? {} : s);
|
|
182
|
+
}
|
|
183
|
+
else if (example !== undefined && example !== null) {
|
|
184
|
+
fields = inferFields(Array.isArray(example) ? example.slice(0, 20) : [example]);
|
|
185
|
+
}
|
|
186
|
+
if (def.shape && !shapeJs)
|
|
187
|
+
warnings.push(`"${name}": its shape schema has no JSON Schema export — fields come from the sample`);
|
|
188
|
+
const untyped = !fields.length;
|
|
189
|
+
if (untyped)
|
|
190
|
+
warnings.push(`"${name}": no shape or sample — Studio shows it untyped (add shape or sample)`);
|
|
191
|
+
let params = [];
|
|
192
|
+
if (def.params) {
|
|
193
|
+
const js = jsonSchemaOf(def.params, "input");
|
|
194
|
+
if (js)
|
|
195
|
+
params = paramsFromJsonSchema(js);
|
|
196
|
+
else
|
|
197
|
+
warnings.push(`"${name}": its params schema has no JSON Schema export — Studio cannot offer its params`);
|
|
198
|
+
}
|
|
199
|
+
const vis = def.visibility === "segment" || def.visibility === "private" ? def.visibility : "public";
|
|
200
|
+
let sample = example;
|
|
201
|
+
if (vis === "private" && def.sample === undefined)
|
|
202
|
+
sample = undefined; // never push real per-user values
|
|
203
|
+
if (sample !== undefined && JSON.stringify(sample).length > 50_000) {
|
|
204
|
+
warnings.push(`"${name}": sample over 50 KB (not sent)`);
|
|
205
|
+
sample = undefined;
|
|
206
|
+
}
|
|
207
|
+
sources.push({
|
|
208
|
+
name, kind, shape, fields, params, visibility: vis,
|
|
209
|
+
...(typeof def.label === "string" ? { label: def.label.slice(0, 60) } : {}),
|
|
210
|
+
...(typeof def.description === "string" ? { description: def.description.slice(0, 300) } : {}),
|
|
211
|
+
...(sample !== undefined ? { sample } : {}),
|
|
212
|
+
...(typeof def.renamedFrom === "string" ? { renamedFrom: def.renamedFrom } : {}),
|
|
213
|
+
...(untyped ? { untyped: true } : {}),
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
return { sources, warnings };
|
|
217
|
+
}
|
|
218
|
+
/** Metadata of the app's actions (what `vp sources push` sends). Never calls `run`. */
|
|
219
|
+
export function describeActions(entries) {
|
|
220
|
+
const actions = [];
|
|
221
|
+
const warnings = [];
|
|
222
|
+
for (const [name, entry] of Object.entries(entries)) {
|
|
223
|
+
if (!/^on[A-Z][A-Za-z0-9]{0,47}$/.test(name)) {
|
|
224
|
+
warnings.push(`action "${name}": names are event names like onAddToCart (skipped)`);
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
if (!entry || typeof entry !== "object" || entry[ACTION_BRAND] !== true) {
|
|
228
|
+
warnings.push(`action "${name}": use defineAction() (skipped)`);
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
const a = entry;
|
|
232
|
+
let input = [];
|
|
233
|
+
if (a.input) {
|
|
234
|
+
const js = jsonSchemaOf(a.input, "input");
|
|
235
|
+
if (js)
|
|
236
|
+
input = paramsFromJsonSchema(js);
|
|
237
|
+
else
|
|
238
|
+
warnings.push(`action "${name}": its input schema has no JSON Schema export`);
|
|
239
|
+
}
|
|
240
|
+
const from = a.from && typeof a.from === "object" ? Object.fromEntries(Object.entries(a.from).filter((e) => typeof e[1] === "string")) : undefined;
|
|
241
|
+
actions.push({
|
|
242
|
+
name, input, revalidates: Array.isArray(a.revalidates) ? a.revalidates.filter((x) => typeof x === "string" && SOURCE_NAME.test(x)) : [],
|
|
243
|
+
...(typeof a.label === "string" ? { label: a.label.slice(0, 60) } : {}),
|
|
244
|
+
...(typeof a.description === "string" ? { description: a.description.slice(0, 300) } : {}),
|
|
245
|
+
...(from && Object.keys(from).length ? { from } : {}),
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return { actions, warnings };
|
|
249
|
+
}
|
|
250
|
+
/** Check appSource inputs against the project's registry. */
|
|
251
|
+
export function checkSourceBindings(inputs, registry) {
|
|
252
|
+
const byName = new Map(registry.map((r) => [r.name, r]));
|
|
253
|
+
const issues = [];
|
|
254
|
+
for (const i of inputs) {
|
|
255
|
+
if (i.source !== "appSource" || !i.sourceRef)
|
|
256
|
+
continue;
|
|
257
|
+
const rec = byName.get(i.sourceRef);
|
|
258
|
+
if (!rec) {
|
|
259
|
+
issues.push({ input: i.name, code: "SOURCE_NOT_FOUND", message: `the app has no source "${i.sourceRef}" (run vp sources push)` });
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
if (rec.status === "missing") {
|
|
263
|
+
issues.push({ input: i.name, code: "SOURCE_MISSING", message: `source "${i.sourceRef}" was removed from the app` });
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
const specs = new Map(rec.params.map((p) => [p.name, p]));
|
|
267
|
+
for (const [pname, b] of Object.entries(i.params ?? {})) {
|
|
268
|
+
const spec = specs.get(pname);
|
|
269
|
+
if (!spec) {
|
|
270
|
+
issues.push({ input: i.name, code: "SOURCE_PARAM_INVALID", message: `source "${i.sourceRef}" has no param "${pname}"` });
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
if (b.kind === "literal" && b.value !== null) {
|
|
274
|
+
const ok = spec.type === "number" ? typeof b.value === "number" : spec.type === "boolean" ? typeof b.value === "boolean" : typeof b.value === "string";
|
|
275
|
+
if (!ok)
|
|
276
|
+
issues.push({ input: i.name, code: "SOURCE_PARAM_INVALID", message: `param "${pname}" expects ${spec.type}` });
|
|
277
|
+
else if (spec.options && !spec.options.includes(b.value))
|
|
278
|
+
issues.push({ input: i.name, code: "SOURCE_PARAM_INVALID", message: `param "${pname}" must be one of ${spec.options.join(", ")}` });
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
for (const spec of rec.params)
|
|
282
|
+
if (spec.required && !(spec.name in (i.params ?? {})))
|
|
283
|
+
issues.push({ input: i.name, code: "SOURCE_PARAM_INVALID", message: `param "${spec.name}" is required` });
|
|
284
|
+
}
|
|
285
|
+
return issues;
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=app-sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-sources.js","sourceRoot":"","sources":["../src/app-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAsC,MAAM,WAAW,CAAC;AAG7F;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,0BAA0B,CAAC;AACtD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AAC5E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AAC7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAEnC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,+BAA+B,CAAC;IACvD,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAChC,QAAQ,EAAE,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,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;qBACnH,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAc,CAAC;oBAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,UAAU,KAAK,oBAAoB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;YACzM,CAAC;QACH,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,MAAM;YAAE,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;gBAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,UAAU,IAAI,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;IAClM,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/component.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ import { type ComponentNode } from "./page-document.js";
|
|
|
8
8
|
export declare const COMPONENT_REF_TYPE = "ComponentRef";
|
|
9
9
|
/** Internal wrapper the renderer understands natively: applies a design-system theme to its children. */
|
|
10
10
|
export declare const THEME_SCOPE_TYPE = "VisualThemeScope";
|
|
11
|
+
/**
|
|
12
|
+
* Wrapper of a component placed on a page (ADR-052): `display: contents` (layout unchanged) carrying the
|
|
13
|
+
* placement's lifecycle and animation (+ the component's own defaults). Inserted at expansion only when used.
|
|
14
|
+
*/
|
|
15
|
+
export declare const COMPONENT_SCOPE_TYPE = "VisualComponentScope";
|
|
11
16
|
export declare const COMPONENT_PROP_TYPES: readonly ["text", "textarea", "image", "link", "icon", "number", "boolean", "select"];
|
|
12
17
|
export declare const ComponentPropSchema: z.ZodObject<{
|
|
13
18
|
name: z.ZodString;
|
|
@@ -62,6 +67,7 @@ export declare const ComponentDocumentSchema: z.ZodObject<{
|
|
|
62
67
|
label: z.ZodOptional<z.ZodString>;
|
|
63
68
|
source: z.ZodDefault<z.ZodEnum<{
|
|
64
69
|
app: "app";
|
|
70
|
+
appSource: "appSource";
|
|
65
71
|
table: "table";
|
|
66
72
|
}>>;
|
|
67
73
|
shape: z.ZodEnum<{
|
|
@@ -86,7 +92,96 @@ export declare const ComponentDocumentSchema: z.ZodObject<{
|
|
|
86
92
|
locale: z.ZodOptional<z.ZodString>;
|
|
87
93
|
}, z.core.$strict>>>;
|
|
88
94
|
single: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
sourceRef: z.ZodOptional<z.ZodString>;
|
|
96
|
+
params: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
|
+
kind: z.ZodLiteral<"literal">;
|
|
98
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
99
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
100
|
+
kind: z.ZodLiteral<"page-locale">;
|
|
101
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
102
|
+
kind: z.ZodLiteral<"route-param">;
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
105
|
+
kind: z.ZodLiteral<"query-param">;
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
108
|
+
kind: z.ZodLiteral<"context">;
|
|
109
|
+
key: z.ZodString;
|
|
110
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
111
|
+
kind: z.ZodLiteral<"source">;
|
|
112
|
+
path: z.ZodString;
|
|
113
|
+
}, z.core.$strict>], "kind">>>>;
|
|
114
|
+
fallback: z.ZodOptional<z.ZodLazy<z.ZodEnum<{
|
|
115
|
+
empty: "empty";
|
|
116
|
+
hide: "hide";
|
|
117
|
+
sample: "sample";
|
|
118
|
+
}>>>;
|
|
89
119
|
}, z.core.$strict>>>>;
|
|
120
|
+
flows: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
label: z.ZodOptional<z.ZodString>;
|
|
123
|
+
description: z.ZodOptional<z.ZodString>;
|
|
124
|
+
params: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
label: z.ZodOptional<z.ZodString>;
|
|
127
|
+
type: z.ZodEnum<{
|
|
128
|
+
boolean: "boolean";
|
|
129
|
+
number: "number";
|
|
130
|
+
text: "text";
|
|
131
|
+
}>;
|
|
132
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
+
}, z.core.$strict>>>;
|
|
134
|
+
steps: z.ZodArray<z.ZodType<import("./flows.js").FlowStep, unknown, z.core.$ZodTypeInternals<import("./flows.js").FlowStep, unknown>>>;
|
|
135
|
+
onError: z.ZodOptional<z.ZodArray<z.ZodType<import("./flows.js").FlowStep, unknown, z.core.$ZodTypeInternals<import("./flows.js").FlowStep, unknown>>>>;
|
|
136
|
+
}, z.core.$strict>>>>;
|
|
137
|
+
lifecycle: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
138
|
+
mount: z.ZodOptional<z.ZodString>;
|
|
139
|
+
unmount: z.ZodOptional<z.ZodString>;
|
|
140
|
+
visible: z.ZodOptional<z.ZodString>;
|
|
141
|
+
leave: z.ZodOptional<z.ZodString>;
|
|
142
|
+
visibleOnce: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
every: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
run: z.ZodString;
|
|
145
|
+
ms: z.ZodNumber;
|
|
146
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
147
|
+
}, z.core.$strict>>;
|
|
148
|
+
}, z.core.$strict>>>;
|
|
149
|
+
animation: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
150
|
+
entrance: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
easing: z.ZodOptional<z.ZodString>;
|
|
154
|
+
preset: z.ZodString;
|
|
155
|
+
trigger: z.ZodOptional<z.ZodEnum<{
|
|
156
|
+
mount: "mount";
|
|
157
|
+
visible: "visible";
|
|
158
|
+
}>>;
|
|
159
|
+
once: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
hover: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
preset: z.ZodString;
|
|
163
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
easing: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, z.core.$strict>>;
|
|
166
|
+
loop: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
easing: z.ZodOptional<z.ZodString>;
|
|
170
|
+
preset: z.ZodString;
|
|
171
|
+
iterations: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"infinite">]>>;
|
|
172
|
+
}, z.core.$strict>>;
|
|
173
|
+
scroll: z.ZodOptional<z.ZodObject<{
|
|
174
|
+
preset: z.ZodString;
|
|
175
|
+
range: z.ZodOptional<z.ZodEnum<{
|
|
176
|
+
cover: "cover";
|
|
177
|
+
enter: "enter";
|
|
178
|
+
exit: "exit";
|
|
179
|
+
}>>;
|
|
180
|
+
}, z.core.$strict>>;
|
|
181
|
+
stagger: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
ms: z.ZodNumber;
|
|
183
|
+
}, z.core.$strict>>;
|
|
184
|
+
}, z.core.$strict>>>;
|
|
90
185
|
disabledLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
91
186
|
childrenSlot: z.ZodOptional<z.ZodObject<{
|
|
92
187
|
nodeId: z.ZodString;
|
package/dist/component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAgE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKtH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,yGAAyG;AACzG,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAG3D,eAAO,MAAM,oBAAoB,YAAI,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAE1H,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;kBASrB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAKhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkClC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAYxE,eAAO,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