@synopackageland/ui 0.14.9 → 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/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 Dt, useBoundProp as Kt, useStateStore as Lt } 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 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 D, 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";
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
- }), K = t.object({
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: "Inline information, success, warning or error message. Put a machine error code in `code`, not in the text."
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(K),
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(K),
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
- }), De = [
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
- ], Ke = '## 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.';
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: De })}
375
+ return `${A.prompt({ customRules: Le })}
374
376
 
375
- ${Ke}
377
+ ${De}
376
378
  `;
377
379
  }
378
- const Le = {
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: Le[e.gap ?? "md"],
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(D, e),
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(D, e)
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: L } = M(A, {
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(L),
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(L),
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
- De as synoJsonAiRules,
1158
+ Le as synoJsonAiRules,
1155
1159
  A as synoJsonCatalog,
1156
1160
  V as synoJsonComponentDefinitions,
1157
- L as synoJsonRegistry,
1161
+ K as synoJsonRegistry,
1158
1162
  Je as synoJsonRenderers,
1159
1163
  bt as synoJsonSchema,
1160
- Dt as useActions,
1161
- Kt as useBoundProp,
1162
- Lt as useStateStore,
1164
+ Lt as useActions,
1165
+ Dt as useBoundProp,
1166
+ Kt as useStateStore,
1163
1167
  mt as validateSynoJsonSpec,
1164
1168
  vt as z
1165
1169
  };
@@ -3,7 +3,7 @@
3
3
  "version": "2.10.5",
4
4
  "delivery": "bundled-patched-esm",
5
5
  "patchManifestSha256": "14f10159b60d48ac7a0686f58faf7a30e99898dc267b3c032cf2bdd6052dc52b",
6
- "bundleSha256": "52e3a1467592c4c601118becdd6c7bacaa68d5a777758af8acb9958e0a22ad6c",
6
+ "bundleSha256": "1bcaf322c85f4ae9454740d0d88b123b81366d65e75505432a630c641117cf5e",
7
7
  "sourceHashes": {
8
8
  "shared/useBodyScrollLock.js": "657592f283cb6fd25454abd284a0024af21936cb56e05b762ff0d22b6a979d32",
9
9
  "DismissableLayer/DismissableLayer.js": "da05ca544d9822a8e2b71057e78c0e1ef59423aa3893534338fb58e1ecbd1a8d",