@synopackageland/ui 0.9.4 → 0.9.6

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 (47) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/README.md +6 -1
  3. package/dist/components/app/page-header/PageHeader.vue.d.ts +4 -2
  4. package/dist/components/composite/callout/Callout.vue.d.ts +2 -0
  5. package/dist/components/composite/form/Form.vue.d.ts +1 -1
  6. package/dist/components/composite/form-actions/FormActions.vue.d.ts +6 -0
  7. package/dist/components/composite/list-item/ListItem.vue.d.ts +25 -0
  8. package/dist/components/composite/settings-row/SettingsRow.vue.d.ts +1 -0
  9. package/dist/components/composite/settings-section/SettingsSection.vue.d.ts +1 -0
  10. package/dist/components/composite/statistic/Statistic.vue.d.ts +24 -0
  11. package/dist/components/composite/table-cell/CellStatus.vue.d.ts +24 -0
  12. package/dist/components/composite/table-cell/CellText.vue.d.ts +36 -0
  13. package/dist/components/feedback/notification/NotificationProvider.vue.d.ts +1 -1
  14. package/dist/components/primitives/button/Button.vue.d.ts +3 -0
  15. package/dist/components/primitives/button/IconButton.vue.d.ts +5 -2
  16. package/dist/components/primitives/dropdown-menu/DropdownMenu.vue.d.ts +2 -2
  17. package/dist/components/primitives/dropdown-menu/DropdownMenuItems.vue.d.ts +3 -0
  18. package/dist/components/primitives/input-group/InputGroup.vue.d.ts +13 -0
  19. package/dist/components/primitives/popover/Popover.vue.d.ts +3 -3
  20. package/dist/components/primitives/progress/Progress.vue.d.ts +3 -0
  21. package/dist/components/primitives/space/Space.vue.d.ts +4 -1
  22. package/dist/composables/collisionBoundary.d.ts +4 -0
  23. package/dist/composables/floatingHost.d.ts +5 -2
  24. package/dist/composables/floatingPlacement.d.ts +1 -1
  25. package/dist/composables/pendingClick.d.ts +12 -0
  26. package/dist/composables/stickyRoom.d.ts +8 -0
  27. package/dist/i18n/text.d.ts +1 -0
  28. package/dist/index.d.ts +9 -1
  29. package/dist/index.js +9046 -8544
  30. package/dist/json/catalog.d.ts +98 -0
  31. package/dist/json/registry.d.ts +3548 -22
  32. package/dist/json-ai-prompt.md +8 -4
  33. package/dist/json-catalog.schema.json +290 -3
  34. package/dist/json-preview/preview.js +6371 -6019
  35. package/dist/json.js +453 -413
  36. package/dist/lib/clipboard.d.ts +7 -1
  37. package/dist/lib/fileSize.d.ts +9 -1
  38. package/dist/lib/floatingDialog.d.ts +9 -2
  39. package/dist/lib/format.d.ts +13 -0
  40. package/dist/lib/slots.d.ts +4 -0
  41. package/dist/reka-runtime.json +1 -1
  42. package/dist/theme.css +1 -1
  43. package/dist/themes/dsm7-embedded-theme.css +1 -1
  44. package/dist/themes/dsm7-embedded.css +1 -1
  45. package/dist/themes/dsm7.css +1 -1
  46. package/docs/layout-rules.md +36 -3
  47. package/package.json +62 -1
package/dist/json.js CHANGED
@@ -1,324 +1,359 @@
1
- import { z as o } from "zod";
2
- import { z as gt } from "zod";
1
+ import { z as t } from "zod";
2
+ import { z as vt } from "zod";
3
3
  import { defineCatalog as z } from "@json-render/core";
4
- import { createStateStore as yt, defineCatalog as wt } from "@json-render/core";
4
+ import { createStateStore as St, defineCatalog as jt } from "@json-render/core";
5
5
  import { defineRegistry as B, useBoundProp as b, JSONUIProvider as M, Renderer as W } from "@json-render/vue";
6
- import { ActionProvider as $t, JSONUIProvider as St, Renderer as jt, StateProvider as Ot, ValidationProvider as xt, VisibilityProvider as At, defineRegistry as Pt, useActions as kt, useBoundProp as Ct, useStateStore as Rt } from "@json-render/vue";
6
+ import { ActionProvider as Ot, JSONUIProvider as At, Renderer as Pt, StateProvider as kt, ValidationProvider as Ct, VisibilityProvider as It, defineRegistry as Rt, useActions as Kt, useBoundProp as Lt, useStateStore as Ut } from "@json-render/vue";
7
7
  import { schema as H } from "@json-render/vue/schema";
8
- import { schema as It } from "@json-render/vue/schema";
8
+ import { schema as Tt } from "@json-render/vue/schema";
9
9
  import { h as d, defineComponent as G, openBlock as X, createBlock as Y, unref as j, withCtx as Q, createVNode as Z } from "vue";
10
- import { LoadingArea as ee, DataTable as I, Dialog as te, Badge as oe, Progress as ne, EmptyState as ie, Callout as se, Card as ae, Surface as re, SettingsRow as le, SettingsSection as ce, FormItem as de, Form as pe, RadioGroup as ue, Switch as me, Checkbox as he, Select as fe, Input as ge, Button as be, SectionTabs as ye, AppSidebar as we, AppToolbar as ve, PageHeader as $e, PageContent as Se, ResponsiveView as je, AppLayout as Oe, AppRoot as xe, getRegisteredIcon as Ae } from "./index.js";
11
- const V = o.lazy(() => o.object({
12
- key: o.string(),
13
- label: o.string(),
14
- icon: o.string().optional(),
15
- badge: o.union([o.string(), o.number()]).optional(),
16
- disabled: o.boolean().optional(),
17
- selectable: o.boolean().optional(),
18
- children: o.array(V).optional()
19
- })), k = o.object({
20
- label: o.string(),
21
- value: o.string(),
22
- disabled: o.boolean().optional()
23
- }), Pe = k.extend({
24
- description: o.string().optional()
25
- }), U = o.object({
26
- key: o.string(),
27
- label: o.string(),
28
- width: o.string().optional(),
29
- align: o.enum(["left", "center", "right"]).optional()
30
- }), _ = {
10
+ import { LoadingArea as ee, InputGroup as te, ListItem as oe, CellStatus as ne, CellText as ie, DataTable as K, Dialog as se, Badge as ae, Progress as re, EmptyState as le, Callout as ce, Card as de, Surface as pe, SettingsRow as ue, SettingsSection as me, FormItem as he, Form as fe, RadioGroup as ge, Switch as be, Checkbox as ye, Select as we, Input as ve, Button as $e, SectionTabs as Se, AppSidebar as je, AppToolbar as xe, PageHeader as Oe, PageContent as Ae, ResponsiveView as Pe, AppLayout as ke, AppRoot as Ce, getRegisteredIcon as Ie } from "./index.js";
11
+ const J = t.lazy(() => t.object({
12
+ key: t.string(),
13
+ label: t.string(),
14
+ icon: t.string().optional(),
15
+ badge: t.union([t.string(), t.number()]).optional(),
16
+ disabled: t.boolean().optional(),
17
+ selectable: t.boolean().optional(),
18
+ children: t.array(J).optional()
19
+ })), k = t.object({
20
+ label: t.string(),
21
+ value: t.string(),
22
+ disabled: t.boolean().optional()
23
+ }), Re = k.extend({
24
+ description: t.string().optional()
25
+ }), L = t.object({
26
+ key: t.string(),
27
+ label: t.string(),
28
+ width: t.string().optional(),
29
+ align: t.enum(["left", "center", "right"]).optional()
30
+ }), V = {
31
31
  AppRoot: {
32
- props: o.object({
33
- modalScope: o.enum(["document", "app"]).optional()
32
+ props: t.object({
33
+ modalScope: t.enum(["document", "app"]).optional()
34
34
  }),
35
35
  slots: ["default"],
36
36
  description: 'Root of a DSM application. Use once around the application shell. Dialogs stay inside the app by default (modalScope "app"); "document" is only for full-page web/Portal apps.'
37
37
  },
38
38
  AppShell: {
39
- props: o.object({
40
- sidebarWidth: o.string().optional(),
41
- minHeight: o.string().optional(),
42
- responsive: o.boolean().optional(),
43
- wideLayout: o.enum(["window", "web"]).optional()
39
+ props: t.object({
40
+ sidebarWidth: t.string().optional(),
41
+ minHeight: t.string().optional(),
42
+ responsive: t.boolean().optional(),
43
+ wideLayout: t.enum(["window", "web"]).optional()
44
44
  }),
45
45
  slots: ["default", "sidebar", "toolbar", "footer"],
46
46
  description: 'DSM application interior with optional sidebar, toolbar, main content and footer regions. Set wideLayout "web" only for a standalone Portal page; DSM windows keep the default "window" at every width.'
47
47
  },
48
48
  ResponsiveView: {
49
- props: o.object({ mode: o.enum(["auto", "mobile", "window", "web"]).optional() }),
49
+ props: t.object({ mode: t.enum(["auto", "mobile", "window", "web"]).optional() }),
50
50
  slots: ["default", "mobile", "window", "web"],
51
51
  description: 'Optionally replace a specialized element with a phone-friendly alternative. mobile/window/web slots follow AppShell container width (web only with AppShell wideLayout "web"); default is always the fallback.'
52
52
  },
53
53
  Page: {
54
- props: o.object({
55
- width: o.string().optional(),
56
- surface: o.enum(["auto", "flat", "card"]).optional()
54
+ props: t.object({
55
+ width: t.string().optional(),
56
+ surface: t.enum(["auto", "flat", "card"]).optional()
57
57
  }),
58
58
  slots: ["default"],
59
59
  description: 'Page content area. Use width "fill" for data-heavy screens and "readable" for forms/settings.'
60
60
  },
61
61
  PageHeader: {
62
- props: o.object({
63
- title: o.string(),
64
- description: o.string().optional()
62
+ props: t.object({
63
+ title: t.string(),
64
+ description: t.string().optional()
65
65
  }),
66
- slots: ["actions"],
67
- description: "Page heading with optional description and page-level actions."
66
+ slots: ["actions", "meta"],
67
+ description: "Page heading with optional description and page-level actions. The meta slot sits on the title line, for a small chip such as when the data was read."
68
68
  },
69
69
  Toolbar: {
70
- props: o.object({ height: o.string().optional() }),
70
+ props: t.object({ height: t.string().optional() }),
71
71
  slots: ["default", "leading", "actions"],
72
72
  description: "Application toolbar. Put primary page-independent actions in the actions slot."
73
73
  },
74
74
  SidebarNav: {
75
- props: o.object({
76
- value: o.string().optional(),
77
- groups: o.array(o.object({
78
- label: o.string().optional(),
79
- items: o.array(V)
75
+ props: t.object({
76
+ value: t.string().optional(),
77
+ groups: t.array(t.object({
78
+ label: t.string().optional(),
79
+ items: t.array(J)
80
80
  })),
81
- searchable: o.boolean().optional(),
82
- collapsible: o.boolean().optional(),
83
- searchPlaceholder: o.string().optional()
81
+ searchable: t.boolean().optional(),
82
+ collapsible: t.boolean().optional(),
83
+ searchPlaceholder: t.string().optional()
84
84
  }),
85
85
  events: ["change"],
86
86
  description: "DSM sidebar navigation. Icon values are names registered by the host application."
87
87
  },
88
88
  Tabs: {
89
- props: o.object({
90
- value: o.string(),
91
- items: o.array(k),
92
- ariaLabel: o.string().optional()
89
+ props: t.object({
90
+ value: t.string(),
91
+ items: t.array(k),
92
+ ariaLabel: t.string().optional()
93
93
  }),
94
94
  events: ["change"],
95
95
  description: "Section tabs for switching a local mode or filter. Bind value to state for two-way updates."
96
96
  },
97
97
  Stack: {
98
- props: o.object({
99
- direction: o.enum(["row", "column"]).optional(),
100
- gap: o.enum(["none", "xs", "sm", "md", "lg"]).optional(),
101
- align: o.enum(["start", "center", "end", "stretch"]).optional(),
102
- justify: o.enum(["start", "center", "end", "between"]).optional(),
103
- wrap: o.boolean().optional()
98
+ props: t.object({
99
+ direction: t.enum(["row", "column"]).optional(),
100
+ gap: t.enum(["none", "xs", "sm", "md", "lg"]).optional(),
101
+ align: t.enum(["start", "center", "end", "stretch"]).optional(),
102
+ justify: t.enum(["start", "center", "end", "between"]).optional(),
103
+ wrap: t.boolean().optional()
104
104
  }),
105
105
  slots: ["default"],
106
106
  description: "Simple layout composition. Prefer semantic components first and use Stack only for local arrangement."
107
107
  },
108
108
  Text: {
109
- props: o.object({
110
- text: o.string(),
111
- variant: o.enum(["body", "muted", "caption", "heading", "mono"]).optional()
109
+ props: t.object({
110
+ text: t.string(),
111
+ variant: t.enum(["body", "muted", "caption", "heading", "mono"]).optional()
112
112
  }),
113
113
  description: "Short application text. Do not use it when a semantic component already owns the label/description."
114
114
  },
115
115
  Button: {
116
- props: o.object({
117
- label: o.string(),
118
- variant: o.enum(["primary", "secondary", "ghost", "danger"]).optional(),
119
- size: o.enum(["sm", "md", "lg"]).optional(),
120
- disabled: o.boolean().optional(),
121
- loading: o.boolean().optional(),
122
- icon: o.string().optional()
116
+ props: t.object({
117
+ label: t.string(),
118
+ variant: t.enum(["primary", "secondary", "ghost", "danger"]).optional(),
119
+ size: t.enum(["sm", "md", "lg"]).optional(),
120
+ disabled: t.boolean().optional(),
121
+ loading: t.boolean().optional(),
122
+ icon: t.string().optional()
123
123
  }),
124
124
  events: ["press"],
125
125
  description: "User action. Use one primary action per local task when possible. Icon is an optional host-registered icon name."
126
126
  },
127
127
  Input: {
128
- props: o.object({
129
- value: o.union([o.string(), o.number()]).optional(),
130
- type: o.string().optional(),
131
- placeholder: o.string().optional(),
132
- disabled: o.boolean().optional(),
133
- readonly: o.boolean().optional(),
134
- invalid: o.boolean().optional(),
135
- size: o.enum(["sm", "md", "lg"]).optional(),
136
- ariaLabel: o.string().optional()
128
+ props: t.object({
129
+ value: t.union([t.string(), t.number()]).optional(),
130
+ type: t.string().optional(),
131
+ placeholder: t.string().optional(),
132
+ disabled: t.boolean().optional(),
133
+ readonly: t.boolean().optional(),
134
+ invalid: t.boolean().optional(),
135
+ size: t.enum(["sm", "md", "lg"]).optional(),
136
+ ariaLabel: t.string().optional()
137
137
  }),
138
138
  events: ["change"],
139
139
  description: "Single-line input. Use $bindState/$bindItem on value for editable state."
140
140
  },
141
141
  Select: {
142
- props: o.object({
143
- value: o.string().optional(),
144
- options: o.array(k),
145
- placeholder: o.string().optional(),
146
- disabled: o.boolean().optional(),
147
- search: o.boolean().optional()
142
+ props: t.object({
143
+ value: t.string().optional(),
144
+ options: t.array(k),
145
+ placeholder: t.string().optional(),
146
+ disabled: t.boolean().optional(),
147
+ search: t.boolean().optional()
148
148
  }),
149
149
  events: ["change"],
150
150
  description: "Single-choice select. Use $bindState/$bindItem on value."
151
151
  },
152
152
  Checkbox: {
153
- props: o.object({
154
- checked: o.boolean().optional(),
155
- label: o.string().optional(),
156
- description: o.string().optional(),
157
- disabled: o.boolean().optional()
153
+ props: t.object({
154
+ checked: t.boolean().optional(),
155
+ label: t.string().optional(),
156
+ description: t.string().optional(),
157
+ disabled: t.boolean().optional()
158
158
  }),
159
159
  events: ["change"],
160
160
  description: "Boolean choice. Use $bindState/$bindItem on checked."
161
161
  },
162
162
  Switch: {
163
- props: o.object({
164
- checked: o.boolean().optional(),
165
- label: o.string().optional(),
166
- disabled: o.boolean().optional()
163
+ props: t.object({
164
+ checked: t.boolean().optional(),
165
+ label: t.string().optional(),
166
+ disabled: t.boolean().optional()
167
167
  }),
168
168
  events: ["change"],
169
169
  description: "Immediate on/off setting. Use $bindState/$bindItem on checked."
170
170
  },
171
171
  RadioGroup: {
172
- props: o.object({
173
- value: o.string().optional(),
174
- options: o.array(Pe),
175
- orientation: o.enum(["vertical", "horizontal"]).optional(),
176
- disabled: o.boolean().optional()
172
+ props: t.object({
173
+ value: t.string().optional(),
174
+ options: t.array(Re),
175
+ orientation: t.enum(["vertical", "horizontal"]).optional(),
176
+ disabled: t.boolean().optional()
177
177
  }),
178
178
  events: ["change"],
179
179
  description: "Choose one of a small visible set of mutually-exclusive options."
180
180
  },
181
181
  Form: {
182
- props: o.object({
183
- direction: o.enum(["auto", "horizontal", "vertical"]).optional(),
184
- fieldWidth: o.string().optional()
182
+ props: t.object({
183
+ direction: t.enum(["auto", "horizontal", "vertical"]).optional(),
184
+ fieldWidth: t.string().optional()
185
185
  }),
186
186
  slots: ["default"],
187
187
  events: ["submit"],
188
188
  description: "Form container. Put Field components inside and bind controls to state."
189
189
  },
190
190
  Field: {
191
- props: o.object({
192
- label: o.string(),
193
- description: o.string().optional(),
194
- help: o.string().optional(),
195
- required: o.boolean().optional(),
196
- fieldWidth: o.string().optional(),
197
- direction: o.enum(["auto", "horizontal", "vertical"]).optional()
191
+ props: t.object({
192
+ label: t.string(),
193
+ description: t.string().optional(),
194
+ help: t.string().optional(),
195
+ required: t.boolean().optional(),
196
+ fieldWidth: t.string().optional(),
197
+ direction: t.enum(["auto", "horizontal", "vertical"]).optional()
198
198
  }),
199
199
  slots: ["default"],
200
200
  description: "Labeled form field for create/edit dialogs and forms."
201
201
  },
202
202
  SettingsSection: {
203
- props: o.object({
204
- title: o.string(),
205
- collapsible: o.boolean().optional(),
206
- open: o.boolean().optional()
203
+ props: t.object({
204
+ title: t.string(),
205
+ collapsible: t.boolean().optional(),
206
+ open: t.boolean().optional()
207
207
  }),
208
208
  slots: ["default", "actions"],
209
209
  events: ["openChange"],
210
210
  description: "Section of related settings. Prefer this plus SettingsField for DSM settings pages."
211
211
  },
212
212
  SettingsField: {
213
- props: o.object({
214
- label: o.string(),
215
- description: o.string().optional(),
216
- required: o.boolean().optional(),
217
- fieldWidth: o.string().optional(),
218
- align: o.enum(["start", "center"]).optional()
213
+ props: t.object({
214
+ label: t.string(),
215
+ description: t.string().optional(),
216
+ required: t.boolean().optional(),
217
+ fieldWidth: t.string().optional(),
218
+ align: t.enum(["start", "center"]).optional()
219
219
  }),
220
220
  slots: ["default"],
221
221
  description: "DSM settings row with label, description and one control/content region."
222
222
  },
223
223
  Surface: {
224
- props: o.object({
225
- padding: o.enum(["none", "sm", "md", "lg"]).optional(),
226
- border: o.boolean().optional(),
227
- raised: o.boolean().optional()
224
+ props: t.object({
225
+ padding: t.enum(["none", "sm", "md", "lg"]).optional(),
226
+ border: t.boolean().optional(),
227
+ raised: t.boolean().optional()
228
228
  }),
229
229
  slots: ["default"],
230
230
  description: "Neutral bordered/raised content surface when Card semantics are not needed."
231
231
  },
232
232
  Card: {
233
- props: o.object({
234
- title: o.string().optional(),
235
- layoutType: o.enum(["regular", "compact"]).optional(),
236
- expandable: o.boolean().optional(),
237
- expanded: o.boolean().optional(),
238
- footerAlign: o.enum(["start", "end", "between"]).optional()
233
+ props: t.object({
234
+ title: t.string().optional(),
235
+ layoutType: t.enum(["regular", "compact"]).optional(),
236
+ expandable: t.boolean().optional(),
237
+ expanded: t.boolean().optional(),
238
+ footerAlign: t.enum(["start", "end", "between"]).optional()
239
239
  }),
240
240
  slots: ["default", "header-actions", "footer"],
241
241
  events: ["expandedChange"],
242
242
  description: "Grouped content with optional header/actions/footer. Do not use a Card just to add spacing."
243
243
  },
244
244
  Callout: {
245
- props: o.object({
246
- tone: o.enum(["info", "success", "warning", "danger"]).optional(),
247
- title: o.string().optional(),
248
- closable: o.boolean().optional()
245
+ props: t.object({
246
+ tone: t.enum(["info", "success", "warning", "danger"]).optional(),
247
+ title: t.string().optional(),
248
+ closable: t.boolean().optional(),
249
+ code: t.string().optional()
249
250
  }),
250
251
  slots: ["default", "actions"],
251
252
  events: ["close"],
252
- description: "Inline information, success, warning or error message."
253
+ description: "Inline information, success, warning or error message. Put a machine error code in `code`, not in the text."
253
254
  },
254
255
  EmptyState: {
255
- props: o.object({
256
- title: o.string(),
257
- description: o.string().optional(),
258
- icon: o.string().optional()
256
+ props: t.object({
257
+ title: t.string(),
258
+ description: t.string().optional(),
259
+ icon: t.string().optional()
259
260
  }),
260
261
  slots: ["actions"],
261
262
  description: "Empty/no-results state with optional recovery or create actions."
262
263
  },
263
264
  Progress: {
264
- props: o.object({
265
- value: o.number().optional(),
266
- max: o.number().optional(),
267
- label: o.string().optional(),
268
- valueLabel: o.string().optional()
265
+ props: t.object({
266
+ value: t.number().optional(),
267
+ max: t.number().optional(),
268
+ label: t.string().optional(),
269
+ valueLabel: t.string().optional(),
270
+ tone: t.enum(["primary", "success", "warning", "danger"]).optional()
269
271
  }),
270
272
  description: "Linear determinate progress. Domain-specific progress visualizations should be custom components."
271
273
  },
272
274
  Badge: {
273
- props: o.object({
274
- text: o.string(),
275
- tone: o.enum(["neutral", "info", "success", "warning", "danger"]).optional()
275
+ props: t.object({
276
+ text: t.string(),
277
+ tone: t.enum(["neutral", "info", "success", "warning", "danger"]).optional()
276
278
  }),
277
279
  description: "Short status/category badge."
278
280
  },
279
281
  Dialog: {
280
- props: o.object({
281
- open: o.boolean().optional(),
282
- title: o.string().optional(),
283
- description: o.string().optional(),
284
- width: o.string().optional(),
285
- showClose: o.boolean().optional()
282
+ props: t.object({
283
+ open: t.boolean().optional(),
284
+ title: t.string().optional(),
285
+ description: t.string().optional(),
286
+ width: t.string().optional(),
287
+ showClose: t.boolean().optional()
286
288
  }),
287
289
  slots: ["default", "footer"],
288
290
  events: ["openChange"],
289
291
  description: "Modal task/dialog. Bind open to state. Put confirmation or form actions in footer."
290
292
  },
291
293
  DataTable: {
292
- props: o.object({
293
- columns: o.array(U),
294
- rows: o.array(o.record(o.string(), o.unknown())),
295
- rowKey: o.string().optional(),
296
- emptyText: o.string().optional(),
297
- compact: o.boolean().optional(),
298
- mobileView: o.enum(["auto", "cards", "table"]).optional()
294
+ props: t.object({
295
+ columns: t.array(L),
296
+ rows: t.array(t.record(t.string(), t.unknown())),
297
+ rowKey: t.string().optional(),
298
+ emptyText: t.string().optional(),
299
+ compact: t.boolean().optional(),
300
+ mobileView: t.enum(["auto", "cards", "table"]).optional()
299
301
  }),
300
302
  description: "Simple resource table where cells display scalar row fields. Use an app extension component for rich/custom cells and row actions."
301
303
  },
302
304
  ResourceList: {
303
- props: o.object({
304
- columns: o.array(U),
305
- rows: o.array(o.record(o.string(), o.unknown())),
306
- rowKey: o.string().optional(),
307
- emptyText: o.string().optional(),
308
- compact: o.boolean().optional(),
309
- mobileView: o.enum(["auto", "cards", "table"]).optional()
305
+ props: t.object({
306
+ columns: t.array(L),
307
+ rows: t.array(t.record(t.string(), t.unknown())),
308
+ rowKey: t.string().optional(),
309
+ emptyText: t.string().optional(),
310
+ compact: t.boolean().optional(),
311
+ mobileView: t.enum(["auto", "cards", "table"]).optional()
310
312
  }),
311
313
  slots: ["toolbar"],
312
314
  description: "Common resource collection pattern: optional toolbar plus a simple table. For domain-specific row rendering, extend the catalog with a custom list/table component."
313
315
  },
316
+ CellText: {
317
+ props: t.object({
318
+ text: t.string(),
319
+ secondary: t.string().optional(),
320
+ layout: t.enum(["stacked", "inline"]).optional(),
321
+ openLabel: t.string().optional(),
322
+ openDisabled: t.boolean().optional()
323
+ }),
324
+ events: ["open"],
325
+ description: 'Main text with secondary information (size, time, path), truncated with a tooltip. With openLabel the main text is a link-styled button that emits open, e.g. "Open in File Station".'
326
+ },
327
+ CellStatus: {
328
+ props: t.object({
329
+ label: t.string(),
330
+ tone: t.enum(["neutral", "info", "success", "warning", "danger"]).optional(),
331
+ progress: t.number().optional(),
332
+ detail: t.string().optional()
333
+ }),
334
+ description: "Task status: a toned dot and label, a bar while progress (0–100) is running, and a detail such as speed or a reason."
335
+ },
336
+ ListItem: {
337
+ props: t.object({
338
+ title: t.string().optional(),
339
+ description: t.string().optional()
340
+ }),
341
+ slots: ["default", "actions"],
342
+ description: "One entry of a list (an extension, a tool, a rule): title, description, content and actions on the right. Consecutive entries are split by a hairline."
343
+ },
344
+ InputGroup: {
345
+ props: t.object({}),
346
+ slots: ["default"],
347
+ description: "A field and the buttons acting on it on one line, such as a URL and its Install button. The first child takes the room left."
348
+ },
314
349
  Loading: {
315
- props: o.object({ text: o.string().optional() }),
350
+ props: t.object({ text: t.string().optional() }),
316
351
  description: "Centered loading state for a page or bounded region."
317
352
  }
318
353
  }, A = z(H, {
319
- components: _,
354
+ components: V,
320
355
  actions: {}
321
- }), ke = [
356
+ }), Ke = [
322
357
  "Prefer AppRoot > AppShell > Page as the normal DSM application hierarchy.",
323
358
  "Prefer SettingsSection and SettingsField for settings; prefer ResourceList/DataTable for ordinary scalar resource collections.",
324
359
  "Keep state in the spec and use $bindState/$bindItem for editable controls; do not invent JavaScript in props.",
@@ -327,53 +362,53 @@ const V = o.lazy(() => o.object({
327
362
  "AppShell adapts to its actual DSM window width: phone (<=600px), desktop window (601–1199px), and wide web/Portal (>=1200px). Never assume browser viewport width.",
328
363
  "For a phone-unfriendly custom view, use ResponsiveView slots: mobile alternative and default full view. Keep essential actions accessible on mobile.",
329
364
  "Use low-level Stack/Text only when a semantic component does not already express the layout."
330
- ], Ce = '## Self-check workflow\n\nInstall `@synopackageland/ui` first. Without a local install, use\n`npx -y -p @synopackageland/ui syno-pkg-land-ui <command>` (pin the package version for reproducibility).\n\n1. List components with `npx --no syno-pkg-land-ui catalog`; read props with `npx --no syno-pkg-land-ui describe <Component>`.\n2. Write the spec as JSON: {"root", "elements", "state"}. Seed every state path you bind or read.\n3. Run `npx --no syno-pkg-land-ui validate ui.json --json` (add --actions, --functions, --state, --messages for host-provided names).\n Fix every error at its JSON Pointer `path` using its `hint`, then validate again until it passes.\n4. Run `npx --no syno-pkg-land-ui render ui.json --out shots` to screenshot phone, DSM window and wide widths and to\n report layout overflow; fix reported elements and repeat.\n5. Hand over the spec only when validate and render both exit 0.';
331
- function rt() {
332
- return `${A.prompt({ customRules: ke })}
365
+ ], Le = '## Self-check workflow\n\nInstall `@synopackageland/ui` first. Without a local install, use\n`npx -y -p @synopackageland/ui syno-pkg-land-ui <command>` (pin the package version for reproducibility).\n\n1. List components with `npx --no syno-pkg-land-ui catalog`; read props with `npx --no syno-pkg-land-ui describe <Component>`.\n2. Write the spec as JSON: {"root", "elements", "state"}. Seed every state path you bind or read.\n3. Run `npx --no syno-pkg-land-ui validate ui.json --json` (add --actions, --functions, --state, --messages for host-provided names).\n Fix every error at its JSON Pointer `path` using its `hint`, then validate again until it passes.\n4. Run `npx --no syno-pkg-land-ui render ui.json --out shots` to screenshot phone, DSM window and wide widths and to\n report layout overflow; fix reported elements and repeat.\n5. Hand over the spec only when validate and render both exit 0.';
366
+ function pt() {
367
+ return `${A.prompt({ customRules: Ke })}
333
368
 
334
- ${Ce}
369
+ ${Le}
335
370
  `;
336
371
  }
337
- const Re = {
372
+ const Ue = {
338
373
  none: "0",
339
374
  xs: "var(--ui-space-1)",
340
375
  sm: "var(--ui-space-2)",
341
376
  md: "var(--ui-space-3)",
342
377
  lg: "var(--ui-space-4)"
343
- }, Ke = { start: "flex-start", center: "center", end: "flex-end", stretch: "stretch" }, Ie = { start: "flex-start", center: "center", end: "flex-end", between: "space-between" };
344
- function Ue(e) {
378
+ }, De = { start: "flex-start", center: "center", end: "flex-end", stretch: "stretch" }, Te = { start: "flex-start", center: "center", end: "flex-end", between: "space-between" };
379
+ function Ee(e) {
345
380
  return { default: () => e };
346
381
  }
347
382
  function C(e) {
348
- return e ? Ae(e) : void 0;
383
+ return e ? Ie(e) : void 0;
349
384
  }
350
- function T(e) {
385
+ function _(e) {
351
386
  return {
352
387
  ...e,
353
388
  icon: C(e.icon),
354
- children: e.children?.map(T)
389
+ children: e.children?.map(_)
355
390
  };
356
391
  }
357
- function De(e) {
358
- return e.map((t) => ({ ...t, items: t.items.map(T) }));
392
+ function Ne(e) {
393
+ return e.map((o) => ({ ...o, items: o.items.map(_) }));
359
394
  }
360
- const Le = {
361
- AppRoot: ({ props: e, slots: t }) => d(xe, { modalScope: e.modalScope }, t),
362
- AppShell: ({ props: e, slots: t }) => d(Oe, {
395
+ const Je = {
396
+ AppRoot: ({ props: e, slots: o }) => d(Ce, { modalScope: e.modalScope }, o),
397
+ AppShell: ({ props: e, slots: o }) => d(ke, {
363
398
  sidebarWidth: e.sidebarWidth,
364
399
  minHeight: e.minHeight,
365
400
  responsive: e.responsive,
366
401
  wideLayout: e.wideLayout
367
- }, t),
368
- ResponsiveView: ({ props: e, slots: t }) => d(je, { mode: e.mode }, t),
369
- Page: ({ props: e, slots: t }) => d(Se, { width: e.width ?? "fill", surface: e.surface }, t),
370
- PageHeader: ({ props: e, slots: t }) => d($e, e, t),
371
- Toolbar: ({ props: e, slots: t }) => d(ve, e, t),
372
- SidebarNav: ({ props: e, bindings: t, emit: n }) => {
373
- const [s, i] = b(e.value, t?.value);
374
- return d(we, {
402
+ }, o),
403
+ ResponsiveView: ({ props: e, slots: o }) => d(Pe, { mode: e.mode }, o),
404
+ Page: ({ props: e, slots: o }) => d(Ae, { width: e.width ?? "fill", surface: e.surface }, o),
405
+ PageHeader: ({ props: e, slots: o }) => d(Oe, e, o),
406
+ Toolbar: ({ props: e, slots: o }) => d(xe, e, o),
407
+ SidebarNav: ({ props: e, bindings: o, emit: n }) => {
408
+ const [s, i] = b(e.value, o?.value);
409
+ return d(je, {
375
410
  modelValue: s,
376
- groups: De(e.groups),
411
+ groups: Ne(e.groups),
377
412
  searchable: e.searchable,
378
413
  collapsible: e.collapsible,
379
414
  searchPlaceholder: e.searchPlaceholder,
@@ -382,9 +417,9 @@ const Le = {
382
417
  }
383
418
  });
384
419
  },
385
- Tabs: ({ props: e, bindings: t, emit: n }) => {
386
- const [s, i] = b(e.value, t?.value);
387
- return d(ye, {
420
+ Tabs: ({ props: e, bindings: o, emit: n }) => {
421
+ const [s, i] = b(e.value, o?.value);
422
+ return d(Se, {
388
423
  modelValue: s ?? "",
389
424
  items: e.items,
390
425
  ariaLabel: e.ariaLabel,
@@ -393,36 +428,36 @@ const Le = {
393
428
  }
394
429
  });
395
430
  },
396
- Stack: ({ props: e, children: t }) => d("div", {
431
+ Stack: ({ props: e, children: o }) => d("div", {
397
432
  "data-syno-pkg-land-ui": "",
398
433
  style: {
399
434
  display: "flex",
400
435
  flexDirection: e.direction ?? "column",
401
- gap: Re[e.gap ?? "md"],
402
- alignItems: Ke[e.align ?? "stretch"],
403
- justifyContent: Ie[e.justify ?? "start"],
436
+ gap: Ue[e.gap ?? "md"],
437
+ alignItems: De[e.align ?? "stretch"],
438
+ justifyContent: Te[e.justify ?? "start"],
404
439
  flexWrap: e.wrap ? "wrap" : "nowrap"
405
440
  }
406
- }, t),
441
+ }, o),
407
442
  Text: ({ props: e }) => {
408
- const t = e.variant ?? "body";
409
- return d(t === "heading" ? "h2" : t === "mono" ? "code" : "span", { class: t === "muted" ? "text-[13px] text-[var(--ui-text-muted)]" : t === "caption" ? "text-[12px] text-[var(--ui-text-muted)]" : t === "heading" ? "text-[16px] font-semibold text-[var(--ui-text)]" : t === "mono" ? "font-mono text-[12px] text-[var(--ui-text)]" : "text-[13px] text-[var(--ui-text)]", "data-syno-pkg-land-ui": "" }, e.text);
443
+ const o = e.variant ?? "body";
444
+ return d(o === "heading" ? "h2" : o === "mono" ? "code" : "span", { class: o === "muted" ? "text-[13px] text-[var(--ui-text-muted)]" : o === "caption" ? "text-[12px] text-[var(--ui-text-muted)]" : o === "heading" ? "text-[16px] font-semibold text-[var(--ui-text)]" : o === "mono" ? "font-mono text-[12px] text-[var(--ui-text)]" : "text-[13px] text-[var(--ui-text)]", "data-syno-pkg-land-ui": "" }, e.text);
410
445
  },
411
- Button: ({ props: e, emit: t }) => {
446
+ Button: ({ props: e, emit: o }) => {
412
447
  const n = C(e.icon);
413
- return d(be, {
448
+ return d($e, {
414
449
  variant: e.variant,
415
450
  size: e.size,
416
451
  disabled: e.disabled,
417
452
  loading: e.loading,
418
- onClick: () => t("press")
453
+ onClick: () => o("press")
419
454
  }, {
420
455
  default: () => [n ? d(n, { class: "size-4", "aria-hidden": "true" }) : null, e.label]
421
456
  });
422
457
  },
423
- Input: ({ props: e, bindings: t, emit: n }) => {
424
- const [s, i] = b(e.value, t?.value);
425
- return d(ge, {
458
+ Input: ({ props: e, bindings: o, emit: n }) => {
459
+ const [s, i] = b(e.value, o?.value);
460
+ return d(ve, {
426
461
  modelValue: s,
427
462
  type: e.type,
428
463
  placeholder: e.placeholder,
@@ -436,9 +471,9 @@ const Le = {
436
471
  }
437
472
  });
438
473
  },
439
- Select: ({ props: e, bindings: t, emit: n }) => {
440
- const [s, i] = b(e.value, t?.value);
441
- return d(fe, {
474
+ Select: ({ props: e, bindings: o, emit: n }) => {
475
+ const [s, i] = b(e.value, o?.value);
476
+ return d(we, {
442
477
  modelValue: s,
443
478
  options: e.options,
444
479
  placeholder: e.placeholder,
@@ -449,9 +484,9 @@ const Le = {
449
484
  }
450
485
  });
451
486
  },
452
- Checkbox: ({ props: e, bindings: t, emit: n }) => {
453
- const [s, i] = b(e.checked, t?.checked);
454
- return d(he, {
487
+ Checkbox: ({ props: e, bindings: o, emit: n }) => {
488
+ const [s, i] = b(e.checked, o?.checked);
489
+ return d(ye, {
455
490
  modelValue: s ?? !1,
456
491
  label: e.label,
457
492
  description: e.description,
@@ -461,9 +496,9 @@ const Le = {
461
496
  }
462
497
  });
463
498
  },
464
- Switch: ({ props: e, bindings: t, emit: n }) => {
465
- const [s, i] = b(e.checked, t?.checked);
466
- return d(me, {
499
+ Switch: ({ props: e, bindings: o, emit: n }) => {
500
+ const [s, i] = b(e.checked, o?.checked);
501
+ return d(be, {
467
502
  modelValue: s ?? !1,
468
503
  label: e.label,
469
504
  disabled: e.disabled,
@@ -472,9 +507,9 @@ const Le = {
472
507
  }
473
508
  });
474
509
  },
475
- RadioGroup: ({ props: e, bindings: t, emit: n }) => {
476
- const [s, i] = b(e.value, t?.value);
477
- return d(ue, {
510
+ RadioGroup: ({ props: e, bindings: o, emit: n }) => {
511
+ const [s, i] = b(e.value, o?.value);
512
+ return d(ge, {
478
513
  modelValue: s,
479
514
  options: e.options,
480
515
  orientation: e.orientation,
@@ -484,22 +519,22 @@ const Le = {
484
519
  }
485
520
  });
486
521
  },
487
- Form: ({ props: e, slots: t, emit: n }) => d(pe, {
522
+ Form: ({ props: e, slots: o, emit: n }) => d(fe, {
488
523
  direction: e.direction,
489
524
  fieldWidth: e.fieldWidth,
490
525
  onSubmit: () => n("submit")
491
- }, t),
492
- Field: ({ props: e, slots: t }) => d(de, {
526
+ }, o),
527
+ Field: ({ props: e, slots: o }) => d(he, {
493
528
  label: e.label,
494
529
  description: e.description,
495
530
  help: e.help,
496
531
  requiredMark: e.required,
497
532
  fieldWidth: e.fieldWidth,
498
533
  direction: e.direction
499
- }, t),
500
- SettingsSection: ({ props: e, bindings: t, slots: n, emit: s }) => {
501
- const [i, a] = b(e.open, t?.open);
502
- return d(ce, {
534
+ }, o),
535
+ SettingsSection: ({ props: e, bindings: o, slots: n, emit: s }) => {
536
+ const [i, a] = b(e.open, o?.open);
537
+ return d(me, {
503
538
  title: e.title,
504
539
  collapsible: e.collapsible,
505
540
  open: i,
@@ -508,17 +543,17 @@ const Le = {
508
543
  }
509
544
  }, n);
510
545
  },
511
- SettingsField: ({ props: e, slots: t }) => d(le, {
546
+ SettingsField: ({ props: e, slots: o }) => d(ue, {
512
547
  label: e.label,
513
548
  description: e.description,
514
549
  required: e.required,
515
550
  fieldWidth: e.fieldWidth,
516
551
  align: e.align
517
- }, t),
518
- Surface: ({ props: e, slots: t }) => d(re, e, t),
519
- Card: ({ props: e, bindings: t, slots: n, emit: s }) => {
520
- const [i, a] = b(e.expanded, t?.expanded);
521
- return d(ae, {
552
+ }, o),
553
+ Surface: ({ props: e, slots: o }) => d(pe, e, o),
554
+ Card: ({ props: e, bindings: o, slots: n, emit: s }) => {
555
+ const [i, a] = b(e.expanded, o?.expanded);
556
+ return d(de, {
522
557
  title: e.title,
523
558
  layoutType: e.layoutType,
524
559
  expandable: e.expandable,
@@ -529,22 +564,23 @@ const Le = {
529
564
  }
530
565
  }, n);
531
566
  },
532
- Callout: ({ props: e, slots: t, emit: n }) => d(se, {
567
+ Callout: ({ props: e, slots: o, emit: n }) => d(ce, {
533
568
  tone: e.tone,
534
569
  title: e.title,
535
570
  closable: e.closable,
571
+ code: e.code,
536
572
  onClose: () => n("close")
537
- }, t),
538
- EmptyState: ({ props: e, slots: t }) => d(ie, {
573
+ }, o),
574
+ EmptyState: ({ props: e, slots: o }) => d(le, {
539
575
  title: e.title,
540
576
  description: e.description,
541
577
  icon: C(e.icon)
542
- }, t),
543
- Progress: ({ props: e }) => d(ne, e),
544
- Badge: ({ props: e }) => d(oe, { tone: e.tone }, Ue(e.text)),
545
- Dialog: ({ props: e, bindings: t, slots: n, emit: s }) => {
546
- const [i, a] = b(e.open, t?.open);
547
- return d(te, {
578
+ }, o),
579
+ Progress: ({ props: e }) => d(re, e),
580
+ Badge: ({ props: e }) => d(ae, { tone: e.tone }, Ee(e.text)),
581
+ Dialog: ({ props: e, bindings: o, slots: n, emit: s }) => {
582
+ const [i, a] = b(e.open, o?.open);
583
+ return d(se, {
548
584
  open: i ?? !1,
549
585
  title: e.title,
550
586
  description: e.description,
@@ -555,15 +591,19 @@ const Le = {
555
591
  }
556
592
  }, n);
557
593
  },
558
- DataTable: ({ props: e }) => d(I, e),
559
- ResourceList: ({ props: e, slots: t }) => d("section", { class: "min-w-0", "data-syno-pkg-land-ui": "", "data-ui-resource-list": "" }, [
560
- t.toolbar ? d("div", { class: "mb-3 flex flex-wrap items-center gap-2" }, t.toolbar()) : null,
561
- d(I, e)
594
+ DataTable: ({ props: e }) => d(K, e),
595
+ ResourceList: ({ props: e, slots: o }) => d("section", { class: "min-w-0", "data-syno-pkg-land-ui": "", "data-ui-resource-list": "" }, [
596
+ o.toolbar ? d("div", { class: "mb-3 flex flex-wrap items-center gap-2" }, o.toolbar()) : null,
597
+ d(K, e)
562
598
  ]),
599
+ CellText: ({ props: e, emit: o }) => d(ie, { ...e, onOpen: () => o("open") }),
600
+ CellStatus: ({ props: e }) => d(ne, e),
601
+ ListItem: ({ props: e, slots: o }) => d(oe, e, o),
602
+ InputGroup: ({ slots: e }) => d(te, null, e),
563
603
  Loading: ({ props: e }) => d(ee, { text: e.text })
564
- }, { registry: D } = B(A, {
565
- components: Le
566
- }), lt = /* @__PURE__ */ G({
604
+ }, { registry: U } = B(A, {
605
+ components: Je
606
+ }), ut = /* @__PURE__ */ G({
567
607
  __name: "SynoJsonRenderer",
568
608
  props: {
569
609
  spec: {},
@@ -579,8 +619,8 @@ const Le = {
579
619
  fallback: {}
580
620
  },
581
621
  setup(e) {
582
- return (t, n) => (X(), Y(j(M), {
583
- registry: j(D),
622
+ return (o, n) => (X(), Y(j(M), {
623
+ registry: j(U),
584
624
  store: e.store,
585
625
  "initial-state": e.state ?? e.spec?.state ?? {},
586
626
  handlers: e.handlers,
@@ -593,7 +633,7 @@ const Le = {
593
633
  default: Q(() => [
594
634
  Z(j(W), {
595
635
  spec: e.spec,
596
- registry: j(D),
636
+ registry: j(U),
597
637
  loading: e.loading,
598
638
  fallback: e.fallback
599
639
  }, null, 8, ["spec", "registry", "loading", "fallback"])
@@ -601,56 +641,56 @@ const Le = {
601
641
  _: 1
602
642
  }, 8, ["registry", "store", "initial-state", "handlers", "navigate", "functions", "directives", "validation-functions", "on-state-change"]));
603
643
  }
604
- }), Ee = ["label", "title", "description", "text", "placeholder", "emptyText", "help", "ariaLabel", "valueLabel", "searchPlaceholder"];
605
- function q(e, t = "") {
606
- return Array.isArray(e) ? e : Object.entries(e).flatMap(([n, s]) => m(s) ? q(s, `${t}${n}.`) : [`${t}${n}`]);
644
+ }), Ve = ["label", "title", "description", "text", "placeholder", "emptyText", "help", "ariaLabel", "valueLabel", "searchPlaceholder"];
645
+ function q(e, o = "") {
646
+ return Array.isArray(e) ? e : Object.entries(e).flatMap(([n, s]) => m(s) ? q(s, `${o}${n}.`) : [`${o}${n}`]);
607
647
  }
608
- const m = (e) => typeof e == "object" && e !== null && !Array.isArray(e), u = (...e) => e.map((t) => "/" + String(t).replaceAll("~", "~0").replaceAll("/", "~1")).join("");
609
- function Ne(e, t) {
610
- const n = Array.from({ length: t.length + 1 }, (s, i) => i);
648
+ const m = (e) => typeof e == "object" && e !== null && !Array.isArray(e), u = (...e) => e.map((o) => "/" + String(o).replaceAll("~", "~0").replaceAll("/", "~1")).join("");
649
+ function _e(e, o) {
650
+ const n = Array.from({ length: o.length + 1 }, (s, i) => i);
611
651
  for (let s = 1; s <= e.length; s++) {
612
652
  let i = n[0];
613
653
  n[0] = s;
614
- for (let a = 1; a <= t.length; a++) {
654
+ for (let a = 1; a <= o.length; a++) {
615
655
  const r = n[a];
616
- n[a] = Math.min(n[a] + 1, n[a - 1] + 1, i + (e[s - 1].toLowerCase() === t[a - 1].toLowerCase() ? 0 : 1)), i = r;
656
+ n[a] = Math.min(n[a] + 1, n[a - 1] + 1, i + (e[s - 1].toLowerCase() === o[a - 1].toLowerCase() ? 0 : 1)), i = r;
617
657
  }
618
658
  }
619
- return n[t.length];
659
+ return n[o.length];
620
660
  }
621
- function y(e, t) {
661
+ function y(e, o) {
622
662
  let n, s = 1 / 0;
623
- for (const i of t) {
624
- const a = Ne(e, i);
663
+ for (const i of o) {
664
+ const a = _e(e, i);
625
665
  a < s && ([n, s] = [i, a]);
626
666
  }
627
667
  return n !== void 0 && s <= Math.max(2, Math.floor(e.length / 3)) ? n : void 0;
628
668
  }
629
- const Je = ["$state", "$item", "$index", "$bindState", "$bindItem", "$cond", "$computed", "$template"], Ve = (e) => m(e) && Je.some((t) => Object.hasOwn(e, t)), R = (e) => Ve(e) || (Array.isArray(e) ? e.some(R) : m(e) && Object.values(e).some(R));
669
+ const qe = ["$state", "$item", "$index", "$bindState", "$bindItem", "$cond", "$computed", "$template"], Fe = (e) => m(e) && qe.some((o) => Object.hasOwn(e, o)), I = (e) => Fe(e) || (Array.isArray(e) ? e.some(I) : m(e) && Object.values(e).some(I));
630
670
  function P(e) {
631
- const t = e.props?.shape;
632
- return m(t) ? t : void 0;
671
+ const o = e.props?.shape;
672
+ return m(o) ? o : void 0;
633
673
  }
634
- const K = (e) => e.safeParse(void 0).success;
635
- function _e(e) {
636
- if (e.code === "invalid_value") return `Use one of: ${e.values.map((t) => JSON.stringify(t)).join(", ")}.`;
674
+ const R = (e) => e.safeParse(void 0).success;
675
+ function ze(e) {
676
+ if (e.code === "invalid_value") return `Use one of: ${e.values.map((o) => JSON.stringify(o)).join(", ")}.`;
637
677
  if (e.code === "invalid_type") return `Expected ${e.expected}.`;
638
678
  }
639
- const v = (e, t) => `${e}: ${t.join(", ")}`;
640
- class Te {
679
+ const v = (e, o) => `${e}: ${o.join(", ")}`;
680
+ class Be {
641
681
  errors = [];
642
682
  warnings = [];
643
- error(t) {
644
- this.errors.push({ severity: "error", ...t });
683
+ error(o) {
684
+ this.errors.push({ severity: "error", ...o });
645
685
  }
646
- warn(t) {
647
- this.warnings.push({ severity: "warning", ...t });
686
+ warn(o) {
687
+ this.warnings.push({ severity: "warning", ...o });
648
688
  }
649
689
  }
650
- function ct(e, t = {}) {
651
- const n = t.catalog ?? A, s = n.data.components, i = new Te();
690
+ function mt(e, o = {}) {
691
+ const n = o.catalog ?? A, s = n.data.components, i = new Be();
652
692
  if (!m(e))
653
- return i.error({ code: "invalid_spec", path: "", message: "A spec must be a JSON object.", hint: 'Return {"root": "<key>", "elements": {...}, "state": {...}}.' }), E(i);
693
+ return i.error({ code: "invalid_spec", path: "", message: "A spec must be a JSON object.", hint: 'Return {"root": "<key>", "elements": {...}, "state": {...}}.' }), T(i);
654
694
  const a = m(e.elements) ? e.elements : void 0;
655
695
  a || i.error({ code: "invalid_elements", path: "/elements", message: '"elements" must be an object keyed by element id.', hint: 'Use a flat map: {"elements": {"root": {"type": "AppRoot", "props": {}, "children": []}}}.' });
656
696
  const r = Object.keys(a ?? {});
@@ -673,27 +713,27 @@ function ct(e, t = {}) {
673
713
  });
674
714
  continue;
675
715
  }
676
- qe(i, p, h, s[h], f.props), Fe(i, p, h, s[h], f, a);
716
+ Me(i, p, h, s[h], f.props), We(i, p, h, s[h], f, a);
677
717
  }
678
- const c = t.messages && q(t.messages), l = {
718
+ const c = o.messages && q(o.messages), l = {
679
719
  issues: i,
680
720
  components: s,
681
721
  actions: [
682
722
  ...(n.schema?.builtInActions ?? []).map((p) => p.name),
683
723
  ...Object.keys(n.data.actions ?? {}),
684
- ...t.actions ?? []
724
+ ...o.actions ?? []
685
725
  ],
686
- state: { ...t.state, ...m(e.state) ? e.state : {} },
726
+ state: { ...o.state, ...m(e.state) ? e.state : {} },
687
727
  // A message catalog implies the host registers the `t` function.
688
- functions: t.functions || c ? [...t.functions ?? [], ...c ? ["t"] : []] : void 0,
728
+ functions: o.functions || c ? [...o.functions ?? [], ...c ? ["t"] : []] : void 0,
689
729
  messageKeys: c
690
730
  };
691
- return a && typeof e.root == "string" && Object.hasOwn(a, e.root) && ze(l, e.root, a), E(i);
731
+ return a && typeof e.root == "string" && Object.hasOwn(a, e.root) && He(l, e.root, a), T(i);
692
732
  }
693
- function qe(e, t, n, s, i) {
694
- const a = (...l) => u("elements", t, "props", ...l);
733
+ function Me(e, o, n, s, i) {
734
+ const a = (...l) => u("elements", o, "props", ...l);
695
735
  if (!m(i)) {
696
- e.error({ code: "invalid_props", path: a(), elementKey: t, message: '"props" must be an object.', hint: 'Use "props": {} when the component needs none.' });
736
+ e.error({ code: "invalid_props", path: a(), elementKey: o, message: '"props" must be an object.', hint: 'Use "props": {} when the component needs none.' });
697
737
  return;
698
738
  }
699
739
  const r = P(s);
@@ -706,82 +746,82 @@ function qe(e, t, n, s, i) {
706
746
  e.error({
707
747
  code: "unknown_prop",
708
748
  path: a(l),
709
- elementKey: t,
749
+ elementKey: o,
710
750
  message: `${n} has no prop "${l}".`,
711
751
  hint: h ? `Did you mean "${h}"? Run "syno-pkg-land-ui describe ${n}".` : v(`${n} props`, c)
712
752
  });
713
753
  continue;
714
754
  }
715
- if (R(p)) continue;
755
+ if (I(p)) continue;
716
756
  const w = f.safeParse(p);
717
757
  if (!w.success)
718
758
  for (const h of w.error.issues)
719
759
  e.error({
720
760
  code: "invalid_prop",
721
761
  path: a(l, ...h.path.map((g) => String(g))),
722
- elementKey: t,
762
+ elementKey: o,
723
763
  message: `${n}.${l}: ${h.message}`,
724
- hint: _e(h)
764
+ hint: ze(h)
725
765
  });
726
766
  }
727
767
  for (const l of c)
728
- !Object.hasOwn(i, l) && !K(r[l]) && e.error({ code: "missing_prop", path: a(l), elementKey: t, message: `${n} requires prop "${l}".`, hint: `Run "syno-pkg-land-ui describe ${n}" for its type.` });
768
+ !Object.hasOwn(i, l) && !R(r[l]) && e.error({ code: "missing_prop", path: a(l), elementKey: o, message: `${n} requires prop "${l}".`, hint: `Run "syno-pkg-land-ui describe ${n}" for its type.` });
729
769
  }
730
- function F(e, t) {
770
+ function F(e, o) {
731
771
  const n = [];
732
- if (Array.isArray(t.children) && t.children.forEach((s, i) => {
772
+ if (Array.isArray(o.children) && o.children.forEach((s, i) => {
733
773
  typeof s == "string" && n.push({ child: s, path: u("elements", e, "children", i) });
734
- }), m(t.slots))
735
- for (const [s, i] of Object.entries(t.slots))
774
+ }), m(o.slots))
775
+ for (const [s, i] of Object.entries(o.slots))
736
776
  Array.isArray(i) && i.forEach((a, r) => {
737
777
  typeof a == "string" && n.push({ child: a, path: u("elements", e, "slots", s, r) });
738
778
  });
739
779
  return n;
740
780
  }
741
- function Fe(e, t, n, s, i, a) {
781
+ function We(e, o, n, s, i, a) {
742
782
  const r = s.slots ?? [], { children: c } = i;
743
- if (c !== void 0 && !(Array.isArray(c) && c.every((l) => typeof l == "string")) ? e.error({ code: "invalid_children", path: u("elements", t, "children"), elementKey: t, message: '"children" must be an array of element keys.' }) : c?.length && !r.includes("default") && e.error({
783
+ if (c !== void 0 && !(Array.isArray(c) && c.every((l) => typeof l == "string")) ? e.error({ code: "invalid_children", path: u("elements", o, "children"), elementKey: o, message: '"children" must be an array of element keys.' }) : c?.length && !r.includes("default") && e.error({
744
784
  code: "children_not_allowed",
745
- path: u("elements", t, "children"),
746
- elementKey: t,
785
+ path: u("elements", o, "children"),
786
+ elementKey: o,
747
787
  message: `${n} does not render children.`,
748
788
  hint: r.length ? v(`Put them in a named slot of ${n}`, r) : 'Use "children": [] and put the content in a sibling or parent container.'
749
789
  }), i.slots !== void 0)
750
790
  if (!m(i.slots))
751
- e.error({ code: "invalid_slots", path: u("elements", t, "slots"), elementKey: t, message: '"slots" must map slot names to arrays of element keys.' });
791
+ e.error({ code: "invalid_slots", path: u("elements", o, "slots"), elementKey: o, message: '"slots" must map slot names to arrays of element keys.' });
752
792
  else
753
793
  for (const [l, p] of Object.entries(i.slots))
754
794
  if (r.includes(l))
755
- Array.isArray(p) || e.error({ code: "invalid_slots", path: u("elements", t, "slots", l), elementKey: t, message: `Slot "${l}" must be an array of element keys.` });
795
+ Array.isArray(p) || e.error({ code: "invalid_slots", path: u("elements", o, "slots", l), elementKey: o, message: `Slot "${l}" must be an array of element keys.` });
756
796
  else {
757
797
  const f = y(l, r);
758
798
  e.error({
759
799
  code: "unknown_slot",
760
- path: u("elements", t, "slots", l),
761
- elementKey: t,
800
+ path: u("elements", o, "slots", l),
801
+ elementKey: o,
762
802
  message: `${n} has no slot "${l}".`,
763
803
  hint: f ? `Did you mean "${f}"?` : r.length ? v(`${n} slots`, r) : `${n} has no slots.`
764
804
  });
765
805
  }
766
- for (const l of F(t, i))
806
+ for (const l of F(o, i))
767
807
  if (!Object.hasOwn(a, l.child)) {
768
808
  const p = y(l.child, Object.keys(a));
769
809
  e.error({
770
810
  code: "missing_child",
771
811
  path: l.path,
772
- elementKey: t,
812
+ elementKey: o,
773
813
  message: `"${l.child}" is not in "elements".`,
774
814
  hint: p ? `Did you mean "${p}"? Otherwise add the element.` : "Add the element or remove the reference."
775
815
  });
776
816
  }
777
817
  }
778
- function ze(e, t, n) {
818
+ function He(e, o, n) {
779
819
  const { issues: s } = e, i = /* @__PURE__ */ new Set(), a = (r, c, l, p) => {
780
820
  const f = n[r];
781
821
  if (!m(f)) return;
782
822
  i.add(r);
783
823
  const w = m(f.repeat);
784
- He(e, r, f, p || w);
824
+ Qe(e, r, f, p || w);
785
825
  const h = f.type === "AppRoot";
786
826
  h && l && s.error({ code: "nested_app_root", path: u("elements", r), elementKey: r, message: "AppRoot cannot be nested inside another AppRoot.", hint: "Use a single AppRoot at the top of the spec." });
787
827
  for (const g of F(r, f))
@@ -793,13 +833,13 @@ function ze(e, t, n) {
793
833
  a(g.child, [...c, g.child], l || h, p || w);
794
834
  }
795
835
  };
796
- a(t, [t], !1, !1);
836
+ a(o, [o], !1, !1);
797
837
  for (const r of Object.keys(n))
798
838
  i.has(r) || s.warn({ code: "orphaned_element", path: u("elements", r), elementKey: r, message: `"${r}" is not reachable from the root.`, hint: "Reference it from a parent or delete it." });
799
839
  }
800
- function Be(e, t) {
840
+ function Ge(e, o) {
801
841
  let n = e;
802
- for (const s of t.split("/").slice(1)) {
842
+ for (const s of o.split("/").slice(1)) {
803
843
  const i = s.replaceAll("~1", "/").replaceAll("~0", "~");
804
844
  if (Array.isArray(n) && /^\d+$/.test(i)) n = n[Number(i)];
805
845
  else if (m(n) && Object.hasOwn(n, i)) n = n[i];
@@ -807,56 +847,56 @@ function Be(e, t) {
807
847
  }
808
848
  return { found: !0, value: n };
809
849
  }
810
- function $(e, t, n, s, { mustExist: i }) {
850
+ function $(e, o, n, s, { mustExist: i }) {
811
851
  if (typeof n != "string" || !n.startsWith("/")) {
812
852
  e.issues.error({
813
853
  code: "invalid_state_path",
814
854
  path: s,
815
- elementKey: t,
855
+ elementKey: o,
816
856
  message: `State paths are JSON Pointers; got ${JSON.stringify(n)}.`,
817
857
  hint: typeof n == "string" ? `Use "/${n.replace(/^\.?\/?/, "").replaceAll(".", "/")}".` : 'Use a string such as "/settings/enabled".'
818
858
  });
819
859
  return;
820
860
  }
821
- i && !Be(e.state, n).found && e.issues.warn({
861
+ i && !Ge(e.state, n).found && e.issues.warn({
822
862
  code: "state_path_missing",
823
863
  path: s,
824
- elementKey: t,
864
+ elementKey: o,
825
865
  message: `State "${n}" has no initial value.`,
826
866
  hint: `Seed it in the spec's "state", or pass the host state with --state, so the first render has a value.`
827
867
  });
828
868
  }
829
- function S(e, t, n, s, i) {
869
+ function S(e, o, n, s, i) {
830
870
  if (Array.isArray(n)) {
831
- n.forEach((a, r) => S(e, t, a, s + u(r), i));
871
+ n.forEach((a, r) => S(e, o, a, s + u(r), i));
832
872
  return;
833
873
  }
834
874
  if (m(n)) {
835
875
  for (const a of ["$state", "$bindState"])
836
- Object.hasOwn(n, a) && $(e, t, n[a], s + u(a), { mustExist: !0 });
876
+ Object.hasOwn(n, a) && $(e, o, n[a], s + u(a), { mustExist: !0 });
837
877
  for (const a of ["$item", "$bindItem", "$index"])
838
878
  Object.hasOwn(n, a) && !i && e.issues.error({
839
879
  code: "item_outside_repeat",
840
880
  path: s + u(a),
841
- elementKey: t,
881
+ elementKey: o,
842
882
  message: `${a} only works inside an element with "repeat" or its descendants.`,
843
883
  hint: 'Add "repeat": {"statePath": "/list"} to an ancestor, or read the value with $state.'
844
884
  });
845
885
  if (typeof n.$template == "string")
846
886
  for (const a of n.$template.matchAll(/\$\{([^}]*)\}/g))
847
- $(e, t, a[1], s + u("$template"), { mustExist: !0 });
848
- typeof n.$computed == "string" && Me(e, t, n, s);
887
+ $(e, o, a[1], s + u("$template"), { mustExist: !0 });
888
+ typeof n.$computed == "string" && Xe(e, o, n, s);
849
889
  for (const [a, r] of Object.entries(n))
850
- ["$state", "$bindState", "$item", "$bindItem", "$index", "$template"].includes(a) || S(e, t, r, s + u(a), i);
890
+ ["$state", "$bindState", "$item", "$bindItem", "$index", "$template"].includes(a) || S(e, o, r, s + u(a), i);
851
891
  }
852
892
  }
853
- function Me(e, t, n, s) {
893
+ function Xe(e, o, n, s) {
854
894
  const i = n.$computed;
855
895
  if (!e.functions)
856
896
  e.issues.warn({
857
897
  code: "unverified_function",
858
898
  path: s + u("$computed"),
859
- elementKey: t,
899
+ elementKey: o,
860
900
  message: `$computed "${i}" must be registered by the host.`,
861
901
  hint: `Pass the host function names with --functions ${i} to verify it.`
862
902
  });
@@ -865,7 +905,7 @@ function Me(e, t, n, s) {
865
905
  e.issues.error({
866
906
  code: "unknown_function",
867
907
  path: s + u("$computed"),
868
- elementKey: t,
908
+ elementKey: o,
869
909
  message: `$computed "${i}" is not a host function.`,
870
910
  hint: `${r ? `Did you mean "${r}"? ` : ""}${v("Host functions", e.functions)}`
871
911
  });
@@ -877,27 +917,27 @@ function Me(e, t, n, s) {
877
917
  e.issues.error({
878
918
  code: "missing_i18n_key",
879
919
  path: s + u("args", "key"),
880
- elementKey: t,
920
+ elementKey: o,
881
921
  message: `Message key ${JSON.stringify(a)} is not in the message catalog.`,
882
922
  hint: r ? `Did you mean "${r}"? Otherwise add the key to every locale.` : "Add the key to every locale, or use an existing key."
883
923
  });
884
924
  }
885
925
  }
886
- const We = ["statePath", "clearStatePath"];
887
- function He(e, t, n, s) {
888
- const i = (...c) => u("elements", t, ...c);
889
- if (S(e, t, n.props, i("props"), s), e.messageKeys && m(n.props))
890
- for (const c of Ee) {
926
+ const Ye = ["statePath", "clearStatePath"];
927
+ function Qe(e, o, n, s) {
928
+ const i = (...c) => u("elements", o, ...c);
929
+ if (S(e, o, n.props, i("props"), s), e.messageKeys && m(n.props))
930
+ for (const c of Ve) {
891
931
  const l = n.props[c];
892
932
  typeof l == "string" && l.trim() && e.issues.warn({
893
933
  code: "literal_text",
894
934
  path: i("props", c),
895
- elementKey: t,
935
+ elementKey: o,
896
936
  message: `Literal text ${JSON.stringify(l)} is not localized.`,
897
937
  hint: 'Use {"$computed": "t", "args": {"key": "<message key>"}}.'
898
938
  });
899
939
  }
900
- n.visible !== void 0 && S(e, t, n.visible, i("visible"), s), m(n.repeat) && $(e, t, n.repeat.statePath, i("repeat", "statePath"), { mustExist: !0 });
940
+ n.visible !== void 0 && S(e, o, n.visible, i("visible"), s), m(n.repeat) && $(e, o, n.repeat.statePath, i("repeat", "statePath"), { mustExist: !0 });
901
941
  const a = typeof n.type == "string" ? n.type : "", r = e.components[a]?.events ?? [];
902
942
  if (m(n.on))
903
943
  for (const [c, l] of Object.entries(n.on)) {
@@ -906,22 +946,22 @@ function He(e, t, n, s) {
906
946
  e.issues.error({
907
947
  code: "unknown_event",
908
948
  path: i("on", c),
909
- elementKey: t,
949
+ elementKey: o,
910
950
  message: `${a} does not emit "${c}".`,
911
951
  hint: p ? `Did you mean "${p}"?` : r.length ? v(`${a} events`, r) : `${a} emits no events.`
912
952
  });
913
953
  }
914
- L(e, t, l, i("on", c), s);
954
+ D(e, o, l, i("on", c), s);
915
955
  }
916
956
  if (m(n.watch))
917
957
  for (const [c, l] of Object.entries(n.watch))
918
- $(e, t, c, i("watch", c), { mustExist: !1 }), L(e, t, l, i("watch", c), s);
958
+ $(e, o, c, i("watch", c), { mustExist: !1 }), D(e, o, l, i("watch", c), s);
919
959
  }
920
- function L(e, t, n, s, i) {
960
+ function D(e, o, n, s, i) {
921
961
  (Array.isArray(n) ? n : [n]).forEach((r, c) => {
922
962
  const l = Array.isArray(n) ? s + u(c) : s;
923
963
  if (!m(r) || typeof r.action != "string") {
924
- e.issues.error({ code: "invalid_action_binding", path: l, elementKey: t, message: 'An action binding is {"action": "<name>", "params": {...}}.' });
964
+ e.issues.error({ code: "invalid_action_binding", path: l, elementKey: o, message: 'An action binding is {"action": "<name>", "params": {...}}.' });
925
965
  return;
926
966
  }
927
967
  if (!e.actions.includes(r.action)) {
@@ -929,27 +969,27 @@ function L(e, t, n, s, i) {
929
969
  e.issues.error({
930
970
  code: "unknown_action",
931
971
  path: l + u("action"),
932
- elementKey: t,
972
+ elementKey: o,
933
973
  message: `Action "${r.action}" is not declared.`,
934
974
  hint: `${p ? `Did you mean "${p}"? ` : ""}Declare it in the app catalog, or pass host handlers with --actions ${r.action}. ${v("Known actions", e.actions)}`
935
975
  });
936
976
  }
937
977
  if (m(r.params)) {
938
- for (const p of We)
939
- Object.hasOwn(r.params, p) && $(e, t, r.params[p], l + u("params", p), { mustExist: !1 });
940
- S(e, t, r.params, l + u("params"), i);
978
+ for (const p of Ye)
979
+ Object.hasOwn(r.params, p) && $(e, o, r.params[p], l + u("params", p), { mustExist: !1 });
980
+ S(e, o, r.params, l + u("params"), i);
941
981
  }
942
982
  });
943
983
  }
944
- function E(e) {
984
+ function T(e) {
945
985
  return { valid: e.errors.length === 0, errors: e.errors, warnings: e.warnings };
946
986
  }
947
- const O = _;
948
- function Ge(e) {
949
- const t = o.toJSONSchema(e);
950
- return delete t.$schema, t;
987
+ const x = V;
988
+ function Ze(e) {
989
+ const o = t.toJSONSchema(e);
990
+ return delete o.$schema, o;
951
991
  }
952
- function Xe(e) {
992
+ function et(e) {
953
993
  if (Array.isArray(e.enum)) return e.enum[0];
954
994
  switch (e.type) {
955
995
  case "string":
@@ -965,42 +1005,42 @@ function Xe(e) {
965
1005
  return {};
966
1006
  }
967
1007
  }
968
- function dt() {
969
- return Object.entries(O).map(([e, t]) => ({
1008
+ function ht() {
1009
+ return Object.entries(x).map(([e, o]) => ({
970
1010
  name: e,
971
- description: t.description,
972
- required: Object.entries(P(t) ?? {}).filter(([, n]) => !K(n)).map(([n]) => n),
973
- slots: t.slots ?? [],
974
- events: t.events ?? []
1011
+ description: o.description,
1012
+ required: Object.entries(P(o) ?? {}).filter(([, n]) => !R(n)).map(([n]) => n),
1013
+ slots: o.slots ?? [],
1014
+ events: o.events ?? []
975
1015
  }));
976
1016
  }
977
- function pt(e) {
978
- return y(e, Object.keys(O));
1017
+ function ft(e) {
1018
+ return y(e, Object.keys(x));
979
1019
  }
980
- function ut(e) {
981
- if (!Object.hasOwn(O, e)) return;
982
- const t = O[e], n = Object.fromEntries(Object.entries(P(t) ?? {}).map(([s, i]) => [
1020
+ function gt(e) {
1021
+ if (!Object.hasOwn(x, e)) return;
1022
+ const o = x[e], n = Object.fromEntries(Object.entries(P(o) ?? {}).map(([s, i]) => [
983
1023
  s,
984
- { required: !K(i), schema: Ge(i) }
1024
+ { required: !R(i), schema: Ze(i) }
985
1025
  ]));
986
1026
  return {
987
1027
  name: e,
988
- description: t.description,
1028
+ description: o.description,
989
1029
  props: n,
990
- slots: t.slots ?? [],
991
- events: t.events ?? [],
1030
+ slots: o.slots ?? [],
1031
+ events: o.events ?? [],
992
1032
  example: {
993
1033
  type: e,
994
- props: Object.fromEntries(Object.entries(n).filter(([, s]) => s.required).map(([s, { schema: i }]) => [s, Xe(i)])),
1034
+ props: Object.fromEntries(Object.entries(n).filter(([, s]) => s.required).map(([s, { schema: i }]) => [s, et(i)])),
995
1035
  children: []
996
1036
  }
997
1037
  };
998
1038
  }
999
- const x = { type: "string", pattern: "^/" }, Ye = {
1039
+ const O = { type: "string", pattern: "^/" }, tt = {
1000
1040
  description: "A json-render expression resolved at render time.",
1001
1041
  anyOf: [
1002
- { type: "object", required: ["$state"], properties: { $state: x } },
1003
- { type: "object", required: ["$bindState"], properties: { $bindState: x } },
1042
+ { type: "object", required: ["$state"], properties: { $state: O } },
1043
+ { type: "object", required: ["$bindState"], properties: { $bindState: O } },
1004
1044
  { type: "object", required: ["$item"], properties: { $item: { type: "string" } } },
1005
1045
  { type: "object", required: ["$bindItem"], properties: { $bindItem: { type: "string" } } },
1006
1046
  { type: "object", required: ["$index"], properties: { $index: { const: !0 } } },
@@ -1008,7 +1048,7 @@ const x = { type: "string", pattern: "^/" }, Ye = {
1008
1048
  { type: "object", required: ["$computed"], properties: { $computed: { type: "string" }, args: { type: "object" } } },
1009
1049
  { type: "object", required: ["$cond", "$then", "$else"], properties: { $cond: {}, $then: {}, $else: {} } }
1010
1050
  ]
1011
- }, Qe = {
1051
+ }, ot = {
1012
1052
  type: "object",
1013
1053
  required: ["action"],
1014
1054
  properties: {
@@ -1020,21 +1060,21 @@ const x = { type: "string", pattern: "^/" }, Ye = {
1020
1060
  preventDefault: { type: "boolean" }
1021
1061
  },
1022
1062
  additionalProperties: !1
1023
- }, N = { anyOf: [{ $ref: "#/$defs/actionBinding" }, { type: "array", items: { $ref: "#/$defs/actionBinding" } }] }, J = { type: "array", items: { type: "string" } };
1024
- function Ze(e, t, n) {
1063
+ }, E = { anyOf: [{ $ref: "#/$defs/actionBinding" }, { type: "array", items: { $ref: "#/$defs/actionBinding" } }] }, N = { type: "array", items: { type: "string" } };
1064
+ function nt(e, o, n) {
1025
1065
  const s = (r) => Array.isArray(r) ? r.map(s) : !r || typeof r != "object" ? r : Object.fromEntries(Object.entries(r).map(([c, l]) => [
1026
1066
  c,
1027
- c === "$ref" && typeof l == "string" ? l.replace("#/$defs/", `#/$defs/${t}`) : s(l)
1067
+ c === "$ref" && typeof l == "string" ? l.replace("#/$defs/", `#/$defs/${o}`) : s(l)
1028
1068
  ])), { $defs: i, ...a } = e;
1029
1069
  delete a.$schema;
1030
- for (const [r, c] of Object.entries(i ?? {})) n[t + r] = s(c);
1070
+ for (const [r, c] of Object.entries(i ?? {})) n[o + r] = s(c);
1031
1071
  return s(a);
1032
1072
  }
1033
- function et(e, t, n) {
1034
- const s = P(t), i = t.slots ?? [];
1073
+ function it(e, o, n) {
1074
+ const s = P(o), i = o.slots ?? [];
1035
1075
  let a = { type: "object" };
1036
1076
  if (s) {
1037
- const r = Ze(o.toJSONSchema(o.object(s)), `${e}__`, n), c = r.properties;
1077
+ const r = nt(t.toJSONSchema(t.object(s)), `${e}__`, n), c = r.properties;
1038
1078
  a = {
1039
1079
  ...r,
1040
1080
  properties: Object.fromEntries(Object.entries(c).map(([l, p]) => [
@@ -1046,30 +1086,30 @@ function et(e, t, n) {
1046
1086
  return {
1047
1087
  if: { properties: { type: { const: e } } },
1048
1088
  then: {
1049
- ...t.description ? { description: t.description } : {},
1089
+ ...o.description ? { description: o.description } : {},
1050
1090
  properties: {
1051
1091
  props: a,
1052
1092
  ...i.includes("default") ? {} : { children: { maxItems: 0 } },
1053
1093
  slots: { propertyNames: { enum: i.filter((r) => r !== "default") } },
1054
- on: { propertyNames: { enum: t.events ?? [] } }
1094
+ on: { propertyNames: { enum: o.events ?? [] } }
1055
1095
  }
1056
1096
  }
1057
1097
  };
1058
1098
  }
1059
- function mt(e = A) {
1060
- const t = e.data.components, n = { expression: Ye, actionBinding: Qe }, s = Object.entries(t).map(([i, a]) => et(i, a, n));
1099
+ function bt(e = A) {
1100
+ const o = e.data.components, n = { expression: tt, actionBinding: ot }, s = Object.entries(o).map(([i, a]) => it(i, a, n));
1061
1101
  return n.element = {
1062
1102
  type: "object",
1063
1103
  required: ["type", "props"],
1064
1104
  properties: {
1065
- type: { enum: Object.keys(t) },
1105
+ type: { enum: Object.keys(o) },
1066
1106
  props: { type: "object" },
1067
- children: J,
1068
- slots: { type: "object", additionalProperties: J },
1107
+ children: N,
1108
+ slots: { type: "object", additionalProperties: N },
1069
1109
  visible: {},
1070
- on: { type: "object", additionalProperties: N },
1071
- watch: { type: "object", propertyNames: x, additionalProperties: N },
1072
- repeat: { type: "object", required: ["statePath"], properties: { statePath: x, key: { type: "string" } }, additionalProperties: !1 }
1110
+ on: { type: "object", additionalProperties: E },
1111
+ watch: { type: "object", propertyNames: O, additionalProperties: E },
1112
+ repeat: { type: "object", required: ["statePath"], properties: { statePath: O, key: { type: "string" } }, additionalProperties: !1 }
1073
1113
  },
1074
1114
  additionalProperties: !1,
1075
1115
  allOf: s
@@ -1088,30 +1128,30 @@ function mt(e = A) {
1088
1128
  };
1089
1129
  }
1090
1130
  export {
1091
- $t as ActionProvider,
1092
- St as JSONUIProvider,
1093
- jt as Renderer,
1094
- Ot as StateProvider,
1095
- lt as SynoJsonRenderer,
1096
- xt as ValidationProvider,
1097
- At as VisibilityProvider,
1098
- pt as closestSynoJsonComponent,
1099
- yt as createStateStore,
1100
- wt as defineCatalog,
1101
- Pt as defineRegistry,
1102
- ut as describeSynoJsonComponent,
1103
- It as jsonRenderVueSchema,
1104
- dt as listSynoJsonComponents,
1105
- rt as synoJsonAiPrompt,
1106
- ke as synoJsonAiRules,
1131
+ Ot as ActionProvider,
1132
+ At as JSONUIProvider,
1133
+ Pt as Renderer,
1134
+ kt as StateProvider,
1135
+ ut as SynoJsonRenderer,
1136
+ Ct as ValidationProvider,
1137
+ It as VisibilityProvider,
1138
+ ft as closestSynoJsonComponent,
1139
+ St as createStateStore,
1140
+ jt as defineCatalog,
1141
+ Rt as defineRegistry,
1142
+ gt as describeSynoJsonComponent,
1143
+ Tt as jsonRenderVueSchema,
1144
+ ht as listSynoJsonComponents,
1145
+ pt as synoJsonAiPrompt,
1146
+ Ke as synoJsonAiRules,
1107
1147
  A as synoJsonCatalog,
1108
- _ as synoJsonComponentDefinitions,
1109
- D as synoJsonRegistry,
1110
- Le as synoJsonRenderers,
1111
- mt as synoJsonSchema,
1112
- kt as useActions,
1113
- Ct as useBoundProp,
1114
- Rt as useStateStore,
1115
- ct as validateSynoJsonSpec,
1116
- gt as z
1148
+ V as synoJsonComponentDefinitions,
1149
+ U as synoJsonRegistry,
1150
+ Je as synoJsonRenderers,
1151
+ bt as synoJsonSchema,
1152
+ Kt as useActions,
1153
+ Lt as useBoundProp,
1154
+ Ut as useStateStore,
1155
+ mt as validateSynoJsonSpec,
1156
+ vt as z
1117
1157
  };