@synopackageland/ui 0.17.12 → 0.17.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/LICENSES/THIRD_PARTY.md +1605 -229
- package/README.md +8 -2
- package/dist/components/app/section-tabs/SectionTabs.vue.d.ts +13 -3
- package/dist/components/app/settings-page/SettingsPage.vue.d.ts +15 -0
- package/dist/components/composite/callout/Callout.vue.d.ts +9 -2
- package/dist/components/composite/data-grid/DataGrid.vue.d.ts +8 -0
- package/dist/components/composite/data-table/DataTable.vue.d.ts +7 -0
- package/dist/components/composite/upload-queue/UploadQueue.vue.d.ts +1 -1
- package/dist/components/containers/fieldset/Fieldset.vue.d.ts +1 -0
- package/dist/components/primitives/segment-control/SegmentControl.vue.d.ts +1 -1
- package/dist/components/primitives/switch/Switch.vue.d.ts +12 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4350 -4258
- package/dist/json/catalog.d.ts +4 -2
- package/dist/json/registry.d.ts +68 -34
- package/dist/json-ai-prompt.md +1 -1
- package/dist/json-catalog.schema.json +12 -2
- package/dist/json-preview/preview.js +1619 -1560
- package/dist/json.js +58 -56
- package/dist/reka-runtime.json +1 -1
- package/dist/rich-text.js +6 -6
- package/dist/theme.css +1 -1
- package/dist/themes/dsm7-embedded-theme.css +1 -1
- package/dist/themes/dsm7-embedded.css +1 -1
- package/dist/themes/dsm7.css +1 -1
- package/docs/callout.md +17 -3
- package/docs/layout-rules.md +28 -5
- package/package.json +1 -1
package/dist/json.js
CHANGED
|
@@ -3,11 +3,11 @@ import { z as vt } from "zod";
|
|
|
3
3
|
import { defineCatalog as F } from "@json-render/core";
|
|
4
4
|
import { createStateStore as $t, defineCatalog as jt } from "@json-render/core";
|
|
5
5
|
import { defineRegistry as M, useBoundProp as b, JSONUIProvider as W, Renderer as B } from "@json-render/vue";
|
|
6
|
-
import { ActionProvider as Ot, JSONUIProvider as At, Renderer as
|
|
6
|
+
import { ActionProvider as Ot, JSONUIProvider as At, Renderer as kt, StateProvider as Pt, ValidationProvider as Ct, VisibilityProvider as It, defineRegistry as Rt, useActions as Kt, useBoundProp as Lt, useStateStore as Dt } from "@json-render/vue";
|
|
7
7
|
import { schema as H } from "@json-render/vue/schema";
|
|
8
|
-
import { schema as
|
|
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, InputGroup as te, ListItem as oe, CellStatus as ne, CellText as ie, DataTable as
|
|
10
|
+
import { LoadingArea as ee, InputGroup as te, ListItem as oe, CellStatus as ne, CellText as ie, DataTable as K, Dialog as ae, Badge as se, 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 Se, SectionTabs as $e, AppSidebar as je, AppToolbar as xe, PageHeader as Oe, PageContent as Ae, ResponsiveView as ke, AppLayout as Pe, AppRoot as Ce, getRegisteredIcon as Ie } from "./index.js";
|
|
11
11
|
const J = t.lazy(() => t.object({
|
|
12
12
|
key: t.string(),
|
|
13
13
|
label: t.string(),
|
|
@@ -16,13 +16,13 @@ const J = t.lazy(() => t.object({
|
|
|
16
16
|
disabled: t.boolean().optional(),
|
|
17
17
|
selectable: t.boolean().optional(),
|
|
18
18
|
children: t.array(J).optional()
|
|
19
|
-
})),
|
|
19
|
+
})), P = t.object({
|
|
20
20
|
label: t.string(),
|
|
21
21
|
value: t.string(),
|
|
22
22
|
disabled: t.boolean().optional()
|
|
23
|
-
}), Re =
|
|
23
|
+
}), Re = P.extend({
|
|
24
24
|
description: t.string().optional()
|
|
25
|
-
}),
|
|
25
|
+
}), L = t.object({
|
|
26
26
|
key: t.string(),
|
|
27
27
|
label: t.string(),
|
|
28
28
|
width: t.string().optional(),
|
|
@@ -91,7 +91,7 @@ const J = t.lazy(() => t.object({
|
|
|
91
91
|
Tabs: {
|
|
92
92
|
props: t.object({
|
|
93
93
|
value: t.string(),
|
|
94
|
-
items: t.array(
|
|
94
|
+
items: t.array(P),
|
|
95
95
|
ariaLabel: t.string().optional()
|
|
96
96
|
}),
|
|
97
97
|
events: ["change"],
|
|
@@ -144,7 +144,7 @@ const J = t.lazy(() => t.object({
|
|
|
144
144
|
Select: {
|
|
145
145
|
props: t.object({
|
|
146
146
|
value: t.string().optional(),
|
|
147
|
-
options: t.array(
|
|
147
|
+
options: t.array(P),
|
|
148
148
|
placeholder: t.string().optional(),
|
|
149
149
|
disabled: t.boolean().optional(),
|
|
150
150
|
search: t.boolean().optional()
|
|
@@ -249,13 +249,14 @@ const J = t.lazy(() => t.object({
|
|
|
249
249
|
tone: t.enum(["info", "success", "warning", "danger"]).optional(),
|
|
250
250
|
variant: t.enum(["soft", "inline"]).optional(),
|
|
251
251
|
title: t.string().optional(),
|
|
252
|
-
|
|
252
|
+
dismissible: t.boolean().optional(),
|
|
253
|
+
dismissKey: t.string().optional(),
|
|
253
254
|
code: t.string().optional(),
|
|
254
255
|
fill: t.boolean().optional()
|
|
255
256
|
}),
|
|
256
257
|
slots: ["default", "actions", "details"],
|
|
257
258
|
events: ["close"],
|
|
258
|
-
description: "A message that stays until its cause goes away: something to act on (a one-line title, at most one line of text, one action in `actions`) or a short risk note (`variant: inline`, longer text in `details` behind Learn more). A passing result such as Saved is a toast, not a Callout. Callout text has no closing period. Put a machine error code in `code`, not in the text."
|
|
259
|
+
description: "A message that stays until its cause goes away: something to act on (a one-line title, at most one line of text, one action in `actions`) or a short risk note (`variant: inline`, longer text in `details` behind Learn more). The reader can close it (default); it comes back when its text changes, and `dismissible: false` keeps only a blocking requirement in view. A passing result such as Saved is a toast, not a Callout. Callout text has no closing period. Put a machine error code in `code`, not in the text."
|
|
259
260
|
},
|
|
260
261
|
EmptyState: {
|
|
261
262
|
props: t.object({
|
|
@@ -298,7 +299,7 @@ const J = t.lazy(() => t.object({
|
|
|
298
299
|
},
|
|
299
300
|
DataTable: {
|
|
300
301
|
props: t.object({
|
|
301
|
-
columns: t.array(
|
|
302
|
+
columns: t.array(L),
|
|
302
303
|
rows: t.array(t.record(t.string(), t.unknown())),
|
|
303
304
|
rowKey: t.string().optional(),
|
|
304
305
|
emptyText: t.string().optional(),
|
|
@@ -309,7 +310,7 @@ const J = t.lazy(() => t.object({
|
|
|
309
310
|
},
|
|
310
311
|
ResourceList: {
|
|
311
312
|
props: t.object({
|
|
312
|
-
columns: t.array(
|
|
313
|
+
columns: t.array(L),
|
|
313
314
|
rows: t.array(t.record(t.string(), t.unknown())),
|
|
314
315
|
rowKey: t.string().optional(),
|
|
315
316
|
emptyText: t.string().optional(),
|
|
@@ -361,7 +362,7 @@ const J = t.lazy(() => t.object({
|
|
|
361
362
|
}, A = F(H, {
|
|
362
363
|
components: V,
|
|
363
364
|
actions: {}
|
|
364
|
-
}),
|
|
365
|
+
}), Ke = [
|
|
365
366
|
"Prefer AppRoot > AppShell > Page as the normal DSM application hierarchy.",
|
|
366
367
|
"Prefer SettingsSection and SettingsField for settings; prefer ResourceList/DataTable for ordinary scalar resource collections.",
|
|
367
368
|
"Keep state in the spec and use $bindState/$bindItem for editable controls; do not invent JavaScript in props.",
|
|
@@ -370,21 +371,21 @@ const J = t.lazy(() => t.object({
|
|
|
370
371
|
"AppShell adapts to its actual DSM window width: phone (<=600px), desktop window (601–1199px), and wide web/Portal (>=1200px). Never assume browser viewport width.",
|
|
371
372
|
"For a phone-unfriendly custom view, use ResponsiveView slots: mobile alternative and default full view. Keep essential actions accessible on mobile.",
|
|
372
373
|
"Use low-level Stack/Text only when a semantic component does not already express the layout."
|
|
373
|
-
],
|
|
374
|
+
], 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.';
|
|
374
375
|
function pt() {
|
|
375
|
-
return `${A.prompt({ customRules:
|
|
376
|
+
return `${A.prompt({ customRules: Ke })}
|
|
376
377
|
|
|
377
|
-
${
|
|
378
|
+
${Le}
|
|
378
379
|
`;
|
|
379
380
|
}
|
|
380
|
-
const
|
|
381
|
+
const De = {
|
|
381
382
|
none: "0",
|
|
382
383
|
xs: "var(--ui-space-1)",
|
|
383
384
|
sm: "var(--ui-space-2)",
|
|
384
385
|
md: "var(--ui-space-3)",
|
|
385
386
|
lg: "var(--ui-space-4)"
|
|
386
|
-
}, Ue = { start: "flex-start", center: "center", end: "flex-end", stretch: "stretch" },
|
|
387
|
-
function
|
|
387
|
+
}, Ue = { start: "flex-start", center: "center", end: "flex-end", stretch: "stretch" }, Te = { start: "flex-start", center: "center", end: "flex-end", between: "space-between" };
|
|
388
|
+
function Ne(e) {
|
|
388
389
|
return { default: () => e };
|
|
389
390
|
}
|
|
390
391
|
function C(e) {
|
|
@@ -402,14 +403,14 @@ function Ee(e) {
|
|
|
402
403
|
}
|
|
403
404
|
const Je = {
|
|
404
405
|
AppRoot: ({ props: e, slots: o }) => d(Ce, { modalScope: e.modalScope }, o),
|
|
405
|
-
AppShell: ({ props: e, slots: o }) => d(
|
|
406
|
+
AppShell: ({ props: e, slots: o }) => d(Pe, {
|
|
406
407
|
sidebarWidth: e.sidebarWidth,
|
|
407
408
|
minHeight: e.minHeight,
|
|
408
409
|
responsive: e.responsive,
|
|
409
410
|
wideLayout: e.wideLayout,
|
|
410
411
|
navigation: e.navigation
|
|
411
412
|
}, o),
|
|
412
|
-
ResponsiveView: ({ props: e, slots: o }) => d(
|
|
413
|
+
ResponsiveView: ({ props: e, slots: o }) => d(ke, { mode: e.mode }, o),
|
|
413
414
|
Page: ({ props: e, slots: o }) => d(Ae, { width: e.width ?? "fill", surface: e.surface }, o),
|
|
414
415
|
PageHeader: ({ props: e, slots: o }) => d(Oe, e, o),
|
|
415
416
|
Toolbar: ({ props: e, slots: o }) => d(xe, e, o),
|
|
@@ -442,9 +443,9 @@ const Je = {
|
|
|
442
443
|
style: {
|
|
443
444
|
display: "flex",
|
|
444
445
|
flexDirection: e.direction ?? "column",
|
|
445
|
-
gap:
|
|
446
|
+
gap: De[e.gap ?? "md"],
|
|
446
447
|
alignItems: Ue[e.align ?? "stretch"],
|
|
447
|
-
justifyContent:
|
|
448
|
+
justifyContent: Te[e.justify ?? "start"],
|
|
448
449
|
flexWrap: e.wrap ? "wrap" : "nowrap"
|
|
449
450
|
}
|
|
450
451
|
}, o),
|
|
@@ -577,7 +578,8 @@ const Je = {
|
|
|
577
578
|
tone: e.tone,
|
|
578
579
|
variant: e.variant,
|
|
579
580
|
title: e.title,
|
|
580
|
-
|
|
581
|
+
dismissible: e.dismissible,
|
|
582
|
+
dismissKey: e.dismissKey,
|
|
581
583
|
code: e.code,
|
|
582
584
|
fill: e.fill,
|
|
583
585
|
onClose: () => n("close")
|
|
@@ -588,7 +590,7 @@ const Je = {
|
|
|
588
590
|
icon: C(e.icon)
|
|
589
591
|
}, o),
|
|
590
592
|
Progress: ({ props: e }) => d(re, e),
|
|
591
|
-
Badge: ({ props: e }) => d(se, { tone: e.tone },
|
|
593
|
+
Badge: ({ props: e }) => d(se, { tone: e.tone }, Ne(e.text)),
|
|
592
594
|
Dialog: ({ props: e, bindings: o, slots: n, emit: a }) => {
|
|
593
595
|
const [i, s] = b(e.open, o?.open);
|
|
594
596
|
return d(ae, {
|
|
@@ -603,17 +605,17 @@ const Je = {
|
|
|
603
605
|
}
|
|
604
606
|
}, n);
|
|
605
607
|
},
|
|
606
|
-
DataTable: ({ props: e }) => d(
|
|
608
|
+
DataTable: ({ props: e }) => d(K, e),
|
|
607
609
|
ResourceList: ({ props: e, slots: o }) => d("section", { class: "min-w-0", "data-syno-pkg-land-ui": "", "data-ui-resource-list": "" }, [
|
|
608
610
|
o.toolbar ? d("div", { class: "mb-3 flex flex-wrap items-center gap-2" }, o.toolbar()) : null,
|
|
609
|
-
d(
|
|
611
|
+
d(K, e)
|
|
610
612
|
]),
|
|
611
613
|
CellText: ({ props: e, emit: o }) => d(ie, { ...e, onOpen: () => o("open") }),
|
|
612
614
|
CellStatus: ({ props: e }) => d(ne, e),
|
|
613
615
|
ListItem: ({ props: e, slots: o }) => d(oe, e, o),
|
|
614
616
|
InputGroup: ({ slots: e }) => d(te, null, e),
|
|
615
617
|
Loading: ({ props: e }) => d(ee, { text: e.text })
|
|
616
|
-
}, { registry:
|
|
618
|
+
}, { registry: D } = M(A, {
|
|
617
619
|
components: Je
|
|
618
620
|
}), ut = /* @__PURE__ */ G({
|
|
619
621
|
__name: "SynoJsonRenderer",
|
|
@@ -632,7 +634,7 @@ const Je = {
|
|
|
632
634
|
},
|
|
633
635
|
setup(e) {
|
|
634
636
|
return (o, n) => (X(), Y(j(W), {
|
|
635
|
-
registry: j(
|
|
637
|
+
registry: j(D),
|
|
636
638
|
store: e.store,
|
|
637
639
|
"initial-state": e.state ?? e.spec?.state ?? {},
|
|
638
640
|
handlers: e.handlers,
|
|
@@ -645,7 +647,7 @@ const Je = {
|
|
|
645
647
|
default: Q(() => [
|
|
646
648
|
Z(j(B), {
|
|
647
649
|
spec: e.spec,
|
|
648
|
-
registry: j(
|
|
650
|
+
registry: j(D),
|
|
649
651
|
loading: e.loading,
|
|
650
652
|
fallback: e.fallback
|
|
651
653
|
}, null, 8, ["spec", "registry", "loading", "fallback"])
|
|
@@ -654,8 +656,8 @@ const Je = {
|
|
|
654
656
|
}, 8, ["registry", "store", "initial-state", "handlers", "navigate", "functions", "directives", "validation-functions", "on-state-change"]));
|
|
655
657
|
}
|
|
656
658
|
}), Ve = ["label", "title", "description", "text", "placeholder", "emptyText", "help", "ariaLabel", "valueLabel", "searchPlaceholder"];
|
|
657
|
-
function
|
|
658
|
-
return Array.isArray(e) ? e : Object.entries(e).flatMap(([n, a]) => m(a) ?
|
|
659
|
+
function q(e, o = "") {
|
|
660
|
+
return Array.isArray(e) ? e : Object.entries(e).flatMap(([n, a]) => m(a) ? q(a, `${o}${n}.`) : [`${o}${n}`]);
|
|
659
661
|
}
|
|
660
662
|
const m = (e) => typeof e == "object" && e !== null && !Array.isArray(e), u = (...e) => e.map((o) => "/" + String(o).replaceAll("~", "~0").replaceAll("/", "~1")).join("");
|
|
661
663
|
function _e(e, o) {
|
|
@@ -678,8 +680,8 @@ function y(e, o) {
|
|
|
678
680
|
}
|
|
679
681
|
return n !== void 0 && a <= Math.max(2, Math.floor(e.length / 3)) ? n : void 0;
|
|
680
682
|
}
|
|
681
|
-
const
|
|
682
|
-
function
|
|
683
|
+
const qe = ["$state", "$item", "$index", "$bindState", "$bindItem", "$cond", "$computed", "$template"], ze = (e) => m(e) && qe.some((o) => Object.hasOwn(e, o)), I = (e) => ze(e) || (Array.isArray(e) ? e.some(I) : m(e) && Object.values(e).some(I));
|
|
684
|
+
function k(e) {
|
|
683
685
|
const o = e.props?.shape;
|
|
684
686
|
return m(o) ? o : void 0;
|
|
685
687
|
}
|
|
@@ -702,7 +704,7 @@ class Me {
|
|
|
702
704
|
function mt(e, o = {}) {
|
|
703
705
|
const n = o.catalog ?? A, a = n.data.components, i = new Me();
|
|
704
706
|
if (!m(e))
|
|
705
|
-
return i.error({ code: "invalid_spec", path: "", message: "A spec must be a JSON object.", hint: 'Return {"root": "<key>", "elements": {...}, "state": {...}}.' }),
|
|
707
|
+
return i.error({ code: "invalid_spec", path: "", message: "A spec must be a JSON object.", hint: 'Return {"root": "<key>", "elements": {...}, "state": {...}}.' }), T(i);
|
|
706
708
|
const s = m(e.elements) ? e.elements : void 0;
|
|
707
709
|
s || 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": []}}}.' });
|
|
708
710
|
const r = Object.keys(s ?? {});
|
|
@@ -727,7 +729,7 @@ function mt(e, o = {}) {
|
|
|
727
729
|
}
|
|
728
730
|
We(i, p, h, a[h], f.props), Be(i, p, h, a[h], f, s);
|
|
729
731
|
}
|
|
730
|
-
const c = o.messages &&
|
|
732
|
+
const c = o.messages && q(o.messages), l = {
|
|
731
733
|
issues: i,
|
|
732
734
|
components: a,
|
|
733
735
|
actions: [
|
|
@@ -740,7 +742,7 @@ function mt(e, o = {}) {
|
|
|
740
742
|
functions: o.functions || c ? [...o.functions ?? [], ...c ? ["t"] : []] : void 0,
|
|
741
743
|
messageKeys: c
|
|
742
744
|
};
|
|
743
|
-
return s && typeof e.root == "string" && Object.hasOwn(s, e.root) && He(l, e.root, s),
|
|
745
|
+
return s && typeof e.root == "string" && Object.hasOwn(s, e.root) && He(l, e.root, s), T(i);
|
|
744
746
|
}
|
|
745
747
|
function We(e, o, n, a, i) {
|
|
746
748
|
const s = (...l) => u("elements", o, "props", ...l);
|
|
@@ -748,7 +750,7 @@ function We(e, o, n, a, i) {
|
|
|
748
750
|
e.error({ code: "invalid_props", path: s(), elementKey: o, message: '"props" must be an object.', hint: 'Use "props": {} when the component needs none.' });
|
|
749
751
|
return;
|
|
750
752
|
}
|
|
751
|
-
const r =
|
|
753
|
+
const r = k(a);
|
|
752
754
|
if (!r) return;
|
|
753
755
|
const c = Object.keys(r);
|
|
754
756
|
for (const [l, p] of Object.entries(i)) {
|
|
@@ -779,7 +781,7 @@ function We(e, o, n, a, i) {
|
|
|
779
781
|
for (const l of c)
|
|
780
782
|
!Object.hasOwn(i, l) && !R(r[l]) && e.error({ code: "missing_prop", path: s(l), elementKey: o, message: `${n} requires prop "${l}".`, hint: `Run "syno-pkg-land-ui describe ${n}" for its type.` });
|
|
781
783
|
}
|
|
782
|
-
function
|
|
784
|
+
function z(e, o) {
|
|
783
785
|
const n = [];
|
|
784
786
|
if (Array.isArray(o.children) && o.children.forEach((a, i) => {
|
|
785
787
|
typeof a == "string" && n.push({ child: a, path: u("elements", e, "children", i) });
|
|
@@ -815,7 +817,7 @@ function Be(e, o, n, a, i, s) {
|
|
|
815
817
|
hint: f ? `Did you mean "${f}"?` : r.length ? v(`${n} slots`, r) : `${n} has no slots.`
|
|
816
818
|
});
|
|
817
819
|
}
|
|
818
|
-
for (const l of
|
|
820
|
+
for (const l of z(o, i))
|
|
819
821
|
if (!Object.hasOwn(s, l.child)) {
|
|
820
822
|
const p = y(l.child, Object.keys(s));
|
|
821
823
|
e.error({
|
|
@@ -836,7 +838,7 @@ function He(e, o, n) {
|
|
|
836
838
|
Qe(e, r, f, p || w);
|
|
837
839
|
const h = f.type === "AppRoot";
|
|
838
840
|
h && l && a.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." });
|
|
839
|
-
for (const g of
|
|
841
|
+
for (const g of z(r, f))
|
|
840
842
|
if (Object.hasOwn(n, g.child)) {
|
|
841
843
|
if (c.includes(g.child)) {
|
|
842
844
|
a.error({ code: "cycle", path: g.path, elementKey: r, message: `"${g.child}" is its own ancestor.`, hint: "Element references must form a tree." });
|
|
@@ -993,7 +995,7 @@ function U(e, o, n, a, i) {
|
|
|
993
995
|
}
|
|
994
996
|
});
|
|
995
997
|
}
|
|
996
|
-
function
|
|
998
|
+
function T(e) {
|
|
997
999
|
return { valid: e.errors.length === 0, errors: e.errors, warnings: e.warnings };
|
|
998
1000
|
}
|
|
999
1001
|
const x = V;
|
|
@@ -1021,7 +1023,7 @@ function ht() {
|
|
|
1021
1023
|
return Object.entries(x).map(([e, o]) => ({
|
|
1022
1024
|
name: e,
|
|
1023
1025
|
description: o.description,
|
|
1024
|
-
required: Object.entries(
|
|
1026
|
+
required: Object.entries(k(o) ?? {}).filter(([, n]) => !R(n)).map(([n]) => n),
|
|
1025
1027
|
slots: o.slots ?? [],
|
|
1026
1028
|
events: o.events ?? []
|
|
1027
1029
|
}));
|
|
@@ -1031,7 +1033,7 @@ function ft(e) {
|
|
|
1031
1033
|
}
|
|
1032
1034
|
function gt(e) {
|
|
1033
1035
|
if (!Object.hasOwn(x, e)) return;
|
|
1034
|
-
const o = x[e], n = Object.fromEntries(Object.entries(
|
|
1036
|
+
const o = x[e], n = Object.fromEntries(Object.entries(k(o) ?? {}).map(([a, i]) => [
|
|
1035
1037
|
a,
|
|
1036
1038
|
{ required: !R(i), schema: Ze(i) }
|
|
1037
1039
|
]));
|
|
@@ -1072,7 +1074,7 @@ const O = { type: "string", pattern: "^/" }, tt = {
|
|
|
1072
1074
|
preventDefault: { type: "boolean" }
|
|
1073
1075
|
},
|
|
1074
1076
|
additionalProperties: !1
|
|
1075
|
-
},
|
|
1077
|
+
}, N = { anyOf: [{ $ref: "#/$defs/actionBinding" }, { type: "array", items: { $ref: "#/$defs/actionBinding" } }] }, E = { type: "array", items: { type: "string" } };
|
|
1076
1078
|
function nt(e, o, n) {
|
|
1077
1079
|
const a = (r) => Array.isArray(r) ? r.map(a) : !r || typeof r != "object" ? r : Object.fromEntries(Object.entries(r).map(([c, l]) => [
|
|
1078
1080
|
c,
|
|
@@ -1083,7 +1085,7 @@ function nt(e, o, n) {
|
|
|
1083
1085
|
return a(s);
|
|
1084
1086
|
}
|
|
1085
1087
|
function it(e, o, n) {
|
|
1086
|
-
const a =
|
|
1088
|
+
const a = k(o), i = o.slots ?? [];
|
|
1087
1089
|
let s = { type: "object" };
|
|
1088
1090
|
if (a) {
|
|
1089
1091
|
const r = nt(t.toJSONSchema(t.object(a)), `${e}__`, n), c = r.properties;
|
|
@@ -1119,8 +1121,8 @@ function bt(e = A) {
|
|
|
1119
1121
|
children: E,
|
|
1120
1122
|
slots: { type: "object", additionalProperties: E },
|
|
1121
1123
|
visible: {},
|
|
1122
|
-
on: { type: "object", additionalProperties:
|
|
1123
|
-
watch: { type: "object", propertyNames: O, additionalProperties:
|
|
1124
|
+
on: { type: "object", additionalProperties: N },
|
|
1125
|
+
watch: { type: "object", propertyNames: O, additionalProperties: N },
|
|
1124
1126
|
repeat: { type: "object", required: ["statePath"], properties: { statePath: O, key: { type: "string" } }, additionalProperties: !1 }
|
|
1125
1127
|
},
|
|
1126
1128
|
additionalProperties: !1,
|
|
@@ -1142,8 +1144,8 @@ function bt(e = A) {
|
|
|
1142
1144
|
export {
|
|
1143
1145
|
Ot as ActionProvider,
|
|
1144
1146
|
At as JSONUIProvider,
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
+
kt as Renderer,
|
|
1148
|
+
Pt as StateProvider,
|
|
1147
1149
|
ut as SynoJsonRenderer,
|
|
1148
1150
|
Ct as ValidationProvider,
|
|
1149
1151
|
It as VisibilityProvider,
|
|
@@ -1152,18 +1154,18 @@ export {
|
|
|
1152
1154
|
jt as defineCatalog,
|
|
1153
1155
|
Rt as defineRegistry,
|
|
1154
1156
|
gt as describeSynoJsonComponent,
|
|
1155
|
-
|
|
1157
|
+
Tt as jsonRenderVueSchema,
|
|
1156
1158
|
ht as listSynoJsonComponents,
|
|
1157
1159
|
pt as synoJsonAiPrompt,
|
|
1158
|
-
|
|
1160
|
+
Ke as synoJsonAiRules,
|
|
1159
1161
|
A as synoJsonCatalog,
|
|
1160
1162
|
V as synoJsonComponentDefinitions,
|
|
1161
|
-
|
|
1163
|
+
D as synoJsonRegistry,
|
|
1162
1164
|
Je as synoJsonRenderers,
|
|
1163
1165
|
bt as synoJsonSchema,
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1166
|
+
Kt as useActions,
|
|
1167
|
+
Lt as useBoundProp,
|
|
1168
|
+
Dt as useStateStore,
|
|
1167
1169
|
mt as validateSynoJsonSpec,
|
|
1168
1170
|
vt as z
|
|
1169
1171
|
};
|
package/dist/reka-runtime.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"version": "2.10.5",
|
|
4
4
|
"delivery": "bundled-patched-esm",
|
|
5
5
|
"patchManifestSha256": "14f10159b60d48ac7a0686f58faf7a30e99898dc267b3c032cf2bdd6052dc52b",
|
|
6
|
-
"bundleSha256": "
|
|
6
|
+
"bundleSha256": "0ffe2746c038e8a2648f8a6b218ae43230968f70734ff4ba66dc6f5910881eb3",
|
|
7
7
|
"sourceHashes": {
|
|
8
8
|
"shared/useBodyScrollLock.js": "657592f283cb6fd25454abd284a0024af21936cb56e05b762ff0d22b6a979d32",
|
|
9
9
|
"DismissableLayer/DismissableLayer.js": "da05ca544d9822a8e2b71057e78c0e1ef59423aa3893534338fb58e1ecbd1a8d",
|
package/dist/rich-text.js
CHANGED
|
@@ -190,7 +190,7 @@ function nt(a, o, i) {
|
|
|
190
190
|
}
|
|
191
191
|
return u.join(i);
|
|
192
192
|
}
|
|
193
|
-
function wa(a, o
|
|
193
|
+
function wa(a, o) {
|
|
194
194
|
switch (a.type) {
|
|
195
195
|
case "paragraph":
|
|
196
196
|
return _e(a.content ?? [], o);
|
|
@@ -203,13 +203,13 @@ function wa(a, o, i) {
|
|
|
203
203
|
return nt(a.content ?? [], "", `
|
|
204
204
|
|
|
205
205
|
`).split(`
|
|
206
|
-
`).map((
|
|
206
|
+
`).map((i) => i ? `> ${i}` : ">").join(`
|
|
207
207
|
`);
|
|
208
208
|
case "codeBlock": {
|
|
209
|
-
const
|
|
210
|
-
return `${
|
|
211
|
-
${
|
|
212
|
-
${
|
|
209
|
+
const i = (a.content ?? []).map((n) => n.text ?? "").join(""), u = "`".repeat(Math.max(2, ...Array.from(i.matchAll(/`+/g), (n) => n[0].length)) + 1);
|
|
210
|
+
return `${u}
|
|
211
|
+
${i}
|
|
212
|
+
${u}`;
|
|
213
213
|
}
|
|
214
214
|
case "fileImage":
|
|
215
215
|
return a.attrs?.id ? lt(a) : null;
|