@pebble-software/bonsai 0.1.0 → 0.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.
Files changed (45) hide show
  1. package/README.md +4 -0
  2. package/dist/ast.js +10 -0
  3. package/dist/ast.js.map +1 -0
  4. package/dist/chunks/builder.meta-WpXc5VBB.js +666 -0
  5. package/dist/chunks/builder.meta-WpXc5VBB.js.map +1 -0
  6. package/dist/chunks/{button-CSLrIvsS.js → button-jfJanilw.js} +46 -51
  7. package/dist/chunks/button-jfJanilw.js.map +1 -0
  8. package/dist/chunks/{create-renderer-1cky1uN9.js → create-renderer-DHneTPd-.js} +8 -8
  9. package/dist/chunks/{create-renderer-1cky1uN9.js.map → create-renderer-DHneTPd-.js.map} +1 -1
  10. package/dist/chunks/index-DzpRdatr.js +359 -0
  11. package/dist/chunks/index-DzpRdatr.js.map +1 -0
  12. package/dist/chunks/{render-shared-CIUUkLDn.js → render-shared-Ci28BpkI.js} +601 -931
  13. package/dist/chunks/render-shared-Ci28BpkI.js.map +1 -0
  14. package/dist/constants.d.ts +1 -0
  15. package/dist/constants.js +11 -0
  16. package/dist/constants.js.map +1 -0
  17. package/dist/core.js +3 -3
  18. package/dist/index.js +308 -955
  19. package/dist/index.js.map +1 -1
  20. package/dist/library/constants/src/components.d.ts +59 -0
  21. package/dist/library/constants/src/index.d.ts +2 -0
  22. package/dist/library/constants/src/webhook-events.d.ts +6 -0
  23. package/dist/library/schemas/src/bonsai.schema.d.ts +24 -0
  24. package/dist/library/schemas/src/builder.meta.d.ts +26 -0
  25. package/dist/presets/calendar.js +12 -11
  26. package/dist/presets/calendar.js.map +1 -1
  27. package/dist/presets/signature.js +9 -8
  28. package/dist/presets/signature.js.map +1 -1
  29. package/dist/schemas.d.ts +2 -0
  30. package/dist/schemas.js +13 -0
  31. package/dist/schemas.js.map +1 -0
  32. package/dist/styles/css/base.css +144 -0
  33. package/dist/styles/css/fonts.css +25 -0
  34. package/dist/styles/css/maplibre.css +29 -0
  35. package/dist/styles/css/overrides.css +7 -0
  36. package/dist/styles/css/tailwind.css +1 -0
  37. package/dist/styles/css/theme.css +197 -0
  38. package/dist/styles/css/tw-animate.css +1 -0
  39. package/dist/styles/css/utilities.css +44 -0
  40. package/dist/styles/presets.json +20 -0
  41. package/dist/styles/vendor/maplibre-gl.css +701 -0
  42. package/dist/styles/vendor/tw-animate.css +692 -0
  43. package/package.json +19 -3
  44. package/dist/chunks/button-CSLrIvsS.js.map +0 -1
  45. package/dist/chunks/render-shared-CIUUkLDn.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,13 +1,14 @@
1
- import { c as Ge } from "./chunks/create-renderer-1cky1uN9.js";
2
- import { u as Gn } from "./chunks/create-renderer-1cky1uN9.js";
3
- import $e, { z as e } from "zod";
4
- import { createErrorMap as Je } from "zod-validation-error";
5
- import { C as n } from "./chunks/button-CSLrIvsS.js";
6
- import { c as Ve, a as Xe, d as Be, e as Ue, f as Ze, b as Ke } from "./chunks/render-shared-CIUUkLDn.js";
7
- import { u as Jn } from "./chunks/render-shared-CIUUkLDn.js";
8
- import { calendarPreset as je } from "./presets/calendar.js";
9
- import { signaturePreset as ze } from "./presets/signature.js";
10
- const g = e.string().length(24).meta({
1
+ import { c as T } from "./chunks/create-renderer-DHneTPd-.js";
2
+ import { u as ve } from "./chunks/create-renderer-DHneTPd-.js";
3
+ import z, { z as e } from "zod";
4
+ import { createErrorMap as D } from "zod-validation-error";
5
+ import { a as u, P as C } from "./chunks/builder.meta-WpXc5VBB.js";
6
+ import { c as B, a as U, d as j, e as A, f as $, b as q } from "./chunks/render-shared-Ci28BpkI.js";
7
+ import { u as ke } from "./chunks/render-shared-Ci28BpkI.js";
8
+ import { calendarPreset as I } from "./presets/calendar.js";
9
+ import { signaturePreset as S } from "./presets/signature.js";
10
+ import { COMPONENT as v } from "./constants.js";
11
+ const c = e.string().length(24).meta({
11
12
  description: "MongoDB ObjectId (24-character hex string)",
12
13
  example: "67e091ab2c4d3f22001a2b3c"
13
14
  });
@@ -15,7 +16,7 @@ e.string().email().meta({
15
16
  description: "Valid email address",
16
17
  example: "jack@datahaven.net"
17
18
  });
18
- const h = e.string().datetime({ offset: !0 }).meta({
19
+ const d = e.string().datetime({ offset: !0 }).meta({
19
20
  description: "ISO 8601 datetime with optional timezone offset",
20
21
  example: "2077-12-25T23:59:59Z"
21
22
  });
@@ -27,656 +28,8 @@ e.object({
27
28
  error: e.string().meta({ description: "Human-readable error description", example: "Forbidden — no access to this resource" }),
28
29
  data: e.any().optional().meta({ description: "Additional error context (if available)" })
29
30
  }).meta({ description: "Error API response" });
30
- const l = e.object({
31
- id: e.string().optional().meta({ description: "Unique identifier for the element" }),
32
- className: e.string().optional().meta({ description: "CSS classes to apply to the element" })
33
- }), Ye = l.extend({
34
- href: e.string({ error: "Link destination (href) is required" }).min(1, { message: "Link destination (href) cannot be empty" })
35
- }), Qe = l.extend({
36
- variant: e.enum(["h1", "h2", "h3", "h4", "h5", "h6"], {
37
- error: "Invalid heading variant. Must be one of: h1, h2, h3, h4, h5, or h6"
38
- }).optional().meta({ description: "Heading level variant (h1-h6)" }),
39
- as: e.enum(["h1", "h2", "h3", "h4", "h5", "h6"], {
40
- error: "Invalid heading element type. Must be one of: h1, h2, h3, h4, h5, or h6"
41
- }).optional().meta({ description: "Render as a different heading element" })
42
- }).optional(), et = l.extend({
43
- size: e.enum(["xs", "sm", "md", "lg", "xl"], {
44
- error: "Invalid paragraph size. Must be one of: xs, sm, md, lg, or xl"
45
- }).optional().meta({ description: "Paragraph text size" }),
46
- variant: e.enum(["default", "muted"]).optional().meta({ description: "Paragraph style variant" }),
47
- as: e.enum(["p", "div", "span"]).optional().meta({ description: "Render as a different element" })
48
- }).optional(), tt = l.optional(), nt = l.optional(), at = l.optional(), it = l.optional(), ot = l.optional(), rt = l.optional(), st = l.extend({
49
- variant: e.enum(["default", "success", "warning", "destructive"], {
50
- error: "Invalid alert variant. Must be one of: default, success, warning, or destructive"
51
- }).optional().meta({ description: "Alert style variant" }),
52
- size: e.enum(["default", "sm", "lg"]).optional().meta({ description: "Alert size" }),
53
- raised: e.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Alert shadow elevation" })
54
- }).optional(), dt = l.extend({
55
- variant: e.enum(["default", "secondary", "destructive", "outline", "ghost"], {
56
- error: "Invalid badge variant. Must be one of: default, secondary, destructive, outline, or ghost"
57
- }).optional().meta({ description: "Badge style variant" }),
58
- size: e.enum(["sm", "md", "lg"]).optional().meta({ description: "Badge size" }),
59
- raised: e.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Badge shadow elevation" }),
60
- extrude: e.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Badge extrude elevation" })
61
- }).optional(), ct = l.extend({
62
- variant: e.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"], {
63
- error: "Invalid button variant. Must be one of: default, secondary, outline, destructive, warning, or ghost"
64
- }).optional().meta({ description: "Button style variant" }),
65
- size: e.enum(["xs", "sm", "md", "lg"], {
66
- error: "Invalid button size. Must be one of: xs, sm, md, or lg"
67
- }).optional().meta({ description: "Button size" }),
68
- icon: e.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Icon-only button size" }),
69
- raised: e.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Button shadow elevation" }),
70
- extrude: e.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Button extrude elevation" }),
71
- disabled: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the button is disabled" }),
72
- loading: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether to show a loading spinner" }),
73
- type: e.enum(["button", "submit"], {
74
- error: "Invalid button type. Must be either 'button' or 'submit'"
75
- }).optional().meta({ description: "Button type attribute" })
76
- }).optional(), lt = l.extend({
77
- size: e.enum(["sm", "md"]).optional().meta({ description: "Card size" }),
78
- raised: e.enum(["none", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Card shadow elevation" })
79
- }).optional(), pt = l.optional(), mt = l.optional(), ut = l.optional(), gt = l.optional(), ht = l.optional(), ft = l.optional(), bt = l.optional(), yt = l.extend({
80
- checked: e.union([e.string(), e.boolean()]).optional().meta({ description: "Checkbox checked state" }),
81
- disabled: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the checkbox is disabled" }),
82
- required: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the checkbox must be checked" }),
83
- size: e.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Checkbox size" })
84
- }).strict(), At = l.extend({
85
- src: e.union(
86
- [
87
- e.url({ error: "Image source (src) must be a valid URL" }),
88
- e.string().min(1, { message: "Image source (src) cannot be empty" })
89
- ],
90
- {
91
- error: "Image source (src) is required"
92
- }
93
- ),
94
- alt: e.string().optional().default("unknown image url").meta({ description: "Alternative text for the image" })
95
- }).strict(), xt = l.extend({
96
- value: e.union([e.string(), e.number()], {
97
- error: "OTP value is required"
98
- }).meta({ description: "Current OTP value" }),
99
- placeholder: e.string().optional().meta({ description: "Placeholder text for the OTP input" }),
100
- disabled: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the OTP input is disabled" }),
101
- containerClassName: e.string().optional().meta({ description: "Custom CSS class for the OTP input container" })
102
- }).strict(), Ot = l.extend({
103
- type: e.enum(["text", "email", "password", "number"], {
104
- error: "Invalid input type. Must be one of: text, email, password, or number"
105
- }).optional().meta({ description: "Input type; a number input stores a number" }),
106
- value: e.union([e.string(), e.number()], {
107
- error: "Input value is required"
108
- }).meta({ description: "Current input value" }),
109
- placeholder: e.string().optional().meta({ description: "Placeholder text shown when empty" }),
110
- disabled: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the input is disabled" })
111
- }).strict(), Tt = l.extend({
112
- htmlFor: e.string().min(1, {
113
- message: "Label 'for' attribute is required and must reference an input ID"
114
- }).meta({ description: "ID of the associated input element" }),
115
- size: e.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Label text size" }),
116
- variant: e.enum(["default", "underline", "destructive"]).optional().meta({ description: "Label style variant" })
117
- }).strict(), Ct = l.extend({
118
- checked: e.union([e.string(), e.boolean()], {
119
- error: "Switch checked state is required"
120
- }).meta({ description: "Current switch state" }),
121
- disabled: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the switch is disabled" }),
122
- required: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the switch must be turned on" }),
123
- size: e.enum(["sm", "md", "lg"]).optional().meta({ description: "Switch size" }),
124
- rounded: e.enum(["none", "sm", "md", "lg", "full"]).optional().meta({ description: "Switch border radius" })
125
- }).strict(), vt = l.extend({
126
- value: e.string({ error: "Textarea value is required" }).meta({ description: "Current textarea content" }),
127
- placeholder: e.string().optional().meta({ description: "Placeholder text shown when empty" }),
128
- disabled: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the textarea is disabled" }),
129
- autosize: e.boolean().optional().meta({ description: "Whether the textarea auto-resizes to fit content" }),
130
- rows: e.number().min(1, { message: "Minimum number of rows is 1" }).max(100, { message: "Maximum number of rows is 100" }).optional().meta({ description: "Number of visible text lines" }),
131
- minLength: e.number().min(0, { message: "Minimum character length cannot be negative" }).optional().meta({ description: "Minimum number of characters allowed" }),
132
- maxLength: e.number().max(1e4, { message: "Maximum character length cannot exceed 10,000" }).optional().meta({ description: "Maximum number of characters allowed" })
133
- }).strict(), It = l.optional(), wt = l.optional(), Rt = l.extend({
134
- align: e.enum(["inline-start", "inline-end", "block-start", "block-end"]).optional().meta({ description: "Alignment of the addon within the input group" })
135
- }).optional(), St = l.extend({
136
- value: e.union([e.string(), e.number()], {
137
- error: "Input value is required"
138
- }).meta({ description: "Current input value" }),
139
- placeholder: e.string().optional().meta({ description: "Placeholder text shown when empty" }),
140
- disabled: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the input is disabled" })
141
- }).strict(), Nt = l.extend({
142
- variant: e.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"]).optional(),
143
- size: e.enum(["xs", "sm", "md", "lg"]).optional()
144
- }).optional(), Et = l.extend({
145
- value: e.string({ error: "Textarea value is required" }).meta({ description: "Current textarea content" }),
146
- placeholder: e.string().optional(),
147
- disabled: e.union([e.string(), e.boolean()]).optional()
148
- }).strict(), Pt = l.extend({
149
- value: e.string().nullable().meta({ description: "Current signature value (base64 or null if empty)" }),
150
- canvasClassname: e.string().optional().meta({ description: "Custom CSS class for the signature canvas" }),
151
- imageType: e.enum(["image/png", "image/jpeg", "image/webp"]).optional().meta({ description: "Image format for the exported signature" })
152
- }).strict(), Dt = l.extend({
153
- selected: e.union([e.string(), e.date(), e.array(e.date())], {
154
- error: "Invalid calendar selection. Must be a date string, Date object, or array of dates"
155
- }).optional().meta({ description: "Currently selected date(s)" }),
156
- buttonVariant: e.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"]).optional().meta({ description: "Variant for calendar navigation buttons" }),
157
- hideWeekends: e.boolean().optional().meta({ description: "Whether to hide Saturday and Sunday columns" })
158
- }).optional(), Lt = l.optional(), kt = l.optional(), _t = l.optional(), Bt = l.optional(), Ut = l.optional(), jt = l.optional(), zt = l.optional(), Ht = l.optional(), Mt = l.extend({
159
- variant: e.enum(["default", "contained", "separated"]).optional().meta({ description: "Accordion style variant" }),
160
- raised: e.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Accordion shadow elevation" }),
161
- extrude: e.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Accordion extrude elevation" })
162
- }).optional(), qt = l.optional(), Ft = l.extend({
163
- disabled: e.union([e.string(), e.boolean()]).optional().meta({ description: "Whether the accordion trigger is disabled" }),
164
- icon: e.any().optional().meta({ description: "Custom icon component for the trigger" })
165
- }).optional(), Wt = l.optional(), Gt = l.extend({
166
- src: e.string().optional().meta({ description: "Image source URL" }),
167
- alt: e.string().optional().meta({ description: "Alternative text for the avatar image" }),
168
- size: e.enum(["full", "sm", "md", "lg", "xl"]).optional().meta({ description: "Avatar size" }),
169
- rounded: e.enum(["none", "sm", "md", "lg", "full"]).optional().meta({ description: "Avatar border radius" }),
170
- raised: e.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Avatar shadow elevation" }),
171
- fallback: e.string().optional().meta({ description: "Fallback text or element when image fails to load" }),
172
- badge: e.any().optional().meta({ description: "Badge element to overlay on the avatar" })
173
- }).optional(), $t = l.optional(), Jt = l.optional(), Vt = l.optional(), Xt = l.extend({
174
- variant: e.enum(["spinner", "ping"]).optional().meta({ description: "Loader animation variant" }),
175
- fill: e.enum(["default", "destructive", "warning", "pending"]).optional().meta({ description: "Loader fill color" }),
176
- size: e.enum(["sm", "md", "lg"]).optional().meta({ description: "Loader size" }),
177
- icon: e.any().optional().meta({ description: "Custom spinner icon component" }),
178
- pingIcon: e.any().optional().meta({ description: "Custom ping icon component" }),
179
- iconProps: e.any().optional().meta({ description: "Props to pass to the icon components" })
180
- }).optional(), Zt = l.extend({
181
- mode: e.enum(["single", "multiple"]).optional().meta({ description: "Progress display mode" }),
182
- value: e.union([
183
- e.number().nullable(),
184
- e.array(
185
- e.object({
186
- name: e.string().optional(),
187
- value: e.number()
188
- })
189
- )
190
- ]).optional().meta({ description: "Current progress value(s)" }),
191
- size: e.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress size" }),
192
- raised: e.enum(["default", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress shadow elevation" }),
193
- stacked: e.enum(["default", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress stacked spacing" })
194
- }).optional(), Kt = l.extend({
195
- variant: e.enum(["circle", "square", "default", "text"]).optional().meta({ description: "Skeleton shape variant" }),
196
- animate: e.boolean().optional().meta({ description: "Whether to animate the skeleton" })
197
- }).optional(), Yt = e.lazy(() => e.union([e.string(), qe])), c = e.object({
198
- children: e.array(Yt).optional().meta({ description: "Child nodes to render inside this element" })
199
- }), E = c.extend({
200
- type: e.literal(n.DIV),
201
- args: it
202
- }).meta({ description: "Container div element for grouping content" }), P = c.extend({
203
- type: e.literal(n.A),
204
- args: Ye
205
- }).meta({ description: "Anchor/link element" }), D = c.extend({
206
- type: e.literal(n.H),
207
- args: Qe
208
- }).meta({ description: "Heading element (h1-h6)" }), L = c.extend({
209
- type: e.literal(n.P),
210
- args: et
211
- }).meta({ description: "Paragraph text element" }), k = c.extend({
212
- type: e.literal(n.OL),
213
- args: tt
214
- }).meta({ description: "Ordered list element" }), _ = c.extend({
215
- type: e.literal(n.UL),
216
- args: nt
217
- }).meta({ description: "Unordered list element" }), B = c.extend({
218
- type: e.literal(n.LI),
219
- args: at
220
- }).meta({ description: "List item element" }), U = c.extend({
221
- type: e.literal(n.SPAN),
222
- args: ot
223
- }).meta({ description: "Inline span element" }), j = c.extend({
224
- type: e.literal(n.SEPARATOR),
225
- args: rt
226
- }).meta({ description: "Horizontal separator / divider element" }), z = c.extend({
227
- type: e.literal(n.ALERT),
228
- args: st
229
- }).meta({ description: "Alert message box" }), H = c.extend({
230
- type: e.literal(n.BADGE),
231
- args: dt
232
- }).meta({ description: "Badge/status indicator" }), M = c.extend({
233
- type: e.literal(n.BUTTON),
234
- args: ct
235
- }).meta({ description: "Clickable button element" }), q = c.extend({
236
- type: e.literal(n.CARD),
237
- args: lt
238
- }).meta({ description: "Card container element" }), F = c.extend({
239
- type: e.literal(n.CHECKBOX),
240
- args: yt
241
- }).meta({ description: "Checkbox input element" }), W = c.extend({
242
- type: e.literal(n.IMAGE),
243
- args: At
244
- }).meta({ description: "Image element" }), G = c.extend({
245
- type: e.literal(n.OTP),
246
- args: xt
247
- }).meta({ description: "One-time password (OTP) input" }), $ = c.extend({
248
- type: e.literal(n.INPUT),
249
- args: Ot
250
- }).meta({ description: "Text input element" }), J = c.extend({
251
- type: e.literal(n.LABEL),
252
- args: Tt
253
- }).meta({ description: "Form label element" }), V = c.extend({
254
- type: e.literal(n.SWITCH),
255
- args: Ct
256
- }).meta({ description: "Toggle switch element" }), X = c.extend({
257
- type: e.literal(n.TEXTAREA),
258
- args: vt
259
- }).meta({ description: "Multi-line text input" }), Z = c.extend({
260
- type: e.literal(n.SIGNATURE),
261
- args: Pt
262
- }).meta({ description: "Signature pad input" }), K = c.extend({
263
- type: e.literal(n.CALENDAR),
264
- args: Dt
265
- }).meta({ description: "Date picker calendar" }), Y = c.extend({
266
- type: e.literal(n.CARD_HEADER),
267
- args: pt
268
- }).meta({ description: "Card header container" }), Q = c.extend({
269
- type: e.literal(n.CARD_TITLE),
270
- args: mt
271
- }).meta({ description: "Card title element" }), ee = c.extend({
272
- type: e.literal(n.CARD_DESCRIPTION),
273
- args: ut
274
- }).meta({ description: "Card description element" }), te = c.extend({
275
- type: e.literal(n.CARD_CONTENT),
276
- args: gt
277
- }).meta({ description: "Card content body" }), ne = c.extend({
278
- type: e.literal(n.CARD_FOOTER),
279
- args: ht
280
- }).meta({ description: "Card footer container" }), ae = c.extend({
281
- type: e.literal(n.CARD_ACTION),
282
- args: ft
283
- }).meta({ description: "Card action slot" }), ie = c.extend({
284
- type: e.literal(n.CARD_ICON),
285
- args: bt
286
- }).meta({ description: "Card icon slot" }), oe = c.extend({
287
- type: e.literal(n.TABLE),
288
- args: Lt
289
- }).meta({ description: "Table container" }), re = c.extend({
290
- type: e.literal(n.TABLE_HEADER),
291
- args: kt
292
- }).meta({ description: "Table header section" }), se = c.extend({
293
- type: e.literal(n.TABLE_BODY),
294
- args: _t
295
- }).meta({ description: "Table body section" }), de = c.extend({
296
- type: e.literal(n.TABLE_FOOTER),
297
- args: Bt
298
- }).meta({ description: "Table footer section" }), ce = c.extend({
299
- type: e.literal(n.TABLE_HEAD),
300
- args: Ut
301
- }).meta({ description: "Table header cell" }), le = c.extend({
302
- type: e.literal(n.TABLE_ROW),
303
- args: jt
304
- }).meta({ description: "Table row" }), pe = c.extend({
305
- type: e.literal(n.TABLE_CELL),
306
- args: zt
307
- }).meta({ description: "Table data cell" }), me = c.extend({
308
- type: e.literal(n.TABLE_CAPTION),
309
- args: Ht
310
- }).meta({ description: "Table caption" }), ue = c.extend({
311
- type: e.literal(n.ACCORDION),
312
- args: Mt
313
- }).meta({ description: "Accordion container" }), ge = c.extend({
314
- type: e.literal(n.ACCORDION_ITEM),
315
- args: qt
316
- }).meta({ description: "Accordion item" }), he = c.extend({
317
- type: e.literal(n.ACCORDION_TRIGGER),
318
- args: Ft
319
- }).meta({ description: "Accordion trigger" }), fe = c.extend({
320
- type: e.literal(n.ACCORDION_CONTENT),
321
- args: Wt
322
- }).meta({ description: "Accordion content panel" }), be = c.extend({
323
- type: e.literal(n.AVATAR),
324
- args: Gt
325
- }).meta({ description: "Avatar image or fallback" }), ye = c.extend({
326
- type: e.literal(n.COLLAPSIBLE),
327
- args: $t
328
- }).meta({ description: "Collapsible container" }), Ae = c.extend({
329
- type: e.literal(n.COLLAPSIBLE_TRIGGER),
330
- args: Jt
331
- }).meta({ description: "Collapsible trigger" }), xe = c.extend({
332
- type: e.literal(n.COLLAPSIBLE_CONTENT),
333
- args: Vt
334
- }).meta({ description: "Collapsible content panel" }), Oe = c.extend({
335
- type: e.literal(n.LOADER),
336
- args: Xt
337
- }).meta({ description: "Loading spinner indicator" }), Te = c.extend({
338
- type: e.literal(n.PROGRESS),
339
- args: Zt
340
- }).meta({ description: "Progress bar indicator" }), Ce = c.extend({
341
- type: e.literal(n.SKELETON),
342
- args: Kt
343
- }).meta({ description: "Skeleton loading placeholder" }), ve = c.extend({
344
- type: e.literal(n.INPUT_GROUP),
345
- args: It
346
- }).meta({ description: "Input group container" }), Ie = c.extend({
347
- type: e.literal(n.INPUT_GROUP_TEXT),
348
- args: wt
349
- }).meta({ description: "Text element within input group" }), we = c.extend({
350
- type: e.literal(n.INPUT_GROUP_ADDON),
351
- args: Rt
352
- }).meta({ description: "Addon container within input group" }), Re = c.extend({
353
- type: e.literal(n.INPUT_GROUP_INPUT),
354
- args: St
355
- }).meta({ description: "Input element within input group" }), Se = c.extend({
356
- type: e.literal(n.INPUT_GROUP_BUTTON),
357
- args: Nt
358
- }).meta({ description: "Button element within input group" }), Ne = c.extend({
359
- type: e.literal(n.INPUT_GROUP_TEXTAREA),
360
- args: Et
361
- }).meta({ description: "Textarea element within input group" }), Qt = e.object({
362
- items: e.string({ error: "each.items is required" }).min(1, { message: "each.items cannot be empty" }).meta({
363
- description: 'Binding path to the array to iterate, e.g. "{{applicants}}". Must be a plain path (not a computed/filtered expression) so each row maps back to a real store index for two-way binding.'
364
- }),
365
- as: e.string({ error: "each.as is required" }).min(1, { message: "each.as cannot be empty" }).meta({ description: 'Alias name bound to the current item, e.g. "applicant"' }),
366
- index: e.string().optional().meta({ description: "Alias name bound to the current numeric index" }),
367
- key: e.string().optional().meta({
368
- description: 'Binding expression used as the React key per row, e.g. "{{applicant.id}}". Falls back to the row index when omitted.'
369
- })
370
- }).strict(), Ee = c.extend({
371
- type: e.literal(n.EACH),
372
- args: Qt
373
- }).meta({ description: "Repeats its children once per item in a bound array" }), en = e.object({
374
- condition: e.string({ error: "if.condition is required" }).min(1, { message: "if.condition cannot be empty" }).meta({ description: "Binding expression; children render only when it evaluates truthy" })
375
- }).strict(), Pe = c.extend({
376
- type: e.literal(n.IF),
377
- args: en
378
- }).meta({ description: "Conditionally renders its children based on a bound expression" });
379
- function s(t) {
380
- return t.shape.args;
381
- }
382
- function d(t) {
383
- return t.meta()?.description;
384
- }
385
- function tn(t) {
386
- if (Object.keys(t).length === 0)
387
- throw new Error("createTemplateSchema: registry must declare at least one component");
388
- let a;
389
- const o = e.lazy(() => e.union([e.string(), a])), p = e.object({
390
- children: e.array(o).optional().meta({ description: "Child nodes to render inside this element" })
391
- }), r = Object.entries(t).map(([m, { argsSchema: u, description: f }]) => {
392
- const b = p.extend({
393
- type: e.literal(m),
394
- args: u
395
- });
396
- return f ? b.meta({ description: f }) : b;
397
- });
398
- return a = e.discriminatedUnion(
399
- "type",
400
- r
401
- ), { Node: o, ComponentNode: a };
402
- }
403
- const He = {
404
- [n.DIV]: { argsSchema: s(E), description: d(E) },
405
- [n.A]: { argsSchema: s(P), description: d(P) },
406
- [n.H]: { argsSchema: s(D), description: d(D) },
407
- [n.P]: { argsSchema: s(L), description: d(L) },
408
- [n.OL]: { argsSchema: s(k), description: d(k) },
409
- [n.UL]: { argsSchema: s(_), description: d(_) },
410
- [n.LI]: { argsSchema: s(B), description: d(B) },
411
- [n.SPAN]: { argsSchema: s(U), description: d(U) },
412
- [n.SEPARATOR]: {
413
- argsSchema: s(j),
414
- description: d(j)
415
- },
416
- [n.ALERT]: { argsSchema: s(z), description: d(z) },
417
- [n.BADGE]: { argsSchema: s(H), description: d(H) },
418
- [n.BUTTON]: { argsSchema: s(M), description: d(M) },
419
- [n.CARD]: { argsSchema: s(q), description: d(q) },
420
- [n.CARD_HEADER]: {
421
- argsSchema: s(Y),
422
- description: d(Y)
423
- },
424
- [n.CARD_TITLE]: {
425
- argsSchema: s(Q),
426
- description: d(Q)
427
- },
428
- [n.CARD_DESCRIPTION]: {
429
- argsSchema: s(ee),
430
- description: d(ee)
431
- },
432
- [n.CARD_CONTENT]: {
433
- argsSchema: s(te),
434
- description: d(te)
435
- },
436
- [n.CARD_FOOTER]: {
437
- argsSchema: s(ne),
438
- description: d(ne)
439
- },
440
- [n.CARD_ACTION]: {
441
- argsSchema: s(ae),
442
- description: d(ae)
443
- },
444
- [n.CARD_ICON]: {
445
- argsSchema: s(ie),
446
- description: d(ie)
447
- },
448
- [n.CHECKBOX]: {
449
- argsSchema: s(F),
450
- description: d(F)
451
- },
452
- [n.IMAGE]: { argsSchema: s(W), description: d(W) },
453
- [n.OTP]: { argsSchema: s(G), description: d(G) },
454
- [n.INPUT]: { argsSchema: s($), description: d($) },
455
- [n.LABEL]: { argsSchema: s(J), description: d(J) },
456
- [n.SWITCH]: { argsSchema: s(V), description: d(V) },
457
- [n.TEXTAREA]: {
458
- argsSchema: s(X),
459
- description: d(X)
460
- },
461
- [n.SIGNATURE]: {
462
- argsSchema: s(Z),
463
- description: d(Z)
464
- },
465
- [n.CALENDAR]: {
466
- argsSchema: s(K),
467
- description: d(K)
468
- },
469
- [n.TABLE]: { argsSchema: s(oe), description: d(oe) },
470
- [n.TABLE_HEADER]: {
471
- argsSchema: s(re),
472
- description: d(re)
473
- },
474
- [n.TABLE_BODY]: {
475
- argsSchema: s(se),
476
- description: d(se)
477
- },
478
- [n.TABLE_FOOTER]: {
479
- argsSchema: s(de),
480
- description: d(de)
481
- },
482
- [n.TABLE_HEAD]: {
483
- argsSchema: s(ce),
484
- description: d(ce)
485
- },
486
- [n.TABLE_ROW]: {
487
- argsSchema: s(le),
488
- description: d(le)
489
- },
490
- [n.TABLE_CELL]: {
491
- argsSchema: s(pe),
492
- description: d(pe)
493
- },
494
- [n.TABLE_CAPTION]: {
495
- argsSchema: s(me),
496
- description: d(me)
497
- },
498
- [n.ACCORDION]: {
499
- argsSchema: s(ue),
500
- description: d(ue)
501
- },
502
- [n.ACCORDION_ITEM]: {
503
- argsSchema: s(ge),
504
- description: d(ge)
505
- },
506
- [n.ACCORDION_TRIGGER]: {
507
- argsSchema: s(he),
508
- description: d(he)
509
- },
510
- [n.ACCORDION_CONTENT]: {
511
- argsSchema: s(fe),
512
- description: d(fe)
513
- },
514
- [n.AVATAR]: { argsSchema: s(be), description: d(be) },
515
- [n.COLLAPSIBLE]: {
516
- argsSchema: s(ye),
517
- description: d(ye)
518
- },
519
- [n.COLLAPSIBLE_TRIGGER]: {
520
- argsSchema: s(Ae),
521
- description: d(Ae)
522
- },
523
- [n.COLLAPSIBLE_CONTENT]: {
524
- argsSchema: s(xe),
525
- description: d(xe)
526
- },
527
- [n.LOADER]: { argsSchema: s(Oe), description: d(Oe) },
528
- [n.PROGRESS]: {
529
- argsSchema: s(Te),
530
- description: d(Te)
531
- },
532
- [n.SKELETON]: {
533
- argsSchema: s(Ce),
534
- description: d(Ce)
535
- },
536
- [n.INPUT_GROUP]: {
537
- argsSchema: s(ve),
538
- description: d(ve)
539
- },
540
- [n.INPUT_GROUP_TEXT]: {
541
- argsSchema: s(Ie),
542
- description: d(Ie)
543
- },
544
- [n.INPUT_GROUP_ADDON]: {
545
- argsSchema: s(we),
546
- description: d(we)
547
- },
548
- [n.INPUT_GROUP_INPUT]: {
549
- argsSchema: s(Re),
550
- description: d(Re)
551
- },
552
- [n.INPUT_GROUP_BUTTON]: {
553
- argsSchema: s(Se),
554
- description: d(Se)
555
- },
556
- [n.INPUT_GROUP_TEXTAREA]: {
557
- argsSchema: s(Ne),
558
- description: d(Ne)
559
- },
560
- [n.EACH]: { argsSchema: s(Ee), description: d(Ee) },
561
- [n.IF]: { argsSchema: s(Pe), description: d(Pe) }
562
- }, Me = tn(He), qe = Me.ComponentNode, A = Me.Node, Fe = Object.fromEntries(
563
- qe.options.map((t) => [t.shape.type.value, t])
564
- ), nn = e.registry(), an = e.registry(), i = n, on = [
565
- i.INPUT,
566
- i.INPUT_GROUP_INPUT,
567
- i.INPUT_GROUP_TEXTAREA,
568
- i.TEXTAREA,
569
- i.IMAGE,
570
- i.SEPARATOR,
571
- i.CHECKBOX,
572
- i.SWITCH,
573
- i.OTP,
574
- i.SIGNATURE,
575
- i.CALENDAR,
576
- i.LOADER,
577
- i.SKELETON,
578
- i.PROGRESS,
579
- i.AVATAR
580
- ], De = [i.TABLE_HEADER, i.TABLE_BODY, i.TABLE_FOOTER], T = [i.CARD, i.CARD_HEADER, i.CARD_FOOTER], C = [i.INPUT_GROUP, i.INPUT_GROUP_ADDON], I = {
581
- [i.ACCORDION]: { accepts: [i.ACCORDION_ITEM] },
582
- [i.ACCORDION_ITEM]: { accepts: [i.ACCORDION_TRIGGER, i.ACCORDION_CONTENT], parent: [i.ACCORDION] },
583
- [i.ACCORDION_TRIGGER]: { parent: [i.ACCORDION_ITEM] },
584
- [i.ACCORDION_CONTENT]: { parent: [i.ACCORDION_ITEM] },
585
- [i.COLLAPSIBLE_TRIGGER]: { parent: [i.COLLAPSIBLE] },
586
- [i.COLLAPSIBLE_CONTENT]: { parent: [i.COLLAPSIBLE] },
587
- [i.TABLE]: { accepts: [...De, i.TABLE_CAPTION] },
588
- [i.TABLE_HEADER]: { accepts: [i.TABLE_ROW], parent: [i.TABLE] },
589
- [i.TABLE_BODY]: { accepts: [i.TABLE_ROW], parent: [i.TABLE] },
590
- [i.TABLE_FOOTER]: { accepts: [i.TABLE_ROW], parent: [i.TABLE] },
591
- [i.TABLE_CAPTION]: { parent: [i.TABLE] },
592
- [i.TABLE_ROW]: { accepts: [i.TABLE_CELL, i.TABLE_HEAD], parent: De },
593
- [i.TABLE_CELL]: { parent: [i.TABLE_ROW] },
594
- [i.TABLE_HEAD]: { parent: [i.TABLE_ROW] },
595
- [i.CARD_HEADER]: { parent: [i.CARD] },
596
- [i.CARD_CONTENT]: { parent: [i.CARD] },
597
- [i.CARD_FOOTER]: { parent: [i.CARD] },
598
- [i.CARD_TITLE]: { parent: T },
599
- [i.CARD_DESCRIPTION]: { parent: T },
600
- [i.CARD_ACTION]: { parent: T },
601
- [i.CARD_ICON]: { parent: T },
602
- [i.INPUT_GROUP_ADDON]: { parent: [i.INPUT_GROUP] },
603
- [i.INPUT_GROUP_TEXT]: { parent: C },
604
- [i.INPUT_GROUP_INPUT]: { parent: C },
605
- [i.INPUT_GROUP_BUTTON]: { parent: C },
606
- [i.INPUT_GROUP_TEXTAREA]: { parent: C },
607
- [i.OL]: { accepts: [i.LI] },
608
- [i.UL]: { accepts: [i.LI] },
609
- [i.LI]: { parent: [i.OL, i.UL] }
610
- };
611
- for (const t of on) I[t] = { ...I[t], accepts: "none" };
612
- const rn = {
613
- id: { label: "Element ID", group: "Advanced" },
614
- className: { label: "Classes", group: "Advanced" },
615
- href: { label: "Link URL", group: "Content", placeholder: "https://" },
616
- src: { label: "Image URL", group: "Content", placeholder: "https:// or {{binding}}" },
617
- alt: { label: "Alt text", group: "Content" },
618
- placeholder: { label: "Placeholder", group: "Content" },
619
- fallback: { label: "Fallback text", group: "Content" },
620
- value: { label: "Bound value", control: "binding", group: "Data" },
621
- checked: { label: "Bound value", control: "binding", group: "Data" },
622
- selected: { label: "Bound value", control: "binding", group: "Data" },
623
- htmlFor: { label: "For input (ID)", group: "Data" },
624
- disabled: { label: "Disabled", group: "Data" },
625
- required: { label: "Required", group: "Data" },
626
- loading: { label: "Loading", group: "Data" },
627
- readonly: { label: "Read only", group: "Data" },
628
- items: { label: "Repeat over", control: "binding", group: "Data", placeholder: "{{items}}" },
629
- index: { label: "Index alias", group: "Data" },
630
- key: { label: "Row key", control: "binding", group: "Advanced" },
631
- condition: { label: "Show when", control: "binding", group: "Data", placeholder: "{{flag}}" },
632
- variant: { label: "Variant", group: "Style" },
633
- size: { label: "Size", group: "Style" },
634
- raised: { label: "Shadow", group: "Style" },
635
- extrude: { label: "Extrude", group: "Style" },
636
- rounded: { label: "Corners", group: "Style" },
637
- align: { label: "Alignment", group: "Style" },
638
- fill: { label: "Colour", group: "Style" },
639
- stacked: { label: "Stacked spacing", group: "Style" },
640
- animate: { label: "Animate", group: "Style" },
641
- buttonVariant: { label: "Button variant", group: "Style" },
642
- mode: { label: "Mode", group: "Style" },
643
- rows: { label: "Rows", group: "Style" },
644
- autosize: { label: "Auto-size", group: "Style" },
645
- type: { label: "Button type", group: "Content" },
646
- imageType: { label: "Image format", group: "Advanced" },
647
- containerClassName: { label: "Container classes", group: "Advanced" },
648
- canvasClassname: { label: "Canvas classes", group: "Advanced" },
649
- minLength: { label: "Min length", group: "Advanced" },
650
- maxLength: { label: "Max length", group: "Advanced" },
651
- hideWeekends: { label: "Hide weekends", group: "Advanced" },
652
- pins: { label: "Pins", control: "json", group: "Advanced" },
653
- zoom: { label: "Zoom", group: "Advanced" },
654
- pitch: { label: "Pitch", group: "Advanced" },
655
- fixed: { label: "Fixed viewport", group: "Advanced" },
656
- allowMultiple: { label: "Allow multiple pins", group: "Advanced" },
657
- icon: { label: "Icon", group: "Advanced" },
658
- pingIcon: { label: "Ping icon", control: "json", group: "Advanced" },
659
- iconProps: { label: "Icon props", control: "json", group: "Advanced" },
660
- badge: { label: "Badge", control: "json", group: "Advanced" }
661
- }, sn = {
662
- [i.EACH]: { as: { label: "Item alias", group: "Data" } },
663
- [i.H]: { as: { label: "Render as", group: "Advanced" } },
664
- [i.P]: { as: { label: "Render as", group: "Advanced" } },
665
- [i.BUTTON]: { icon: { label: "Icon-only size", group: "Style" } }
666
- };
667
- function dn(t) {
668
- let a = Fe[t]?.shape.args;
669
- for (; a instanceof e.ZodOptional; ) a = a.unwrap();
670
- return a instanceof e.ZodObject ? a : void 0;
671
- }
672
- for (const [t, a] of Object.entries(Fe)) {
673
- nn.add(a, { accepts: "any", ...I[t] });
674
- const o = dn(t)?.shape ?? {};
675
- for (const [p, r] of Object.entries(o))
676
- an.add(r, { ...rn[p], ...sn[t]?.[p] });
677
- }
678
31
  e.object({
679
- _id: g.meta({ readOnly: !0 }),
32
+ _id: c.meta({ readOnly: !0 }),
680
33
  email: e.string().email().meta({
681
34
  description: "User's email address (used as the primary identifier)",
682
35
  example: "jack@datahaven.net",
@@ -685,8 +38,8 @@ e.object({
685
38
  name: e.string().min(1).max(100).meta({ description: "Full display name", example: "Razor Jack" }),
686
39
  emailVerified: e.boolean().nullable().optional().meta({ description: "Whether the user's email has been verified" }),
687
40
  image: e.string().optional().meta({ description: "Avatar image URL", example: "https://cdn.datahaven.net/avatars/rj7741.png" }),
688
- createdAt: h.optional().meta({ description: "When the user account was created", readOnly: !0 }),
689
- updatedAt: h.optional().meta({ description: "When the user account was last updated", readOnly: !0 })
41
+ createdAt: d.optional().meta({ description: "When the user account was created", readOnly: !0 }),
42
+ updatedAt: d.optional().meta({ description: "When the user account was last updated", readOnly: !0 })
690
43
  }).strict().meta({
691
44
  description: "An authenticated user account. Users are distinct from organization memberships — a user may belong to multiple organizations."
692
45
  });
@@ -695,7 +48,7 @@ e.object({
695
48
  image: e.string().optional().meta({ description: "Updated avatar URL", example: "https://cdn.datahaven.net/avatars/cj7741.png" })
696
49
  }).strict().meta({ description: "Update the authenticated user's profile" });
697
50
  e.object({
698
- _id: g.meta({ readOnly: !0 }),
51
+ _id: c.meta({ readOnly: !0 }),
699
52
  clientId: e.string().min(1).meta({ description: "Unique client identifier for the organization", example: "pb-org-7f3a2b9c", readOnly: !0 }),
700
53
  name: e.string().min(3).max(50).meta({ description: "Unique organization slug/identifier", example: "neon-shadow" }),
701
54
  displayName: e.string().min(3).max(50).meta({ description: "Human-readable organization name shown in UI and emails", example: "Neon Shadow Corp" }),
@@ -704,11 +57,11 @@ e.object({
704
57
  contactEmail: e.string().email().meta({ description: "Primary contact email for the organization", example: "legal@neon-shadow.io" }),
705
58
  icon: e.string().meta({ description: "Organization icon/logo URL", example: "https://cdn.neon-shadow.io/icon.png" }),
706
59
  banner: e.string().nullable().optional().meta({ description: "Organization banner image URL", example: "https://cdn.neon-shadow.io/banner.png" }),
707
- createdBy: g.meta({ description: "User ObjectId who created the organization", readOnly: !0 }),
60
+ createdBy: c.meta({ description: "User ObjectId who created the organization", readOnly: !0 }),
708
61
  customerId: e.string().optional().nullable().meta({ description: "Stripe customer ID for billing", example: "cus_9x8y7z6w5v4u3t2s", readOnly: !0 }),
709
62
  subscriptionId: e.string().optional().nullable().meta({ description: "Stripe subscription ID", example: "sub_1A2B3C4D5E6F7G8H", readOnly: !0 }),
710
- createdAt: h.meta({ description: "When the organization was created", readOnly: !0 }),
711
- updatedAt: h.meta({ description: "When the organization was last updated", readOnly: !0 })
63
+ createdAt: d.meta({ description: "When the organization was created", readOnly: !0 }),
64
+ updatedAt: d.meta({ description: "When the organization was last updated", readOnly: !0 })
712
65
  }).strict().meta({
713
66
  description: "A tenant organization. Each organization has its own isolated workspace, templates, signature requests, and API keys."
714
67
  });
@@ -721,15 +74,15 @@ e.object({
721
74
  icon: e.string().meta({ description: "Organization icon/logo URL", example: "https://cdn.neon-shadow.io/icon.png" })
722
75
  }).strict().meta({ description: "Create a new organization" });
723
76
  e.object({
724
- _id: g.meta({ readOnly: !0 }),
725
- organization: g.meta({ description: "The organization this membership belongs to", readOnly: !0 }),
726
- user: g.meta({ description: "The user who is a member of the organization", readOnly: !0 }),
77
+ _id: c.meta({ readOnly: !0 }),
78
+ organization: c.meta({ description: "The organization this membership belongs to", readOnly: !0 }),
79
+ user: c.meta({ description: "The user who is a member of the organization", readOnly: !0 }),
727
80
  role: e.string().min(1).meta({ description: "Role identifier (e.g. 'admin', 'member', 'viewer')", example: "admin" }),
728
81
  permissions: e.string().min(1).meta({ description: "Permission set identifier or JSON string", example: '{"templates":"rw","forms":"r"}' }),
729
82
  status: e.enum(["active", "inactive", "blocked"]).meta({ description: "Membership status", example: "active" }),
730
- lastLogin: h.nullable().meta({ description: "When the user last logged into this organization", readOnly: !0 }),
731
- createdAt: h.meta({ description: "When the membership was created", readOnly: !0 }),
732
- updatedAt: h.optional().meta({ description: "When the membership was last updated", readOnly: !0 })
83
+ lastLogin: d.nullable().meta({ description: "When the user last logged into this organization", readOnly: !0 }),
84
+ createdAt: d.meta({ description: "When the membership was created", readOnly: !0 }),
85
+ updatedAt: d.optional().meta({ description: "When the membership was last updated", readOnly: !0 })
733
86
  }).strict().meta({
734
87
  description: "A user's membership within an organization. This links a User to an Organization and defines their role and permissions."
735
88
  });
@@ -741,55 +94,55 @@ e.object({
741
94
  permissions: e.string().min(1).meta({ description: "Permission set to assign", example: '{"templates":"r","forms":"rw"}' })
742
95
  }).strict().meta({ description: "Invite a user to join an organization" });
743
96
  e.object({
744
- _id: g.meta({ description: "OrganizationUser membership MongoDB ObjectId", readOnly: !0 }),
97
+ _id: c.meta({ description: "OrganizationUser membership MongoDB ObjectId", readOnly: !0 }),
745
98
  role: e.string().min(2).meta({ description: "Updated role", example: "viewer" }),
746
99
  permissions: e.string().min(1).meta({ description: "Updated permission set", example: '{"templates":"r"}' })
747
100
  }).strict().meta({ description: "Update an organization user's role or permissions" });
748
- const N = e.looseObject({
101
+ const x = e.looseObject({
749
102
  version: e.number().int().positive().meta({ description: "Builder document format version" })
750
103
  }).meta({ description: "Builder source document the config was compiled from (editor-only)" });
751
104
  e.object({
752
- _id: g.meta({ readOnly: !0 }),
753
- organization: g.meta({ description: "Organization that owns this template", readOnly: !0 }),
754
- createdBy: g.meta({ description: "OrganizationUser ID who created this template", readOnly: !0 }),
105
+ _id: c.meta({ readOnly: !0 }),
106
+ organization: c.meta({ description: "Organization that owns this template", readOnly: !0 }),
107
+ createdBy: c.meta({ description: "OrganizationUser ID who created this template", readOnly: !0 }),
755
108
  name: e.string().min(1).meta({ description: "Template name (unique within the organization)", example: "Neural_NDA_v3" }),
756
109
  description: e.string().default("").meta({ description: "Human-readable description of the template's purpose", example: "Standard non-disclosure agreement with neural implant data clause" }),
757
110
  config: e.any().meta({ description: "The Bonsai component tree defining the template layout and fields" }),
758
- source: N.optional(),
111
+ source: x.optional(),
759
112
  header: e.string().optional().meta({ description: "A small Bonsai component tree used for page headers in PDF rendering output" }),
760
113
  footer: e.string().optional().meta({ description: "A small Bonsai component tree used for page footers in PDF rendering output" }),
761
114
  contentHash: e.string().optional().meta({ description: "SHA-256 hash of the serialized config, used for deduplication", example: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1" }),
762
115
  css: e.string().optional().meta({ description: "Generated Tailwind CSS for the template layout" }),
763
116
  tags: e.array(e.string()).default([]).meta({ description: "Tags for organizing and discovering templates", example: ["nda", "legal", "neural-interface"] }),
764
117
  active: e.boolean().default(!0).meta({ description: "Whether the template is active and available for use" }),
765
- lastUsed: h.nullable().optional().meta({ description: "When the template was last referenced in a signature request", readOnly: !0 }),
118
+ lastUsed: d.nullable().optional().meta({ description: "When the template was last referenced in a signature request", readOnly: !0 }),
766
119
  usageCount: e.number().default(0).meta({ description: "Total number of signature requests created from this template" }),
767
120
  version: e.number().default(1).meta({ description: "Template schema version (increments on significant config changes)" }),
768
- createdAt: h.meta({ description: "When the template was created", readOnly: !0 }),
769
- updatedAt: h.meta({ description: "When the template was last updated", readOnly: !0 })
121
+ createdAt: d.meta({ description: "When the template was created", readOnly: !0 }),
122
+ updatedAt: d.meta({ description: "When the template was last updated", readOnly: !0 })
770
123
  }).strict().meta({
771
124
  description: "A reusable Bonsai signature template. Templates define the form layout via a component tree and can be referenced by ID when creating signature requests."
772
125
  });
773
126
  e.object({
774
- ou: g.meta({ description: "OrganizationUser ID of the user creating the template" }),
127
+ ou: c.meta({ description: "OrganizationUser ID of the user creating the template" }),
775
128
  name: e.string().min(1).meta({ description: "Template name (must be unique within the organization)", example: "Neural_NDA_v3" }),
776
129
  description: e.string().optional().meta({ description: "Optional description of the template's purpose", example: "Standard NDA with neural implant clause" }),
777
- config: A.meta({ description: "The Bonsai component tree that defines the template layout" }),
778
- source: N.optional(),
130
+ config: u.meta({ description: "The Bonsai component tree that defines the template layout" }),
131
+ source: x.optional(),
779
132
  pdf: e.object({
780
- header: A.optional().meta({ description: "PDF header Bonsai component tree" }),
781
- footer: A.optional().meta({ description: "PDF footer Bonsai component tree" })
133
+ header: u.optional().meta({ description: "PDF header Bonsai component tree" }),
134
+ footer: u.optional().meta({ description: "PDF footer Bonsai component tree" })
782
135
  }).optional(),
783
136
  tags: e.array(e.string()).optional().meta({ description: "Tags for organizing and filtering templates", example: ["nda", "legal"] })
784
137
  }).strict().meta({ description: "Create a new reusable signature template" });
785
138
  e.object({
786
139
  name: e.string().min(1).optional().meta({ description: "New template name (must be unique within the organization)" }),
787
140
  description: e.string().optional().meta({ description: "New description" }),
788
- config: A.optional().meta({ description: "Replacement Bonsai component tree; CSS and content hash are recomputed" }),
789
- source: N.optional(),
141
+ config: u.optional().meta({ description: "Replacement Bonsai component tree; CSS and content hash are recomputed" }),
142
+ source: x.optional(),
790
143
  pdf: e.object({
791
- header: A.optional().meta({ description: "PDF header Bonsai component tree" }),
792
- footer: A.optional().meta({ description: "PDF footer Bonsai component tree" })
144
+ header: u.optional().meta({ description: "PDF header Bonsai component tree" }),
145
+ footer: u.optional().meta({ description: "PDF footer Bonsai component tree" })
793
146
  }).optional(),
794
147
  tags: e.array(e.string()).optional().meta({ description: "Replacement tags" })
795
148
  }).strict().refine((t) => Object.keys(t).length > 0, { message: "Provide at least one field to update" }).meta({ description: "Update an existing template" });
@@ -804,7 +157,7 @@ e.object({
804
157
  name: e.string().meta({ description: "Template name", example: "Neural_NDA_v3" }),
805
158
  contentHash: e.string().optional().meta({ description: "SHA-256 hash of the config, useful for deduplication" })
806
159
  }).strict().meta({ description: "Created template summary" });
807
- const cn = e.enum([
160
+ const M = e.enum([
808
161
  "pending",
809
162
  "captured",
810
163
  "completed",
@@ -812,33 +165,33 @@ const cn = e.enum([
812
165
  "revoked"
813
166
  ]);
814
167
  e.object({
815
- _id: g.meta({ readOnly: !0 }),
168
+ _id: c.meta({ readOnly: !0 }),
816
169
  id: e.string().meta({ description: "Public-facing unique request ID (random hex string)", example: "fr_a7b8c9d0e1f2", readOnly: !0 }),
817
170
  token: e.string().meta({ description: "Verification token used for cookie-based auth in the signer's browser", readOnly: !0 }),
818
171
  email: e.string().email().meta({ description: "Recipient email address where the signature link was sent", example: "jack@datahaven.net" }),
819
172
  name: e.string().min(1).meta({ description: "Recipient's display name", example: "Razor Jack" }),
820
173
  attachments: e.array(e.string()).optional().meta({ description: "Array of attachment URLs included with the form", example: ["https://files.datahaven.net/nda_v3.pdf"] }),
821
174
  data: e.any().optional().meta({ description: "Form field data submitted by the signer" }),
822
- webhooks: e.array(g).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
175
+ webhooks: e.array(c).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
823
176
  metadata: e.any().optional().meta({ description: "Capture-time metadata such as IP address, user agent, and timestamps" }),
824
- expiry: h.meta({ description: "When the signature request link expires" }),
825
- due: h.optional().nullable().meta({ description: "Soft deadline for completing the signature" }),
177
+ expiry: d.meta({ description: "When the signature request link expires" }),
178
+ due: d.optional().nullable().meta({ description: "Soft deadline for completing the signature" }),
826
179
  digest: e.string().meta({ description: "SHA-256 hash of the serialized payload, used for deduplication", readOnly: !0 }),
827
180
  template: e.any().meta({ description: "Snapshot of the Bonsai component tree config at the time of form creation", readOnly: !0 }),
828
181
  header: e.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page header rendering", readOnly: !0 }),
829
182
  footer: e.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page footer rendering", readOnly: !0 }),
830
183
  css: e.string().meta({ description: "Tailwind CSS generated from the template at the time of form creation", readOnly: !0 }),
831
- status: cn.meta({ description: "Current lifecycle status of the form request", example: "pending" }),
832
- organization: g.meta({ description: "Organization that owns this form request", readOnly: !0 }),
833
- createdAt: h.meta({ description: "When the form request was created", readOnly: !0 }),
834
- updatedAt: h.meta({ description: "When the form request was last updated", readOnly: !0 })
184
+ status: M.meta({ description: "Current lifecycle status of the form request", example: "pending" }),
185
+ organization: c.meta({ description: "Organization that owns this form request", readOnly: !0 }),
186
+ createdAt: d.meta({ description: "When the form request was created", readOnly: !0 }),
187
+ updatedAt: d.meta({ description: "When the form request was last updated", readOnly: !0 })
835
188
  }).strict().meta({
836
189
  description: "A signature request sent to a recipient. Tracks the full lifecycle from creation through signing, completion, or revocation."
837
190
  });
838
191
  e.object({
839
192
  name: e.string().min(1).meta({ description: "Recipient's display name (used in the email greeting and form header)", example: "Razor Jack" }),
840
193
  email: e.string().email().meta({ description: "Recipient email address where the signature link will be sent", example: "jack@datahaven.net" }),
841
- template: e.union([A, e.string()]).meta({
194
+ template: e.union([u, e.string()]).meta({
842
195
  description: "Either an inline Bonsai component tree config, or a saved template MongoDB ObjectId to use as the form layout"
843
196
  }),
844
197
  expiry: e.coerce.date().optional().meta({ description: "When the signature request link expires (ISO 8601 date)", example: "2077-12-25T23:59:59Z" }),
@@ -848,8 +201,8 @@ e.object({
848
201
  metadata: e.any().optional().meta({ description: "Arbitrary metadata to associate with the form request", example: { department: "Legal", priority: "high" } }),
849
202
  data: e.any().optional().meta({ description: "Pre-filled form field data to populate the form on load", example: { full_name: "Razor Jack", badge_id: "RJ-7741" } }),
850
203
  pdf: e.union([e.boolean(), e.object({
851
- header: e.union([A, e.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
852
- footer: e.union([A, e.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
204
+ header: e.union([u, e.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
205
+ footer: e.union([u, e.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
853
206
  })]).optional().meta({ description: "PDF file config object (header||footer) or `true/false` boolean to trigger PDF file generation after form capture" })
854
207
  }).strict().meta({ description: "Create a new signature request targeting a recipient" });
855
208
  e.object({
@@ -868,24 +221,24 @@ e.object({
868
221
  })
869
222
  }).strict().meta({ description: "Submit captured form data from the signer's browser session" });
870
223
  e.object({
871
- _id: g.meta({ readOnly: !0 }),
224
+ _id: c.meta({ readOnly: !0 }),
872
225
  id: e.string().meta({ description: "Public key identifier (e.g. pb-xxxx). Used as the 'client' field when authenticating.", example: "pb-a7f3b2c9d1e8f4a5b6c7d8e9", readOnly: !0 }),
873
226
  secret: e.string().meta({ description: "Encrypted API key secret — only viewable at creation time", readOnly: !0 }),
874
227
  allowedOrigins: e.array(e.string()).default([]).meta({ description: "CORS origin allowlist. Requests from origins not in this list are rejected.", example: ["https://console.neon-shadow.io"] }),
875
228
  allowedIps: e.array(e.string()).default([]).meta({ description: "IP CIDR allowlist. Requests from IPs not in this list are rejected.", example: ["203.0.113.0/24"] }),
876
229
  active: e.boolean().default(!0).meta({ description: "Whether the key is active and can be used for authentication" }),
877
- expiry: h.meta({ description: "When the API key expires and can no longer be used" }),
878
- lastUsed: h.meta({ description: "Timestamp of the most recent request using this key", readOnly: !0 }),
230
+ expiry: d.meta({ description: "When the API key expires and can no longer be used" }),
231
+ lastUsed: d.meta({ description: "Timestamp of the most recent request using this key", readOnly: !0 }),
879
232
  audience: e.enum(["internal", "external"]).meta({ description: "Key audience — 'internal' for server-to-server, 'external' for client-side", example: "internal" }),
880
- organization: g.meta({ description: "Organization this key belongs to", readOnly: !0 }),
881
- generatedBy: g.meta({ description: "OrganizationUser ID who created this key", readOnly: !0 }),
882
- createdAt: h.meta({ description: "When the API key was created", readOnly: !0 }),
883
- updatedAt: h.meta({ description: "When the API key was last updated", readOnly: !0 })
233
+ organization: c.meta({ description: "Organization this key belongs to", readOnly: !0 }),
234
+ generatedBy: c.meta({ description: "OrganizationUser ID who created this key", readOnly: !0 }),
235
+ createdAt: d.meta({ description: "When the API key was created", readOnly: !0 }),
236
+ updatedAt: d.meta({ description: "When the API key was last updated", readOnly: !0 })
884
237
  }).strict().meta({
885
238
  description: "An API key scoped to an organization. Each key has configurable IP and origin restrictions for fine-grained access control."
886
239
  });
887
240
  e.object({
888
- ou: g.meta({ description: "OrganizationUser ID of the user creating the API key" }),
241
+ ou: c.meta({ description: "OrganizationUser ID of the user creating the API key" }),
889
242
  expiry: e.coerce.date().optional().meta({ description: "Key expiration date (defaults to +1 year from creation)", example: "2078-12-19T00:00:00Z" }),
890
243
  audience: e.enum(["internal", "external"]).meta({ description: "Key audience — 'internal' for server-to-server, 'external' for client-side usage", example: "internal" }),
891
244
  allowedOrigins: e.array(e.string()).optional().meta({ description: "CORS origin allowlist (e.g. ['https://app.example.com']). Empty array disables origin restriction.", example: ["https://console.neon-shadow.io", "https://api.datahaven.net"] }),
@@ -896,21 +249,21 @@ e.object({
896
249
  secret: e.string().meta({ description: "API key secret — **this is the only time the secret is returned**. Store it securely.", readOnly: !0 })
897
250
  }).strict().meta({ description: "API key credentials — the secret is only shown once" });
898
251
  e.object({
899
- _id: g.meta({ readOnly: !0 }),
252
+ _id: c.meta({ readOnly: !0 }),
900
253
  id: e.string().meta({ description: "Public webhook identifier (e.g. pb-wbhk-xxxx)", example: "pb-wbhk-a7b8c9d0", readOnly: !0 }),
901
254
  url: e.string().url().meta({ description: "HTTPS endpoint receiving POST event notifications", example: "https://hooks.datahaven.net/events" }),
902
255
  secret: e.string().meta({ description: "HMAC-SHA256 signing secret — used to verify that webhook payloads genuinely came from Bonsai", readOnly: !0 }),
903
256
  active: e.boolean().default(!0).meta({ description: "Whether the webhook is active and receiving events" }),
904
- lastUsed: h.meta({ description: "When the webhook last received an event", readOnly: !0 }),
905
- organization: g.meta({ description: "Organization that owns this webhook", readOnly: !0 }),
906
- generatedBy: g.meta({ description: "OrganizationUser ID who created this webhook", readOnly: !0 }),
907
- createdAt: h.meta({ description: "When the webhook was created", readOnly: !0 }),
908
- updatedAt: h.meta({ description: "When the webhook was last updated", readOnly: !0 })
257
+ lastUsed: d.meta({ description: "When the webhook last received an event", readOnly: !0 }),
258
+ organization: c.meta({ description: "Organization that owns this webhook", readOnly: !0 }),
259
+ generatedBy: c.meta({ description: "OrganizationUser ID who created this webhook", readOnly: !0 }),
260
+ createdAt: d.meta({ description: "When the webhook was created", readOnly: !0 }),
261
+ updatedAt: d.meta({ description: "When the webhook was last updated", readOnly: !0 })
909
262
  }).strict().meta({
910
263
  description: "A webhook destination for form request lifecycle events. When a form is created, signed, or revoked, Bonsai sends a POST request to this URL with a JSON payload signed via HMAC-SHA256."
911
264
  });
912
265
  e.object({
913
- ou: g.meta({ description: "OrganizationUser ID of the user creating the webhook" }),
266
+ ou: c.meta({ description: "OrganizationUser ID of the user creating the webhook" }),
914
267
  url: e.string().url().meta({ description: "HTTPS endpoint that will receive POST event notifications", example: "https://hooks.datahaven.net/events" })
915
268
  }).strict().meta({ description: "Payload for creating a new webhook destination" });
916
269
  e.object({
@@ -932,7 +285,7 @@ e.object({
932
285
  e.object({
933
286
  token: e.string().meta({ description: "New JWT access token (1 hour expiry)", example: "eyJhbGciOiJIUzI1NiIs...c012" })
934
287
  }).strict().meta({ description: "New JWT access token" });
935
- const ln = e.enum([
288
+ const N = e.enum([
936
289
  "application/pdf",
937
290
  "image/png",
938
291
  "image/jpeg",
@@ -946,10 +299,10 @@ e.object({
946
299
  e.object({
947
300
  downloadUrl: e.string().url().meta({ description: "Pre-signed GCS download URL", example: "https://storage.googleapis.com/bonsai-secure/f1e2d3...X-Goog-Signature=def456" }),
948
301
  filename: e.string().meta({ description: "Original filename (for Content-Disposition)", example: "signed_nda_razorjack.pdf" }),
949
- mimeType: ln.meta({ description: "MIME type (for Content-Type)", example: "application/pdf" }),
302
+ mimeType: N.meta({ description: "MIME type (for Content-Type)", example: "application/pdf" }),
950
303
  size: e.number().int().meta({ description: "File size in bytes", example: 245760 })
951
304
  }).strict().meta({ description: "Signed download URL for secure file access" });
952
- const pn = e.enum([
305
+ const F = e.enum([
953
306
  "pending",
954
307
  "generating",
955
308
  "completed",
@@ -957,190 +310,190 @@ const pn = e.enum([
957
310
  "revoked"
958
311
  ]);
959
312
  e.object({
960
- _id: g.meta({ readOnly: !0 }),
313
+ _id: c.meta({ readOnly: !0 }),
961
314
  id: e.string().meta({ description: "Public-facing unique request ID (random hex string)", example: "fr_a7b8c9d0e1f2", readOnly: !0 }),
962
315
  token: e.string().meta({ description: "Verification token used for cookie-based auth in the signer's browser", readOnly: !0 }),
963
316
  data: e.any().optional().meta({ description: "Form field data submitted by the signer/requester" }),
964
- webhooks: e.array(g).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
317
+ webhooks: e.array(c).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
965
318
  metadata: e.any().optional().meta({ description: "File metadata such as size, contentType, etc." }),
966
319
  digest: e.string().meta({ description: "SHA-256 hash of the serialized payload, used for deduplication", readOnly: !0 }),
967
320
  template: e.any().meta({ description: "Snapshot of the Bonsai component tree config at the time of PDF creation" }),
968
321
  header: e.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page header rendering" }),
969
322
  footer: e.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page footer rendering" }),
970
323
  css: e.string().meta({ description: "Tailwind CSS generated from the template at the time of PDF generation request", readOnly: !0 }),
971
- status: pn.meta({ description: "Current lifecycle status of the PDF request", example: "pending" }),
972
- organization: g.meta({ description: "Organization that owns this PDF request", readOnly: !0 }),
973
- createdAt: h.meta({ description: "When the PDF request was created", readOnly: !0 }),
974
- updatedAt: h.meta({ description: "When the PDF request was last updated", readOnly: !0 })
324
+ status: F.meta({ description: "Current lifecycle status of the PDF request", example: "pending" }),
325
+ organization: c.meta({ description: "Organization that owns this PDF request", readOnly: !0 }),
326
+ createdAt: d.meta({ description: "When the PDF request was created", readOnly: !0 }),
327
+ updatedAt: d.meta({ description: "When the PDF request was last updated", readOnly: !0 })
975
328
  }).strict().meta({
976
329
  description: "A PDF request used to trigger the generation of a custom PDF file. Tracks the full lifecycle and alerts sends results via webhook."
977
330
  });
978
331
  e.object({
979
- template: e.union([A, e.string()]).meta({
332
+ template: e.union([u, e.string()]).meta({
980
333
  description: "Either an inline Bonsai component tree config, or a saved template MongoDB ObjectId to use as the PDF content layout"
981
334
  }),
982
335
  webhooks: e.array(e.string()).min(1).meta({ description: "Array of webhook ObjectIds to notify on form lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
983
336
  metadata: e.any().optional().meta({ description: "Arbitrary metadata to associate with the PDF request", example: { department: "Legal", priority: "high" } }),
984
337
  data: e.any().optional().meta({ description: "Pre-filled template field data to populate the PDF with", example: { full_name: "Razor Jack", badge_id: "RJ-7741" } }),
985
- header: e.union([A, e.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
986
- footer: e.union([A, e.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
338
+ header: e.union([u, e.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
339
+ footer: e.union([u, e.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
987
340
  }).strict().meta({ description: "Create a new PDF request to generate a PDF file from a Bonsai template" });
988
341
  e.object({
989
342
  pdfId: e.string().meta({ description: "MongoDB ObjectId of the newly created PDF request (this is NOT the rendered pdf file - a file ID is returned after async pdf generation via webhook)", example: "67e091ab2c4d3f22001a2b3c", readOnly: !0 })
990
343
  }).strict().meta({ description: "Created form request identifier" });
991
- $e.config({
992
- customError: Je()
344
+ z.config({
345
+ customError: D()
993
346
  });
994
- const mn = {
995
- ...Ve,
996
- ...je.components,
997
- ...ze.components
998
- }, un = {
999
- ...Xe,
1000
- ...je.controlledInputs,
1001
- ...ze.controlledInputs
1002
- }, Le = Ze(Ke, {
1003
- components: mn,
1004
- controlledInputs: un
1005
- }), gn = Be({
1006
- ...Le,
347
+ const E = {
348
+ ...B,
349
+ ...I.components,
350
+ ...S.components
351
+ }, W = {
352
+ ...U,
353
+ ...I.controlledInputs,
354
+ ...S.controlledInputs
355
+ }, O = $(q, {
356
+ components: E,
357
+ controlledInputs: W
358
+ }), _ = j({
359
+ ...O,
1007
360
  components: Object.fromEntries(
1008
- Object.entries(Le.components).map(([t, a]) => [
361
+ Object.entries(O.components).map(([t, i]) => [
1009
362
  t,
1010
- Ue({ ...a, propsSchema: He[t]?.argsSchema })
363
+ A({ ...i, propsSchema: C[t]?.argsSchema })
1011
364
  ])
1012
365
  )
1013
366
  });
1014
- function hn(t, a) {
367
+ function H(t, i) {
1015
368
  if (!t)
1016
369
  return { action: "render", reason: "no-pin" };
1017
- if (t.id !== a.id)
370
+ if (t.id !== i.id)
1018
371
  return {
1019
372
  action: "fail",
1020
373
  reason: "id-mismatch",
1021
- error: `Template is pinned to registry "${t.id}", but rendering registry is "${a.id}" — this is a different component library, not a version skew.`
374
+ error: `Template is pinned to registry "${t.id}", but rendering registry is "${i.id}" — this is a different component library, not a version skew.`
1022
375
  };
1023
- const o = t.version === a.version, p = t.manifestHash == null || a.manifestHash == null || t.manifestHash === a.manifestHash;
1024
- return o && p ? { action: "render", reason: "match" } : {
376
+ const n = t.version === i.version, o = t.manifestHash == null || i.manifestHash == null || t.manifestHash === i.manifestHash;
377
+ return n && o ? { action: "render", reason: "match" } : {
1025
378
  action: "render",
1026
379
  reason: "version-skew",
1027
- warning: o ? `Template is pinned to registry "${t.id}"@"${t.version}" (manifest ${t.manifestHash}), but the resolved manifest is now ${a.manifestHash}. Re-pin on next save.` : `Template is pinned to registry "${t.id}"@"${t.version}", but rendering registry is "${t.id}"@"${a.version}". Re-pin on next save.`
380
+ warning: n ? `Template is pinned to registry "${t.id}"@"${t.version}" (manifest ${t.manifestHash}), but the resolved manifest is now ${i.manifestHash}. Re-pin on next save.` : `Template is pinned to registry "${t.id}"@"${t.version}", but rendering registry is "${t.id}"@"${i.version}". Re-pin on next save.`
1028
381
  };
1029
382
  }
1030
- const fn = [n.EACH, n.IF];
1031
- function bn(t, a) {
1032
- return t.capabilities ? a === "pdf" ? t.capabilities.includes("pdf") : t.capabilities.includes("ssr") : !0;
383
+ const L = [v.EACH, v.IF];
384
+ function J(t, i) {
385
+ return t.capabilities ? i === "pdf" ? t.capabilities.includes("pdf") : t.capabilities.includes("ssr") : !0;
1033
386
  }
1034
- function w(t, a, o, p, r) {
387
+ function b(t, i, n, o, a) {
1035
388
  if (t == null || typeof t == "string") return;
1036
- const m = t.type;
1037
- if (!m) {
1038
- r.push({ path: a, message: "Node is missing a required `type` field" });
389
+ const r = t.type;
390
+ if (!r) {
391
+ a.push({ path: i, message: "Node is missing a required `type` field" });
1039
392
  return;
1040
393
  }
1041
- if (fn.includes(m)) {
394
+ if (L.includes(r)) {
1042
395
  (t.children ?? []).forEach(
1043
- (b, y) => w(b, `${a}.children[${y}]`, o, p, r)
396
+ (m, p) => b(m, `${i}.children[${p}]`, n, o, a)
1044
397
  );
1045
398
  return;
1046
399
  }
1047
- const u = o.components[m];
1048
- if (!u) {
1049
- r.push({
1050
- path: a,
1051
- componentType: m,
1052
- message: `Unknown component type "${m}" in registry "${o.id}"@"${o.version}"`
400
+ const s = n.components[r];
401
+ if (!s) {
402
+ a.push({
403
+ path: i,
404
+ componentType: r,
405
+ message: `Unknown component type "${r}" in registry "${n.id}"@"${n.version}"`
1053
406
  });
1054
407
  return;
1055
408
  }
1056
- if (bn(u, p) || r.push({
1057
- path: a,
1058
- componentType: m,
1059
- message: `Component "${m}" in registry "${o.id}"@"${o.version}" does not support "${p}" rendering`
1060
- }), u.propsSchema) {
1061
- const b = u.propsSchema.safeParse(t.args);
1062
- if (!b.success)
1063
- for (const y of b.error.issues) {
1064
- const O = y.path.length ? `${a}.args.${y.path.join(".")}` : `${a}.args`;
1065
- r.push({ path: O, componentType: m, message: y.message });
409
+ if (J(s, o) || a.push({
410
+ path: i,
411
+ componentType: r,
412
+ message: `Component "${r}" in registry "${n.id}"@"${n.version}" does not support "${o}" rendering`
413
+ }), s.propsSchema) {
414
+ const m = s.propsSchema.safeParse(t.args);
415
+ if (!m.success)
416
+ for (const p of m.error.issues) {
417
+ const f = p.path.length ? `${i}.args.${p.path.join(".")}` : `${i}.args`;
418
+ a.push({ path: f, componentType: r, message: p.message });
1066
419
  }
1067
420
  }
1068
- (t.children?.length ?? 0) > 0 && (u.capabilities && !u.capabilities.includes("children") && r.push({
1069
- path: a,
1070
- componentType: m,
1071
- message: `Component "${m}" in registry "${o.id}"@"${o.version}" does not accept children`
421
+ (t.children?.length ?? 0) > 0 && (s.capabilities && !s.capabilities.includes("children") && a.push({
422
+ path: i,
423
+ componentType: r,
424
+ message: `Component "${r}" in registry "${n.id}"@"${n.version}" does not accept children`
1072
425
  }), (t.children ?? []).forEach(
1073
- (b, y) => w(b, `${a}.children[${y}]`, o, p, r)
426
+ (m, p) => b(m, `${i}.children[${p}]`, n, o, a)
1074
427
  ));
1075
428
  }
1076
- function Bn(t, a, o = {}) {
1077
- const p = [], r = [];
1078
- if (o.pin) {
1079
- const m = hn(o.pin, a);
1080
- if (m.action === "fail")
1081
- return p.push({ path: "root", message: m.error }), { valid: !1, errors: p, warnings: r };
1082
- m.reason === "version-skew" && r.push(m.warning);
429
+ function pe(t, i, n = {}) {
430
+ const o = [], a = [];
431
+ if (n.pin) {
432
+ const r = H(n.pin, i);
433
+ if (r.action === "fail")
434
+ return o.push({ path: "root", message: r.error }), { valid: !1, errors: o, warnings: a };
435
+ r.reason === "version-skew" && a.push(r.warning);
1083
436
  }
1084
- return w(t, "root", a, o.mode ?? "web", p), { valid: p.length === 0, errors: p, warnings: r };
437
+ return b(t, "root", i, n.mode ?? "web", o), { valid: o.length === 0, errors: o, warnings: a };
1085
438
  }
1086
- const yn = e.string().refine((t) => t.startsWith("{{") && t.endsWith("}}"), {
439
+ const V = e.string().refine((t) => t.startsWith("{{") && t.endsWith("}}"), {
1087
440
  message: 'Expected a value of the declared type, or a "{{binding}}" expression'
1088
441
  });
1089
- function R(t, a = {}) {
1090
- const o = (r) => a.allowBindings ? e.union([yn, r]) : r;
442
+ function y(t, i = {}) {
443
+ const n = (a) => i.allowBindings ? e.union([V, a]) : a;
1091
444
  if ("const" in t)
1092
- return o(e.literal(t.const));
445
+ return n(e.literal(t.const));
1093
446
  if (Array.isArray(t.enum)) {
1094
- const r = t.enum;
1095
- if (r.length === 0)
447
+ const a = t.enum;
448
+ if (a.length === 0)
1096
449
  throw new Error("jsonSchemaToZod: enum must have at least one value");
1097
- const [m, ...u] = r;
1098
- return o(u.reduce((f, b) => e.union([f, e.literal(b)]), e.literal(m)));
450
+ const [r, ...s] = a;
451
+ return n(s.reduce((l, m) => e.union([l, e.literal(m)]), e.literal(r)));
1099
452
  }
1100
- const p = t.type;
1101
- switch (p) {
453
+ const o = t.type;
454
+ switch (o) {
1102
455
  case "string": {
1103
- let r = e.string();
1104
- return typeof t.minLength == "number" && (r = r.min(t.minLength)), typeof t.maxLength == "number" && (r = r.max(t.maxLength)), typeof t.pattern == "string" && (r = r.regex(new RegExp(t.pattern))), o(r);
456
+ let a = e.string();
457
+ return typeof t.minLength == "number" && (a = a.min(t.minLength)), typeof t.maxLength == "number" && (a = a.max(t.maxLength)), typeof t.pattern == "string" && (a = a.regex(new RegExp(t.pattern))), n(a);
1105
458
  }
1106
459
  case "number":
1107
460
  case "integer": {
1108
- let r = e.number();
1109
- return p === "integer" && (r = r.int()), typeof t.minimum == "number" && (r = r.min(t.minimum)), typeof t.maximum == "number" && (r = r.max(t.maximum)), o(r);
461
+ let a = e.number();
462
+ return o === "integer" && (a = a.int()), typeof t.minimum == "number" && (a = a.min(t.minimum)), typeof t.maximum == "number" && (a = a.max(t.maximum)), n(a);
1110
463
  }
1111
464
  case "boolean":
1112
- return o(e.boolean());
465
+ return n(e.boolean());
1113
466
  case "array": {
1114
- const r = t.items ? R(t.items, a) : e.unknown();
1115
- return o(e.array(r));
467
+ const a = t.items ? y(t.items, i) : e.unknown();
468
+ return n(e.array(a));
1116
469
  }
1117
470
  case "object": {
1118
- const r = t.properties ?? {}, m = new Set(t.required ?? []), u = {};
1119
- for (const [b, y] of Object.entries(r)) {
1120
- const O = R(y, a);
1121
- u[b] = m.has(b) ? O : O.optional();
471
+ const a = t.properties ?? {}, r = new Set(t.required ?? []), s = {};
472
+ for (const [m, p] of Object.entries(a)) {
473
+ const f = y(p, i);
474
+ s[m] = r.has(m) ? f : f.optional();
1122
475
  }
1123
- let f = e.object(u);
1124
- return t.additionalProperties === !1 && (f = f.strict()), f;
476
+ let l = e.object(s);
477
+ return t.additionalProperties === !1 && (l = l.strict()), l;
1125
478
  }
1126
479
  default:
1127
480
  return e.unknown();
1128
481
  }
1129
482
  }
1130
- const An = e.object({
483
+ const G = e.object({
1131
484
  valueProp: e.string().min(1),
1132
485
  changeProp: e.string().min(1),
1133
486
  extract: e.string().min(1)
1134
- }).strict(), xn = e.object({
487
+ }).strict(), Z = e.object({
1135
488
  name: e.string().min(1),
1136
489
  canonicalName: e.string().min(1).optional(),
1137
490
  // Case A: a key resolved against `base`'s exports, never a module path to import.
1138
491
  entry: e.string().min(1),
1139
492
  propsSchema: e.record(e.string(), e.unknown()).optional(),
1140
493
  capabilities: e.array(e.enum(["children", "bindings", "events", "formField", "ssr", "pdf"])).optional(),
1141
- controlled: An.optional(),
494
+ controlled: G.optional(),
1142
495
  css: e.array(e.string()).optional()
1143
- }).strict(), We = e.object({
496
+ }).strict(), R = e.object({
1144
497
  $schema: e.string().optional(),
1145
498
  id: e.string().min(1),
1146
499
  namespace: e.string().min(1).optional(),
@@ -1149,198 +502,198 @@ const An = e.object({
1149
502
  name: e.literal("bonsai"),
1150
503
  api: e.string().min(1)
1151
504
  }).strict(),
1152
- components: e.array(xn).min(1),
505
+ components: e.array(Z).min(1),
1153
506
  integrity: e.object({
1154
507
  algorithm: e.literal("sha256"),
1155
508
  manifestHash: e.string().min(1)
1156
509
  }).strict().optional()
1157
- }).strict(), On = "1", ke = {
510
+ }).strict(), K = "1", k = {
1158
511
  identity: (t) => t,
1159
512
  targetValue: (t) => t?.target?.value,
1160
513
  targetChecked: (t) => t?.target?.checked,
1161
514
  targetValueAsNumber: (t) => t?.target?.valueAsNumber
1162
515
  };
1163
- class x extends Error {
1164
- constructor(a) {
1165
- super(a), this.name = "ManifestLoadError";
516
+ class g extends Error {
517
+ constructor(i) {
518
+ super(i), this.name = "ManifestLoadError";
1166
519
  }
1167
520
  }
1168
- function Tn(t, a) {
1169
- return t ? a ? e.any().superRefine((o, p) => {
1170
- const r = t.safeParse(o);
521
+ function X(t, i) {
522
+ return t ? i ? e.any().superRefine((n, o) => {
523
+ const a = t.safeParse(n);
524
+ if (!a.success)
525
+ for (const s of a.error.issues)
526
+ o.addIssue({ code: "custom", message: s.message, path: s.path });
527
+ const r = i.safeParse(n);
1171
528
  if (!r.success)
1172
- for (const u of r.error.issues)
1173
- p.addIssue({ code: "custom", message: u.message, path: u.path });
1174
- const m = a.safeParse(o);
1175
- if (!m.success)
1176
- for (const u of m.error.issues)
1177
- p.addIssue({ code: "custom", message: u.message, path: u.path });
1178
- }) : t : a;
529
+ for (const s of r.error.issues)
530
+ o.addIssue({ code: "custom", message: s.message, path: s.path });
531
+ }) : t : i;
1179
532
  }
1180
- async function Cn(t) {
1181
- const a = new TextEncoder().encode(t), o = await crypto.subtle.digest("SHA-256", a);
1182
- return `sha256:${Array.from(new Uint8Array(o)).map((r) => r.toString(16).padStart(2, "0")).join("")}`;
533
+ async function Q(t) {
534
+ const i = new TextEncoder().encode(t), n = await crypto.subtle.digest("SHA-256", i);
535
+ return `sha256:${Array.from(new Uint8Array(n)).map((a) => a.toString(16).padStart(2, "0")).join("")}`;
1183
536
  }
1184
- function vn(t) {
1185
- const a = ke[t];
1186
- if (!a)
1187
- throw new x(
1188
- `Registry manifest: unknown extractor "${t}" — must be one of: ${Object.keys(ke).join(", ")}`
537
+ function Y(t) {
538
+ const i = k[t];
539
+ if (!i)
540
+ throw new g(
541
+ `Registry manifest: unknown extractor "${t}" — must be one of: ${Object.keys(k).join(", ")}`
1189
542
  );
1190
- return a;
543
+ return i;
1191
544
  }
1192
- function In(t, a, o) {
1193
- const p = a.components[t.entry];
1194
- if (!p)
1195
- throw new x(
1196
- `Registry manifest "${o}": component "${t.name}" resolves entry "${t.entry}", which is not exported by base registry "${a.id}"@"${a.version}"`
545
+ function ee(t, i, n) {
546
+ const o = i.components[t.entry];
547
+ if (!o)
548
+ throw new g(
549
+ `Registry manifest "${n}": component "${t.name}" resolves entry "${t.entry}", which is not exported by base registry "${i.id}"@"${i.version}"`
1197
550
  );
1198
- const r = t.propsSchema ? R(t.propsSchema) : void 0, m = t.controlled ? {
551
+ const a = t.propsSchema ? y(t.propsSchema) : void 0, r = t.controlled ? {
1199
552
  valueProp: t.controlled.valueProp,
1200
553
  changeProp: t.controlled.changeProp,
1201
- extract: vn(t.controlled.extract)
1202
- } : p.controlled;
554
+ extract: Y(t.controlled.extract)
555
+ } : o.controlled;
1203
556
  return [
1204
557
  t.canonicalName ?? t.name,
1205
- Ue({
1206
- component: p.component,
1207
- propsSchema: Tn(p.propsSchema, r),
1208
- capabilities: t.capabilities ?? p.capabilities,
1209
- controlled: m,
1210
- assets: t.css ? { css: t.css } : p.assets
558
+ A({
559
+ component: o.component,
560
+ propsSchema: X(o.propsSchema, a),
561
+ capabilities: t.capabilities ?? o.capabilities,
562
+ controlled: r,
563
+ assets: t.css ? { css: t.css } : o.assets
1211
564
  })
1212
565
  ];
1213
566
  }
1214
- function wn(t, a) {
1215
- const o = We.parse(t), p = a.engineApi ?? On;
1216
- if (o.engine.api !== p)
1217
- throw new x(
1218
- `Registry manifest "${o.id}" targets engine.api "${o.engine.api}", but this build supports "${p}"`
567
+ function te(t, i) {
568
+ const n = R.parse(t), o = i.engineApi ?? K;
569
+ if (n.engine.api !== o)
570
+ throw new g(
571
+ `Registry manifest "${n.id}" targets engine.api "${n.engine.api}", but this build supports "${o}"`
1219
572
  );
1220
- const r = a.maxComponents ?? 500;
1221
- if (o.components.length > r)
1222
- throw new x(
1223
- `Registry manifest "${o.id}" declares ${o.components.length} components, exceeding the limit of ${r}`
573
+ const a = i.maxComponents ?? 500;
574
+ if (n.components.length > a)
575
+ throw new g(
576
+ `Registry manifest "${n.id}" declares ${n.components.length} components, exceeding the limit of ${a}`
1224
577
  );
1225
- const m = a.maxManifestBytes ?? 5 * 1024 * 1024;
1226
- if (a.rawManifestSize != null && a.rawManifestSize > m)
1227
- throw new x(
1228
- `Registry manifest "${o.id}" is ${a.rawManifestSize} bytes, exceeding the limit of ${m}`
578
+ const r = i.maxManifestBytes ?? 5 * 1024 * 1024;
579
+ if (i.rawManifestSize != null && i.rawManifestSize > r)
580
+ throw new g(
581
+ `Registry manifest "${n.id}" is ${i.rawManifestSize} bytes, exceeding the limit of ${r}`
1229
582
  );
1230
- const u = Object.fromEntries(
1231
- o.components.map((f) => In(f, a.base, o.id))
583
+ const s = Object.fromEntries(
584
+ n.components.map((l) => ee(l, i.base, n.id))
1232
585
  );
1233
- return Be({
1234
- id: o.id,
1235
- version: o.version,
1236
- namespace: o.namespace,
1237
- manifestHash: a.manifestHash,
1238
- fallback: a.base.fallback,
1239
- components: u
586
+ return j({
587
+ id: n.id,
588
+ version: n.version,
589
+ namespace: n.namespace,
590
+ manifestHash: i.manifestHash,
591
+ fallback: i.base.fallback,
592
+ components: s
1240
593
  });
1241
594
  }
1242
- const S = /* @__PURE__ */ new Map();
1243
- function Un() {
1244
- S.clear();
595
+ const w = /* @__PURE__ */ new Map();
596
+ function ue() {
597
+ w.clear();
1245
598
  }
1246
- function Rn(t, a) {
599
+ function ie(t, i) {
1247
600
  if (!t.integrity)
1248
- throw new x(
601
+ throw new g(
1249
602
  `Registry manifest "${t.id}" has no integrity block — a manifest hash is required before use`
1250
603
  );
1251
- if (t.integrity.manifestHash !== a)
1252
- throw new x(
1253
- `Registry manifest "${t.id}" failed its integrity check: expected "${t.integrity.manifestHash}", computed "${a}"`
604
+ if (t.integrity.manifestHash !== i)
605
+ throw new g(
606
+ `Registry manifest "${t.id}" failed its integrity check: expected "${t.integrity.manifestHash}", computed "${i}"`
1254
607
  );
1255
608
  }
1256
- async function jn(t, a) {
1257
- let o;
609
+ async function ge(t, i) {
610
+ let n;
1258
611
  if (typeof t == "string") {
1259
- const y = new URL(t);
1260
- if (a.allowedOrigins && !a.allowedOrigins.includes(y.origin))
1261
- throw new x(
1262
- `Registry manifest origin "${y.origin}" is not in the allowed origins list`
612
+ const p = new URL(t);
613
+ if (i.allowedOrigins && !i.allowedOrigins.includes(p.origin))
614
+ throw new g(
615
+ `Registry manifest origin "${p.origin}" is not in the allowed origins list`
1263
616
  );
1264
- const v = await (a.fetchImpl ?? fetch)(t);
1265
- if (!v.ok)
1266
- throw new x(
1267
- `Registry manifest fetch failed: ${t} responded ${v.status}`
617
+ const h = await (i.fetchImpl ?? fetch)(t);
618
+ if (!h.ok)
619
+ throw new g(
620
+ `Registry manifest fetch failed: ${t} responded ${h.status}`
1268
621
  );
1269
- o = await v.text();
622
+ n = await h.text();
1270
623
  } else
1271
- o = JSON.stringify(t);
1272
- const p = We.parse(JSON.parse(o)), { integrity: r, ...m } = p, u = await Cn(JSON.stringify(m));
1273
- Rn(p, u);
1274
- const f = S.get(u);
1275
- if (f) return f;
1276
- const b = wn(p, { ...a, rawManifestSize: o.length, manifestHash: u });
1277
- return S.set(u, b), b;
624
+ n = JSON.stringify(t);
625
+ const o = R.parse(JSON.parse(n)), { integrity: a, ...r } = o, s = await Q(JSON.stringify(r));
626
+ ie(o, s);
627
+ const l = w.get(s);
628
+ if (l) return l;
629
+ const m = te(o, { ...i, rawManifestSize: n.length, manifestHash: s });
630
+ return w.set(s, m), m;
1278
631
  }
1279
- function zn(t, a) {
1280
- const o = { ...t?.properties ?? {}, ...a?.properties ?? {} }, p = [.../* @__PURE__ */ new Set([...t?.required ?? [], ...a?.required ?? []])];
1281
- return { type: "object", properties: o, required: p };
632
+ function fe(t, i) {
633
+ const n = { ...t?.properties ?? {}, ...i?.properties ?? {} }, o = [.../* @__PURE__ */ new Set([...t?.required ?? [], ...i?.required ?? []])];
634
+ return { type: "object", properties: n, required: o };
1282
635
  }
1283
- function Sn(t, a) {
1284
- const o = new Map(t.map((m) => [m.url, m.registryHash])), p = new Map(a.map((m) => [m.url, m.registryHash])), r = [];
1285
- for (const [m, u] of p) {
1286
- const f = o.get(m);
1287
- f === void 0 ? r.push(`${m} is configured but missing from the artifact`) : f !== u && r.push(`${m}: artifact has ${f}, pebble-kit.json records ${u}`);
636
+ function ne(t, i) {
637
+ const n = new Map(t.map((r) => [r.url, r.registryHash])), o = new Map(i.map((r) => [r.url, r.registryHash])), a = [];
638
+ for (const [r, s] of o) {
639
+ const l = n.get(r);
640
+ l === void 0 ? a.push(`${r} is configured but missing from the artifact`) : l !== s && a.push(`${r}: artifact has ${l}, pebble-kit.json records ${s}`);
1288
641
  }
1289
- for (const m of o.keys())
1290
- p.has(m) || r.push(`${m} is in the artifact but no longer configured`);
1291
- return r.length > 0 ? r.join("; ") : void 0;
642
+ for (const r of n.keys())
643
+ o.has(r) || a.push(`${r} is in the artifact but no longer configured`);
644
+ return a.length > 0 ? a.join("; ") : void 0;
1292
645
  }
1293
- function _e(t) {
1294
- const a = /(\d+)\.\d+\.\d+/.exec(t);
1295
- return a ? Number(a[1]) : void 0;
646
+ function P(t) {
647
+ const i = /(\d+)\.\d+\.\d+/.exec(t);
648
+ return i ? Number(i[1]) : void 0;
1296
649
  }
1297
- function Hn(t) {
1298
- const a = [], o = Sn(t.artifactRegistries, t.configRegistries);
1299
- if (o && a.push({
650
+ function he(t) {
651
+ const i = [], n = ne(t.artifactRegistries, t.configRegistries);
652
+ if (n && i.push({
1300
653
  check: "stale-artifact",
1301
654
  level: "fail",
1302
- message: `bonsai.generated.json is out of date with pebble-kit.json (${o}) — run "pebble-kit generate"`
655
+ message: `bonsai.generated.json is out of date with pebble-kit.json (${n}) — run "pebble-kit generate"`
1303
656
  }), t.artifactBaseUiVersion !== t.installedBaseUiVersion) {
1304
- const p = _e(t.artifactBaseUiVersion), r = _e(t.installedBaseUiVersion), m = p !== void 0 && r !== void 0 && p !== r;
1305
- a.push({
657
+ const o = P(t.artifactBaseUiVersion), a = P(t.installedBaseUiVersion), r = o !== void 0 && a !== void 0 && o !== a;
658
+ i.push({
1306
659
  check: "baseui-drift",
1307
- level: m ? "fail" : "warn",
660
+ level: r ? "fail" : "warn",
1308
661
  message: `generated artifact's baseline was built against @base-ui/react ${t.artifactBaseUiVersion}, but ${t.installedBaseUiVersion} is installed`
1309
662
  });
1310
663
  }
1311
- return a;
664
+ return i;
1312
665
  }
1313
- function Mn(t) {
1314
- const a = t.filter((o) => o.level === "fail");
1315
- if (a.length > 0)
1316
- throw new Error(a.map((o) => o.message).join("; "));
666
+ function be(t) {
667
+ const i = t.filter((n) => n.level === "fail");
668
+ if (i.length > 0)
669
+ throw new Error(i.map((n) => n.message).join("; "));
1317
670
  }
1318
- const { Bonsai: qn } = Ge({ registry: gn });
671
+ const { Bonsai: ye } = T({ registry: _ });
1319
672
  export {
1320
- qn as Bonsai,
1321
- ke as EXTRACTOR_ALLOWLIST,
1322
- x as ManifestLoadError,
1323
- We as RegistryManifestSchema,
1324
- Mn as assertNoFailingDrift,
1325
- Hn as checkArtifactDrift,
1326
- Un as clearManifestCache,
1327
- mn as componentMap,
1328
- Tn as composePropsSchema,
1329
- Cn as computeManifestHash,
1330
- un as controlledInputMap,
1331
- Ke as coreRegistry,
1332
- Ge as createBonsaiRenderer,
1333
- Be as defineBonsaiRegistry,
1334
- Ue as defineComponent,
1335
- Ze as extendRegistry,
1336
- R as jsonSchemaToZod,
1337
- jn as loadRegistryManifest,
1338
- zn as mergeGeneratedWithOverrides,
1339
- gn as pebbleRegistry,
1340
- wn as resolveManifest,
1341
- hn as resolveRegistryPin,
1342
- Jn as useBonsaiRenderMode,
1343
- Gn as useUpdateData,
1344
- Bn as validateTemplate
673
+ ye as Bonsai,
674
+ k as EXTRACTOR_ALLOWLIST,
675
+ g as ManifestLoadError,
676
+ R as RegistryManifestSchema,
677
+ be as assertNoFailingDrift,
678
+ he as checkArtifactDrift,
679
+ ue as clearManifestCache,
680
+ E as componentMap,
681
+ X as composePropsSchema,
682
+ Q as computeManifestHash,
683
+ W as controlledInputMap,
684
+ q as coreRegistry,
685
+ T as createBonsaiRenderer,
686
+ j as defineBonsaiRegistry,
687
+ A as defineComponent,
688
+ $ as extendRegistry,
689
+ y as jsonSchemaToZod,
690
+ ge as loadRegistryManifest,
691
+ fe as mergeGeneratedWithOverrides,
692
+ _ as pebbleRegistry,
693
+ te as resolveManifest,
694
+ H as resolveRegistryPin,
695
+ ke as useBonsaiRenderMode,
696
+ ve as useUpdateData,
697
+ pe as validateTemplate
1345
698
  };
1346
699
  //# sourceMappingURL=index.js.map