@bysages/svelte 0.2.3 → 0.3.0

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 (114) hide show
  1. package/README.md +16 -2
  2. package/dist/{ai-BOUoSSjw.mjs → AiLoader-0jlig3fe.mjs} +2 -34
  3. package/dist/Input-CZhcEeFU.mjs +75 -0
  4. package/dist/{spinner-EpUWE3Hu.mjs → Spinner-sd__23WT.mjs} +1 -6
  5. package/dist/{TabsRoot-BMMO3B77.mjs → TabsRoot-DXd41HqW.mjs} +5 -1
  6. package/dist/{avatar-BHYqgq4d.mjs → avatar-LR0CZ1Iz.mjs} +5 -1
  7. package/dist/bento-BTvt7gsB.mjs +73 -0
  8. package/dist/block-ui-CpiV9qza.mjs +50 -0
  9. package/dist/browser-gmPTH6mJ.mjs +146 -0
  10. package/dist/{cascade-select-C-eBcN_4.mjs → cascade-select-B-4Z6oWe.mjs} +6 -6
  11. package/dist/components/ai/index.d.mts +3 -2
  12. package/dist/components/ai/index.mjs +27 -2
  13. package/dist/components/ai-action/index.d.mts +1 -1
  14. package/dist/components/ai-action/index.mjs +1 -1
  15. package/dist/components/ai-message/index.d.mts +1 -1
  16. package/dist/components/ai-message/index.mjs +1 -1
  17. package/dist/components/ai-prompt-input/index.d.mts +1 -1
  18. package/dist/components/ai-prompt-input/index.mjs +1 -1
  19. package/dist/components/ai-reasoning/index.d.mts +1 -1
  20. package/dist/components/ai-reasoning/index.mjs +1 -1
  21. package/dist/components/ai-response/index.d.mts +1 -1
  22. package/dist/components/ai-response/index.mjs +1 -1
  23. package/dist/components/ai-source/index.d.mts +1 -1
  24. package/dist/components/ai-source/index.mjs +1 -1
  25. package/dist/components/ai-suggestion/index.d.mts +1 -1
  26. package/dist/components/ai-suggestion/index.mjs +1 -1
  27. package/dist/components/ai-tool/index.d.mts +1 -1
  28. package/dist/components/ai-tool/index.mjs +1 -1
  29. package/dist/components/avatar/index.d.mts +1 -1
  30. package/dist/components/avatar/index.mjs +1 -1
  31. package/dist/components/bento/index.d.mts +2 -0
  32. package/dist/components/bento/index.mjs +2 -0
  33. package/dist/components/block-ui/index.d.mts +2 -0
  34. package/dist/components/block-ui/index.mjs +2 -0
  35. package/dist/components/browser/index.d.mts +9 -0
  36. package/dist/components/browser/index.mjs +2 -0
  37. package/dist/components/cascade-select/index.mjs +1 -1
  38. package/dist/components/data-view/index.d.mts +2 -0
  39. package/dist/components/data-view/index.mjs +2 -0
  40. package/dist/components/deferred-content/index.d.mts +2 -0
  41. package/dist/components/deferred-content/index.mjs +2 -0
  42. package/dist/components/descriptions/index.d.mts +1 -1
  43. package/dist/components/descriptions/index.mjs +1 -1
  44. package/dist/components/dock/index.d.mts +2 -0
  45. package/dist/components/dock/index.mjs +2 -0
  46. package/dist/components/form/index.d.mts +2 -2
  47. package/dist/components/form/index.mjs +2 -2
  48. package/dist/components/icon/index.d.mts +1 -1
  49. package/dist/components/icon/index.mjs +1 -1
  50. package/dist/components/input/index.d.mts +1 -1
  51. package/dist/components/input/index.mjs +1 -1
  52. package/dist/components/order-list/index.d.mts +2 -0
  53. package/dist/components/order-list/index.mjs +2 -0
  54. package/dist/components/result/index.d.mts +12 -0
  55. package/dist/components/result/index.mjs +2 -0
  56. package/dist/components/select/index.d.mts +2 -7
  57. package/dist/components/select/index.mjs +2 -14
  58. package/dist/components/spinner/index.mjs +6 -1
  59. package/dist/components/spotlight/index.d.mts +2 -0
  60. package/dist/components/spotlight/index.mjs +2 -0
  61. package/dist/components/table/index.mjs +1 -1
  62. package/dist/components/tabs/index.d.mts +1 -1
  63. package/dist/components/tabs/index.mjs +1 -1
  64. package/dist/components/terminal/index.d.mts +2 -0
  65. package/dist/components/terminal/index.mjs +2 -0
  66. package/dist/components/timeline/index.d.mts +1 -1
  67. package/dist/components/timeline/index.mjs +1 -1
  68. package/dist/components/toolbar/index.d.mts +2 -0
  69. package/dist/components/toolbar/index.mjs +2 -0
  70. package/dist/components/tree-select/index.mjs +1 -1
  71. package/dist/components/user/index.d.mts +2 -0
  72. package/dist/components/user/index.mjs +2 -0
  73. package/dist/components/virtual-list/index.d.mts +2 -0
  74. package/dist/components/virtual-list/index.mjs +2 -0
  75. package/dist/data-view-B3TY3rYl.mjs +167 -0
  76. package/dist/deferred-content-CO9YsKMQ.mjs +65 -0
  77. package/dist/{descriptions-Cv3x5qLW.mjs → descriptions-DgkA_9B-.mjs} +14 -8
  78. package/dist/dock-CKGRnXWu.mjs +84 -0
  79. package/dist/{form-De-ZwM1P.mjs → form-BTL9S1gn.mjs} +4 -4
  80. package/dist/{icon-B6_cYYzO.mjs → icon-D7AeDq0M.mjs} +7 -6
  81. package/dist/index-0k-VxNRm.d.mts +15 -0
  82. package/dist/{index-NJ21Q4f4.d.mts → index-BEfqqxjl.d.mts} +11 -1
  83. package/dist/index-BmFfkztS.d.mts +14 -0
  84. package/dist/{index-BgLAlGbg.d.mts → index-BoR_54C_.d.mts} +3 -0
  85. package/dist/index-BolxaoaW.d.mts +18 -0
  86. package/dist/index-CAb_-2Bn.d.mts +21 -0
  87. package/dist/{index-Cd5VU1DI.d.mts → index-CV1LSzq5.d.mts} +3 -0
  88. package/dist/index-CmskeLd_.d.mts +23 -0
  89. package/dist/index-CnrohEXe.d.mts +24 -0
  90. package/dist/{index-BjVEomHj.d.mts → index-CtbGSRNw.d.mts} +719 -3781
  91. package/dist/{index-Nt0a2iYy.d.mts → index-D1U7Svy2.d.mts} +2 -2
  92. package/dist/index-D6eYSdmD.d.mts +28 -0
  93. package/dist/index-D9UBDdoA.d.mts +17 -0
  94. package/dist/index-DBbjFiDd.d.mts +20 -0
  95. package/dist/index-DGOBhwXN.d.mts +18 -0
  96. package/dist/{index-DrXCIscJ.d.mts → index-DjaHpB21.d.mts} +3 -0
  97. package/dist/index-KoqiUxmN.d.mts +20 -0
  98. package/dist/{index-BnvnT-GQ.d.mts → index-_kQsvJKo.d.mts} +6 -2
  99. package/dist/index-mshFOd-j.d.mts +20 -0
  100. package/dist/index.d.mts +24 -10
  101. package/dist/index.mjs +26 -12
  102. package/dist/order-list-q7VlsbmU.mjs +120 -0
  103. package/dist/result-4Oee2ndu.mjs +159 -0
  104. package/dist/select-rkY0qJKI.mjs +95 -0
  105. package/dist/spotlight-DMC5E1eS.mjs +51 -0
  106. package/dist/{table-C0AcH5Dw.mjs → table-BnNK4_su.mjs} +1 -1
  107. package/dist/terminal-B3b4KzoN.mjs +78 -0
  108. package/dist/{timeline-BV4eahUx.mjs → timeline-1yPOTbtY.mjs} +4 -2
  109. package/dist/toolbar-SNwuRrJr.mjs +68 -0
  110. package/dist/{tree-select-aHymj8Zu.mjs → tree-select-BSf4a_En.mjs} +1 -1
  111. package/dist/user-BjJSjDYV.mjs +100 -0
  112. package/dist/virtual-list-psKQ_NVr.mjs +59 -0
  113. package/package.json +28 -7
  114. package/dist/Input-Biz4J1B6.mjs +0 -39
package/README.md CHANGED
@@ -4,11 +4,11 @@
4
4
  ![npm downloads](https://img.shields.io/npm/dw/@bysages/svelte)
5
5
  ![npm license](https://img.shields.io/npm/l/@bysages/svelte)
6
6
 
7
- > By Sages Elements for Svelte — 90+ accessible component families, headless by construction, dressed by the paper-and-ink style layer.
7
+ > By Sages Elements for Svelte — 140+ accessible component families, headless by construction, dressed by the paper-and-ink style layer.
8
8
 
9
9
  ## Features
10
10
 
11
- - 🧩 **90+ families** — actions, forms, overlays, navigation, data, layout, and an AI conversation family on ai-sdk formats
11
+ - 🧩 **140+ families** — actions, forms, overlays, navigation, data, layout, an AI conversation family on ai-sdk formats, and a full generative vocabulary
12
12
  - 🏛️ **Headless inside** — interaction, state, ARIA, and positioning come from proven headless state machines; wrappers add API narrowing and style injection, no DOM of their own
13
13
  - 🎨 **Token-styled** — every visual value is a CSS custom property from `@bysages/core`; light/dark, accent pigments, contrast and density tiers are data, never hardcoded styles
14
14
  - 📦 **Container-driven** — components respond to `@container`, not the viewport; the same component composes in a sidebar, a card, or a page
@@ -65,6 +65,20 @@ mount(App, { target: document.getElementById("app")! });
65
65
  </Dialog.Root>
66
66
  ```
67
67
 
68
+ ## Generative UI
69
+
70
+ Every family carries a generative face — a zod-typed catalog entry that
71
+ lives beside the component. The faces compose into a
72
+ [json-render](https://json-render.dev) catalog and render through the
73
+ same package:
74
+
75
+ ```ts
76
+ import { catalog } from "@bysages/svelte/generative";
77
+ ```
78
+
79
+ Point an AI SDK stream at the renderer and a prompt becomes real,
80
+ on-brand components — constrained to the families you registered.
81
+
68
82
  ## Documentation
69
83
 
70
84
  The [documentation site](https://elements.bysages.com) carries every family with live demos and props tables.
@@ -1,11 +1,3 @@
1
- import { t as AiAction } from "./ai-action-DKsvxilp.mjs";
2
- import { t as AiMessage } from "./ai-message-DBs1fdFm.mjs";
3
- import { t as AiPromptInput } from "./ai-prompt-input-BmyKyadu.mjs";
4
- import { t as AiReasoning } from "./ai-reasoning-C4YsB2hQ.mjs";
5
- import { t as AiResponse } from "./ai-response-D5IkRFMN.mjs";
6
- import { n as AiSources, t as AiSource } from "./ai-source-CvglcFw1.mjs";
7
- import { t as AiSuggestion } from "./ai-suggestion-zGAQ1kkf.mjs";
8
- import { t as AiTool } from "./ai-tool-DY_iNbMk.mjs";
9
1
  import { injectComponentStyle } from "@bysages/core";
10
2
  import "svelte/internal/disclose-version";
11
3
  import * as $ from "svelte/internal/client";
@@ -17,7 +9,7 @@ var rest_excludes$3 = /* @__PURE__ */ new Set([
17
9
  "children"
18
10
  ]);
19
11
  var root$3 = $.from_html(`<div><!></div>`);
20
- function Ai$1($$anchor, $$props) {
12
+ function Ai($$anchor, $$props) {
21
13
  $.push($$props, true);
22
14
  injectComponentStyle("ai");
23
15
  let rest = $.rest_props($$props, rest_excludes$3);
@@ -113,28 +105,4 @@ function AiLoader($$anchor, $$props) {
113
105
  $.pop();
114
106
  }
115
107
  //#endregion
116
- //#region src/components/ai/index.ts
117
- /** A conversation column: Root is the log, Message carries a role, and
118
- * the speaking parts — Response, Reasoning, Tool, Sources — part the
119
- * stream. The interactive folds are the shared Collapsible wearing a
120
- * `data-ai` marker, the prompt vessel the shared Field, so the machine
121
- * work is never ours. Parts stay agnostic of any client; consumers map
122
- * their message format (e.g. the `UIMessage` parts re-exported below)
123
- * onto these primitives. */
124
- const Ai = Object.assign(Ai$1, {
125
- Conversation: Ai$1,
126
- Content: AiContent,
127
- Message: AiMessage,
128
- Response: AiResponse,
129
- Reasoning: AiReasoning,
130
- Tool: AiTool,
131
- Sources: AiSources,
132
- Source: AiSource,
133
- Actions: AiActions,
134
- Action: AiAction,
135
- Suggestion: AiSuggestion,
136
- PromptInput: AiPromptInput,
137
- Loader: AiLoader
138
- });
139
- //#endregion
140
- export { Ai as t };
108
+ export { Ai as i, AiContent as n, AiActions as r, AiLoader as t };
@@ -0,0 +1,75 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import "svelte/internal/disclose-version";
3
+ import * as $ from "svelte/internal/client";
4
+ import { useFieldContext } from "@ark-ui/svelte/field";
5
+ //#region src/components/input/mask.ts
6
+ function accepts(slot, ch) {
7
+ if (slot === "9") return /\d/.test(ch);
8
+ if (slot === "a") return /[a-zA-Z]/.test(ch);
9
+ return /[\da-zA-Z]/.test(ch);
10
+ }
11
+ /** Apply the entry mask: `9` takes a digit, `a` a letter, `*` either;
12
+ * every other character is literal. A literal already typed is consumed,
13
+ * not duplicated; a literal met out of place holds the walk and lets its
14
+ * own slot claim it — so deleting through the middle reflows the shape
15
+ * instead of corrupting it. */
16
+ function applyMask(raw, mask) {
17
+ const literals = new Set(mask.split("").filter((s) => s !== "9" && s !== "a" && s !== "*"));
18
+ let out = "";
19
+ let at = 0;
20
+ slots: for (const slot of mask) {
21
+ if (at >= raw.length) break;
22
+ if (slot === "9" || slot === "a" || slot === "*") {
23
+ let ch = raw[at];
24
+ while (ch !== void 0 && !accepts(slot, ch)) {
25
+ if (literals.has(ch)) continue slots;
26
+ at += 1;
27
+ ch = raw[at];
28
+ }
29
+ if (ch === void 0) break;
30
+ out += ch;
31
+ at += 1;
32
+ } else if (raw[at] === slot) {
33
+ at += 1;
34
+ out += slot;
35
+ } else out += slot;
36
+ }
37
+ return out;
38
+ }
39
+ //#endregion
40
+ //#region src/components/input/Input.svelte
41
+ var rest_excludes = /* @__PURE__ */ new Set([
42
+ "$$slots",
43
+ "$$events",
44
+ "$$legacy",
45
+ "value",
46
+ "size",
47
+ "invalid",
48
+ "mask"
49
+ ]);
50
+ var root = $.from_html(`<input/>`);
51
+ function Input($$anchor, $$props) {
52
+ $.push($$props, true);
53
+ injectComponentStyle("input");
54
+ let value = $.prop($$props, "value", 15), size = $.prop($$props, "size", 3, "md"), invalid = $.prop($$props, "invalid", 3, false), rest = $.rest_props($$props, rest_excludes);
55
+ const field = useFieldContext();
56
+ const fieldProps = $.derived(() => field?.()?.getInputProps() ?? {});
57
+ var input = root();
58
+ var event_handler = (event) => {
59
+ value($$props.mask ? applyMask(event.currentTarget.value, $$props.mask) : event.currentTarget.value);
60
+ };
61
+ $.attribute_effect(input, () => ({
62
+ ...$.get(fieldProps),
63
+ ...rest,
64
+ "data-scope": "input",
65
+ "data-part": "root",
66
+ "data-size": size(),
67
+ "data-invalid": invalid() || $.get(fieldProps)["data-invalid"] != null ? "" : void 0,
68
+ oninput: event_handler
69
+ }), void 0, void 0, void 0, void 0, true);
70
+ $.bind_value(input, value);
71
+ $.append($$anchor, input);
72
+ $.pop();
73
+ }
74
+ //#endregion
75
+ export { Input as t };
@@ -10,7 +10,7 @@ var rest_excludes = /* @__PURE__ */ new Set([
10
10
  "children"
11
11
  ]);
12
12
  var root = $.from_html(`<span><svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-opacity="0.2" stroke-width="2.5"></circle><path d="M21 12a9 9 0 0 0-9-9" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"></path></svg> <!></span>`);
13
- function Spinner$1($$anchor, $$props) {
13
+ function Spinner($$anchor, $$props) {
14
14
  $.push($$props, true);
15
15
  injectComponentStyle("spinner");
16
16
  let size = $.prop($$props, "size", 3, "md"), rest = $.rest_props($$props, rest_excludes);
@@ -30,9 +30,4 @@ function Spinner$1($$anchor, $$props) {
30
30
  $.pop();
31
31
  }
32
32
  //#endregion
33
- //#region src/components/spinner/index.ts
34
- /** A wheel of waiting: one arc of ink turning about its center. Quiet by
35
- * default — it reports progress without claiming attention. */
36
- const Spinner = Spinner$1;
37
- //#endregion
38
33
  export { Spinner as t };
@@ -8,12 +8,13 @@ var rest_excludes = /* @__PURE__ */ new Set([
8
8
  "$$events",
9
9
  "$$legacy",
10
10
  "size",
11
+ "variant",
11
12
  "children"
12
13
  ]);
13
14
  function TabsRoot($$anchor, $$props) {
14
15
  $.push($$props, true);
15
16
  injectComponentStyle("tabs");
16
- let size = $.prop($$props, "size", 3, "md"), rest = $.rest_props($$props, rest_excludes);
17
+ let size = $.prop($$props, "size", 3, "md"), variant = $.prop($$props, "variant", 3, "line"), rest = $.rest_props($$props, rest_excludes);
17
18
  var fragment = $.comment();
18
19
  var node = $.first_child(fragment);
19
20
  $.component(node, () => Tabs.Root, ($$anchor, ArkTabs_Root) => {
@@ -21,6 +22,9 @@ function TabsRoot($$anchor, $$props) {
21
22
  get "data-size"() {
22
23
  return size();
23
24
  },
25
+ get "data-variant"() {
26
+ return variant();
27
+ },
24
28
  children: ($$anchor, $$slotProps) => {
25
29
  var fragment_1 = $.comment();
26
30
  var node_1 = $.first_child(fragment_1);
@@ -8,12 +8,13 @@ var rest_excludes = /* @__PURE__ */ new Set([
8
8
  "$$events",
9
9
  "$$legacy",
10
10
  "size",
11
+ "shape",
11
12
  "children"
12
13
  ]);
13
14
  function Avatar$2($$anchor, $$props) {
14
15
  $.push($$props, true);
15
16
  injectComponentStyle("avatar");
16
- let rest = $.rest_props($$props, rest_excludes);
17
+ let shape = $.prop($$props, "shape", 3, "circle"), rest = $.rest_props($$props, rest_excludes);
17
18
  var fragment = $.comment();
18
19
  var node = $.first_child(fragment);
19
20
  $.component(node, () => Avatar.Root, ($$anchor, ArkAvatar_Root) => {
@@ -21,6 +22,9 @@ function Avatar$2($$anchor, $$props) {
21
22
  get "data-size"() {
22
23
  return $$props.size;
23
24
  },
25
+ get "data-shape"() {
26
+ return shape();
27
+ },
24
28
  children: ($$anchor, $$slotProps) => {
25
29
  var fragment_1 = $.comment();
26
30
  var node_1 = $.first_child(fragment_1);
@@ -0,0 +1,73 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import "svelte/internal/disclose-version";
3
+ import * as $ from "svelte/internal/client";
4
+ //#region src/components/bento/Bento.svelte
5
+ var rest_excludes$1 = /* @__PURE__ */ new Set([
6
+ "$$slots",
7
+ "$$events",
8
+ "$$legacy",
9
+ "columns",
10
+ "children"
11
+ ]);
12
+ var root$1 = $.from_html(`<div><!></div>`);
13
+ function Bento$1($$anchor, $$props) {
14
+ $.push($$props, true);
15
+ injectComponentStyle("bento");
16
+ /** Tracks across the lattice. */
17
+ let columns = $.prop($$props, "columns", 3, 3), rest = $.rest_props($$props, rest_excludes$1);
18
+ var div = root$1();
19
+ $.attribute_effect(div, ($0) => ({
20
+ ...rest,
21
+ "data-scope": "bento",
22
+ "data-part": "root",
23
+ [$.STYLE]: { "--bs-bento-columns": $0 }
24
+ }), [() => String(columns())]);
25
+ var node = $.child(div);
26
+ $.snippet(node, () => $$props.children ?? $.noop);
27
+ $.reset(div);
28
+ $.append($$anchor, div);
29
+ $.pop();
30
+ }
31
+ //#endregion
32
+ //#region src/components/bento/BentoCell.svelte
33
+ var rest_excludes = /* @__PURE__ */ new Set([
34
+ "$$slots",
35
+ "$$events",
36
+ "$$legacy",
37
+ "span",
38
+ "rowSpan",
39
+ "children"
40
+ ]);
41
+ var root = $.from_html(`<div><!></div>`);
42
+ function BentoCell($$anchor, $$props) {
43
+ $.push($$props, true);
44
+ injectComponentStyle("bento");
45
+ /** Columns this tile claims. */
46
+ /** Rows this tile claims. */
47
+ let span = $.prop($$props, "span", 3, 1), rowSpan = $.prop($$props, "rowSpan", 3, 1), rest = $.rest_props($$props, rest_excludes);
48
+ var div = root();
49
+ $.attribute_effect(div, ($0, $1) => ({
50
+ ...rest,
51
+ "data-scope": "bento",
52
+ "data-part": "cell",
53
+ [$.STYLE]: {
54
+ "--bs-bento-span-x": $0,
55
+ "--bs-bento-span-y": $1
56
+ }
57
+ }), [() => String(span()), () => String(rowSpan())]);
58
+ var node = $.child(div);
59
+ $.snippet(node, () => $$props.children ?? $.noop);
60
+ $.reset(div);
61
+ $.append($$anchor, div);
62
+ $.pop();
63
+ }
64
+ //#endregion
65
+ //#region src/components/bento/index.ts
66
+ /** The bento lattice: a grid of unequal tiles that reads as one plate
67
+ * — Bento, Bento.Cell. */
68
+ const Bento = Object.assign(Bento$1, {
69
+ Root: Bento$1,
70
+ Cell: BentoCell
71
+ });
72
+ //#endregion
73
+ export { Bento as t };
@@ -0,0 +1,50 @@
1
+ import { t as Spinner } from "./Spinner-sd__23WT.mjs";
2
+ import { injectComponentStyle } from "@bysages/core";
3
+ import "svelte/internal/disclose-version";
4
+ import * as $ from "svelte/internal/client";
5
+ //#region src/components/block-ui/BlockUI.svelte
6
+ var rest_excludes = /* @__PURE__ */ new Set([
7
+ "$$slots",
8
+ "$$events",
9
+ "$$legacy",
10
+ "blocked",
11
+ "children"
12
+ ]);
13
+ var root = $.from_html(`<div data-scope="block-ui" data-part="mask"><!></div>`);
14
+ var root_1 = $.from_html(`<div><!> <!></div>`);
15
+ function BlockUI$1($$anchor, $$props) {
16
+ $.push($$props, true);
17
+ injectComponentStyle("block-ui");
18
+ let blocked = $.prop($$props, "blocked", 3, false), rest = $.rest_props($$props, rest_excludes);
19
+ var div = root_1();
20
+ $.attribute_effect(div, () => ({
21
+ ...rest,
22
+ "data-scope": "block-ui",
23
+ "data-part": "root",
24
+ "data-blocked": blocked() ? "" : void 0,
25
+ "aria-busy": blocked() || void 0
26
+ }));
27
+ var node = $.child(div);
28
+ $.snippet(node, () => $$props.children ?? $.noop);
29
+ var node_1 = $.sibling(node, 2);
30
+ var consequent = ($$anchor) => {
31
+ var div_1 = root();
32
+ var node_2 = $.child(div_1);
33
+ Spinner(node_2, { size: "lg" });
34
+ $.reset(div_1);
35
+ $.append($$anchor, div_1);
36
+ };
37
+ $.if(node_1, ($$render) => {
38
+ if (blocked()) $$render(consequent);
39
+ });
40
+ $.reset(div);
41
+ $.append($$anchor, div);
42
+ $.pop();
43
+ }
44
+ //#endregion
45
+ //#region src/components/block-ui/index.ts
46
+ /** A curtain over content that must wait: frosted paper and one
47
+ * quiet wheel. */
48
+ const BlockUI = BlockUI$1;
49
+ //#endregion
50
+ export { BlockUI as t };
@@ -0,0 +1,146 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import "svelte/internal/disclose-version";
3
+ import * as $ from "svelte/internal/client";
4
+ //#region src/components/browser/Browser.svelte
5
+ var rest_excludes$4 = /* @__PURE__ */ new Set([
6
+ "$$slots",
7
+ "$$events",
8
+ "$$legacy",
9
+ "children"
10
+ ]);
11
+ var root$4 = $.from_html(`<div><!></div>`);
12
+ function Browser$1($$anchor, $$props) {
13
+ $.push($$props, true);
14
+ injectComponentStyle("browser");
15
+ let rest = $.rest_props($$props, rest_excludes$4);
16
+ var div = root$4();
17
+ $.attribute_effect(div, () => ({
18
+ ...rest,
19
+ "data-scope": "browser",
20
+ "data-part": "root"
21
+ }));
22
+ var node = $.child(div);
23
+ $.snippet(node, () => $$props.children ?? $.noop);
24
+ $.reset(div);
25
+ $.append($$anchor, div);
26
+ $.pop();
27
+ }
28
+ //#endregion
29
+ //#region src/components/browser/BrowserBody.svelte
30
+ var rest_excludes$3 = /* @__PURE__ */ new Set([
31
+ "$$slots",
32
+ "$$events",
33
+ "$$legacy",
34
+ "children"
35
+ ]);
36
+ var root$3 = $.from_html(`<div><!></div>`);
37
+ function BrowserBody($$anchor, $$props) {
38
+ $.push($$props, true);
39
+ injectComponentStyle("browser");
40
+ let rest = $.rest_props($$props, rest_excludes$3);
41
+ var div = root$3();
42
+ $.attribute_effect(div, () => ({
43
+ ...rest,
44
+ "data-scope": "browser",
45
+ "data-part": "body"
46
+ }));
47
+ var node = $.child(div);
48
+ $.snippet(node, () => $$props.children ?? $.noop);
49
+ $.reset(div);
50
+ $.append($$anchor, div);
51
+ $.pop();
52
+ }
53
+ //#endregion
54
+ //#region src/components/browser/BrowserDots.svelte
55
+ var rest_excludes$2 = /* @__PURE__ */ new Set([
56
+ "$$slots",
57
+ "$$events",
58
+ "$$legacy"
59
+ ]);
60
+ var root$2 = $.from_html(`<span data-scope="browser" data-part="dot"></span>`);
61
+ var root_1 = $.from_html(`<div></div>`);
62
+ function BrowserDots($$anchor, $$props) {
63
+ $.push($$props, true);
64
+ injectComponentStyle("browser");
65
+ let rest = $.rest_props($$props, rest_excludes$2);
66
+ const tones = [
67
+ "danger",
68
+ "warning",
69
+ "success"
70
+ ];
71
+ var div = root_1();
72
+ $.attribute_effect(div, () => ({
73
+ ...rest,
74
+ "data-scope": "browser",
75
+ "data-part": "dots"
76
+ }));
77
+ $.each(div, 20, () => tones, (tone) => tone, ($$anchor, tone) => {
78
+ var span = root$2();
79
+ $.template_effect(() => $.set_attribute(span, "data-tone", tone));
80
+ $.append($$anchor, span);
81
+ });
82
+ $.reset(div);
83
+ $.append($$anchor, div);
84
+ $.pop();
85
+ }
86
+ //#endregion
87
+ //#region src/components/browser/BrowserTitleBar.svelte
88
+ var rest_excludes$1 = /* @__PURE__ */ new Set([
89
+ "$$slots",
90
+ "$$events",
91
+ "$$legacy",
92
+ "children"
93
+ ]);
94
+ var root$1 = $.from_html(`<div><!></div>`);
95
+ function BrowserTitleBar($$anchor, $$props) {
96
+ $.push($$props, true);
97
+ injectComponentStyle("browser");
98
+ let rest = $.rest_props($$props, rest_excludes$1);
99
+ var div = root$1();
100
+ $.attribute_effect(div, () => ({
101
+ ...rest,
102
+ "data-scope": "browser",
103
+ "data-part": "titlebar"
104
+ }));
105
+ var node = $.child(div);
106
+ $.snippet(node, () => $$props.children ?? $.noop);
107
+ $.reset(div);
108
+ $.append($$anchor, div);
109
+ $.pop();
110
+ }
111
+ //#endregion
112
+ //#region src/components/browser/BrowserUrlBar.svelte
113
+ var rest_excludes = /* @__PURE__ */ new Set([
114
+ "$$slots",
115
+ "$$events",
116
+ "$$legacy",
117
+ "children"
118
+ ]);
119
+ var root = $.from_html(`<div><!></div>`);
120
+ function BrowserUrlBar($$anchor, $$props) {
121
+ $.push($$props, true);
122
+ injectComponentStyle("browser");
123
+ let rest = $.rest_props($$props, rest_excludes);
124
+ var div = root();
125
+ $.attribute_effect(div, () => ({
126
+ ...rest,
127
+ "data-scope": "browser",
128
+ "data-part": "urlbar"
129
+ }));
130
+ var node = $.child(div);
131
+ $.snippet(node, () => $$props.children ?? $.noop);
132
+ $.reset(div);
133
+ $.append($$anchor, div);
134
+ $.pop();
135
+ }
136
+ //#endregion
137
+ //#region src/components/browser/index.ts
138
+ /** A browser window as a vessel: Root, TitleBar, Dots, UrlBar, Body. */
139
+ const Browser = Object.assign(Browser$1, {
140
+ TitleBar: BrowserTitleBar,
141
+ Dots: BrowserDots,
142
+ UrlBar: BrowserUrlBar,
143
+ Body: BrowserBody
144
+ });
145
+ //#endregion
146
+ export { Browser as t };
@@ -1,4 +1,4 @@
1
- import { t as Input } from "./Input-Biz4J1B6.mjs";
1
+ import { t as Input } from "./Input-CZhcEeFU.mjs";
2
2
  import { injectComponentStyle } from "@bysages/core";
3
3
  import "svelte/internal/disclose-version";
4
4
  import * as $ from "svelte/internal/client";
@@ -21,13 +21,13 @@ var rest_excludes = /* @__PURE__ */ new Set([
21
21
  "multiple",
22
22
  "disabled"
23
23
  ]);
24
- var root = $.from_html(`<span data-part="branch-indicator" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></span>`);
24
+ var root = $.from_html(`<span data-scope="cascade-select" data-part="branch-indicator" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></span>`);
25
25
  var root_1 = $.from_html(`<li><span> </span> <!> <span><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"></path></svg></span></li>`);
26
26
  var root_2 = $.from_html(`<ul></ul> <!>`, 1);
27
- var root_3 = $.from_html(`<div data-part="search"><!></div>`);
28
- var root_4 = $.from_html(`<p data-part="empty">Nothing matches</p>`);
29
- var root_5 = $.from_html(`<button type="button" data-part="match"> </button>`);
30
- var root_6 = $.from_html(`<div><div><!> <div data-part="corridor"><!></div></div></div>`);
27
+ var root_3 = $.from_html(`<div data-scope="cascade-select" data-part="search"><!></div>`);
28
+ var root_4 = $.from_html(`<p data-scope="cascade-select" data-part="empty">Nothing matches</p>`);
29
+ var root_5 = $.from_html(`<button type="button" data-scope="cascade-select" data-part="match"> </button>`);
30
+ var root_6 = $.from_html(`<div><div><!> <div data-scope="cascade-select" data-part="corridor"><!></div></div></div>`);
31
31
  var root_7 = $.from_html(`<div><div><button><span> </span> <span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span></button></div> <!></div>`);
32
32
  function CascadeSelect$1($$anchor, $$props) {
33
33
  const id = $.props_id();
@@ -1,4 +1,4 @@
1
- import { a as SourceDocumentUIPart, c as TextUIPart, d as UIMessagePart, f as AiPartProps, i as ReasoningUIPart, l as ToolUIPart, n as DataUIPart, o as SourceUrlUIPart, r as FileUIPart, s as StepStartUIPart, t as Ai, u as UIMessage } from "../../index-BjVEomHj.mjs";
1
+ import { i as Ai$1, n as AiContent, r as AiActions, t as AiLoader } from "../../AiLoader-0jlig3fe.mjs";
2
2
  import { t as ActionProps } from "../../props-BvDM6-cm.mjs";
3
3
  import { n as MessageRole, t as MessageProps } from "../../props-CIwO25eA.mjs";
4
4
  import { t as PromptInputProps } from "../../props-U567RIQo.mjs";
@@ -7,4 +7,5 @@ import { t as ResponseProps } from "../../props-D93CbAiS.mjs";
7
7
  import { t as SourceProps } from "../../props-C2OWII_8.mjs";
8
8
  import { t as SuggestionProps } from "../../props-Dr7ABUbp.mjs";
9
9
  import { n as ToolStatus, t as ToolProps } from "../../props-B9YcQX8X.mjs";
10
- export { type ActionProps, Ai, type AiPartProps, type DataUIPart, type FileUIPart, type MessageProps, type MessageRole, type PromptInputProps, type ReasoningProps, type ReasoningUIPart, type ResponseProps, type SourceDocumentUIPart, type SourceProps, type SourceUrlUIPart, type StepStartUIPart, type SuggestionProps, type TextUIPart, type ToolProps, type ToolStatus, type ToolUIPart, type UIMessage, type UIMessagePart };
10
+ import { a as SourceDocumentUIPart, c as TextUIPart, d as UIMessagePart, f as AiPartProps, i as ReasoningUIPart, l as ToolUIPart, n as DataUIPart, o as SourceUrlUIPart, r as FileUIPart, s as StepStartUIPart, t as Ai, u as UIMessage } from "../../index-CtbGSRNw.mjs";
11
+ export { type ActionProps, Ai, AiActions, AiContent, Ai$1 as AiConversation, AiLoader, type AiPartProps, type DataUIPart, type FileUIPart, type MessageProps, type MessageRole, type PromptInputProps, type ReasoningProps, type ReasoningUIPart, type ResponseProps, type SourceDocumentUIPart, type SourceProps, type SourceUrlUIPart, type StepStartUIPart, type SuggestionProps, type TextUIPart, type ToolProps, type ToolStatus, type ToolUIPart, type UIMessage, type UIMessagePart };
@@ -1,2 +1,27 @@
1
- import { t as Ai } from "../../ai-BOUoSSjw.mjs";
2
- export { Ai };
1
+ import { t as AiAction } from "../../ai-action-DKsvxilp.mjs";
2
+ import { t as AiMessage } from "../../ai-message-DBs1fdFm.mjs";
3
+ import { t as AiPromptInput } from "../../ai-prompt-input-BmyKyadu.mjs";
4
+ import { t as AiReasoning } from "../../ai-reasoning-C4YsB2hQ.mjs";
5
+ import { t as AiResponse } from "../../ai-response-D5IkRFMN.mjs";
6
+ import { n as AiSources, t as AiSource } from "../../ai-source-CvglcFw1.mjs";
7
+ import { t as AiSuggestion } from "../../ai-suggestion-zGAQ1kkf.mjs";
8
+ import { t as AiTool } from "../../ai-tool-DY_iNbMk.mjs";
9
+ import { i as Ai$1, n as AiContent, r as AiActions, t as AiLoader } from "../../AiLoader-0jlig3fe.mjs";
10
+ //#region src/components/ai/index.ts
11
+ const Ai = Object.assign(Ai$1, {
12
+ Conversation: Ai$1,
13
+ MessageContent: AiContent,
14
+ Message: AiMessage,
15
+ Response: AiResponse,
16
+ Reasoning: AiReasoning,
17
+ Tool: AiTool,
18
+ Sources: AiSources,
19
+ Source: AiSource,
20
+ Actions: AiActions,
21
+ Action: AiAction,
22
+ Suggestion: AiSuggestion,
23
+ PromptInput: AiPromptInput,
24
+ Loader: AiLoader
25
+ });
26
+ //#endregion
27
+ export { Ai, AiActions, AiContent, Ai$1 as AiConversation, AiLoader };
@@ -4,4 +4,4 @@ import { t as ActionProps } from "../../props-BvDM6-cm.mjs";
4
4
  * shared Button in its ghost register. */
5
5
  export declare const AiAction: import("svelte").Component<ActionProps, {}, "">;
6
6
  //#endregion
7
- export type { ActionProps };
7
+ export { AiAction as Action, type ActionProps };
@@ -1,2 +1,2 @@
1
1
  import { t as AiAction } from "../../ai-action-DKsvxilp.mjs";
2
- export { AiAction };
2
+ export { AiAction as Action, AiAction };
@@ -4,4 +4,4 @@ import { n as MessageRole, t as MessageProps } from "../../props-CIwO25eA.mjs";
4
4
  * the assistant speaks flat on the paper. */
5
5
  export declare const AiMessage: import("svelte").Component<MessageProps, {}, "">;
6
6
  //#endregion
7
- export type { MessageProps, MessageRole };
7
+ export { AiMessage as Message, type MessageProps, type MessageRole };
@@ -1,2 +1,2 @@
1
1
  import { t as AiMessage } from "../../ai-message-DBs1fdFm.mjs";
2
- export { AiMessage };
2
+ export { AiMessage, AiMessage as Message };
@@ -4,4 +4,4 @@ import { t as PromptInputProps } from "../../props-U567RIQo.mjs";
4
4
  * machine's autoresize — over a footer row carrying the submit seal. */
5
5
  export declare const AiPromptInput: import("svelte").Component<PromptInputProps, {}, "value">;
6
6
  //#endregion
7
- export type { PromptInputProps };
7
+ export { AiPromptInput as PromptInput, type PromptInputProps };
@@ -1,2 +1,2 @@
1
1
  import { t as AiPromptInput } from "../../ai-prompt-input-BmyKyadu.mjs";
2
- export { AiPromptInput };
2
+ export { AiPromptInput, AiPromptInput as PromptInput };
@@ -4,4 +4,4 @@ import { t as ReasoningProps } from "../../props-BZcE7LP_.mjs";
4
4
  * register. */
5
5
  export declare const AiReasoning: import("svelte").Component<ReasoningProps, {}, "">;
6
6
  //#endregion
7
- export type { ReasoningProps };
7
+ export { AiReasoning as Reasoning, type ReasoningProps };
@@ -1,2 +1,2 @@
1
1
  import { t as AiReasoning } from "../../ai-reasoning-C4YsB2hQ.mjs";
2
- export { AiReasoning };
2
+ export { AiReasoning, AiReasoning as Reasoning };
@@ -3,4 +3,4 @@ import { t as ResponseProps } from "../../props-D93CbAiS.mjs";
3
3
  /** Markdown set on the paper — streaming-safe by construction. */
4
4
  export declare const AiResponse: import("svelte").Component<ResponseProps, {}, "">;
5
5
  //#endregion
6
- export type { ResponseProps };
6
+ export { AiResponse as Response, type ResponseProps };
@@ -1,2 +1,2 @@
1
1
  import { t as AiResponse } from "../../ai-response-D5IkRFMN.mjs";
2
- export { AiResponse };
2
+ export { AiResponse, AiResponse as Response };
@@ -5,4 +5,4 @@ import { n as SourcesProps, t as SourceProps } from "../../props-C2OWII_8.mjs";
5
5
  export declare const AiSource: import("svelte").Component<SourceProps, {}, "">;
6
6
  export declare const AiSources: import("svelte").Component<SourcesProps, {}, "">;
7
7
  //#endregion
8
- export type { SourceProps, SourcesProps };
8
+ export { AiSource as Source, AiSources as Sources, type SourceProps, type SourcesProps };
@@ -1,2 +1,2 @@
1
1
  import { n as AiSources, t as AiSource } from "../../ai-source-CvglcFw1.mjs";
2
- export { AiSource, AiSources };
2
+ export { AiSource, AiSource as Source, AiSources, AiSources as Sources };
@@ -4,4 +4,4 @@ import { t as SuggestionProps } from "../../props-Dr7ABUbp.mjs";
4
4
  * the prompt. */
5
5
  export declare const AiSuggestion: import("svelte").Component<SuggestionProps, {}, "">;
6
6
  //#endregion
7
- export type { SuggestionProps };
7
+ export { AiSuggestion as Suggestion, type SuggestionProps };