@bysages/solid 0.2.2 → 0.2.3

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 (263) hide show
  1. package/dist/ai-response-B_586r27.mjs +139 -0
  2. package/dist/chevron-GWEoEYdO.mjs +9 -0
  3. package/dist/components/accordion/index.d.mts +7 -0
  4. package/dist/components/accordion/index.mjs +10 -0
  5. package/dist/components/affix/index.d.mts +20 -0
  6. package/dist/components/affix/index.mjs +35 -0
  7. package/dist/components/ai/index.d.mts +2 -0
  8. package/dist/components/ai/index.mjs +69 -0
  9. package/dist/components/ai-action/index.d.mts +13 -0
  10. package/dist/components/ai-action/index.mjs +27 -0
  11. package/dist/components/ai-attachments/index.d.mts +20 -0
  12. package/dist/components/ai-attachments/index.mjs +98 -0
  13. package/dist/components/ai-message/index.d.mts +13 -0
  14. package/dist/components/ai-message/index.mjs +24 -0
  15. package/dist/components/ai-prompt-input/index.d.mts +45 -0
  16. package/dist/components/ai-prompt-input/index.mjs +136 -0
  17. package/dist/components/ai-reasoning/index.d.mts +13 -0
  18. package/dist/components/ai-reasoning/index.mjs +34 -0
  19. package/dist/components/ai-response/index.d.mts +20 -0
  20. package/dist/components/ai-response/index.mjs +2 -0
  21. package/dist/components/ai-source/index.d.mts +13 -0
  22. package/dist/components/ai-source/index.mjs +36 -0
  23. package/dist/components/ai-suggestion/index.d.mts +13 -0
  24. package/dist/components/ai-suggestion/index.mjs +22 -0
  25. package/dist/components/ai-tool/index.d.mts +23 -0
  26. package/dist/components/ai-tool/index.mjs +78 -0
  27. package/dist/components/alert/index.d.mts +22 -0
  28. package/dist/components/alert/index.mjs +92 -0
  29. package/dist/components/angle-slider/index.d.mts +15 -0
  30. package/dist/components/angle-slider/index.mjs +18 -0
  31. package/dist/components/aspect-ratio/index.d.mts +10 -0
  32. package/dist/components/aspect-ratio/index.mjs +25 -0
  33. package/dist/components/autocomplete/index.d.mts +21 -0
  34. package/dist/components/autocomplete/index.mjs +75 -0
  35. package/dist/components/avatar/index.d.mts +20 -0
  36. package/dist/components/avatar/index.mjs +15 -0
  37. package/dist/components/avatar-group/index.d.mts +11 -0
  38. package/dist/components/avatar-group/index.mjs +22 -0
  39. package/dist/components/back-top/index.d.mts +29 -0
  40. package/dist/components/back-top/index.mjs +89 -0
  41. package/dist/components/badge/index.d.mts +10 -0
  42. package/dist/components/badge/index.mjs +25 -0
  43. package/dist/components/banner/index.d.mts +24 -0
  44. package/dist/components/banner/index.mjs +71 -0
  45. package/dist/components/breadcrumb/index.d.mts +11 -0
  46. package/dist/components/breadcrumb/index.mjs +43 -0
  47. package/dist/components/button/index.d.mts +15 -0
  48. package/dist/components/button/index.mjs +45 -0
  49. package/dist/components/button-group/index.d.mts +23 -0
  50. package/dist/components/button-group/index.mjs +40 -0
  51. package/dist/components/calendar/index.d.mts +17 -0
  52. package/dist/components/calendar/index.mjs +197 -0
  53. package/dist/components/card/index.d.mts +11 -0
  54. package/dist/components/card/index.mjs +33 -0
  55. package/dist/components/carousel/index.d.mts +9 -0
  56. package/dist/components/carousel/index.mjs +12 -0
  57. package/dist/components/cascade-select/index.d.mts +31 -0
  58. package/dist/components/cascade-select/index.mjs +265 -0
  59. package/dist/components/checkbox/index.d.mts +15 -0
  60. package/dist/components/checkbox/index.mjs +18 -0
  61. package/dist/components/checkbox-group/index.d.mts +28 -0
  62. package/dist/components/checkbox-group/index.mjs +99 -0
  63. package/dist/components/chip/index.d.mts +12 -0
  64. package/dist/components/chip/index.mjs +34 -0
  65. package/dist/components/client-only/index.d.mts +2 -0
  66. package/dist/components/client-only/index.mjs +2 -0
  67. package/dist/components/clipboard/index.d.mts +16 -0
  68. package/dist/components/clipboard/index.mjs +19 -0
  69. package/dist/components/collapsible/index.d.mts +7 -0
  70. package/dist/components/collapsible/index.mjs +10 -0
  71. package/dist/components/collection/index.d.mts +2 -0
  72. package/dist/components/collection/index.mjs +2 -0
  73. package/dist/components/color-picker/index.d.mts +19 -0
  74. package/dist/components/color-picker/index.mjs +18 -0
  75. package/dist/components/combobox/index.d.mts +17 -0
  76. package/dist/components/combobox/index.mjs +18 -0
  77. package/dist/components/command/index.d.mts +43 -0
  78. package/dist/components/command/index.mjs +237 -0
  79. package/dist/components/comment/index.d.mts +17 -0
  80. package/dist/components/comment/index.mjs +86 -0
  81. package/dist/components/config-provider/index.d.mts +48 -0
  82. package/dist/components/config-provider/index.mjs +65 -0
  83. package/dist/components/container/index.d.mts +13 -0
  84. package/dist/components/container/index.mjs +25 -0
  85. package/dist/components/date-input/index.d.mts +15 -0
  86. package/dist/components/date-input/index.mjs +18 -0
  87. package/dist/components/date-picker/index.d.mts +17 -0
  88. package/dist/components/date-picker/index.mjs +18 -0
  89. package/dist/components/descriptions/index.d.mts +18 -0
  90. package/dist/components/descriptions/index.mjs +42 -0
  91. package/dist/components/dialog/index.d.mts +9 -0
  92. package/dist/components/dialog/index.mjs +11 -0
  93. package/dist/components/download-trigger/index.d.mts +2 -0
  94. package/dist/components/download-trigger/index.mjs +2 -0
  95. package/dist/components/drawer/index.d.mts +9 -0
  96. package/dist/components/drawer/index.mjs +12 -0
  97. package/dist/components/dynamic-input/index.d.mts +30 -0
  98. package/dist/components/dynamic-input/index.mjs +116 -0
  99. package/dist/components/editable/index.d.mts +15 -0
  100. package/dist/components/editable/index.mjs +18 -0
  101. package/dist/components/ellipsis/index.d.mts +10 -0
  102. package/dist/components/ellipsis/index.mjs +29 -0
  103. package/dist/components/empty/index.d.mts +10 -0
  104. package/dist/components/empty/index.mjs +31 -0
  105. package/dist/components/field/index.d.mts +8 -0
  106. package/dist/components/field/index.mjs +11 -0
  107. package/dist/components/fieldset/index.d.mts +7 -0
  108. package/dist/components/fieldset/index.mjs +10 -0
  109. package/dist/components/file-upload/index.d.mts +17 -0
  110. package/dist/components/file-upload/index.mjs +18 -0
  111. package/dist/components/float-button/index.d.mts +61 -0
  112. package/dist/components/float-button/index.mjs +128 -0
  113. package/dist/components/floating-panel/index.d.mts +9 -0
  114. package/dist/components/floating-panel/index.mjs +12 -0
  115. package/dist/components/focus-trap/index.d.mts +2 -0
  116. package/dist/components/focus-trap/index.mjs +2 -0
  117. package/dist/components/form/index.d.mts +2 -0
  118. package/dist/components/form/index.mjs +110 -0
  119. package/dist/components/format/index.d.mts +9 -0
  120. package/dist/components/format/index.mjs +10 -0
  121. package/dist/components/frame/index.d.mts +10 -0
  122. package/dist/components/frame/index.mjs +12 -0
  123. package/dist/components/grid/index.d.mts +13 -0
  124. package/dist/components/grid/index.mjs +44 -0
  125. package/dist/components/highlight/index.d.mts +7 -0
  126. package/dist/components/highlight/index.mjs +11 -0
  127. package/dist/components/hover-card/index.d.mts +7 -0
  128. package/dist/components/hover-card/index.mjs +10 -0
  129. package/dist/components/icon/index.d.mts +19 -0
  130. package/dist/components/icon/index.mjs +53 -0
  131. package/dist/components/image/index.d.mts +17 -0
  132. package/dist/components/image/index.mjs +69 -0
  133. package/dist/components/image-cropper/index.d.mts +8 -0
  134. package/dist/components/image-cropper/index.mjs +11 -0
  135. package/dist/components/image-viewer/index.d.mts +19 -0
  136. package/dist/components/image-viewer/index.mjs +143 -0
  137. package/dist/components/input/index.d.mts +16 -0
  138. package/dist/components/input/index.mjs +42 -0
  139. package/dist/components/input-group/index.d.mts +18 -0
  140. package/dist/components/input-group/index.mjs +40 -0
  141. package/dist/components/json-tree-view/index.d.mts +7 -0
  142. package/dist/components/json-tree-view/index.mjs +10 -0
  143. package/dist/components/kbd/index.d.mts +6 -0
  144. package/dist/components/kbd/index.mjs +17 -0
  145. package/dist/components/layout/index.d.mts +60 -0
  146. package/dist/components/layout/index.mjs +192 -0
  147. package/dist/components/link/index.d.mts +10 -0
  148. package/dist/components/link/index.mjs +25 -0
  149. package/dist/components/list/index.d.mts +26 -0
  150. package/dist/components/list/index.mjs +92 -0
  151. package/dist/components/listbox/index.d.mts +17 -0
  152. package/dist/components/listbox/index.mjs +19 -0
  153. package/dist/components/marquee/index.d.mts +7 -0
  154. package/dist/components/marquee/index.mjs +10 -0
  155. package/dist/components/masonry/index.d.mts +11 -0
  156. package/dist/components/masonry/index.mjs +36 -0
  157. package/dist/components/mentions/index.d.mts +2 -0
  158. package/dist/components/mentions/index.mjs +3 -0
  159. package/dist/components/menu/index.d.mts +13 -0
  160. package/dist/components/menu/index.mjs +38 -0
  161. package/dist/components/menubar/index.d.mts +32 -0
  162. package/dist/components/menubar/index.mjs +82 -0
  163. package/dist/components/meter/index.d.mts +21 -0
  164. package/dist/components/meter/index.mjs +95 -0
  165. package/dist/components/navigation-menu/index.d.mts +8 -0
  166. package/dist/components/navigation-menu/index.mjs +11 -0
  167. package/dist/components/number-input/index.d.mts +15 -0
  168. package/dist/components/number-input/index.mjs +18 -0
  169. package/dist/components/page-header/index.d.mts +11 -0
  170. package/dist/components/page-header/index.mjs +34 -0
  171. package/dist/components/pagination/index.d.mts +17 -0
  172. package/dist/components/pagination/index.mjs +18 -0
  173. package/dist/components/password-input/index.d.mts +15 -0
  174. package/dist/components/password-input/index.mjs +18 -0
  175. package/dist/components/pin-input/index.d.mts +14 -0
  176. package/dist/components/pin-input/index.mjs +18 -0
  177. package/dist/components/popconfirm/index.d.mts +17 -0
  178. package/dist/components/popconfirm/index.mjs +78 -0
  179. package/dist/components/popover/index.d.mts +8 -0
  180. package/dist/components/popover/index.mjs +11 -0
  181. package/dist/components/presence/index.d.mts +2 -0
  182. package/dist/components/presence/index.mjs +2 -0
  183. package/dist/components/progress/index.d.mts +15 -0
  184. package/dist/components/progress/index.mjs +18 -0
  185. package/dist/components/progress-group/index.d.mts +22 -0
  186. package/dist/components/progress-group/index.mjs +77 -0
  187. package/dist/components/qr-code/index.d.mts +8 -0
  188. package/dist/components/qr-code/index.mjs +11 -0
  189. package/dist/components/radio-group/index.d.mts +15 -0
  190. package/dist/components/radio-group/index.mjs +18 -0
  191. package/dist/components/rating-group/index.d.mts +15 -0
  192. package/dist/components/rating-group/index.mjs +18 -0
  193. package/dist/components/scroll-area/index.d.mts +7 -0
  194. package/dist/components/scroll-area/index.mjs +10 -0
  195. package/dist/components/segment-group/index.d.mts +17 -0
  196. package/dist/components/segment-group/index.mjs +23 -0
  197. package/dist/components/select/index.d.mts +17 -0
  198. package/dist/components/select/index.mjs +18 -0
  199. package/dist/components/separator/index.d.mts +11 -0
  200. package/dist/components/separator/index.mjs +29 -0
  201. package/dist/components/signature-pad/index.d.mts +8 -0
  202. package/dist/components/signature-pad/index.mjs +11 -0
  203. package/dist/components/skeleton/index.d.mts +7 -0
  204. package/dist/components/skeleton/index.mjs +17 -0
  205. package/dist/components/slider/index.d.mts +15 -0
  206. package/dist/components/slider/index.mjs +18 -0
  207. package/dist/components/spinner/index.d.mts +9 -0
  208. package/dist/components/spinner/index.mjs +28 -0
  209. package/dist/components/split-button/index.d.mts +36 -0
  210. package/dist/components/split-button/index.mjs +123 -0
  211. package/dist/components/splitter/index.d.mts +7 -0
  212. package/dist/components/splitter/index.mjs +10 -0
  213. package/dist/components/stack/index.d.mts +11 -0
  214. package/dist/components/stack/index.mjs +47 -0
  215. package/dist/components/stat/index.d.mts +17 -0
  216. package/dist/components/stat/index.mjs +46 -0
  217. package/dist/components/steps/index.d.mts +18 -0
  218. package/dist/components/steps/index.mjs +18 -0
  219. package/dist/components/swap/index.d.mts +8 -0
  220. package/dist/components/swap/index.mjs +11 -0
  221. package/dist/components/switch/index.d.mts +15 -0
  222. package/dist/components/switch/index.mjs +18 -0
  223. package/dist/components/table/index.d.mts +77 -0
  224. package/dist/components/table/index.mjs +740 -0
  225. package/dist/components/tabs/index.d.mts +17 -0
  226. package/dist/components/tabs/index.mjs +18 -0
  227. package/dist/components/tags-input/index.d.mts +16 -0
  228. package/dist/components/tags-input/index.mjs +18 -0
  229. package/dist/components/textarea/index.d.mts +14 -0
  230. package/dist/components/textarea/index.mjs +37 -0
  231. package/dist/components/timeline/index.d.mts +9 -0
  232. package/dist/components/timeline/index.mjs +29 -0
  233. package/dist/components/timer/index.d.mts +8 -0
  234. package/dist/components/timer/index.mjs +11 -0
  235. package/dist/components/toast/index.d.mts +11 -0
  236. package/dist/components/toast/index.mjs +13 -0
  237. package/dist/components/toc/index.d.mts +7 -0
  238. package/dist/components/toc/index.mjs +10 -0
  239. package/dist/components/toggle/index.d.mts +7 -0
  240. package/dist/components/toggle/index.mjs +10 -0
  241. package/dist/components/toggle-group/index.d.mts +14 -0
  242. package/dist/components/toggle-group/index.mjs +18 -0
  243. package/dist/components/tooltip/index.d.mts +7 -0
  244. package/dist/components/tooltip/index.mjs +10 -0
  245. package/dist/components/tour/index.d.mts +11 -0
  246. package/dist/components/tour/index.mjs +13 -0
  247. package/dist/components/transfer/index.d.mts +24 -0
  248. package/dist/components/transfer/index.mjs +166 -0
  249. package/dist/components/tree-select/index.d.mts +28 -0
  250. package/dist/components/tree-select/index.mjs +245 -0
  251. package/dist/components/tree-view/index.d.mts +18 -0
  252. package/dist/components/tree-view/index.mjs +19 -0
  253. package/dist/components/typography/index.d.mts +11 -0
  254. package/dist/components/typography/index.mjs +34 -0
  255. package/dist/components/watermark/index.d.mts +17 -0
  256. package/dist/components/watermark/index.mjs +71 -0
  257. package/dist/index-B1xiJ5ki.d.mts +1811 -0
  258. package/dist/index-B4XS2n2y.d.mts +13411 -0
  259. package/dist/index-DDX7x8aT.d.mts +95 -0
  260. package/dist/index.d.mts +128 -15209
  261. package/dist/index.mjs +128 -6171
  262. package/dist/mentions-xbI6vJAP.mjs +257 -0
  263. package/package.json +77 -4
@@ -0,0 +1,99 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
3
+ import { For, createUniqueId, splitProps } from "solid-js";
4
+ import { useFieldContext } from "@ark-ui/solid/field";
5
+ import { Checkbox } from "@ark-ui/solid/checkbox";
6
+ //#region src/components/checkbox-group/index.tsx
7
+ var _tmpl$ = /*#__PURE__*/ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m5 12.5 5 5L19 7">`);
8
+ var _tmpl$2 = /*#__PURE__*/ template(`<div>`);
9
+ function checkGlyph() {
10
+ return _tmpl$();
11
+ }
12
+ /**
13
+ * One question, many answers: a labelled stack (or row) of the seal-cut
14
+ * checkboxes bound to a single array. Toggling a box adds or removes its
15
+ * value; the group itself is semantics (`role="group"`), the boxes stay
16
+ * the machine-driven originals. Inside a `Field.Root` the group picks up
17
+ * the field context, so the invalid and disabled states a Form routes to
18
+ * its name dress every box at once.
19
+ */
20
+ function CheckboxGroup(props) {
21
+ injectComponentStyle("checkbox-group");
22
+ injectComponentStyle("checkbox");
23
+ const field = useFieldContext();
24
+ const uid = createUniqueId();
25
+ const [own, rest] = splitProps(props, [
26
+ "value",
27
+ "options",
28
+ "layout",
29
+ "size",
30
+ "invalid",
31
+ "disabled",
32
+ "onValueChange"
33
+ ]);
34
+ const selected = () => new Set(own.value ?? []);
35
+ const isInvalid = () => own.invalid || field?.().invalid === true;
36
+ const isDisabled = () => own.disabled || field?.().disabled === true;
37
+ function toggle(value) {
38
+ const next = new Set(selected());
39
+ if (next.has(value)) next.delete(value);
40
+ else next.add(value);
41
+ own.onValueChange?.([...next]);
42
+ }
43
+ return (() => {
44
+ var _el$2 = _tmpl$2();
45
+ spread(_el$2, mergeProps(rest, {
46
+ "role": "group",
47
+ "data-scope": "checkbox-group",
48
+ "data-part": "root",
49
+ get ["data-layout"]() {
50
+ return own.layout ?? "vertical";
51
+ },
52
+ get ["data-invalid"]() {
53
+ return isInvalid() ? "" : void 0;
54
+ }
55
+ }), false, true);
56
+ insert(_el$2, createComponent(For, {
57
+ get each() {
58
+ return own.options;
59
+ },
60
+ children: (option) => createComponent(Checkbox.Root, {
61
+ get ids() {
62
+ return {
63
+ label: `${uid}:${option.value}:label`,
64
+ hiddenInput: `${uid}:${option.value}:input`
65
+ };
66
+ },
67
+ get checked() {
68
+ return selected().has(option.value);
69
+ },
70
+ get ["data-size"]() {
71
+ return own.size ?? "md";
72
+ },
73
+ get invalid() {
74
+ return isInvalid();
75
+ },
76
+ get disabled() {
77
+ return isDisabled() || option.disabled === true;
78
+ },
79
+ onCheckedChange: () => toggle(option.value),
80
+ get children() {
81
+ return [
82
+ createComponent(Checkbox.Control, { get children() {
83
+ return createComponent(Checkbox.Indicator, { get children() {
84
+ return checkGlyph();
85
+ } });
86
+ } }),
87
+ createComponent(Checkbox.Label, { get children() {
88
+ return option.label;
89
+ } }),
90
+ createComponent(Checkbox.HiddenInput, {})
91
+ ];
92
+ }
93
+ })
94
+ }));
95
+ return _el$2;
96
+ })();
97
+ }
98
+ //#endregion
99
+ export { CheckboxGroup };
@@ -0,0 +1,12 @@
1
+ import { JSX } from "solid-js";
2
+ //#region src/components/chip/index.d.ts
3
+ /** A counting coin: the numeric value, capped at `max` with an ellipsis
4
+ * of the remainder ("99+"). */
5
+ export interface ChipProps extends JSX.HTMLAttributes<HTMLSpanElement> {
6
+ value: number;
7
+ max?: number;
8
+ tone?: "ink" | "info" | "success" | "warning" | "danger";
9
+ variant?: "solid" | "subtle" | "outline";
10
+ }
11
+ export declare function Chip(props: ChipProps): JSX.Element;
12
+ //#endregion
@@ -0,0 +1,34 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { insert, memo, mergeProps, spread, template } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ //#region src/components/chip/index.tsx
5
+ var _tmpl$ = /*#__PURE__*/ template(`<span>`);
6
+ function Chip(props) {
7
+ injectComponentStyle("chip");
8
+ const [own, rest] = splitProps(props, [
9
+ "value",
10
+ "max",
11
+ "tone",
12
+ "variant"
13
+ ]);
14
+ return (() => {
15
+ var _el$ = _tmpl$();
16
+ spread(_el$, mergeProps(rest, {
17
+ "data-scope": "chip",
18
+ "data-part": "root",
19
+ get ["data-tone"]() {
20
+ return own.tone ?? "ink";
21
+ },
22
+ get ["data-variant"]() {
23
+ return own.variant ?? "solid";
24
+ }
25
+ }), false, true);
26
+ insert(_el$, (() => {
27
+ var _c$ = memo(() => !!(own.max != null && own.value > own.max));
28
+ return () => _c$() ? `${own.max}+` : String(own.value);
29
+ })());
30
+ return _el$;
31
+ })();
32
+ }
33
+ //#endregion
34
+ export { Chip };
@@ -0,0 +1,2 @@
1
+ import { ClientOnly, ClientOnlyProps } from "@ark-ui/solid/client-only";
2
+ export { ClientOnly, type ClientOnlyProps };
@@ -0,0 +1,2 @@
1
+ import { ClientOnly } from "@ark-ui/solid/client-only";
2
+ export { ClientOnly };
@@ -0,0 +1,16 @@
1
+ import { Clipboard as Clipboard$1, ClipboardRootProps } from "@ark-ui/solid/clipboard";
2
+ //#region src/components/clipboard/index.d.ts
3
+ /** Ark's Clipboard, dressed in the paper-and-ink system: a hairline value
4
+ * field beside an icon-sized copy trigger whose ink turns bamboo while the
5
+ * copy is confirmed. The API is Ark's own — Root, Label, Control, Input,
6
+ * Trigger, Indicator, Context, HiddenInput. */
7
+ type ClipboardOwnProps = {
8
+ /** One rung of the control-height ladder for the value field and
9
+ * its copy seal. */
10
+ size?: "sm" | "md" | "lg";
11
+ };
12
+ declare function ClipboardRoot(props: ClipboardRootProps & ClipboardOwnProps): import("solid-js").JSX.Element;
13
+ export declare const Clipboard: Omit<typeof Clipboard$1, "Root"> & {
14
+ Root: typeof ClipboardRoot;
15
+ };
16
+ //#endregion
@@ -0,0 +1,19 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { createComponent, mergeProps } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ import { Clipboard as Clipboard$1 } from "@ark-ui/solid/clipboard";
5
+ //#region src/components/clipboard/index.tsx
6
+ const ArkRoot = Clipboard$1.Root;
7
+ function ClipboardRoot(props) {
8
+ const [own, rest] = splitProps(props, ["size"]);
9
+ return createComponent(ArkRoot, mergeProps(rest, { get ["data-size"]() {
10
+ return own.size ?? "md";
11
+ } }));
12
+ }
13
+ const Clipboard = {
14
+ ...Clipboard$1,
15
+ Root: ClipboardRoot
16
+ };
17
+ injectComponentStyle("clipboard");
18
+ //#endregion
19
+ export { Clipboard };
@@ -0,0 +1,7 @@
1
+ import { Collapsible as Collapsible$1 } from "@ark-ui/solid/collapsible";
2
+ //#region src/components/collapsible/index.d.ts
3
+ /** Ark's Collapsible, dressed in the paper-and-ink system: one control on
4
+ * the paper, its panel dissolving open to the machine's measured height.
5
+ * The API is Ark's own — Root, Trigger, Content, Indicator. */
6
+ export declare const Collapsible: typeof Collapsible$1;
7
+ //#endregion
@@ -0,0 +1,10 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { Collapsible as Collapsible$1 } from "@ark-ui/solid/collapsible";
3
+ //#region src/components/collapsible/index.ts
4
+ /** Ark's Collapsible, dressed in the paper-and-ink system: one control on
5
+ * the paper, its panel dissolving open to the machine's measured height.
6
+ * The API is Ark's own — Root, Trigger, Content, Indicator. */
7
+ const Collapsible = Collapsible$1;
8
+ injectComponentStyle("collapsible");
9
+ //#endregion
10
+ export { Collapsible };
@@ -0,0 +1,2 @@
1
+ import { CollectionItem, CollectionOptions, FilePathTreeNode, FlatTreeNode, GridCollection, GridCollectionOptions, ListCollection, TreeCollection, TreeCollectionOptions, TreeNode, UseAsyncListProps, UseAsyncListReturn, UseListCollectionProps, UseListCollectionReturn, UseListSelectionProps, UseListSelectionReturn, createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useAsyncList, useListCollection, useListSelection } from "@ark-ui/solid/collection";
2
+ export { type CollectionItem, type CollectionOptions, type FilePathTreeNode, type FlatTreeNode, type GridCollection, type GridCollectionOptions, type ListCollection, type TreeCollection, type TreeCollectionOptions, type TreeNode, type UseAsyncListProps, type UseAsyncListReturn, type UseListCollectionProps, type UseListCollectionReturn, type UseListSelectionProps, type UseListSelectionReturn, createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useAsyncList, useListCollection, useListSelection };
@@ -0,0 +1,2 @@
1
+ import { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useAsyncList, useListCollection, useListSelection } from "@ark-ui/solid/collection";
2
+ export { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useAsyncList, useListCollection, useListSelection };
@@ -0,0 +1,19 @@
1
+ import { ColorPicker as ColorPicker$1, ColorPickerRootProps } from "@ark-ui/solid/color-picker";
2
+ //#region src/components/color-picker/index.d.ts
3
+ /** Ark's ColorPicker, dressed in the paper-and-ink system: a seal-sized swatch
4
+ * on the paper, opening into an area and channel sliders where pigment is
5
+ * picked. The API is Ark's own — Root, Label, Control, Trigger, Positioner,
6
+ * Content, Area, AreaThumb, AreaBackground, ValueText, ValueSwatch,
7
+ * ChannelSlider, ChannelSliderLabel, ChannelSliderTrack, ChannelSliderThumb,
8
+ * ChannelSliderValueText, ChannelInput, TransparencyGrid, SwatchGroup,
9
+ * SwatchTrigger, SwatchIndicator, Swatch, EyeDropperTrigger, FormatTrigger,
10
+ * FormatSelect, HiddenInput, Context. */
11
+ type ColorPickerOwnProps = {
12
+ /** One rung of the control-height ladder for the swatch seal. */
13
+ size?: "sm" | "md" | "lg";
14
+ };
15
+ declare function ColorPickerRoot(props: ColorPickerRootProps & ColorPickerOwnProps): import("solid-js").JSX.Element;
16
+ export declare const ColorPicker: Omit<typeof ColorPicker$1, "Root"> & {
17
+ Root: typeof ColorPickerRoot;
18
+ };
19
+ //#endregion
@@ -0,0 +1,18 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { createComponent, mergeProps } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ import { ColorPicker as ColorPicker$1 } from "@ark-ui/solid/color-picker";
5
+ //#region src/components/color-picker/index.tsx
6
+ function ColorPickerRoot(props) {
7
+ const [own, rest] = splitProps(props, ["size"]);
8
+ return createComponent(ColorPicker$1.Root, mergeProps(rest, { get ["data-size"]() {
9
+ return own.size ?? "md";
10
+ } }));
11
+ }
12
+ const ColorPicker = {
13
+ ...ColorPicker$1,
14
+ Root: ColorPickerRoot
15
+ };
16
+ injectComponentStyle("color-picker");
17
+ //#endregion
18
+ export { ColorPicker };
@@ -0,0 +1,17 @@
1
+ import { CollectionItem } from "@ark-ui/solid/collection";
2
+ import { Combobox as Combobox$1, ComboboxRootProps } from "@ark-ui/solid/combobox";
3
+ //#region src/components/combobox/index.d.ts
4
+ /** Ark's Combobox, dressed in the paper-and-ink system: the field carries
5
+ * the control recipe and its matches dissolve open as a paper vessel, the
6
+ * checked row taking the flat ink fill. The API is Ark's own — Root, Label,
7
+ * Control, Input, Trigger, ClearTrigger, Positioner, Content, List, Empty,
8
+ * Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel. */
9
+ type ComboboxOwnProps = {
10
+ /** One rung of the control-height ladder for the field row. */
11
+ size?: "sm" | "md" | "lg";
12
+ };
13
+ declare function ComboboxRoot<T extends CollectionItem>(props: ComboboxRootProps<T> & ComboboxOwnProps): import("solid-js").JSX.Element;
14
+ export declare const Combobox: Omit<typeof Combobox$1, "Root"> & {
15
+ Root: typeof ComboboxRoot;
16
+ };
17
+ //#endregion
@@ -0,0 +1,18 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { createComponent, mergeProps } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ import { Combobox as Combobox$1 } from "@ark-ui/solid/combobox";
5
+ //#region src/components/combobox/index.tsx
6
+ function ComboboxRoot(props) {
7
+ const [own, rest] = splitProps(props, ["size"]);
8
+ return createComponent(Combobox$1.Root, mergeProps(rest, { get ["data-size"]() {
9
+ return own.size ?? "md";
10
+ } }));
11
+ }
12
+ const Combobox = {
13
+ ...Combobox$1,
14
+ Root: ComboboxRoot
15
+ };
16
+ injectComponentStyle("combobox");
17
+ //#endregion
18
+ export { Combobox };
@@ -0,0 +1,43 @@
1
+ //#region src/components/command/index.d.ts
2
+ export interface CommandEntry {
3
+ label: string;
4
+ value: string;
5
+ /** Entries sharing a group are listed under one heading. */
6
+ group?: string;
7
+ /** A short affordance note, set as a keycap at the row's end. */
8
+ hint?: string;
9
+ }
10
+ export interface CommandProps {
11
+ /** The commands on offer, grouped as they arrive. */
12
+ items?: CommandEntry[];
13
+ placeholder?: string;
14
+ /** Whether the palette is up. Supply it to control the palette;
15
+ * changes are reported through `onOpenChange`. */
16
+ open?: boolean;
17
+ /** Whether the shell narrows `items` as the reader types. Turn it off
18
+ * when the caller owns the searching — a ranked engine or a remote
19
+ * source — and hands down the already-narrowed list. */
20
+ autoFilter?: boolean;
21
+ /** The field's text under the caller's control; changes are reported
22
+ * through `onInputValueChange`. */
23
+ inputValue?: string;
24
+ /** What the list whispers when nothing matches. */
25
+ emptyText?: string;
26
+ /** Called with the chosen entry's `value`; the palette closes after. */
27
+ onSelect?: (value: string) => void;
28
+ /** The palette's openness changed. */
29
+ onOpenChange?: (open: boolean) => void;
30
+ /** The field's text changed. */
31
+ onInputValueChange?: (value: string) => void;
32
+ }
33
+ /**
34
+ * The command palette: a modal sheet at the top of the page carrying a
35
+ * search field over the caller's commands, grouped as a ledger with a
36
+ * keycap hint at each row. The shell is the dialog machinery — scrim,
37
+ * focus trap, Escape — and the searching is the combobox machinery
38
+ * driving our own list: the vessel and the list live inside the sheet,
39
+ * so the combobox renders no separate popup and the machine's content
40
+ * grafts onto the sheet's list.
41
+ */
42
+ export declare function Command(props: CommandProps): import("solid-js").JSX.Element;
43
+ //#endregion
@@ -0,0 +1,237 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { Portal, createComponent, insert, mergeProps, spread, template } from "solid-js/web";
3
+ import { For, Show, createEffect, createSignal, splitProps } from "solid-js";
4
+ import { useListCollection } from "@ark-ui/solid/collection";
5
+ import { Combobox } from "@ark-ui/solid/combobox";
6
+ import { Dialog } from "@ark-ui/solid/dialog";
7
+ //#region src/components/command/index.tsx
8
+ var _tmpl$ = /*#__PURE__*/ template(`<span data-scope=command data-part=item-hint>`);
9
+ var _tmpl$2 = /*#__PURE__*/ template(`<div>`);
10
+ var _tmpl$3 = /*#__PURE__*/ template(`<span>`);
11
+ var _tmpl$4 = /*#__PURE__*/ template(`<input>`);
12
+ var _tmpl$5 = /*#__PURE__*/ template(`<div data-scope=command data-part=empty>`);
13
+ /** A command row: the machine's item grafted onto a vessel of our own,
14
+ * the label riding the machine's item text. */
15
+ function Row(props) {
16
+ return createComponent(Combobox.Item, {
17
+ get item() {
18
+ return props.entry.value;
19
+ },
20
+ asChild: (itemProps) => (() => {
21
+ var _el$ = _tmpl$2();
22
+ spread(_el$, mergeProps(itemProps, {
23
+ "data-scope": "command",
24
+ "data-part": "item"
25
+ }), false, true);
26
+ insert(_el$, createComponent(Combobox.ItemText, { asChild: (textProps) => (() => {
27
+ var _el$3 = _tmpl$3();
28
+ spread(_el$3, mergeProps(textProps, {
29
+ "data-scope": "command",
30
+ "data-part": "item-label"
31
+ }), false, true);
32
+ insert(_el$3, () => props.entry.label);
33
+ return _el$3;
34
+ })() }), null);
35
+ insert(_el$, createComponent(Show, {
36
+ get when() {
37
+ return props.entry.hint;
38
+ },
39
+ get children() {
40
+ var _el$2 = _tmpl$();
41
+ insert(_el$2, () => props.entry.hint);
42
+ return _el$2;
43
+ }
44
+ }), null);
45
+ return _el$;
46
+ })()
47
+ });
48
+ }
49
+ /**
50
+ * The command palette: a modal sheet at the top of the page carrying a
51
+ * search field over the caller's commands, grouped as a ledger with a
52
+ * keycap hint at each row. The shell is the dialog machinery — scrim,
53
+ * focus trap, Escape — and the searching is the combobox machinery
54
+ * driving our own list: the vessel and the list live inside the sheet,
55
+ * so the combobox renders no separate popup and the machine's content
56
+ * grafts onto the sheet's list.
57
+ */
58
+ function Command(props) {
59
+ injectComponentStyle("command");
60
+ injectComponentStyle("dialog");
61
+ const [own, rest] = splitProps(props, [
62
+ "items",
63
+ "placeholder",
64
+ "open",
65
+ "autoFilter",
66
+ "inputValue",
67
+ "emptyText",
68
+ "onSelect",
69
+ "onOpenChange",
70
+ "onInputValueChange"
71
+ ]);
72
+ const [internalOpen, setInternalOpen] = createSignal(false);
73
+ const [listOpen, setListOpen] = createSignal(true);
74
+ let fieldText = "";
75
+ const { collection, set, filter } = useListCollection({
76
+ initialItems: (own.items ?? []).map((entry) => entry.value),
77
+ filter: (value, input) => {
78
+ const entry = (own.items ?? []).find((candidate) => candidate.value === value);
79
+ if (!entry) return false;
80
+ const query = input.toLowerCase();
81
+ return entry.label.toLowerCase().includes(query) || value.toLowerCase().includes(query);
82
+ }
83
+ });
84
+ createEffect(() => {
85
+ set((own.items ?? []).map((entry) => entry.value));
86
+ if (own.autoFilter ?? true) filter(fieldText);
87
+ });
88
+ const open = () => own.open ?? internalOpen();
89
+ const setOpen = (value) => {
90
+ if (own.open === void 0) setInternalOpen(value);
91
+ own.onOpenChange?.(value);
92
+ };
93
+ createEffect(() => {
94
+ if (open()) setListOpen(true);
95
+ });
96
+ const sections = () => {
97
+ const available = new Set(collection().items);
98
+ const groups = /* @__PURE__ */ new Map();
99
+ for (const entry of own.items ?? []) {
100
+ if (!available.has(entry.value)) continue;
101
+ const key = entry.group ?? "";
102
+ if (!groups.has(key)) groups.set(key, []);
103
+ groups.get(key).push(entry);
104
+ }
105
+ return Array.from(groups, ([group, entries]) => ({
106
+ group,
107
+ entries
108
+ }));
109
+ };
110
+ return createComponent(Dialog.Root, mergeProps(rest, {
111
+ get open() {
112
+ return open();
113
+ },
114
+ onOpenChange: (details) => setOpen(details.open),
115
+ get children() {
116
+ return createComponent(Portal, { get children() {
117
+ return [createComponent(Dialog.Backdrop, {}), createComponent(Dialog.Positioner, { asChild: (positionerProps) => (() => {
118
+ var _el$4 = _tmpl$2();
119
+ spread(_el$4, mergeProps(positionerProps, {
120
+ "data-scope": "command",
121
+ "data-part": "positioner"
122
+ }), false, true);
123
+ insert(_el$4, createComponent(Dialog.Content, { asChild: (contentProps) => (() => {
124
+ var _el$5 = _tmpl$2();
125
+ spread(_el$5, mergeProps(contentProps, {
126
+ "data-scope": "command",
127
+ "data-part": "content"
128
+ }), false, true);
129
+ insert(_el$5, createComponent(Combobox.Root, {
130
+ get collection() {
131
+ return collection();
132
+ },
133
+ get inputValue() {
134
+ return own.inputValue;
135
+ },
136
+ get open() {
137
+ return listOpen();
138
+ },
139
+ onOpenChange: (details) => setListOpen(details.open),
140
+ inputBehavior: "autohighlight",
141
+ loopFocus: true,
142
+ onInputValueChange: (details) => {
143
+ fieldText = details.inputValue;
144
+ if (own.autoFilter ?? true) filter(details.inputValue);
145
+ own.onInputValueChange?.(details.inputValue);
146
+ },
147
+ onValueChange: (details) => {
148
+ const [first] = details.value;
149
+ if (first == null) return;
150
+ own.onSelect?.(first);
151
+ setOpen(false);
152
+ },
153
+ get children() {
154
+ return [createComponent(Combobox.Input, { asChild: (inputProps) => (() => {
155
+ var _el$6 = _tmpl$4();
156
+ spread(_el$6, mergeProps(inputProps, {
157
+ "type": "text",
158
+ get placeholder() {
159
+ return own.placeholder;
160
+ },
161
+ "data-scope": "command",
162
+ "data-part": "input"
163
+ }), false, false);
164
+ return _el$6;
165
+ })() }), createComponent(Combobox.Content, { asChild: (listProps) => (() => {
166
+ var _el$7 = _tmpl$2();
167
+ spread(_el$7, mergeProps(listProps, {
168
+ "data-scope": "command",
169
+ "data-part": "list"
170
+ }), false, true);
171
+ insert(_el$7, createComponent(For, {
172
+ get each() {
173
+ return sections();
174
+ },
175
+ children: (section) => createComponent(Show, {
176
+ get when() {
177
+ return section.group !== "";
178
+ },
179
+ get fallback() {
180
+ return createComponent(For, {
181
+ get each() {
182
+ return section.entries;
183
+ },
184
+ children: (entry) => createComponent(Row, { entry })
185
+ });
186
+ },
187
+ get children() {
188
+ return createComponent(Combobox.ItemGroup, { asChild: (groupProps) => (() => {
189
+ var _el$9 = _tmpl$2();
190
+ spread(_el$9, mergeProps(groupProps, {
191
+ "data-scope": "command",
192
+ "data-part": "group"
193
+ }), false, true);
194
+ insert(_el$9, createComponent(Combobox.ItemGroupLabel, { asChild: (labelProps) => (() => {
195
+ var _el$0 = _tmpl$2();
196
+ spread(_el$0, mergeProps(labelProps, {
197
+ "data-scope": "command",
198
+ "data-part": "group-label"
199
+ }), false, true);
200
+ insert(_el$0, () => section.group);
201
+ return _el$0;
202
+ })() }), null);
203
+ insert(_el$9, createComponent(For, {
204
+ get each() {
205
+ return section.entries;
206
+ },
207
+ children: (entry) => createComponent(Row, { entry })
208
+ }), null);
209
+ return _el$9;
210
+ })() });
211
+ }
212
+ })
213
+ }), null);
214
+ insert(_el$7, createComponent(Show, {
215
+ get when() {
216
+ return sections().length === 0;
217
+ },
218
+ get children() {
219
+ var _el$8 = _tmpl$5();
220
+ insert(_el$8, () => own.emptyText ?? "No matching commands");
221
+ return _el$8;
222
+ }
223
+ }), null);
224
+ return _el$7;
225
+ })() })];
226
+ }
227
+ }));
228
+ return _el$5;
229
+ })() }));
230
+ return _el$4;
231
+ })() })];
232
+ } });
233
+ }
234
+ }));
235
+ }
236
+ //#endregion
237
+ export { Command };
@@ -0,0 +1,17 @@
1
+ import { JSX } from "solid-js";
2
+ //#region src/components/comment/index.d.ts
3
+ export interface CommentProps extends JSX.HTMLAttributes<HTMLElement> {
4
+ author?: string;
5
+ datetime?: string;
6
+ /** The portrait hanging to the left of the body. */
7
+ avatar?: JSX.Element;
8
+ /** The row of answers beneath the ink. */
9
+ actions?: JSX.Element;
10
+ }
11
+ /**
12
+ * A voice on the record: the portrait hangs left (the `avatar` prop),
13
+ * the body carries the byline from `author` and `datetime`, the ink is
14
+ * the children, and `actions` is the row of answers.
15
+ */
16
+ export declare function Comment(props: CommentProps): JSX.Element;
17
+ //#endregion