@bysages/svelte 0.1.1 → 0.2.1

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 (3) hide show
  1. package/dist/index.d.mts +155 -75
  2. package/dist/index.mjs +1478 -809
  3. package/package.json +7 -7
package/dist/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { t as useMentions } from "./use-mentions-DeF_38di.mjs";
2
2
  import { Accordion as Accordion$1 } from "@ark-ui/svelte/accordion";
3
3
  import { Field as Field$1 } from "@ark-ui/svelte/field";
4
- import { Collapsible as Collapsible$1 } from "@ark-ui/svelte/collapsible";
4
+ import { Popover as Popover$1 } from "@ark-ui/svelte/popover";
5
5
  import { Snippet } from "svelte";
6
+ import { Collapsible as Collapsible$1 } from "@ark-ui/svelte/collapsible";
6
7
  import { Combobox as Combobox$1 } from "@ark-ui/svelte/combobox";
7
8
  import { CollectionItem, CollectionOptions, FilePathTreeNode, FlatTreeNode, GridCollection, GridCollectionOptions, ListCollection, TreeCollection, TreeCollectionOptions, TreeNode, UseAsyncListProps, UseAsyncListReturn, UseListCollectionProps, UseListCollectionReturn, UseListSelectionProps, UseListSelectionReturn, createFileTreeCollection, createGridCollection, createTreeCollection, useAsyncList, useListCollection, useListSelection } from "@ark-ui/svelte/collection";
8
9
  import { AngleSlider as AngleSlider$1 } from "@ark-ui/svelte/angle-slider";
@@ -29,7 +30,6 @@ import { JsonTreeView as JsonTreeView$1 } from "@ark-ui/svelte/json-tree-view";
29
30
  import { Listbox as Listbox$1 } from "@ark-ui/svelte/listbox";
30
31
  import { Marquee as Marquee$1 } from "@ark-ui/svelte/marquee";
31
32
  import { Menu as Menu$1 } from "@ark-ui/svelte/menu";
32
- import { Popover as Popover$1 } from "@ark-ui/svelte/popover";
33
33
  import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/svelte/navigation-menu";
34
34
  import { NumberInput as NumberInput$1 } from "@ark-ui/svelte/number-input";
35
35
  import { Pagination as Pagination$1 } from "@ark-ui/svelte/pagination";
@@ -107,29 +107,126 @@ interface MessageProps extends HTMLAttributes<HTMLElement> {
107
107
  children?: Snippet;
108
108
  }
109
109
  //#endregion
110
+ //#region src/components/mentions/props.d.ts
111
+ interface MentionEntry {
112
+ label: string;
113
+ value: string;
114
+ }
115
+ interface UseMentionsOptions {
116
+ /** The candidates offered once the trigger character is typed. */
117
+ items: MentionEntry[];
118
+ /** The character that summons the candidates. */
119
+ trigger?: string;
120
+ }
121
+ interface UseMentionsHandlers {
122
+ /** The text the field holds right now — read at keystroke time, never
123
+ * from a controlled prop that lags a render behind the caret. */
124
+ getText: () => string;
125
+ /** Writes the field's next text: a mention inserted at the token. */
126
+ setText: (value: string) => void;
127
+ }
128
+ interface MentionsProps extends HTMLAttributes<HTMLDivElement> {
129
+ /** The candidates offered once the trigger character is typed. */
130
+ items?: MentionEntry[];
131
+ /** Two-way bindable — `bind:value` keeps the bound variable mirroring
132
+ * the field; changes are reported through `onValueChange`. */
133
+ value?: string;
134
+ /** The character that summons the candidates. */
135
+ trigger?: string;
136
+ placeholder?: string;
137
+ /** Let the field grow with its text instead of holding `rows`. */
138
+ autoresize?: boolean;
139
+ /** Standing alone, the field announces itself invalid; inside a
140
+ * `Field.Root` the field's own invalid state takes over. */
141
+ invalid?: boolean;
142
+ /** The field's text turned. */
143
+ onValueChange?: (value: string) => void;
144
+ }
145
+ interface MentionsVesselProps {
146
+ open?: boolean;
147
+ matches?: MentionEntry[];
148
+ active?: number;
149
+ /** The live rectangle the vessel points at — the host's field. */
150
+ anchor?: HTMLTextAreaElement | null;
151
+ /** A candidate was confirmed (click or Enter). */
152
+ onInsert?: (entry: MentionEntry) => void;
153
+ /** The keyboard's active row moved. */
154
+ onActiveChange?: (index: number) => void;
155
+ /** The vessel's open state turned. */
156
+ onOpenChange?: (open: boolean) => void;
157
+ }
158
+ //#endregion
159
+ //#region src/components/mentions/index.d.ts
160
+ /** @-mentions: a plain textarea that, when the text before the caret
161
+ * ends with the trigger character followed by a token, offers the
162
+ * matching candidates in a small anchored vessel; choosing one replaces
163
+ * the token with `trigger + label` and hands the whole text back
164
+ * through `bind:value`. Arrows move, Enter inserts, Escape dismisses. */
165
+ export declare const Mentions: import("svelte").Component<MentionsProps, {}, "value">;
166
+ /** The vessel: the candidates themselves as a floating card. Composers
167
+ * that keep their own field anatomy wire it up with `useMentions`
168
+ * directly. */
169
+ export declare const MentionsVessel: import("svelte").Component<MentionsVesselProps, {}, "">;
170
+ //#endregion
110
171
  //#region src/components/ai-prompt-input/props.d.ts
111
172
  interface PromptInputProps extends HTMLAttributes<HTMLFormElement> {
112
- /** Two-way bindable — `bind:value` keeps the bound variable mirroring
113
- * the field; send clears it back through the binding. */
173
+ /** The draft in the vessel — bind `value`; it clears itself on a
174
+ * successful submit. */
114
175
  value?: string;
176
+ onValueChange?: (value: string) => void;
115
177
  onSubmit?: (value: string) => void;
178
+ onStop?: () => void;
116
179
  /** The quiet invitation before the reader types. */
117
180
  placeholder?: string;
181
+ /** Still the words on the canvas, but the submit seal does nothing
182
+ * and Enter stays a line break. */
118
183
  disabled?: boolean;
184
+ /** The machine is working — the seal becomes a stop seal and Enter
185
+ * holds its breath. */
186
+ busy?: boolean;
187
+ /** Mention candidates for the field: pass the roster and the summon
188
+ * character (`@` unless told otherwise) and the vessel rides the
189
+ * textarea. While candidates are up, Enter inserts and the send
190
+ * waits. */
191
+ mentions?: {
192
+ items: MentionEntry[];
193
+ trigger?: string;
194
+ };
195
+ /** Attachments riding above the text. */
196
+ header?: Snippet;
197
+ /** The tools at the text's left. */
198
+ leading?: Snippet;
199
+ /** Controls at the text's right — the send seal rides here by
200
+ * default. */
201
+ trailing?: Snippet;
202
+ /** The tools beneath the text. */
203
+ footer?: Snippet;
204
+ /** The controls that close the footer row — the seal falls here by
205
+ * default when a footer is present. */
206
+ footerEnd?: Snippet;
119
207
  }
120
208
  //#endregion
121
209
  //#region src/components/ai-reasoning/props.d.ts
122
210
  interface ReasoningProps extends HTMLAttributes<HTMLDivElement> {
123
211
  /** The trigger's words — the fold arrives open under them. */
124
212
  label?: string;
213
+ /** The fold arrives open when set — rides the shared collapsible. */
214
+ defaultOpen?: boolean;
125
215
  children?: Snippet;
126
216
  }
127
217
  //#endregion
128
218
  //#region src/components/ai-response/props.d.ts
129
219
  interface ResponseProps extends HTMLAttributes<HTMLDivElement> {
130
- /** The markdown text to set on the paper — streamed in freely;
131
- * raw HTML and executable links stay inert. */
220
+ /** The markdown text to set on the paper — streamed in freely; raw
221
+ * HTML and executable links stay inert. */
132
222
  content: string;
223
+ /** Optional code-highlighting function re-inking fenced blocks; the
224
+ * component stays agnostic about which engine provides it. */
225
+ highlighter?: (code: string, lang?: string) => string;
226
+ /** The copy stamp's accessible name before the copy lands. */
227
+ copyLabel?: string;
228
+ /** The copy stamp's accessible name once the text has landed. */
229
+ copiedLabel?: string;
133
230
  }
134
231
  //#endregion
135
232
  //#region src/components/ai-source/props.d.ts
@@ -161,6 +258,8 @@ interface ToolProps extends HTMLAttributes<HTMLDivElement> {
161
258
  /** The state the call reached — stamped on the fold and whispered
162
259
  * in the status chip. */
163
260
  status?: ToolStatus;
261
+ /** The fold arrives open when set — rides the shared collapsible. */
262
+ defaultOpen?: boolean;
164
263
  input?: string;
165
264
  output?: string;
166
265
  }
@@ -170,7 +269,7 @@ interface AiPartProps extends HTMLAttributes<HTMLElement> {
170
269
  children?: Snippet;
171
270
  }
172
271
  //#endregion
173
- //#region ../../node_modules/.pnpm/@ai-sdk+provider@4.0.14/node_modules/@ai-sdk/provider/dist/index.d.ts
272
+ //#region ../../node_modules/.pnpm/@ai-sdk+provider@4.0.17/node_modules/@ai-sdk/provider/dist/index.d.ts
174
273
  /**
175
274
  * Audio format configuration shared by provider V4 model specifications.
176
275
  */
@@ -250,7 +349,7 @@ type SharedV4Headers = Record<string, string>;
250
349
  * A JSON value can be a string, number, boolean, object, array, or null.
251
350
  * JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods.
252
351
  */
253
- type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
352
+ type JSONValue = null | string | number | boolean | Readonly<JSONObject> | readonly JSONValue[];
254
353
  type JSONObject = {
255
354
  [key: string]: JSONValue | undefined;
256
355
  };
@@ -9697,7 +9796,7 @@ interface $ZodConfig {
9697
9796
  declare const globalConfig: $ZodConfig;
9698
9797
  declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;
9699
9798
  //#endregion
9700
- //#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@5.0.40_zod@4.6.5/node_modules/@ai-sdk/provider-utils/dist/index.d.ts
9799
+ //#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@5.0.45_zod@4.6.5/node_modules/@ai-sdk/provider-utils/dist/index.d.ts
9701
9800
  /**
9702
9801
  * A value that can be provided either as a single item, an array of items,
9703
9802
  * or be left undefined.
@@ -10658,6 +10757,13 @@ type ToolOutputProperties<INPUT, OUTPUT, CONTEXT extends Context | unknown | nev
10658
10757
  * Common properties shared by all tool kinds.
10659
10758
  */
10660
10759
  type BaseTool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JSONValue | unknown | never = any, CONTEXT extends Context | unknown | never = any> = {
10760
+ /**
10761
+ * Defer exposing this tool until it is discovered by `toolSearch`.
10762
+ * Supports direct calls and local callers that announce tools in conversation
10763
+ * messages (code mode with `toolDiscovery: 'conversation'`). Discovered tools
10764
+ * become available on the next model step.
10765
+ */
10766
+ deferLoading?: boolean;
10661
10767
  /**
10662
10768
  * An optional title of the tool.
10663
10769
  *
@@ -10914,7 +11020,7 @@ type Normalize<OBJECT> = { [KEY in keyof OBJECT]: OBJECT[KEY]; };
10914
11020
  */
10915
11021
  type InferToolSetContext<TOOLS extends ToolSet> = Normalize<RequiredToolSetContext<TOOLS> & OptionalToolSetContext<TOOLS>>;
10916
11022
  //#endregion
10917
- //#region ../../node_modules/.pnpm/ai@7.0.99_zod@4.6.5/node_modules/ai/dist/index.d.ts
11023
+ //#region ../../node_modules/.pnpm/ai@7.0.107_zod@4.6.5/node_modules/ai/dist/index.d.ts
10918
11024
  /**
10919
11025
  * Embedding.
10920
11026
  */
@@ -12403,6 +12509,10 @@ type UIToolInvocation<TOOL extends UITool | Tool> = {
12403
12509
  } | {
12404
12510
  state: 'output-error';
12405
12511
  input: asUITool<TOOL>['input'] | undefined;
12512
+ /**
12513
+ * @deprecated Use `input` instead. This field will be removed in the next
12514
+ * major version.
12515
+ */
12406
12516
  rawInput?: unknown;
12407
12517
  output?: never;
12408
12518
  errorText: string;
@@ -13274,6 +13384,7 @@ declare global {
13274
13384
  * String model ids are resolved to the default provider and model id.
13275
13385
  *
13276
13386
  * If not set, the default provider is the Vercel AI gateway provider.
13387
+ * Experimental evaluation requires an explicitly configured evaluation-capable provider.
13277
13388
  *
13278
13389
  * @see https://ai-sdk.dev/docs/ai-sdk-core/provider-management#global-provider-configuration
13279
13390
  */
@@ -13443,11 +13554,25 @@ interface AspectRatioProps extends HTMLAttributes<HTMLDivElement> {
13443
13554
  * the width it is dealt, and the child fills the frame it is given. */
13444
13555
  export declare const AspectRatio: import("svelte").Component<AspectRatioProps, {}, "">;
13445
13556
  //#endregion
13557
+ //#region src/components/avatar/props.d.ts
13558
+ type AvatarSize = "sm" | "md" | "lg";
13559
+ interface AvatarProps {
13560
+ /** Seal diameter: the small, medium, or large control rung. The
13561
+ * default (large) stands as tall as the biggest control so an avatar
13562
+ * rides a row without stretching it. */
13563
+ size?: AvatarSize;
13564
+ children?: import("svelte").Snippet;
13565
+ }
13566
+ //#endregion
13446
13567
  //#region src/components/avatar/index.d.ts
13447
- /** Ark's Avatar, dressed in the paper-and-ink system: a circular seal on
13448
- * inset paper that holds initials until the image loads over them. The
13449
- * API is Ark's own — Root, Image, Fallback. */
13450
- export declare const Avatar: typeof Avatar$1;
13568
+ /** Avatar, dressed in the paper-and-ink system: a circular seal on
13569
+ * inset paper that holds initials until the image loads over them.
13570
+ * `size` picks a control-height rung for the seal — the core styles
13571
+ * re-point `--bs-avatar-size` per rung, and scenes can still retune the
13572
+ * variable directly. */
13573
+ export declare const Avatar: typeof Avatar$1 & {
13574
+ Root: import("svelte").Component<AvatarProps, {}, "">;
13575
+ };
13451
13576
  //#endregion
13452
13577
  //#region src/components/avatar-group/props.d.ts
13453
13578
  interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {
@@ -13466,6 +13591,10 @@ interface BackTopProps extends HTMLButtonAttributes {
13466
13591
  threshold?: number;
13467
13592
  /** The accessible name; the control is icon-only by default. */
13468
13593
  label?: string;
13594
+ /** Ride a scrolling element of your own instead of the page: the
13595
+ * control moors inside that element's corner and watches its
13596
+ * scrollTop. The host supplies the positioning context. */
13597
+ scrollEl?: () => HTMLElement | null;
13469
13598
  /** The control's own content — the up-stroke glyph by default. */
13470
13599
  children?: Snippet;
13471
13600
  }
@@ -13646,6 +13775,9 @@ interface CascadeSelectProps extends HTMLAttributes<HTMLDivElement> {
13646
13775
  /** `"hover"` turns the classic cascading menu: pointing is enough to
13647
13776
  * unfold. */
13648
13777
  highlightTrigger?: "click" | "hover";
13778
+ /** Flattens the corridor into matching routes while a query runs —
13779
+ * each hit still reads as its full path. */
13780
+ filterable?: boolean;
13649
13781
  multiple?: boolean;
13650
13782
  disabled?: boolean;
13651
13783
  }
@@ -13683,6 +13815,7 @@ interface CheckboxGroupProps extends HTMLAttributes<HTMLDivElement> {
13683
13815
  value?: string[];
13684
13816
  options: CheckboxOption[];
13685
13817
  layout?: "vertical" | "horizontal";
13818
+ invalid?: boolean;
13686
13819
  disabled?: boolean;
13687
13820
  children?: Snippet;
13688
13821
  }
@@ -14431,67 +14564,6 @@ interface MenubarProps extends HTMLAttributes<HTMLDivElement> {
14431
14564
  * stylesheet dresses them. */
14432
14565
  export declare const Menubar: import("svelte").Component<MenubarProps, {}, "">;
14433
14566
  //#endregion
14434
- //#region src/components/mentions/props.d.ts
14435
- interface MentionEntry {
14436
- label: string;
14437
- value: string;
14438
- }
14439
- interface UseMentionsOptions {
14440
- /** The candidates offered once the trigger character is typed. */
14441
- items: MentionEntry[];
14442
- /** The character that summons the candidates. */
14443
- trigger?: string;
14444
- }
14445
- interface UseMentionsHandlers {
14446
- /** The text the field holds right now — read at keystroke time, never
14447
- * from a controlled prop that lags a render behind the caret. */
14448
- getText: () => string;
14449
- /** Writes the field's next text: a mention inserted at the token. */
14450
- setText: (value: string) => void;
14451
- }
14452
- interface MentionsProps extends HTMLAttributes<HTMLDivElement> {
14453
- /** The candidates offered once the trigger character is typed. */
14454
- items?: MentionEntry[];
14455
- /** Two-way bindable — `bind:value` keeps the bound variable mirroring
14456
- * the field; changes are reported through `onValueChange`. */
14457
- value?: string;
14458
- /** The character that summons the candidates. */
14459
- trigger?: string;
14460
- placeholder?: string;
14461
- /** Let the field grow with its text instead of holding `rows`. */
14462
- autoresize?: boolean;
14463
- /** Standing alone, the field announces itself invalid; inside a
14464
- * `Field.Root` the field's own invalid state takes over. */
14465
- invalid?: boolean;
14466
- /** The field's text turned. */
14467
- onValueChange?: (value: string) => void;
14468
- }
14469
- interface MentionsVesselProps {
14470
- open?: boolean;
14471
- matches?: MentionEntry[];
14472
- active?: number;
14473
- /** The live rectangle the vessel points at — the host's field. */
14474
- anchor?: HTMLTextAreaElement | null;
14475
- /** A candidate was confirmed (click or Enter). */
14476
- onInsert?: (entry: MentionEntry) => void;
14477
- /** The keyboard's active row moved. */
14478
- onActiveChange?: (index: number) => void;
14479
- /** The vessel's open state turned. */
14480
- onOpenChange?: (open: boolean) => void;
14481
- }
14482
- //#endregion
14483
- //#region src/components/mentions/index.d.ts
14484
- /** @-mentions: a plain textarea that, when the text before the caret
14485
- * ends with the trigger character followed by a token, offers the
14486
- * matching candidates in a small anchored vessel; choosing one replaces
14487
- * the token with `trigger + label` and hands the whole text back
14488
- * through `bind:value`. Arrows move, Enter inserts, Escape dismisses. */
14489
- export declare const Mentions: import("svelte").Component<MentionsProps, {}, "value">;
14490
- /** The vessel: the candidates themselves as a floating card. Composers
14491
- * that keep their own field anatomy wire it up with `useMentions`
14492
- * directly. */
14493
- export declare const MentionsVessel: import("svelte").Component<MentionsVesselProps, {}, "">;
14494
- //#endregion
14495
14567
  //#region src/components/meter/props.d.ts
14496
14568
  interface MeterRootProps extends HTMLAttributes<HTMLDivElement> {
14497
14569
  /** The measured value — clamped between min and max. */
@@ -14830,6 +14902,11 @@ interface DataTableProps extends HTMLAttributes<HTMLDivElement> {
14830
14902
  sortable?: boolean;
14831
14903
  /** Render a global-filter toolbar and per-column filter inputs. */
14832
14904
  filterable?: boolean;
14905
+ /** Keep the built-in toolbar row above the table (default true when
14906
+ * `filterable`). Turn it off to host the global filter in your own
14907
+ * toolbar — the feature stays registered and the instance methods
14908
+ * keep working. */
14909
+ showToolbar?: boolean;
14833
14910
  /** Enable tree expansion over `subRows`; the first column hosts the
14834
14911
  * expander and depth indent. */
14835
14912
  tree?: boolean;
@@ -15041,6 +15118,9 @@ interface TreeSelectProps extends HTMLAttributes<HTMLButtonElement> {
15041
15118
  value?: string;
15042
15119
  data: TreeSelectNode[];
15043
15120
  placeholder?: string;
15121
+ /** Put a filter line at the top of the vessel; matches keep their
15122
+ * ancestors and the branches fan open. */
15123
+ filterable?: boolean;
15044
15124
  disabled?: boolean;
15045
15125
  }
15046
15126
  //#endregion