@synopackageland/ui 0.14.8 → 0.14.10
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 +16 -0
- package/README.md +5 -1
- package/dist/components/composite/callout/Callout.vue.d.ts +22 -4
- package/dist/components/composite/tree-view/TreeView.vue.d.ts +2 -2
- package/dist/components/containers/card/Card.vue.d.ts +1 -1
- package/dist/components/containers/expandable-item/ExpandableItem.vue.d.ts +1 -1
- package/dist/i18n/text.d.ts +2 -0
- package/dist/index.js +3740 -3695
- package/dist/json/catalog.d.ts +10 -0
- package/dist/json/registry.d.ts +170 -0
- package/dist/json-ai-prompt.md +1 -1
- package/dist/json-catalog.schema.json +27 -2
- package/dist/json-preview/preview.js +6916 -6817
- package/dist/json.js +28 -24
- package/dist/reka-runtime.json +1 -1
- 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/button-policy.md +3 -0
- package/docs/callout.md +123 -0
- package/docs/color-system.md +3 -3
- package/docs/layout-rules.md +1 -0
- package/docs/theme-hooks.md +9 -0
- package/package.json +2 -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 Pt, StateProvider as kt, ValidationProvider as Ct, VisibilityProvider as It, defineRegistry as Rt, useActions as
|
|
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 Lt, useBoundProp as Dt, useStateStore as Kt } from "@json-render/vue";
|
|
7
7
|
import { schema as H } from "@json-render/vue/schema";
|
|
8
8
|
import { schema as Nt } 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 L, 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 Pe, AppLayout as ke, 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(),
|
|
@@ -22,7 +22,7 @@ const J = t.lazy(() => t.object({
|
|
|
22
22
|
disabled: t.boolean().optional()
|
|
23
23
|
}), Re = k.extend({
|
|
24
24
|
description: t.string().optional()
|
|
25
|
-
}),
|
|
25
|
+
}), D = t.object({
|
|
26
26
|
key: t.string(),
|
|
27
27
|
label: t.string(),
|
|
28
28
|
width: t.string().optional(),
|
|
@@ -247,13 +247,15 @@ const J = t.lazy(() => t.object({
|
|
|
247
247
|
Callout: {
|
|
248
248
|
props: t.object({
|
|
249
249
|
tone: t.enum(["info", "success", "warning", "danger"]).optional(),
|
|
250
|
+
variant: t.enum(["soft", "inline"]).optional(),
|
|
250
251
|
title: t.string().optional(),
|
|
251
252
|
closable: t.boolean().optional(),
|
|
252
|
-
code: t.string().optional()
|
|
253
|
+
code: t.string().optional(),
|
|
254
|
+
fill: t.boolean().optional()
|
|
253
255
|
}),
|
|
254
|
-
slots: ["default", "actions"],
|
|
256
|
+
slots: ["default", "actions", "details"],
|
|
255
257
|
events: ["close"],
|
|
256
|
-
description: "
|
|
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."
|
|
257
259
|
},
|
|
258
260
|
EmptyState: {
|
|
259
261
|
props: t.object({
|
|
@@ -296,7 +298,7 @@ const J = t.lazy(() => t.object({
|
|
|
296
298
|
},
|
|
297
299
|
DataTable: {
|
|
298
300
|
props: t.object({
|
|
299
|
-
columns: t.array(
|
|
301
|
+
columns: t.array(D),
|
|
300
302
|
rows: t.array(t.record(t.string(), t.unknown())),
|
|
301
303
|
rowKey: t.string().optional(),
|
|
302
304
|
emptyText: t.string().optional(),
|
|
@@ -307,7 +309,7 @@ const J = t.lazy(() => t.object({
|
|
|
307
309
|
},
|
|
308
310
|
ResourceList: {
|
|
309
311
|
props: t.object({
|
|
310
|
-
columns: t.array(
|
|
312
|
+
columns: t.array(D),
|
|
311
313
|
rows: t.array(t.record(t.string(), t.unknown())),
|
|
312
314
|
rowKey: t.string().optional(),
|
|
313
315
|
emptyText: t.string().optional(),
|
|
@@ -359,7 +361,7 @@ const J = t.lazy(() => t.object({
|
|
|
359
361
|
}, A = F(H, {
|
|
360
362
|
components: V,
|
|
361
363
|
actions: {}
|
|
362
|
-
}),
|
|
364
|
+
}), Le = [
|
|
363
365
|
"Prefer AppRoot > AppShell > Page as the normal DSM application hierarchy.",
|
|
364
366
|
"Prefer SettingsSection and SettingsField for settings; prefer ResourceList/DataTable for ordinary scalar resource collections.",
|
|
365
367
|
"Keep state in the spec and use $bindState/$bindItem for editable controls; do not invent JavaScript in props.",
|
|
@@ -368,14 +370,14 @@ const J = t.lazy(() => t.object({
|
|
|
368
370
|
"AppShell adapts to its actual DSM window width: phone (<=600px), desktop window (601–1199px), and wide web/Portal (>=1200px). Never assume browser viewport width.",
|
|
369
371
|
"For a phone-unfriendly custom view, use ResponsiveView slots: mobile alternative and default full view. Keep essential actions accessible on mobile.",
|
|
370
372
|
"Use low-level Stack/Text only when a semantic component does not already express the layout."
|
|
371
|
-
],
|
|
373
|
+
], De = '## 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.';
|
|
372
374
|
function pt() {
|
|
373
|
-
return `${A.prompt({ customRules:
|
|
375
|
+
return `${A.prompt({ customRules: Le })}
|
|
374
376
|
|
|
375
|
-
${
|
|
377
|
+
${De}
|
|
376
378
|
`;
|
|
377
379
|
}
|
|
378
|
-
const
|
|
380
|
+
const Ke = {
|
|
379
381
|
none: "0",
|
|
380
382
|
xs: "var(--ui-space-1)",
|
|
381
383
|
sm: "var(--ui-space-2)",
|
|
@@ -440,7 +442,7 @@ const Je = {
|
|
|
440
442
|
style: {
|
|
441
443
|
display: "flex",
|
|
442
444
|
flexDirection: e.direction ?? "column",
|
|
443
|
-
gap:
|
|
445
|
+
gap: Ke[e.gap ?? "md"],
|
|
444
446
|
alignItems: Ue[e.align ?? "stretch"],
|
|
445
447
|
justifyContent: Ne[e.justify ?? "start"],
|
|
446
448
|
flexWrap: e.wrap ? "wrap" : "nowrap"
|
|
@@ -573,9 +575,11 @@ const Je = {
|
|
|
573
575
|
},
|
|
574
576
|
Callout: ({ props: e, slots: o, emit: n }) => d(ce, {
|
|
575
577
|
tone: e.tone,
|
|
578
|
+
variant: e.variant,
|
|
576
579
|
title: e.title,
|
|
577
580
|
closable: e.closable,
|
|
578
581
|
code: e.code,
|
|
582
|
+
fill: e.fill,
|
|
579
583
|
onClose: () => n("close")
|
|
580
584
|
}, o),
|
|
581
585
|
EmptyState: ({ props: e, slots: o }) => d(le, {
|
|
@@ -599,17 +603,17 @@ const Je = {
|
|
|
599
603
|
}
|
|
600
604
|
}, n);
|
|
601
605
|
},
|
|
602
|
-
DataTable: ({ props: e }) => d(
|
|
606
|
+
DataTable: ({ props: e }) => d(L, e),
|
|
603
607
|
ResourceList: ({ props: e, slots: o }) => d("section", { class: "min-w-0", "data-syno-pkg-land-ui": "", "data-ui-resource-list": "" }, [
|
|
604
608
|
o.toolbar ? d("div", { class: "mb-3 flex flex-wrap items-center gap-2" }, o.toolbar()) : null,
|
|
605
|
-
d(
|
|
609
|
+
d(L, e)
|
|
606
610
|
]),
|
|
607
611
|
CellText: ({ props: e, emit: o }) => d(ie, { ...e, onOpen: () => o("open") }),
|
|
608
612
|
CellStatus: ({ props: e }) => d(ne, e),
|
|
609
613
|
ListItem: ({ props: e, slots: o }) => d(oe, e, o),
|
|
610
614
|
InputGroup: ({ slots: e }) => d(te, null, e),
|
|
611
615
|
Loading: ({ props: e }) => d(ee, { text: e.text })
|
|
612
|
-
}, { registry:
|
|
616
|
+
}, { registry: K } = M(A, {
|
|
613
617
|
components: Je
|
|
614
618
|
}), ut = /* @__PURE__ */ G({
|
|
615
619
|
__name: "SynoJsonRenderer",
|
|
@@ -628,7 +632,7 @@ const Je = {
|
|
|
628
632
|
},
|
|
629
633
|
setup(e) {
|
|
630
634
|
return (o, n) => (X(), Y(j(W), {
|
|
631
|
-
registry: j(
|
|
635
|
+
registry: j(K),
|
|
632
636
|
store: e.store,
|
|
633
637
|
"initial-state": e.state ?? e.spec?.state ?? {},
|
|
634
638
|
handlers: e.handlers,
|
|
@@ -641,7 +645,7 @@ const Je = {
|
|
|
641
645
|
default: Q(() => [
|
|
642
646
|
Z(j(B), {
|
|
643
647
|
spec: e.spec,
|
|
644
|
-
registry: j(
|
|
648
|
+
registry: j(K),
|
|
645
649
|
loading: e.loading,
|
|
646
650
|
fallback: e.fallback
|
|
647
651
|
}, null, 8, ["spec", "registry", "loading", "fallback"])
|
|
@@ -1151,15 +1155,15 @@ export {
|
|
|
1151
1155
|
Nt as jsonRenderVueSchema,
|
|
1152
1156
|
ht as listSynoJsonComponents,
|
|
1153
1157
|
pt as synoJsonAiPrompt,
|
|
1154
|
-
|
|
1158
|
+
Le as synoJsonAiRules,
|
|
1155
1159
|
A as synoJsonCatalog,
|
|
1156
1160
|
V as synoJsonComponentDefinitions,
|
|
1157
|
-
|
|
1161
|
+
K as synoJsonRegistry,
|
|
1158
1162
|
Je as synoJsonRenderers,
|
|
1159
1163
|
bt as synoJsonSchema,
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1164
|
+
Lt as useActions,
|
|
1165
|
+
Dt as useBoundProp,
|
|
1166
|
+
Kt as useStateStore,
|
|
1163
1167
|
mt as validateSynoJsonSpec,
|
|
1164
1168
|
vt as z
|
|
1165
1169
|
};
|
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": "1bcaf322c85f4ae9454740d0d88b123b81366d65e75505432a630c641117cf5e",
|
|
7
7
|
"sourceHashes": {
|
|
8
8
|
"shared/useBodyScrollLock.js": "657592f283cb6fd25454abd284a0024af21936cb56e05b762ff0d22b6a979d32",
|
|
9
9
|
"DismissableLayer/DismissableLayer.js": "da05ca544d9822a8e2b71057e78c0e1ef59423aa3893534338fb58e1ecbd1a8d",
|