@bysages/solid 0.4.1 → 0.4.2

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 (96) hide show
  1. package/dist/components/ai-prompt-input/index.mjs +37 -35
  2. package/dist/components/angle-slider/index.d.mts +15 -1
  3. package/dist/components/angle-slider/index.mjs +57 -2
  4. package/dist/components/calendar/index.d.mts +19 -7
  5. package/dist/components/calendar/index.mjs +212 -138
  6. package/dist/components/carousel/index.d.mts +15 -1
  7. package/dist/components/carousel/index.mjs +68 -4
  8. package/dist/components/checkbox/index.d.mts +16 -1
  9. package/dist/components/checkbox/index.mjs +53 -2
  10. package/dist/components/checkbox-group/index.d.mts +10 -3
  11. package/dist/components/checkbox-group/index.mjs +2 -2
  12. package/dist/components/chip/index.d.mts +1 -1
  13. package/dist/components/clipboard/index.d.mts +14 -1
  14. package/dist/components/clipboard/index.mjs +57 -2
  15. package/dist/components/date-input/index.d.mts +16 -2
  16. package/dist/components/date-input/index.mjs +51 -2
  17. package/dist/components/date-picker/index.d.mts +27 -2
  18. package/dist/components/date-picker/index.mjs +152 -3
  19. package/dist/components/editable/index.d.mts +17 -1
  20. package/dist/components/editable/index.mjs +80 -2
  21. package/dist/components/field/index.d.mts +16 -1
  22. package/dist/components/field/index.mjs +52 -4
  23. package/dist/components/fieldset/index.d.mts +15 -3
  24. package/dist/components/fieldset/index.mjs +46 -4
  25. package/dist/components/file-upload/index.d.mts +21 -1
  26. package/dist/components/file-upload/index.mjs +65 -2
  27. package/dist/components/floating-panel/index.d.mts +15 -3
  28. package/dist/components/floating-panel/index.mjs +112 -4
  29. package/dist/components/form/index.d.mts +44 -2
  30. package/dist/components/image-cropper/index.d.mts +8 -1
  31. package/dist/components/image-cropper/index.mjs +42 -4
  32. package/dist/components/json-tree-view/index.d.mts +11 -2
  33. package/dist/components/json-tree-view/index.mjs +16 -1
  34. package/dist/components/listbox/index.d.mts +21 -1
  35. package/dist/components/listbox/index.mjs +58 -3
  36. package/dist/components/marquee/index.d.mts +12 -1
  37. package/dist/components/marquee/index.mjs +45 -4
  38. package/dist/components/navigation-menu/index.d.mts +17 -1
  39. package/dist/components/navigation-menu/index.mjs +65 -5
  40. package/dist/components/number-input/index.d.mts +20 -1
  41. package/dist/components/number-input/index.mjs +71 -2
  42. package/dist/components/pagination/index.d.mts +22 -2
  43. package/dist/components/pagination/index.mjs +104 -5
  44. package/dist/components/password-input/index.d.mts +18 -1
  45. package/dist/components/password-input/index.mjs +56 -2
  46. package/dist/components/pin-input/index.d.mts +18 -1
  47. package/dist/components/pin-input/index.mjs +54 -2
  48. package/dist/components/progress/index.d.mts +19 -1
  49. package/dist/components/progress/index.mjs +105 -6
  50. package/dist/components/qr-code/index.d.mts +8 -1
  51. package/dist/components/qr-code/index.mjs +21 -4
  52. package/dist/components/radio-group/index.d.mts +23 -1
  53. package/dist/components/radio-group/index.mjs +65 -2
  54. package/dist/components/rating-group/index.d.mts +15 -1
  55. package/dist/components/rating-group/index.mjs +51 -2
  56. package/dist/components/scroll-area/index.d.mts +11 -3
  57. package/dist/components/scroll-area/index.mjs +36 -4
  58. package/dist/components/segment-group/index.d.mts +27 -4
  59. package/dist/components/segment-group/index.mjs +65 -6
  60. package/dist/components/signature-pad/index.d.mts +16 -1
  61. package/dist/components/signature-pad/index.mjs +63 -4
  62. package/dist/components/slider/index.d.mts +20 -1
  63. package/dist/components/slider/index.mjs +66 -2
  64. package/dist/components/splitter/index.d.mts +15 -1
  65. package/dist/components/splitter/index.mjs +57 -4
  66. package/dist/components/steps/index.d.mts +5 -1
  67. package/dist/components/steps/index.mjs +9 -2
  68. package/dist/components/swap/index.d.mts +11 -3
  69. package/dist/components/swap/index.mjs +34 -4
  70. package/dist/components/switch/index.d.mts +16 -1
  71. package/dist/components/switch/index.mjs +47 -2
  72. package/dist/components/table/index.d.mts +2 -0
  73. package/dist/components/table/index.mjs +13 -11
  74. package/dist/components/tag/index.d.mts +29 -0
  75. package/dist/components/tag/index.mjs +108 -0
  76. package/dist/components/tags-input/index.d.mts +18 -1
  77. package/dist/components/tags-input/index.mjs +82 -2
  78. package/dist/components/timer/index.d.mts +12 -1
  79. package/dist/components/timer/index.mjs +56 -4
  80. package/dist/components/toast/index.d.mts +10 -5
  81. package/dist/components/toast/index.mjs +37 -5
  82. package/dist/components/toc/index.d.mts +2 -11
  83. package/dist/components/toc/index.mjs +1 -1
  84. package/dist/components/toggle/index.d.mts +8 -1
  85. package/dist/components/toggle/index.mjs +26 -4
  86. package/dist/components/toggle-group/index.d.mts +23 -1
  87. package/dist/components/toggle-group/index.mjs +57 -3
  88. package/dist/components/tree-view/index.d.mts +32 -2
  89. package/dist/components/tree-view/index.mjs +93 -4
  90. package/dist/index-BU5U5w04.d.mts +35 -0
  91. package/dist/index.d.mts +43 -42
  92. package/dist/index.mjs +3 -2
  93. package/dist/toc-DRHr8_eD.mjs +88 -0
  94. package/package.json +2 -2
  95. package/dist/index-B1-quIrl.d.mts +0 -1815
  96. package/dist/toc-CqvGOp34.mjs +0 -31
@@ -1,19 +1,61 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
2
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
+ import { createComponent, memo } from "@solidjs/web";
3
4
  import { injectComponentStyle } from "@bysages/core/styling";
4
- import { createComponent, mergeProps } from "solid-js";
5
+ import { Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
5
6
  import { Fieldset as Fieldset$1 } from "@ark-ui/solid/fieldset";
6
- //#region src/components/fieldset/index.ts
7
+ //#region src/components/fieldset/index.tsx
7
8
  /** Ark's Fieldset, dressed in the paper-and-ink system: a song-serif
8
9
  * legend heading a column of fields. The API is Ark's own — Root, Legend,
9
10
  * HelperText, ErrorText. */
10
11
  function FieldsetRoot(props) {
11
12
  const id = useElementId("fieldset", () => props.id);
12
- return createComponent(Fieldset$1.Root, mergeProps(props, { get id() {
13
+ return createComponent$1(Fieldset$1.Root, mergeProps$1(props, { get id() {
13
14
  return id();
14
15
  } }));
15
16
  }
16
- const Fieldset = defineFamily(FieldsetRoot, {
17
+ function FieldsetFacade(props) {
18
+ injectComponentStyle("fieldset");
19
+ return createComponent(FieldsetRoot, {
20
+ get disabled() {
21
+ return props.disabled;
22
+ },
23
+ get invalid() {
24
+ return props.invalid;
25
+ },
26
+ get "data-required"() {
27
+ return props.required || void 0;
28
+ },
29
+ get children() {
30
+ return [
31
+ createComponent(Show, {
32
+ get when() {
33
+ return props.label;
34
+ },
35
+ get children() {
36
+ return createComponent(Fieldset$1.Legend, { get children() {
37
+ return props.label;
38
+ } });
39
+ }
40
+ }),
41
+ memo(() => {
42
+ return props.children;
43
+ }),
44
+ createComponent(Show, {
45
+ get when() {
46
+ return props.description;
47
+ },
48
+ get children() {
49
+ return createComponent(Fieldset$1.HelperText, { get children() {
50
+ return props.description;
51
+ } });
52
+ }
53
+ })
54
+ ];
55
+ }
56
+ });
57
+ }
58
+ const Fieldset = defineFamily(FieldsetFacade, {
17
59
  ...Fieldset$1,
18
60
  Root: FieldsetRoot
19
61
  });
@@ -1,5 +1,10 @@
1
+ import { ComponentProps } from "solid-js";
1
2
  import { FileUpload as FileUpload$1, FileUploadRootProps } from "@ark-ui/solid/file-upload";
2
3
  //#region src/components/file-upload/index.d.ts
4
+ /** The inner trigger repeats the click binding the dropzone already
5
+ * owns: keyboard users enter through the dropzone, so the button
6
+ * leaves the tab order and the semantic tree entirely. */
7
+ declare function FileUploadTrigger(props: ComponentProps<typeof FileUpload$1.Trigger>): import("solid-js").JSX.Element;
3
8
  /** Ark's FileUpload, dressed in the paper-and-ink system: a dashed
4
9
  * dropzone that floods with subtle light on drag-over, and accepted files
5
10
  * as loose hairline slips. The API is Ark's own — Root, Label, Trigger,
@@ -11,7 +16,22 @@ type FileUploadOwnProps = {
11
16
  size?: "sm" | "md" | "lg";
12
17
  };
13
18
  declare function FileUploadRoot(props: FileUploadRootProps & FileUploadOwnProps): import("solid-js").JSX.Element;
14
- export declare const FileUpload: typeof FileUploadRoot & Omit<typeof FileUpload$1, "Root"> & {
19
+ /** The one-tag path: a labelled dropzone and its accepted slips; MIME
20
+ * rules, directories, and controlled files stay on the anatomy. */
21
+ export interface FileUploadFacadeProps {
22
+ label?: string;
23
+ placeholder?: string;
24
+ disabled?: boolean;
25
+ invalid?: boolean;
26
+ required?: boolean;
27
+ maxFiles?: number;
28
+ /** One rung of the control-height ladder for the trigger. */
29
+ size?: "sm" | "md" | "lg";
30
+ }
31
+ declare function FileUploadFacade(props: FileUploadFacadeProps): import("solid-js").JSX.Element;
32
+ type FileUploadParts = Omit<typeof FileUpload$1, "Root" | "Trigger"> & {
15
33
  Root: typeof FileUploadRoot;
34
+ Trigger: typeof FileUploadTrigger;
16
35
  };
36
+ export declare const FileUpload: typeof FileUploadFacade & FileUploadParts;
17
37
  //#endregion
@@ -1,8 +1,9 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
+ import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
2
3
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
4
  import { createComponent, mergeProps } from "@solidjs/web";
4
5
  import { injectComponentStyle } from "@bysages/core/styling";
5
- import { splitProps } from "solid-js";
6
+ import { For, Show, splitProps } from "solid-js";
6
7
  import { FileUpload as FileUpload$1 } from "@ark-ui/solid/file-upload";
7
8
  //#region src/components/file-upload/index.tsx
8
9
  /** The inner trigger repeats the click binding the dropzone already
@@ -26,7 +27,69 @@ function FileUploadRoot(props) {
26
27
  }
27
28
  }));
28
29
  }
29
- const FileUpload = defineFamily(FileUploadRoot, {
30
+ function FileUploadFacade(props) {
31
+ injectComponentStyle("file-upload");
32
+ return createComponent(FileUploadRoot, {
33
+ get size() {
34
+ return props.size ?? "md";
35
+ },
36
+ get disabled() {
37
+ return props.disabled;
38
+ },
39
+ get invalid() {
40
+ return props.invalid;
41
+ },
42
+ get required() {
43
+ return props.required;
44
+ },
45
+ get maxFiles() {
46
+ return props.maxFiles;
47
+ },
48
+ get children() {
49
+ return [
50
+ createComponent(Show, {
51
+ get when() {
52
+ return props.label;
53
+ },
54
+ get children() {
55
+ return createComponent(FileUpload$1.Label, { get children() {
56
+ return props.label;
57
+ } });
58
+ }
59
+ }),
60
+ createComponent(FileUpload$1.Dropzone, { get children() {
61
+ return createComponent(FileUploadTrigger, { get children() {
62
+ return props.placeholder ?? "Choose files";
63
+ } });
64
+ } }),
65
+ createComponent(FileUpload$1.ItemGroup, { get children() {
66
+ return createComponent(FileUpload$1.Context, { children: (context) => createComponent(For, {
67
+ get each() {
68
+ return context().acceptedFiles;
69
+ },
70
+ children: (file) => createComponent(FileUpload$1.Item, {
71
+ file,
72
+ get children() {
73
+ return [
74
+ createComponent(FileUpload$1.ItemPreview, { get children() {
75
+ return iconNode("file");
76
+ } }),
77
+ createComponent(FileUpload$1.ItemName, {}),
78
+ createComponent(FileUpload$1.ItemSizeText, {}),
79
+ createComponent(FileUpload$1.ItemDeleteTrigger, { get children() {
80
+ return iconNode("x");
81
+ } })
82
+ ];
83
+ }
84
+ })
85
+ }) });
86
+ } }),
87
+ createComponent(FileUpload$1.HiddenInput, {})
88
+ ];
89
+ }
90
+ });
91
+ }
92
+ const FileUpload = defineFamily(FileUploadFacade, {
30
93
  ...FileUpload$1,
31
94
  Root: FileUploadRoot,
32
95
  Trigger: FileUploadTrigger
@@ -1,4 +1,4 @@
1
- import { ComponentProps } from "solid-js";
1
+ import { ComponentProps, JSX } from "solid-js";
2
2
  import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
3
3
  //#region src/components/floating-panel/index.d.ts
4
4
  /** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
@@ -6,8 +6,20 @@ import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
6
6
  * handle. The API is Ark's own — Root, Trigger, Positioner, Content, Header,
7
7
  * Title, Control, DragTrigger, StageTrigger, CloseTrigger, ResizeTrigger,
8
8
  * Body. */
9
- declare function FloatingPanelRoot(props: ComponentProps<typeof FloatingPanel$1.Root>): import("solid-js").JSX.Element;
10
- export declare const FloatingPanel: typeof FloatingPanelRoot & Omit<typeof FloatingPanel$1, "Root"> & {
9
+ declare function FloatingPanelRoot(props: ComponentProps<typeof FloatingPanel$1.Root>): JSX.Element;
10
+ export interface FloatingPanelFacadeProps {
11
+ open?: boolean;
12
+ defaultOpen?: boolean;
13
+ trigger?: string;
14
+ content?: string;
15
+ label: string;
16
+ description?: string;
17
+ disabled?: boolean;
18
+ children?: JSX.Element;
19
+ onOpenChange?: (open: boolean) => void;
20
+ }
21
+ declare function FloatingPanelFacade(props: FloatingPanelFacadeProps): JSX.Element;
22
+ export declare const FloatingPanel: typeof FloatingPanelFacade & Omit<typeof FloatingPanel$1, "Root"> & {
11
23
  Root: typeof FloatingPanelRoot;
12
24
  };
13
25
  //#endregion
@@ -1,9 +1,12 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
+ import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
2
3
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
4
+ import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
3
5
  import { injectComponentStyle } from "@bysages/core/styling";
4
- import { createComponent, mergeProps } from "solid-js";
6
+ import { For, Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
5
7
  import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
6
- //#region src/components/floating-panel/index.ts
8
+ //#region src/components/floating-panel/index.tsx
9
+ var _tmpl$ = /* @__PURE__ */ template(`<p>`);
7
10
  /** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
8
11
  * popup vessel let loose — a draggable, resizable sheet whose header is the
9
12
  * handle. The API is Ark's own — Root, Trigger, Positioner, Content, Header,
@@ -11,11 +14,116 @@ import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
11
14
  * Body. */
12
15
  function FloatingPanelRoot(props) {
13
16
  const id = useElementId("floating-panel", () => props.id);
14
- return createComponent(FloatingPanel$1.Root, mergeProps(props, { get id() {
17
+ return createComponent$1(FloatingPanel$1.Root, mergeProps$1(props, { get id() {
15
18
  return id();
16
19
  } }));
17
20
  }
18
- const FloatingPanel = defineFamily(FloatingPanelRoot, {
21
+ const resizeAxes = [
22
+ "n",
23
+ "e",
24
+ "s",
25
+ "w",
26
+ "ne",
27
+ "se",
28
+ "sw",
29
+ "nw"
30
+ ];
31
+ function FloatingPanelFacade(props) {
32
+ injectComponentStyle("floating-panel");
33
+ return createComponent(FloatingPanelRoot, mergeProps(() => {
34
+ return props.open === void 0 ? {} : { open: props.open };
35
+ }, () => {
36
+ return props.defaultOpen === void 0 ? {} : { defaultOpen: props.defaultOpen };
37
+ }, {
38
+ get disabled() {
39
+ return props.disabled;
40
+ },
41
+ onOpenChange: (details) => props.onOpenChange?.(details.open),
42
+ get children() {
43
+ return [createComponent(FloatingPanel$1.Trigger, { get children() {
44
+ return props.trigger ?? props.label;
45
+ } }), createComponent(FloatingPanel$1.Positioner, { get children() {
46
+ return createComponent(FloatingPanel$1.Content, { get children() {
47
+ return [
48
+ createComponent(FloatingPanel$1.DragTrigger, { get children() {
49
+ return createComponent(FloatingPanel$1.Header, { get children() {
50
+ return [createComponent(FloatingPanel$1.Title, { get children() {
51
+ return props.label;
52
+ } }), createComponent(FloatingPanel$1.Control, { get children() {
53
+ return [
54
+ createComponent(FloatingPanel$1.StageTrigger, {
55
+ stage: "minimized",
56
+ get children() {
57
+ return iconNode("minus");
58
+ }
59
+ }),
60
+ createComponent(FloatingPanel$1.StageTrigger, {
61
+ stage: "maximized",
62
+ get children() {
63
+ return iconNode("maximize-2");
64
+ }
65
+ }),
66
+ createComponent(FloatingPanel$1.StageTrigger, {
67
+ stage: "default",
68
+ "aria-label": "Restore",
69
+ get children() {
70
+ return iconNode("minimize-2");
71
+ }
72
+ }),
73
+ createComponent(FloatingPanel$1.CloseTrigger, {
74
+ "aria-label": "Close",
75
+ get children() {
76
+ return iconNode("x");
77
+ }
78
+ })
79
+ ];
80
+ } })];
81
+ } });
82
+ } }),
83
+ createComponent(FloatingPanel$1.Body, { get children() {
84
+ return [
85
+ createComponent(Show, {
86
+ get when() {
87
+ return props.description;
88
+ },
89
+ get children() {
90
+ var _el$ = _tmpl$();
91
+ insert(_el$, () => {
92
+ return props.description;
93
+ });
94
+ return _el$;
95
+ }
96
+ }),
97
+ createComponent(Show, {
98
+ get when() {
99
+ return props.content;
100
+ },
101
+ get children() {
102
+ var _el$2 = _tmpl$();
103
+ insert(_el$2, () => {
104
+ return props.content;
105
+ });
106
+ return _el$2;
107
+ }
108
+ }),
109
+ memo(() => {
110
+ return props.children;
111
+ })
112
+ ];
113
+ } }),
114
+ createComponent(For, {
115
+ get each() {
116
+ return [...resizeAxes];
117
+ },
118
+ children: (axis) => createComponent(FloatingPanel$1.ResizeTrigger, { axis })
119
+ })
120
+ ];
121
+ } });
122
+ } })];
123
+ }
124
+ }));
125
+ }
126
+ const FloatingPanel = defineFamily(FloatingPanelFacade, {
19
127
  ...FloatingPanel$1,
20
128
  Root: FloatingPanelRoot
21
129
  });
@@ -1,2 +1,44 @@
1
- import { a as SolidFormApi, c as FormApi, i as FormProps, l as FieldApi, n as FormField, o as createField, r as FormFieldProps, s as createForm, t as Form } from "../../index-B1-quIrl.mjs";
2
- export { type FieldApi, Form, type FormApi, FormField, FormFieldProps, FormProps, type SolidFormApi, createField, createField as useField, createForm, createForm as useForm };
1
+ import { Component, JSX } from "solid-js";
2
+ import { FieldApi, FormApi, SolidFormApi, createField, createForm } from "@tanstack/solid-form";
3
+ //#region src/components/form/index.d.ts
4
+ /** The seam this family passes the engine through — the members the
5
+ * components drive, with the engine's field-name generics opened to
6
+ * `any`. The engine ships no "any form" alias: its loosest, `FormLikeAPI`,
7
+ * still pins names to `string`, which a concrete form's literal names
8
+ * cannot satisfy. */
9
+ interface AnyFormApi {
10
+ handleSubmit(): Promise<unknown>;
11
+ setFieldMeta(field: any, updater: (prev: any) => any): void;
12
+ Field: Component<any>;
13
+ }
14
+ /** The form element itself: native submit interception handing the event
15
+ * to the engine, one grid, one spacing voice. */
16
+ export interface FormProps extends JSX.FormHTMLAttributes<HTMLFormElement> {
17
+ form: AnyFormApi;
18
+ }
19
+ export declare const Form: ((props: FormProps) => JSX.Element) & {
20
+ Root: (props: FormProps) => JSX.Element;
21
+ };
22
+ /**
23
+ * The named slot in the grid: label, control, hint — and the engine's
24
+ * errors for this name, shown through the same parts the standalone
25
+ * Field family styles. The children receive the live engine field — in
26
+ * Solid an accessor to the FieldApi — so every capability the engine
27
+ * has is right there where the control is wired. Without a Form above
28
+ * it degrades to a plain labelled field.
29
+ */
30
+ export interface FormFieldProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "children"> {
31
+ form?: AnyFormApi;
32
+ name: string;
33
+ label?: string;
34
+ hint?: string;
35
+ required?: boolean;
36
+ invalid?: boolean;
37
+ disabled?: boolean;
38
+ children?: JSX.Element | ((field: any) => JSX.Element);
39
+ }
40
+ export declare const FormField: ((props: FormFieldProps) => JSX.Element) & {
41
+ Root: (props: FormFieldProps) => JSX.Element;
42
+ };
43
+ //#endregion
44
+ export { type FieldApi, type FormApi, type SolidFormApi, createField, createField as useField, createForm, createForm as useForm };
@@ -6,7 +6,14 @@ import { ImageCropper as ImageCropper$1 } from "@ark-ui/solid/image-cropper";
6
6
  * The API is Ark's own — Root, Viewport, Image, Selection, Handle, Grid,
7
7
  * Context. */
8
8
  declare function ImageCropperRoot(props: ComponentProps<typeof ImageCropper$1.Root>): import("solid-js").JSX.Element;
9
- export declare const ImageCropper: typeof ImageCropperRoot & Omit<typeof ImageCropper$1, "Root"> & {
9
+ export interface ImageCropperFacadeProps {
10
+ src: string;
11
+ alt?: string;
12
+ }
13
+ /** The complete cropper behind one photograph: the viewport, selection
14
+ * frame, corner handles, and ruling grid arrive ready to use. */
15
+ declare function ImageCropperFacade(props: ImageCropperFacadeProps): import("solid-js").JSX.Element;
16
+ export declare const ImageCropper: typeof ImageCropperFacade & Omit<typeof ImageCropper$1, "Root"> & {
10
17
  Root: typeof ImageCropperRoot;
11
18
  };
12
19
  //#endregion
@@ -1,20 +1,58 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
2
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
+ import { createComponent, template } from "@solidjs/web";
3
4
  import { injectComponentStyle } from "@bysages/core/styling";
4
- import { createComponent, mergeProps } from "solid-js";
5
+ import { For, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
5
6
  import { ImageCropper as ImageCropper$1 } from "@ark-ui/solid/image-cropper";
6
- //#region src/components/image-cropper/index.ts
7
+ //#region src/components/image-cropper/index.tsx
8
+ var _tmpl$ = /* @__PURE__ */ template(`<div>`);
7
9
  /** Ark's ImageCropper, dressed in the paper-and-ink system: a rounded vessel
8
10
  * holding the photograph, one lit selection window framed by light hairlines.
9
11
  * The API is Ark's own — Root, Viewport, Image, Selection, Handle, Grid,
10
12
  * Context. */
11
13
  function ImageCropperRoot(props) {
12
14
  const id = useElementId("image-cropper", () => props.id);
13
- return createComponent(ImageCropper$1.Root, mergeProps(props, { get id() {
15
+ return createComponent$1(ImageCropper$1.Root, mergeProps$1(props, { get id() {
14
16
  return id();
15
17
  } }));
16
18
  }
17
- const ImageCropper = defineFamily(ImageCropperRoot, {
19
+ /** The complete cropper behind one photograph: the viewport, selection
20
+ * frame, corner handles, and ruling grid arrive ready to use. */
21
+ function ImageCropperFacade(props) {
22
+ injectComponentStyle("image-cropper");
23
+ return createComponent(ImageCropperRoot, { get children() {
24
+ return createComponent(ImageCropper$1.Viewport, { get children() {
25
+ return [createComponent(ImageCropper$1.Image, {
26
+ get src() {
27
+ return props.src;
28
+ },
29
+ get alt() {
30
+ return props.alt;
31
+ }
32
+ }), createComponent(ImageCropper$1.Selection, { get children() {
33
+ return [
34
+ createComponent(For, {
35
+ each: [
36
+ "nw",
37
+ "ne",
38
+ "se",
39
+ "sw"
40
+ ],
41
+ children: (position) => createComponent(ImageCropper$1.Handle, {
42
+ position,
43
+ get children() {
44
+ return _tmpl$();
45
+ }
46
+ })
47
+ }),
48
+ createComponent(ImageCropper$1.Grid, { axis: "horizontal" }),
49
+ createComponent(ImageCropper$1.Grid, { axis: "vertical" })
50
+ ];
51
+ } })];
52
+ } });
53
+ } });
54
+ }
55
+ const ImageCropper = defineFamily(ImageCropperFacade, {
18
56
  ...ImageCropper$1,
19
57
  Root: ImageCropperRoot
20
58
  });
@@ -1,11 +1,20 @@
1
1
  import { ComponentProps } from "solid-js";
2
- import { JsonTreeView as JsonTreeView$1 } from "@ark-ui/solid/json-tree-view";
2
+ import { JsonTreeView as JsonTreeView$1, JsonTreeViewTreeProps } from "@ark-ui/solid/json-tree-view";
3
3
  //#region src/components/json-tree-view/index.d.ts
4
4
  /** Ark's JsonTreeView, dressed in the paper-and-ink system: the tree-view
5
5
  * recipes re-scoped, with value nodes reading as tabular data. The API is
6
6
  * Ark's own — Root, Tree, plus createJsonTreeCollection. */
7
7
  declare function JsonTreeViewRoot(props: ComponentProps<typeof JsonTreeView$1.Root>): import("solid-js").JSX.Element;
8
- export declare const JsonTreeView: typeof JsonTreeViewRoot & Omit<typeof JsonTreeView$1, "Root"> & {
8
+ declare function JsonTreeViewTree(props: JsonTreeViewTreeProps): import("solid-js").JSX.Element;
9
+ export interface JsonTreeViewFacadeProps {
10
+ data: unknown;
11
+ defaultExpandedDepth?: number;
12
+ }
13
+ /** The one-tag path for a read-only tree: `data` and the initial depth
14
+ * are all a quiet ledger needs; deeper control stays on the anatomy. */
15
+ declare function JsonTreeViewFacade(props: JsonTreeViewFacadeProps): import("solid-js").JSX.Element;
16
+ export declare const JsonTreeView: typeof JsonTreeViewFacade & Omit<typeof JsonTreeView$1, "Root"> & {
9
17
  Root: typeof JsonTreeViewRoot;
18
+ Tree: typeof JsonTreeViewTree;
10
19
  };
11
20
  //#endregion
@@ -20,7 +20,22 @@ function JsonTreeViewTree(props) {
20
20
  return props.arrow ?? iconNode("chevron-right");
21
21
  } }));
22
22
  }
23
- const JsonTreeView = defineFamily(JsonTreeViewRoot, {
23
+ /** The one-tag path for a read-only tree: `data` and the initial depth
24
+ * are all a quiet ledger needs; deeper control stays on the anatomy. */
25
+ function JsonTreeViewFacade(props) {
26
+ return createComponent(JsonTreeViewRoot, {
27
+ get data() {
28
+ return props.data;
29
+ },
30
+ get defaultExpandedDepth() {
31
+ return props.defaultExpandedDepth ?? 1;
32
+ },
33
+ get children() {
34
+ return createComponent(JsonTreeViewTree, {});
35
+ }
36
+ });
37
+ }
38
+ const JsonTreeView = defineFamily(JsonTreeViewFacade, {
24
39
  ...JsonTreeView$1,
25
40
  Root: JsonTreeViewRoot,
26
41
  Tree: JsonTreeViewTree
@@ -11,7 +11,27 @@ type ListboxOwnProps = {
11
11
  size?: "sm" | "md" | "lg";
12
12
  };
13
13
  declare function ListboxRoot<T extends CollectionItem>(props: ListboxRootProps<T> & ListboxOwnProps): import("solid-js").JSX.Element;
14
- export declare const Listbox: typeof ListboxRoot & Omit<typeof Listbox$1, "Root"> & {
14
+ type ListboxOption = {
15
+ label: string;
16
+ value: string;
17
+ };
18
+ type ListboxFacadeValue = string | string[];
19
+ /** The complete listbox behind one model value: options become rows and the
20
+ * label names the quiet register. */
21
+ export interface ListboxFacadeProps {
22
+ value?: ListboxFacadeValue;
23
+ defaultValue?: ListboxFacadeValue;
24
+ options: ListboxOption[];
25
+ multiple?: boolean;
26
+ disabled?: boolean;
27
+ label?: string;
28
+ /** One rung of the ladder for the row register and the filter field. */
29
+ size?: "sm" | "md" | "lg";
30
+ onValueChange?: (value?: ListboxFacadeValue) => void;
31
+ }
32
+ declare function ListboxFacade(props: ListboxFacadeProps): import("solid-js").JSX.Element;
33
+ type ListboxParts = Omit<typeof Listbox$1, "Root"> & {
15
34
  Root: typeof ListboxRoot;
16
35
  };
36
+ export declare const Listbox: typeof ListboxFacade & ListboxParts;
17
37
  //#endregion
@@ -1,9 +1,10 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
+ import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
2
3
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
4
  import { createComponent, mergeProps } from "@solidjs/web";
4
5
  import { injectComponentStyle } from "@bysages/core/styling";
5
- import { splitProps } from "solid-js";
6
- import { Listbox as Listbox$1 } from "@ark-ui/solid/listbox";
6
+ import { For, createMemo, splitProps } from "solid-js";
7
+ import { Listbox as Listbox$1, createListCollection } from "@ark-ui/solid/listbox";
7
8
  //#region src/components/listbox/index.tsx
8
9
  const ArkRoot = Listbox$1.Root;
9
10
  function ListboxRoot(props) {
@@ -18,7 +19,61 @@ function ListboxRoot(props) {
18
19
  }
19
20
  }));
20
21
  }
21
- const Listbox = defineFamily(ListboxRoot, {
22
+ function toListboxValue(value) {
23
+ if (value === void 0) return void 0;
24
+ return Array.isArray(value) ? value : [value];
25
+ }
26
+ function ListboxFacade(props) {
27
+ injectComponentStyle("listbox");
28
+ const collection = createMemo(() => createListCollection({ items: props.options }));
29
+ return createComponent(ListboxRoot, mergeProps({
30
+ get size() {
31
+ return props.size ?? "md";
32
+ },
33
+ get collection() {
34
+ return collection();
35
+ },
36
+ get defaultValue() {
37
+ return toListboxValue(props.defaultValue);
38
+ },
39
+ get disabled() {
40
+ return props.disabled;
41
+ },
42
+ get "aria-label"() {
43
+ return props.label;
44
+ },
45
+ get selectionMode() {
46
+ return props.multiple ? "multiple" : "single";
47
+ }
48
+ }, () => {
49
+ return props.value === void 0 ? {} : { value: toListboxValue(props.value) };
50
+ }, {
51
+ onValueChange: (details) => props.onValueChange?.(props.multiple ? details.value : details.value.at(0)),
52
+ get children() {
53
+ return createComponent(Listbox$1.Content, { get children() {
54
+ return createComponent(For, {
55
+ get each() {
56
+ return collection().items;
57
+ },
58
+ children: (item) => createComponent(Listbox$1.Item, {
59
+ item,
60
+ get children() {
61
+ return [createComponent(Listbox$1.ItemText, { get children() {
62
+ return item.label;
63
+ } }), createComponent(Listbox$1.ItemIndicator, { get children() {
64
+ return iconNode("check", {
65
+ width: "14",
66
+ height: "14"
67
+ });
68
+ } })];
69
+ }
70
+ })
71
+ });
72
+ } });
73
+ }
74
+ }));
75
+ }
76
+ const Listbox = defineFamily(ListboxFacade, {
22
77
  ...Listbox$1,
23
78
  Root: ListboxRoot
24
79
  });
@@ -5,7 +5,18 @@ import { Marquee as Marquee$1 } from "@ark-ui/solid/marquee";
5
5
  * seal-cut chips that dissolves into the paper at its edges rather than
6
6
  * cutting off. The API is Ark's own — Root, Viewport, Content, Edge, Item. */
7
7
  declare function MarqueeRoot(props: ComponentProps<typeof Marquee$1.Root>): import("solid-js").JSX.Element;
8
- export declare const Marquee: typeof MarqueeRoot & Omit<typeof Marquee$1, "Root"> & {
8
+ type MarqueeItem = string | {
9
+ label: string;
10
+ };
11
+ export interface MarqueeFacadeProps {
12
+ items: MarqueeItem[];
13
+ spacing?: string;
14
+ speed?: number;
15
+ label?: string;
16
+ }
17
+ /** The complete ribbon behind a list of short marks. */
18
+ declare function MarqueeFacade(props: MarqueeFacadeProps): import("solid-js").JSX.Element;
19
+ export declare const Marquee: typeof MarqueeFacade & Omit<typeof Marquee$1, "Root"> & {
9
20
  Root: typeof MarqueeRoot;
10
21
  };
11
22
  //#endregion