@kubuild/schema 0.6.0 → 0.8.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.
Files changed (42) hide show
  1. package/README.md +24 -0
  2. package/dist/actions.d.ts +26 -2
  3. package/dist/actions.d.ts.map +1 -1
  4. package/dist/breakpoints.d.ts +35 -0
  5. package/dist/breakpoints.d.ts.map +1 -0
  6. package/dist/builtin-components.d.ts +17 -0
  7. package/dist/builtin-components.d.ts.map +1 -0
  8. package/dist/canonical-props.d.ts +39 -0
  9. package/dist/canonical-props.d.ts.map +1 -0
  10. package/dist/chunk-MT3M7D67.js +1041 -0
  11. package/dist/chunk-MT3M7D67.js.map +1 -0
  12. package/dist/chunk-PECTZDCI.js +1038 -0
  13. package/dist/chunk-PECTZDCI.js.map +1 -0
  14. package/dist/document.d.ts +21 -82
  15. package/dist/document.d.ts.map +1 -1
  16. package/dist/index.cjs +700 -169
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.ts +4 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +447 -747
  21. package/dist/index.js.map +1 -1
  22. package/dist/json-schema.d.ts +323 -10
  23. package/dist/json-schema.d.ts.map +1 -1
  24. package/dist/template.d.ts +6 -18
  25. package/dist/template.d.ts.map +1 -1
  26. package/dist/theme.d.ts +80 -0
  27. package/dist/theme.d.ts.map +1 -0
  28. package/dist/tracking.d.ts +178 -31
  29. package/dist/tracking.d.ts.map +1 -1
  30. package/dist/types.cjs +19 -0
  31. package/dist/types.cjs.map +1 -0
  32. package/dist/types.d.ts +331 -0
  33. package/dist/types.d.ts.map +1 -0
  34. package/dist/types.js +1 -0
  35. package/dist/types.js.map +1 -0
  36. package/dist/validate.cjs +715 -0
  37. package/dist/validate.cjs.map +1 -0
  38. package/dist/validate.d.ts +16 -0
  39. package/dist/validate.d.ts.map +1 -0
  40. package/dist/validate.js +53 -0
  41. package/dist/validate.js.map +1 -0
  42. package/package.json +22 -2
@@ -11,25 +11,33 @@ export declare const TrackingProviderTypeSchema: z.ZodEnum<{
11
11
  }>;
12
12
  export type TrackingProviderType = z.infer<typeof TrackingProviderTypeSchema>;
13
13
  /**
14
- * Option descriptor representing a saved Pixel Credential from Account/Workspace
14
+ * Metadata-only descriptor of a tracking credential saved by the host (account/workspace).
15
+ *
16
+ * This is what the editor receives to render a credential picker. It NEVER carries secret
17
+ * material (access tokens, API secrets, webhook URLs/headers) — those stay on the host and
18
+ * are resolved server-side from `id` (see `TrackingSecretResolver` in `@kubuild/core`).
15
19
  */
16
20
  export interface PixelCredentialOption {
21
+ /** Opaque host id, stored in the document as `providers.<provider>.credentialId`. */
17
22
  id: string;
23
+ /** Human-readable label shown in the picker. */
18
24
  name: string;
19
- provider: 'meta' | 'google' | 'gtm' | 'tiktok' | 'custom' | string;
20
- pixelId: string;
21
- capiAccessToken?: string;
22
- testEventCode?: string;
23
- measurementProtocolSecret?: string;
24
- serverRelayUrl?: string;
25
- customHeaders?: Record<string, string>;
25
+ provider: TrackingProviderType | (string & {});
26
+ /** Public Meta / TikTok pixel id, if the credential has one. */
27
+ pixelId?: string;
28
+ /** Public GA4 measurement id, if the credential has one. */
29
+ measurementId?: string;
30
+ /** Public GTM container id, if the credential has one. */
31
+ containerId?: string;
32
+ /** True when the host holds a server-side secret for this credential. */
33
+ hasSecret?: boolean;
26
34
  isActive?: boolean;
27
35
  }
28
36
  /**
29
37
  * Event Delivery Channels:
30
- * - 'both': Fires client browser pixel and dispatches to server CAPI (with deduplication event_id)
38
+ * - 'both': Fires client browser pixel and dispatches to the server relay (with deduplication event_id)
31
39
  * - 'client_only': Only fires in the browser via client-side pixel scripts
32
- * - 'server_only': Only sends to server endpoint / CAPI (no browser pixel call)
40
+ * - 'server_only': Only sends to the host server relay (no browser pixel call)
33
41
  */
34
42
  export declare const TrackingDeliverySchema: z.ZodEnum<{
35
43
  both: "both";
@@ -45,9 +53,7 @@ export declare const MetaTrackingProviderConfigSchema: z.ZodObject<{
45
53
  credentialId: z.ZodOptional<z.ZodString>;
46
54
  pixelId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
47
55
  capiEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
48
- capiAccessToken: z.ZodDefault<z.ZodOptional<z.ZodString>>;
49
56
  testEventCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
50
- serverRelayUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
51
57
  }, z.core.$strip>;
52
58
  export type MetaTrackingProviderConfig = z.infer<typeof MetaTrackingProviderConfigSchema>;
53
59
  /**
@@ -57,18 +63,16 @@ export declare const GoogleTrackingProviderConfigSchema: z.ZodObject<{
57
63
  enabled: z.ZodDefault<z.ZodBoolean>;
58
64
  credentialId: z.ZodOptional<z.ZodString>;
59
65
  measurementId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
60
- measurementProtocolSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
61
- serverRelayUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
62
66
  }, z.core.$strip>;
63
67
  export type GoogleTrackingProviderConfig = z.infer<typeof GoogleTrackingProviderConfigSchema>;
64
68
  /**
65
- * Google Tag Manager (GTM) Configuration
69
+ * Google Tag Manager (GTM) Configuration.
70
+ * Client-side only: `track_event` with provider 'gtm' (or 'all') pushes to `window.dataLayer`.
66
71
  */
67
72
  export declare const GtmTrackingProviderConfigSchema: z.ZodObject<{
68
73
  enabled: z.ZodDefault<z.ZodBoolean>;
69
74
  credentialId: z.ZodOptional<z.ZodString>;
70
75
  containerId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
71
- serverRelayUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
72
76
  }, z.core.$strip>;
73
77
  export type GtmTrackingProviderConfig = z.infer<typeof GtmTrackingProviderConfigSchema>;
74
78
  /**
@@ -79,24 +83,27 @@ export declare const TikTokTrackingProviderConfigSchema: z.ZodObject<{
79
83
  credentialId: z.ZodOptional<z.ZodString>;
80
84
  pixelId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
81
85
  eventsApiEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
82
- accessToken: z.ZodDefault<z.ZodOptional<z.ZodString>>;
83
86
  testEventCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
84
- serverRelayUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
85
87
  }, z.core.$strip>;
86
88
  export type TikTokTrackingProviderConfig = z.infer<typeof TikTokTrackingProviderConfigSchema>;
87
89
  /**
88
- * Custom Webhook / Analytics Endpoint Configuration
90
+ * Custom Webhook Configuration.
91
+ * The destination URL and any auth headers are host secrets resolved from `credentialId`.
89
92
  */
90
93
  export declare const CustomTrackingProviderConfigSchema: z.ZodObject<{
91
94
  enabled: z.ZodDefault<z.ZodBoolean>;
92
95
  credentialId: z.ZodOptional<z.ZodString>;
93
- endpointUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
94
- headers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
95
96
  }, z.core.$strip>;
96
97
  export type CustomTrackingProviderConfig = z.infer<typeof CustomTrackingProviderConfigSchema>;
98
+ /**
99
+ * Provider keys that `<= 1.0.0` documents stored but that are now host-owned
100
+ * (secrets and server destinations). Used by migration and by import/export
101
+ * sanitization to strip them defensively.
102
+ */
103
+ export declare const LEGACY_TRACKING_SECRET_KEYS: Readonly<Record<TrackingProviderType, readonly string[]>>;
97
104
  /**
98
105
  * Global Tracking Configuration Schema
99
- * Attached to Document / Project / Runtime Context.
106
+ * Attached to Document / Project. Contains no secrets.
100
107
  */
101
108
  export declare const TrackingConfigSchema: z.ZodObject<{
102
109
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -113,41 +120,64 @@ export declare const TrackingConfigSchema: z.ZodObject<{
113
120
  credentialId: z.ZodOptional<z.ZodString>;
114
121
  pixelId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
115
122
  capiEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
116
- capiAccessToken: z.ZodDefault<z.ZodOptional<z.ZodString>>;
117
123
  testEventCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
118
- serverRelayUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
119
124
  }, z.core.$strip>>;
120
125
  google: z.ZodOptional<z.ZodObject<{
121
126
  enabled: z.ZodDefault<z.ZodBoolean>;
122
127
  credentialId: z.ZodOptional<z.ZodString>;
123
128
  measurementId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
124
- measurementProtocolSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
125
- serverRelayUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
126
129
  }, z.core.$strip>>;
127
130
  gtm: z.ZodOptional<z.ZodObject<{
128
131
  enabled: z.ZodDefault<z.ZodBoolean>;
129
132
  credentialId: z.ZodOptional<z.ZodString>;
130
133
  containerId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
131
- serverRelayUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
132
134
  }, z.core.$strip>>;
133
135
  tiktok: z.ZodOptional<z.ZodObject<{
134
136
  enabled: z.ZodDefault<z.ZodBoolean>;
135
137
  credentialId: z.ZodOptional<z.ZodString>;
136
138
  pixelId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
137
139
  eventsApiEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
138
- accessToken: z.ZodDefault<z.ZodOptional<z.ZodString>>;
139
140
  testEventCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
140
- serverRelayUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
141
141
  }, z.core.$strip>>;
142
142
  custom: z.ZodOptional<z.ZodObject<{
143
143
  enabled: z.ZodDefault<z.ZodBoolean>;
144
144
  credentialId: z.ZodOptional<z.ZodString>;
145
- endpointUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
146
- headers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
147
145
  }, z.core.$strip>>;
148
146
  }, z.core.$strip>>>;
149
147
  }, z.core.$strip>;
150
148
  export type TrackingConfig = z.infer<typeof TrackingConfigSchema>;
149
+ /** Meta Conversions API secret material. */
150
+ export declare const MetaTrackingSecretsSchema: z.ZodObject<{
151
+ capiAccessToken: z.ZodString;
152
+ }, z.core.$strip>;
153
+ export type MetaTrackingSecrets = z.infer<typeof MetaTrackingSecretsSchema>;
154
+ /** GA4 Measurement Protocol secret material. */
155
+ export declare const GoogleTrackingSecretsSchema: z.ZodObject<{
156
+ measurementProtocolSecret: z.ZodString;
157
+ }, z.core.$strip>;
158
+ export type GoogleTrackingSecrets = z.infer<typeof GoogleTrackingSecretsSchema>;
159
+ /** TikTok Events API secret material. */
160
+ export declare const TikTokTrackingSecretsSchema: z.ZodObject<{
161
+ accessToken: z.ZodString;
162
+ }, z.core.$strip>;
163
+ export type TikTokTrackingSecrets = z.infer<typeof TikTokTrackingSecretsSchema>;
164
+ /** Custom webhook destination + auth headers (both are host secrets). */
165
+ export declare const CustomTrackingSecretsSchema: z.ZodObject<{
166
+ endpointUrl: z.ZodString;
167
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
168
+ }, z.core.$strip>;
169
+ export type CustomTrackingSecrets = z.infer<typeof CustomTrackingSecretsSchema>;
170
+ /** Secret material keyed by provider. GTM is client-only and has no secret. */
171
+ export interface TrackingProviderSecretsMap {
172
+ meta: MetaTrackingSecrets;
173
+ google: GoogleTrackingSecrets;
174
+ tiktok: TikTokTrackingSecrets;
175
+ custom: CustomTrackingSecrets;
176
+ }
177
+ /** Providers that support server-side delivery (and therefore have secrets). */
178
+ export type ServerTrackingProviderType = keyof TrackingProviderSecretsMap;
179
+ /** Secret material for a single provider, as returned by a host secret resolver. */
180
+ export type TrackingProviderSecrets = TrackingProviderSecretsMap[ServerTrackingProviderType];
151
181
  /**
152
182
  * Standard Event Names commonly used across Meta, Google, and TikTok.
153
183
  */
@@ -166,6 +196,18 @@ export declare const StandardTrackingEventSchema: z.ZodEnum<{
166
196
  Schedule: "Schedule";
167
197
  }>;
168
198
  export type StandardTrackingEvent = z.infer<typeof StandardTrackingEventSchema>;
199
+ /**
200
+ * Target provider of a `track_event` step. 'gtm' pushes to `window.dataLayer` (client only).
201
+ */
202
+ export declare const TrackEventProviderSchema: z.ZodEnum<{
203
+ all: "all";
204
+ custom: "custom";
205
+ meta: "meta";
206
+ google: "google";
207
+ gtm: "gtm";
208
+ tiktok: "tiktok";
209
+ }>;
210
+ export type TrackEventProvider = z.infer<typeof TrackEventProviderSchema>;
169
211
  /**
170
212
  * Track Event Step Payload Schema (for Action Pipelines)
171
213
  */
@@ -180,6 +222,7 @@ export declare const TrackEventStepPayloadSchema: z.ZodObject<{
180
222
  custom: "custom";
181
223
  meta: "meta";
182
224
  google: "google";
225
+ gtm: "gtm";
183
226
  tiktok: "tiktok";
184
227
  }>>>;
185
228
  delivery: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
@@ -193,9 +236,113 @@ export declare const TrackEventStepPayloadSchema: z.ZodObject<{
193
236
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
194
237
  }, z.core.$strip>;
195
238
  export type TrackEventStepPayload = z.infer<typeof TrackEventStepPayloadSchema>;
239
+ export declare const TRACKING_RELAY_PROTOCOL_VERSION: 1;
240
+ /** Normalized server tracking event, as sent from the browser to the host relay. */
241
+ export declare const ServerTrackingEventSchema: z.ZodObject<{
242
+ eventName: z.ZodString;
243
+ eventType: z.ZodOptional<z.ZodEnum<{
244
+ standard: "standard";
245
+ custom: "custom";
246
+ }>>;
247
+ eventId: z.ZodOptional<z.ZodString>;
248
+ eventTime: z.ZodOptional<z.ZodNumber>;
249
+ eventSourceUrl: z.ZodOptional<z.ZodString>;
250
+ actionSource: z.ZodOptional<z.ZodEnum<{
251
+ website: "website";
252
+ app: "app";
253
+ system_generated: "system_generated";
254
+ }>>;
255
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
256
+ userData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
257
+ customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
258
+ }, z.core.$strip>;
259
+ export type ServerTrackingEventInput = z.infer<typeof ServerTrackingEventSchema>;
260
+ /**
261
+ * Body the renderer POSTs to the host relay (`RenderContext.tracking.relayUrl`).
262
+ * The relay MUST load the tracking config itself (trusted) — never from this body.
263
+ */
264
+ export declare const TrackingRelayRequestSchema: z.ZodObject<{
265
+ version: z.ZodLiteral<1>;
266
+ event: z.ZodObject<{
267
+ eventName: z.ZodString;
268
+ eventType: z.ZodOptional<z.ZodEnum<{
269
+ standard: "standard";
270
+ custom: "custom";
271
+ }>>;
272
+ eventId: z.ZodOptional<z.ZodString>;
273
+ eventTime: z.ZodOptional<z.ZodNumber>;
274
+ eventSourceUrl: z.ZodOptional<z.ZodString>;
275
+ actionSource: z.ZodOptional<z.ZodEnum<{
276
+ website: "website";
277
+ app: "app";
278
+ system_generated: "system_generated";
279
+ }>>;
280
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
281
+ userData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
282
+ customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
283
+ }, z.core.$strip>;
284
+ provider: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
285
+ all: "all";
286
+ custom: "custom";
287
+ meta: "meta";
288
+ google: "google";
289
+ gtm: "gtm";
290
+ tiktok: "tiktok";
291
+ }>>>;
292
+ credentialId: z.ZodOptional<z.ZodString>;
293
+ documentId: z.ZodOptional<z.ZodString>;
294
+ }, z.core.$strip>;
295
+ export type TrackingRelayRequest = z.infer<typeof TrackingRelayRequestSchema>;
296
+ /** Per-provider outcome returned by the relay (provider response bodies are not echoed). */
297
+ export declare const TrackingRelayProviderResultSchema: z.ZodObject<{
298
+ provider: z.ZodString;
299
+ success: z.ZodBoolean;
300
+ status: z.ZodOptional<z.ZodNumber>;
301
+ skipped: z.ZodOptional<z.ZodBoolean>;
302
+ reason: z.ZodOptional<z.ZodString>;
303
+ error: z.ZodOptional<z.ZodString>;
304
+ }, z.core.$strip>;
305
+ export type TrackingRelayProviderResult = z.infer<typeof TrackingRelayProviderResultSchema>;
306
+ export declare const TrackingRelayErrorCodeSchema: z.ZodEnum<{
307
+ INVALID_REQUEST: "INVALID_REQUEST";
308
+ UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
309
+ FORBIDDEN_ORIGIN: "FORBIDDEN_ORIGIN";
310
+ METHOD_NOT_ALLOWED: "METHOD_NOT_ALLOWED";
311
+ CONFIG_NOT_FOUND: "CONFIG_NOT_FOUND";
312
+ INTERNAL_ERROR: "INTERNAL_ERROR";
313
+ }>;
314
+ export type TrackingRelayErrorCode = z.infer<typeof TrackingRelayErrorCodeSchema>;
315
+ export declare const TrackingRelayResponseSchema: z.ZodObject<{
316
+ version: z.ZodLiteral<1>;
317
+ success: z.ZodBoolean;
318
+ eventId: z.ZodOptional<z.ZodString>;
319
+ skipped: z.ZodOptional<z.ZodBoolean>;
320
+ reason: z.ZodOptional<z.ZodString>;
321
+ results: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
322
+ provider: z.ZodString;
323
+ success: z.ZodBoolean;
324
+ status: z.ZodOptional<z.ZodNumber>;
325
+ skipped: z.ZodOptional<z.ZodBoolean>;
326
+ reason: z.ZodOptional<z.ZodString>;
327
+ error: z.ZodOptional<z.ZodString>;
328
+ }, z.core.$strip>>>;
329
+ error: z.ZodOptional<z.ZodObject<{
330
+ code: z.ZodEnum<{
331
+ INVALID_REQUEST: "INVALID_REQUEST";
332
+ UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
333
+ FORBIDDEN_ORIGIN: "FORBIDDEN_ORIGIN";
334
+ METHOD_NOT_ALLOWED: "METHOD_NOT_ALLOWED";
335
+ CONFIG_NOT_FOUND: "CONFIG_NOT_FOUND";
336
+ INTERNAL_ERROR: "INTERNAL_ERROR";
337
+ }>;
338
+ message: z.ZodString;
339
+ }, z.core.$strip>>;
340
+ }, z.core.$strip>;
341
+ export type TrackingRelayResponse = z.infer<typeof TrackingRelayResponseSchema>;
196
342
  /**
197
343
  * Type guards
198
344
  */
199
345
  export declare function isTrackingConfig(value: unknown): value is TrackingConfig;
200
346
  export declare function isTrackEventStepPayload(value: unknown): value is TrackEventStepPayload;
347
+ export declare function isTrackingRelayRequest(value: unknown): value is TrackingRelayRequest;
201
348
  //# sourceMappingURL=tracking.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracking.d.ts","sourceRoot":"","sources":["../src/tracking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;EAMrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;EAAiD,CAAC;AACrF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sB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H,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,4FAA4F;AAC5F,eAAO,MAAM,iCAAiC;;;;;;;iBAO5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,4BAA4B;;;;;;;EAOvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;iBAatC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,qBAAqB,CAEtF;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oBAAoB,CAEpF"}
package/dist/types.cjs ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["/**\n * `@kubuild/schema/types` — pure TypeScript interfaces for the portable document format\n * (STORA-552).\n *\n * This module MUST NOT import zod (or any module that does). Its emitted `.d.ts` is what\n * hosts on a different zod major (e.g. a zod v3 backend) import to type `PageDocument`,\n * `Node`, etc. without pulling zod v4's core namespace into their compilation.\n *\n * Every type here mirrors the *parsed output* (`z.infer<...>`) of the matching schema in\n * the main entry, i.e. fields with a schema default are required. The equality is\n * enforced by `tests/types.test.ts` (`expectTypeOf(...).toEqualTypeOf(...)`), so a schema\n * change that is not reflected here fails `pnpm run typecheck`.\n */\n\n/* ----------------------------------------------------------------------------------------\n * Bindings & styles\n * -------------------------------------------------------------------------------------- */\n\nexport interface AssetReference {\n type: 'asset';\n assetId: string;\n filename?: string;\n mimeType?: string;\n fallbackUrl?: string;\n}\n\nexport interface VariableBinding {\n type: 'variable';\n key: string;\n fallback?: unknown;\n}\n\nexport interface ActionBinding {\n type: string;\n payload?: Record<string, unknown>;\n}\n\nexport type StyleValue = string | number | boolean | null | undefined;\n\n/**\n * Standard CSS style definition supporting Flexbox, sizing constraints, effects,\n * CSS Grid, and arbitrary CSS properties / design-token references.\n */\nexport interface StyleDefinition extends Record<string, StyleValue> {\n display?: string;\n flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse' | (string & {});\n flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse' | (string & {});\n justifyContent?:\n | 'flex-start'\n | 'flex-end'\n | 'center'\n | 'space-between'\n | 'space-around'\n | 'space-evenly'\n | 'start'\n | 'end'\n | 'left'\n | 'right'\n | (string & {});\n alignItems?:\n | 'stretch'\n | 'flex-start'\n | 'flex-end'\n | 'center'\n | 'baseline'\n | 'start'\n | 'end'\n | 'self-start'\n | 'self-end'\n | (string & {});\n alignContent?:\n | 'flex-start'\n | 'flex-end'\n | 'center'\n | 'space-between'\n | 'space-around'\n | 'space-evenly'\n | 'stretch'\n | 'start'\n | 'end'\n | (string & {});\n gap?: string | number;\n rowGap?: string | number;\n columnGap?: string | number;\n flexGrow?: number | string;\n flexShrink?: number | string;\n flexBasis?: string | number;\n alignSelf?:\n 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch' | (string & {});\n width?: string | number;\n height?: string | number;\n minWidth?: string | number;\n maxWidth?: string | number;\n minHeight?: string | number;\n maxHeight?: string | number;\n objectFit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down' | (string & {});\n objectPosition?: string;\n borderRadius?: string | number;\n borderTopLeftRadius?: string | number;\n borderTopRightRadius?: string | number;\n borderBottomRightRadius?: string | number;\n borderBottomLeftRadius?: string | number;\n backdropFilter?: string;\n filter?: string;\n boxShadow?: string;\n backgroundColor?: string;\n backgroundImage?: string;\n backgroundSize?: 'cover' | 'contain' | 'auto' | (string & {});\n backgroundPosition?: string;\n backgroundRepeat?: 'no-repeat' | 'repeat' | 'repeat-x' | 'repeat-y' | (string & {});\n backgroundAttachment?: 'scroll' | 'fixed' | 'local' | (string & {});\n gridTemplateColumns?: string;\n gridTemplateRows?: string;\n gridAutoFlow?: string;\n gridAutoColumns?: string;\n gridAutoRows?: string;\n gridColumn?: string | number;\n gridRow?: string | number;\n gridColumnStart?: string | number;\n gridColumnEnd?: string | number;\n gridRowStart?: string | number;\n gridRowEnd?: string | number;\n colSpan?: number | string;\n rowSpan?: number | string;\n justifySelf?: string;\n}\n\nexport type PseudoStateStyles = Record<string, StyleDefinition>;\n\n/** Breakpoint style layers (`base` applies to every viewport) plus pseudo-state layers. */\nexport interface ResponsiveStyles {\n [key: string]: unknown;\n base?: StyleDefinition;\n desktop?: StyleDefinition;\n tablet?: StyleDefinition;\n mobile?: StyleDefinition;\n states?: Record<string, StyleDefinition>;\n}\n\nexport interface AnimationConfig {\n type: string;\n duration: number;\n delay: number;\n easing: string;\n once: boolean;\n hoverEffect: string;\n loopEffect: string;\n}\n\n/* ----------------------------------------------------------------------------------------\n * Theme (STORA-551)\n * -------------------------------------------------------------------------------------- */\n\nexport type ThemeTokenValue = string | number;\n\n/** Design tokens; referenced from styles as `var(--kb-color-<key>)` etc. */\nexport interface Theme {\n colors?: Record<string, ThemeTokenValue>;\n fonts?: Record<string, ThemeTokenValue>;\n radii?: Record<string, ThemeTokenValue>;\n spacing?: Record<string, ThemeTokenValue>;\n}\n\n/* ----------------------------------------------------------------------------------------\n * Forms\n * -------------------------------------------------------------------------------------- */\n\nexport type ValidationRuleType =\n | 'required'\n | 'email'\n | 'url'\n | 'min_length'\n | 'max_length'\n | 'numeric_min'\n | 'numeric_max'\n | 'pattern'\n | 'match_field'\n | 'custom_regex';\n\nexport type ValidateOnEvent = 'blur' | 'change' | 'submit';\n\nexport interface ValidationRule {\n type: ValidationRuleType;\n value?: unknown;\n message: string;\n}\n\nexport interface FormFieldBinding {\n name: string;\n label?: string;\n defaultValue?: unknown;\n rules: ValidationRule[];\n validateOn: ValidateOnEvent;\n transform?: 'trim' | 'lowercase' | 'uppercase' | 'number';\n disabled?: boolean;\n required?: boolean;\n}\n\nexport interface FormConfig {\n formId: string;\n resetOnSubmit: boolean;\n scrollToFirstError: boolean;\n validateOn: ValidateOnEvent;\n initialValues?: Record<string, unknown>;\n rules?: ValidationRule[];\n}\n\n/* ----------------------------------------------------------------------------------------\n * Actions\n * -------------------------------------------------------------------------------------- */\n\nexport type ActionTriggerType =\n 'click' | 'submit' | 'change' | 'blur' | 'focus' | 'load' | 'expire';\n\nexport type ActionStepType =\n | 'api_request'\n | 'navigate'\n | 'set_state'\n | 'reset_form'\n | 'show_toast'\n | 'open_modal'\n | 'close_modal'\n | 'toggle_modal'\n | 'copy_clipboard'\n | 'custom_event'\n | 'track_event';\n\nexport type ConditionOperator =\n | 'equals'\n | 'not_equals'\n | 'contains'\n | 'not_contains'\n | 'is_truthy'\n | 'is_falsy'\n | 'gt'\n | 'gte'\n | 'lt'\n | 'lte'\n | 'regex';\n\nexport interface ActionStepCondition {\n field: string;\n operator: ConditionOperator;\n value?: unknown;\n}\n\nexport interface ActionStep {\n id: string;\n type: ActionStepType;\n label?: string;\n payload?: Record<string, unknown>;\n condition?: ActionStepCondition;\n timeout?: number;\n continueOnError?: boolean;\n onSuccess?: ActionStep[];\n onError?: ActionStep[];\n}\n\nexport interface ActionPipeline {\n id: string;\n trigger: ActionTriggerType;\n label?: string;\n debounceMs?: number;\n preventDuplicate?: boolean;\n enabled: boolean;\n steps: ActionStep[];\n}\n\n/* ----------------------------------------------------------------------------------------\n * Tracking (public ids only — secrets are host-owned)\n * -------------------------------------------------------------------------------------- */\n\nexport type TrackingProviderType = 'meta' | 'google' | 'gtm' | 'tiktok' | 'custom';\n\nexport type TrackingDelivery = 'both' | 'client_only' | 'server_only';\n\nexport interface MetaTrackingProviderConfig {\n enabled: boolean;\n credentialId?: string;\n pixelId: string;\n capiEnabled: boolean;\n testEventCode: string;\n}\n\nexport interface GoogleTrackingProviderConfig {\n enabled: boolean;\n credentialId?: string;\n measurementId: string;\n}\n\nexport interface GtmTrackingProviderConfig {\n enabled: boolean;\n credentialId?: string;\n containerId: string;\n}\n\nexport interface TikTokTrackingProviderConfig {\n enabled: boolean;\n credentialId?: string;\n pixelId: string;\n eventsApiEnabled: boolean;\n testEventCode: string;\n}\n\nexport interface CustomTrackingProviderConfig {\n enabled: boolean;\n credentialId?: string;\n}\n\nexport interface TrackingConfig {\n enabled: boolean;\n debugMode: boolean;\n autoPageView: boolean;\n defaultDelivery: TrackingDelivery;\n providers: {\n meta?: MetaTrackingProviderConfig;\n google?: GoogleTrackingProviderConfig;\n gtm?: GtmTrackingProviderConfig;\n tiktok?: TikTokTrackingProviderConfig;\n custom?: CustomTrackingProviderConfig;\n };\n}\n\n/* ----------------------------------------------------------------------------------------\n * Document\n * -------------------------------------------------------------------------------------- */\n\nexport interface Node {\n id: string;\n type: string;\n props?: Record<string, unknown>;\n styles?: ResponsiveStyles;\n animation?: AnimationConfig;\n actions?: ActionPipeline[];\n formConfig?: FormConfig;\n children?: Node[];\n}\n\nexport type RootPageNode = Node & { type: 'page' };\n\nexport interface DocumentMetadata {\n title: string;\n description: string;\n author: string;\n createdAt?: string;\n updatedAt?: string;\n tags: string[];\n category: string;\n version: string;\n custom?: Record<string, unknown>;\n tracking?: TrackingConfig;\n}\n\nexport interface PageDocument {\n schema: 'stora.page';\n version: string;\n metadata?: DocumentMetadata;\n tracking?: TrackingConfig;\n theme?: Theme;\n document: RootPageNode;\n}\n\nexport type ArtboardType = 'page' | 'component';\n\nexport interface Artboard {\n id: string;\n name: string;\n artboardType: ArtboardType;\n slug?: string;\n triggerId?: string;\n viewport?: 'desktop' | 'tablet' | 'mobile';\n width?: number;\n position?: { x: number; y: number };\n document: PageDocument;\n}\n\nexport interface ProjectDocument {\n schema: 'stora.project';\n version: string;\n metadata?: DocumentMetadata;\n tracking?: TrackingConfig;\n artboards: Artboard[];\n activeArtboardId?: string;\n}\n\n/* ----------------------------------------------------------------------------------------\n * Package manifest & templates\n * -------------------------------------------------------------------------------------- */\n\nexport interface ManifestAssetItem {\n id: string;\n path: string;\n mimeType: string;\n size: number;\n checksum?: string;\n}\n\nexport interface Manifest {\n schema: 'stora.page';\n schemaVersion: string;\n packageVersion: string;\n builderCompatibility: string;\n requiredComponents: string[];\n requiredCapabilities: string[];\n assets: ManifestAssetItem[];\n createdAt?: string;\n}\n\nexport interface SafeThumbnailObject {\n url: string;\n alt?: string;\n width?: number;\n height?: number;\n}\n\nexport type SafeThumbnail = AssetReference | SafeThumbnailObject | string;\n\nexport interface TemplatePackageRef {\n path?: string;\n url?: string;\n checksum?: string;\n format: 'stora' | 'json';\n}\n\nexport interface TemplateRequirements {\n requiredComponents: string[];\n requiredCapabilities: string[];\n}\n\nexport interface TemplateRecord {\n id: string;\n name: string;\n description: string;\n category: string;\n tags: string[];\n thumbnail?: SafeThumbnail;\n author: string;\n version: string;\n document?: PageDocument;\n packageReference?: TemplatePackageRef;\n requirements: TemplateRequirements;\n createdAt?: string;\n updatedAt?: string;\n custom?: Record<string, unknown>;\n}\n\n/* ----------------------------------------------------------------------------------------\n * Zod-free validation results (see `@kubuild/schema/validate`)\n * -------------------------------------------------------------------------------------- */\n\nexport interface SchemaValidationIssue {\n /** Dotted path to the offending value, e.g. `document.children.0.id` (empty for root). */\n path: string;\n message: string;\n /** Validator issue code (e.g. `invalid_type`, `custom`). */\n code: string;\n}\n\nexport type SchemaValidationResult<T> =\n | { success: true; data: T; issues: [] }\n | { success: false; data?: undefined; issues: SchemaValidationIssue[] };\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}