alus-ui-mcp 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +20 -20
  2. package/dist/index.js +595 -398
  3. package/package.json +3 -1
package/dist/index.js CHANGED
@@ -5175,6 +5175,7 @@ var BUNDLED_DATA = {
5175
5175
  mergeAttrs
5176
5176
  } from '$utils/a11y/index.js';
5177
5177
  import Portal from '../../utility/portal/Portal.svelte';
5178
+ import VisuallyHidden from '../../utility/visually-hidden/VisuallyHidden.svelte';
5178
5179
 
5179
5180
  interface Props {
5180
5181
  options: AutoCompleteOption<T>[];
@@ -5186,6 +5187,7 @@ var BUNDLED_DATA = {
5186
5187
  required?: boolean;
5187
5188
  minLength?: number;
5188
5189
  maxResults?: number;
5190
+ noResultsText?: string;
5189
5191
  filter?: (option: AutoCompleteOption<T>, query: string) => boolean;
5190
5192
  class?: string;
5191
5193
  inputClass?: string;
@@ -5212,6 +5214,7 @@ var BUNDLED_DATA = {
5212
5214
  required = false,
5213
5215
  minLength = 0,
5214
5216
  maxResults = 50,
5217
+ noResultsText = 'No results',
5215
5218
  filter,
5216
5219
  class: className = '',
5217
5220
  inputClass = '',
@@ -5233,6 +5236,9 @@ var BUNDLED_DATA = {
5233
5236
  let listEl = $state<HTMLUListElement | null>(null);
5234
5237
  let highlighted = $state(0);
5235
5238
 
5239
+ // Seed the input value from an initially-provided selected option
5240
+ if (selected && !value) value = selected.label;
5241
+
5236
5242
  const filtered = $derived.by(() => {
5237
5243
  const q = value.trim().toLowerCase();
5238
5244
  if (q.length < minLength) return [];
@@ -5366,6 +5372,10 @@ var BUNDLED_DATA = {
5366
5372
  </script>
5367
5373
 
5368
5374
  <div class={className}>
5375
+ <!-- Live region announces empty/no-results state to screen readers -->
5376
+ <VisuallyHidden as="div" role="status" aria-live="polite" aria-atomic={true}>
5377
+ {#if showEmpty}{noResultsText}{/if}
5378
+ </VisuallyHidden>
5369
5379
  <input
5370
5380
  type="text"
5371
5381
  role="combobox"
@@ -5376,6 +5386,7 @@ var BUNDLED_DATA = {
5376
5386
  {placeholder}
5377
5387
  {value}
5378
5388
  aria-autocomplete="list"
5389
+ aria-owns={listId}
5379
5390
  class={inputClass}
5380
5391
  oninput={onInputEvent}
5381
5392
  onkeydown={onKeydown}
@@ -5419,7 +5430,7 @@ var BUNDLED_DATA = {
5419
5430
  {#if empty}
5420
5431
  {@render empty({ query: value })}
5421
5432
  {:else}
5422
- No results.
5433
+ {noResultsText}
5423
5434
  {/if}
5424
5435
  </li>
5425
5436
  {/if}
@@ -5546,7 +5557,7 @@ var BUNDLED_DATA = {
5546
5557
  "files": {
5547
5558
  "Calendar.svelte": `<script lang="ts" module>
5548
5559
  import {
5549
- CalendarDate,
5560
+ CalendarDate as CalendarDateImpl,
5550
5561
  DateFormatter,
5551
5562
  getDayOfWeek,
5552
5563
  getLocalTimeZone,
@@ -5558,6 +5569,12 @@ var BUNDLED_DATA = {
5558
5569
  type DateValue
5559
5570
  } from '@internationalized/date';
5560
5571
 
5572
+ // Re-export CalendarDate through a local binding to satisfy no-import-assign
5573
+ const CalendarDate: typeof CalendarDateImpl = CalendarDateImpl;
5574
+ export { CalendarDate };
5575
+ // Declare DateValue locally to avoid no-import-assign false positive on re-export
5576
+ export type { DateValue }; // eslint-disable-line no-import-assign
5577
+
5561
5578
  export interface CalendarDay {
5562
5579
  date: DateValue;
5563
5580
  jsDate: Date;
@@ -5569,8 +5586,6 @@ var BUNDLED_DATA = {
5569
5586
 
5570
5587
  export type CalendarView = 'days' | 'months' | 'years';
5571
5588
 
5572
- export { CalendarDate, type DateValue };
5573
-
5574
5589
  function isoOf(d: DateValue) {
5575
5590
  return \`\${d.year}-\${d.month}-\${d.day}\`;
5576
5591
  }
@@ -5784,7 +5799,7 @@ var BUNDLED_DATA = {
5784
5799
  }
5785
5800
 
5786
5801
  function onDayKey(e: KeyboardEvent, d: DateValue) {
5787
- let next: DateValue | null = null;
5802
+ let next: DateValue | null;
5788
5803
  switch (e.key) {
5789
5804
  case 'ArrowLeft':
5790
5805
  next = d.subtract({ days: 1 });
@@ -5908,7 +5923,7 @@ var BUNDLED_DATA = {
5908
5923
  {#if view === 'days'}
5909
5924
  <div role="grid" aria-label={ariaLabel} data-calendar={gridId} class={gridClass}>
5910
5925
  <div role="row">
5911
- {#each weekdays as wd}
5926
+ {#each weekdays as wd (wd)}
5912
5927
  <div role="columnheader" aria-label={wd} class={weekdayClass}>{wd}</div>
5913
5928
  {/each}
5914
5929
  </div>
@@ -6053,7 +6068,8 @@ var BUNDLED_DATA = {
6053
6068
  mergeAttrs(
6054
6069
  labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby, describedby: ariaDescribedby }),
6055
6070
  interactiveStateAttrs({
6056
- disabled
6071
+ disabled,
6072
+ checked: indeterminate ? 'mixed' : undefined
6057
6073
  }),
6058
6074
  validationAttrs({
6059
6075
  invalid: ariaInvalid === 'false' ? false : ariaInvalid === 'true' ? true : ariaInvalid,
@@ -6128,6 +6144,8 @@ var BUNDLED_DATA = {
6128
6144
  swatchClass?: string;
6129
6145
  'aria-label'?: string;
6130
6146
  'aria-labelledby'?: string;
6147
+ swatchesLabel?: string;
6148
+ nativeInputLabel?: string;
6131
6149
  onChange?: (value: string) => void;
6132
6150
  }
6133
6151
 
@@ -6144,6 +6162,8 @@ var BUNDLED_DATA = {
6144
6162
  swatchClass = '',
6145
6163
  'aria-label': ariaLabel = 'Color',
6146
6164
  'aria-labelledby': ariaLabelledby,
6165
+ swatchesLabel = 'Color swatches',
6166
+ nativeInputLabel = 'Color',
6147
6167
  onChange
6148
6168
  }: Props = $props();
6149
6169
 
@@ -6227,7 +6247,7 @@ var BUNDLED_DATA = {
6227
6247
  {#if showNative}
6228
6248
  <input
6229
6249
  type="color"
6230
- aria-label={\`\${ariaLabel} picker\`}
6250
+ aria-label={nativeInputLabel}
6231
6251
  {disabled}
6232
6252
  {value}
6233
6253
  class={nativeClass}
@@ -6251,7 +6271,7 @@ var BUNDLED_DATA = {
6251
6271
  class={swatchesClass}
6252
6272
  role="listbox"
6253
6273
  tabindex="-1"
6254
- aria-label="Color swatches"
6274
+ aria-label={swatchesLabel}
6255
6275
  bind:this={swatchListEl}
6256
6276
  onkeydown={onSwatchKeydown}
6257
6277
  >
@@ -7003,6 +7023,8 @@ var BUNDLED_DATA = {
7003
7023
  files?: FileList | null;
7004
7024
  accept?: string;
7005
7025
  multiple?: boolean;
7026
+ capture?: 'user' | 'environment';
7027
+ webkitdirectory?: boolean;
7006
7028
  disabled?: boolean;
7007
7029
  required?: boolean;
7008
7030
  name?: string;
@@ -7021,6 +7043,8 @@ var BUNDLED_DATA = {
7021
7043
  files = $bindable(null),
7022
7044
  accept,
7023
7045
  multiple = false,
7046
+ capture,
7047
+ webkitdirectory,
7024
7048
  disabled = false,
7025
7049
  required = false,
7026
7050
  name,
@@ -7062,6 +7086,8 @@ var BUNDLED_DATA = {
7062
7086
  {name}
7063
7087
  {accept}
7064
7088
  {multiple}
7089
+ {capture}
7090
+ {webkitdirectory}
7065
7091
  {disabled}
7066
7092
  {required}
7067
7093
  class="sr-only"
@@ -7077,6 +7103,8 @@ var BUNDLED_DATA = {
7077
7103
  {name}
7078
7104
  {accept}
7079
7105
  {multiple}
7106
+ {capture}
7107
+ {webkitdirectory}
7080
7108
  {disabled}
7081
7109
  {required}
7082
7110
  class={className}
@@ -7267,6 +7295,10 @@ var BUNDLED_DATA = {
7267
7295
  'aria-required'?: AriaBoolean;
7268
7296
  'aria-errormessage'?: string;
7269
7297
  tabindex?: number;
7298
+ autofocus?: boolean;
7299
+ spellcheck?: boolean;
7300
+ enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
7301
+ list?: string;
7270
7302
  }
7271
7303
 
7272
7304
  let {
@@ -7299,7 +7331,11 @@ var BUNDLED_DATA = {
7299
7331
  'aria-invalid': ariaInvalid,
7300
7332
  'aria-required': ariaRequired,
7301
7333
  'aria-errormessage': ariaErrormessage,
7302
- tabindex
7334
+ tabindex,
7335
+ autofocus,
7336
+ spellcheck,
7337
+ enterkeyhint,
7338
+ list
7303
7339
  }: Props = $props();
7304
7340
 
7305
7341
  // Build ARIA attributes using reusable utilities
@@ -7317,6 +7353,7 @@ var BUNDLED_DATA = {
7317
7353
  );
7318
7354
  </script>
7319
7355
 
7356
+ <!-- svelte-ignore a11y_autofocus -->
7320
7357
  <input
7321
7358
  {type}
7322
7359
  {placeholder}
@@ -7342,6 +7379,10 @@ var BUNDLED_DATA = {
7342
7379
  {onkeydown}
7343
7380
  {onkeyup}
7344
7381
  {tabindex}
7382
+ {autofocus}
7383
+ {spellcheck}
7384
+ {enterkeyhint}
7385
+ {list}
7345
7386
  {...ariaAttrs}
7346
7387
  />
7347
7388
  `,
@@ -7473,6 +7514,7 @@ var BUNDLED_DATA = {
7473
7514
  'aria-errormessage'?: string;
7474
7515
  oninput?: (event: Event) => void;
7475
7516
  onchange?: (value: number | null) => void;
7517
+ autofocus?: boolean;
7476
7518
  }
7477
7519
 
7478
7520
  let {
@@ -7497,7 +7539,8 @@ var BUNDLED_DATA = {
7497
7539
  'aria-invalid': ariaInvalid,
7498
7540
  'aria-errormessage': ariaErrormessage,
7499
7541
  oninput,
7500
- onchange
7542
+ onchange,
7543
+ autofocus
7501
7544
  }: Props = $props();
7502
7545
 
7503
7546
  let ariaAttrs: Record<string, string> = $derived(
@@ -7547,6 +7590,7 @@ var BUNDLED_DATA = {
7547
7590
  >
7548
7591
  \u2212
7549
7592
  </button>
7593
+ <!-- svelte-ignore a11y_autofocus -->
7550
7594
  <input
7551
7595
  type="number"
7552
7596
  {id}
@@ -7558,6 +7602,8 @@ var BUNDLED_DATA = {
7558
7602
  {readonly}
7559
7603
  {required}
7560
7604
  {placeholder}
7605
+ inputmode="numeric"
7606
+ {autofocus}
7561
7607
  value={value ?? ''}
7562
7608
  class={inputClass}
7563
7609
  oninput={handleInput}
@@ -7800,7 +7846,7 @@ var BUNDLED_DATA = {
7800
7846
 
7801
7847
  function onKeydown(e: KeyboardEvent) {
7802
7848
  if (readonly || disabled) return;
7803
- let next = value;
7849
+ let next: number;
7804
7850
  switch (e.key) {
7805
7851
  case 'ArrowRight':
7806
7852
  case 'ArrowUp':
@@ -7855,7 +7901,7 @@ var BUNDLED_DATA = {
7855
7901
  onkeydown={onKeydown}
7856
7902
  {...ariaAttrs}
7857
7903
  >
7858
- {#each Array(max) as _, i (i)}
7904
+ {#each Array.from({ length: max }, (_, n) => n) as i (i)}
7859
7905
  {@const idx = i + 1}
7860
7906
  {@const filled = idx <= displayed}
7861
7907
  <button
@@ -8055,7 +8101,7 @@ var BUNDLED_DATA = {
8055
8101
  let highlighted = $state<unknown>(undefined);
8056
8102
  let triggerEl = $state<HTMLElement | null>(null);
8057
8103
  let contentEl = $state<HTMLElement | null>(null);
8058
- let opts = $state<SelectOptionEntry[]>([]);
8104
+ let opts: SelectOptionEntry[] = [];
8059
8105
 
8060
8106
  const triggerId = generateCounterId('select-trigger');
8061
8107
  const contentId = generateCounterId('select-content');
@@ -8138,7 +8184,7 @@ var BUNDLED_DATA = {
8138
8184
 
8139
8185
  {#if children}{@render children()}{/if}
8140
8186
  `,
8141
- "SelectContent.svelte": "<script lang=\"ts\">\n import type { Attachment } from 'svelte/attachments';\n import { computePosition, autoUpdate, flip, shift, offset, size } from '@floating-ui/dom';\n import { getSelectContext } from './Select.svelte';\n import Portal from '../../utility/portal/Portal.svelte';\n\n interface Props {\n children?: import('svelte').Snippet;\n class?: string;\n placement?: 'top' | 'bottom' | 'top-start' | 'bottom-start' | 'top-end' | 'bottom-end';\n offset?: number;\n sameWidth?: boolean;\n }\n\n let {\n children,\n class: className = '',\n placement = 'bottom-start',\n offset: offsetPx = 4,\n sameWidth = true\n }: Props = $props();\n\n const ctx = getSelectContext();\n\n const contentRef: Attachment<HTMLDivElement> = (node) => {\n ctx.setContentEl(node);\n\n const trigger = ctx.triggerEl.current;\n let cleanupAutoUpdate: (() => void) | undefined;\n\n if (trigger) {\n cleanupAutoUpdate = autoUpdate(trigger, node, async () => {\n const { x, y } = await computePosition(trigger, node, {\n placement,\n strategy: 'fixed',\n middleware: [\n offset(offsetPx),\n flip(),\n shift({ padding: 8 }),\n size({\n apply({ rects, elements }) {\n if (sameWidth) {\n Object.assign(elements.floating.style, {\n minWidth: `${rects.reference.width}px`\n });\n }\n }\n })\n ]\n });\n Object.assign(node.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n });\n }\n\n function onPointerDown(e: PointerEvent) {\n const t = e.target as Node;\n if (node.contains(t) || ctx.triggerEl.current?.contains(t)) return;\n ctx.setOpen(false);\n }\n\n document.addEventListener('pointerdown', onPointerDown, true);\n\n queueMicrotask(() => node.focus());\n\n return () => {\n cleanupAutoUpdate?.();\n document.removeEventListener('pointerdown', onPointerDown, true);\n ctx.setContentEl(null);\n ctx.triggerEl.current?.focus();\n };\n };\n\n function move(dir: 1 | -1) {\n const opts = ctx.options().filter((o) => !o.disabled);\n if (opts.length === 0) return;\n const cur = opts.findIndex((o) => o.value === ctx.highlighted());\n let next: number;\n if (cur === -1) next = dir === 1 ? 0 : opts.length - 1;\n else next = (cur + dir + opts.length) % opts.length;\n ctx.setHighlighted(opts[next].value);\n opts[next].el.scrollIntoView({ block: 'nearest' });\n }\n\n function onKeydown(e: KeyboardEvent) {\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n move(1);\n break;\n case 'ArrowUp':\n e.preventDefault();\n move(-1);\n break;\n case 'Home': {\n e.preventDefault();\n const opts = ctx.options().filter((o) => !o.disabled);\n if (opts[0]) {\n ctx.setHighlighted(opts[0].value);\n opts[0].el.scrollIntoView({ block: 'nearest' });\n }\n break;\n }\n case 'End': {\n e.preventDefault();\n const opts = ctx.options().filter((o) => !o.disabled);\n const last = opts.at(-1);\n if (last) {\n ctx.setHighlighted(last.value);\n last.el.scrollIntoView({ block: 'nearest' });\n }\n break;\n }\n case 'Enter':\n case ' ': {\n e.preventDefault();\n const h = ctx.highlighted();\n if (h !== undefined) ctx.toggleValue(h);\n break;\n }\n case 'Escape':\n e.preventDefault();\n ctx.setOpen(false);\n break;\n case 'Tab':\n ctx.setOpen(false);\n break;\n }\n }\n\n let activeId = $derived.by(() => {\n const opts = ctx.options();\n const found = opts.find((o) => o.value === ctx.highlighted());\n return found?.el.id;\n });\n</script>\n\n{#if ctx.open()}\n <Portal>\n <div\n id={ctx.contentId}\n role=\"listbox\"\n tabindex=\"-1\"\n aria-labelledby={ctx.labelId() ?? ctx.triggerId}\n aria-multiselectable={ctx.multiple() ? true : undefined}\n aria-activedescendant={activeId}\n class={className}\n style=\"position:fixed; top:0; left:0;\"\n onkeydown={onKeydown}\n {@attach contentRef}\n >\n {#if children}{@render children()}{/if}\n </div>\n </Portal>\n{/if}\n",
8187
+ "SelectContent.svelte": "<script lang=\"ts\">\n import type { Attachment } from 'svelte/attachments';\n import { computePosition, autoUpdate, flip, shift, offset, size } from '@floating-ui/dom';\n import { getSelectContext } from './Select.svelte';\n import Portal from '../../utility/portal/Portal.svelte';\n\n interface Props {\n children?: import('svelte').Snippet;\n class?: string;\n placement?: 'top' | 'bottom' | 'top-start' | 'bottom-start' | 'top-end' | 'bottom-end';\n offset?: number;\n sameWidth?: boolean;\n }\n\n let {\n children,\n class: className = '',\n placement = 'bottom-start',\n offset: offsetPx = 4,\n sameWidth = true\n }: Props = $props();\n\n const ctx = getSelectContext();\n\n const contentRef: Attachment<HTMLDivElement> = (node) => {\n ctx.setContentEl(node);\n\n const trigger = ctx.triggerEl.current;\n let cleanupAutoUpdate: (() => void) | undefined;\n\n if (trigger) {\n cleanupAutoUpdate = autoUpdate(trigger, node, async () => {\n const { x, y } = await computePosition(trigger, node, {\n placement,\n strategy: 'fixed',\n middleware: [\n offset(offsetPx),\n flip(),\n shift({ padding: 8 }),\n size({\n apply({ rects, elements }) {\n if (sameWidth) {\n Object.assign(elements.floating.style, {\n minWidth: `${rects.reference.width}px`\n });\n }\n }\n })\n ]\n });\n Object.assign(node.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n });\n }\n\n function onPointerDown(e: PointerEvent) {\n const t = e.target as Node;\n if (node.contains(t) || ctx.triggerEl.current?.contains(t)) return;\n ctx.setOpen(false);\n }\n\n document.addEventListener('pointerdown', onPointerDown, true);\n\n queueMicrotask(() => node.focus());\n\n return () => {\n cleanupAutoUpdate?.();\n document.removeEventListener('pointerdown', onPointerDown, true);\n ctx.setContentEl(null);\n ctx.triggerEl.current?.focus();\n };\n };\n\n function move(dir: 1 | -1) {\n const opts = ctx.options().filter((o) => !o.disabled);\n if (opts.length === 0) return;\n const cur = opts.findIndex((o) => o.value === ctx.highlighted());\n let next: number;\n if (cur === -1) next = dir === 1 ? 0 : opts.length - 1;\n else next = (cur + dir + opts.length) % opts.length;\n ctx.setHighlighted(opts[next].value);\n opts[next].el.scrollIntoView({ block: 'nearest' });\n }\n\n function onKeydown(e: KeyboardEvent) {\n // type-ahead: first-char match, wraps from current position\n const char = e.key.length === 1 ? e.key.toLowerCase() : '';\n if (char) {\n e.preventDefault();\n const opts = ctx.options().filter((o) => !o.disabled);\n const cur = opts.findIndex((o) => o.value === ctx.highlighted());\n const after = [...opts.slice(cur + 1), ...opts.slice(0, cur + 1)];\n const match = after.find((o) => o.el.textContent?.trim().toLowerCase().startsWith(char));\n if (match) {\n ctx.setHighlighted(match.value);\n match.el.scrollIntoView({ block: 'nearest' });\n }\n return;\n }\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n move(1);\n break;\n case 'ArrowUp':\n e.preventDefault();\n move(-1);\n break;\n case 'Home': {\n e.preventDefault();\n const opts = ctx.options().filter((o) => !o.disabled);\n if (opts[0]) {\n ctx.setHighlighted(opts[0].value);\n opts[0].el.scrollIntoView({ block: 'nearest' });\n }\n break;\n }\n case 'End': {\n e.preventDefault();\n const opts = ctx.options().filter((o) => !o.disabled);\n const last = opts.at(-1);\n if (last) {\n ctx.setHighlighted(last.value);\n last.el.scrollIntoView({ block: 'nearest' });\n }\n break;\n }\n case 'Enter':\n case ' ': {\n e.preventDefault();\n const h = ctx.highlighted();\n if (h !== undefined) ctx.toggleValue(h);\n break;\n }\n case 'Escape':\n e.preventDefault();\n ctx.setOpen(false);\n break;\n case 'Tab':\n ctx.setOpen(false);\n break;\n }\n }\n\n let activeId = $derived.by(() => {\n const opts = ctx.options();\n const found = opts.find((o) => o.value === ctx.highlighted());\n return found?.el.id;\n });\n</script>\n\n{#if ctx.open()}\n <Portal>\n <div\n id={ctx.contentId}\n role=\"listbox\"\n tabindex=\"-1\"\n aria-labelledby={ctx.labelId() ?? ctx.triggerId}\n aria-multiselectable={ctx.multiple() ? true : undefined}\n aria-activedescendant={activeId}\n class={className}\n style=\"position:fixed; top:0; left:0;\"\n onkeydown={onKeydown}\n {@attach contentRef}\n >\n {#if children}{@render children()}{/if}\n </div>\n </Portal>\n{/if}\n",
8142
8188
  "SelectOption.svelte": `<script lang="ts">
8143
8189
  import type { Attachment } from 'svelte/attachments';
8144
8190
  import { generateCounterId } from '$utils/a11y/id.js';
@@ -8303,6 +8349,7 @@ var BUNDLED_DATA = {
8303
8349
  'aria-valuetext'?: string;
8304
8350
  oninput?: (event: Event) => void;
8305
8351
  onchange?: (event: Event) => void;
8352
+ onkeydown?: (event: KeyboardEvent) => void;
8306
8353
  }
8307
8354
 
8308
8355
  let {
@@ -8321,9 +8368,12 @@ var BUNDLED_DATA = {
8321
8368
  'aria-describedby': ariaDescribedby,
8322
8369
  'aria-valuetext': ariaValuetext,
8323
8370
  oninput,
8324
- onchange
8371
+ onchange,
8372
+ onkeydown
8325
8373
  }: Props = $props();
8326
8374
 
8375
+ let pageStep = $derived(Math.max(1, Math.round((max - min) / 10)));
8376
+
8327
8377
  let ariaAttrs: Record<string, string> = $derived(
8328
8378
  mergeAttrs(
8329
8379
  labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby, describedby: ariaDescribedby }),
@@ -8338,6 +8388,17 @@ var BUNDLED_DATA = {
8338
8388
  })
8339
8389
  )
8340
8390
  );
8391
+
8392
+ function handleKeydown(e: KeyboardEvent) {
8393
+ if (e.key === 'PageUp') {
8394
+ e.preventDefault();
8395
+ value = Math.min(max, value + pageStep);
8396
+ } else if (e.key === 'PageDown') {
8397
+ e.preventDefault();
8398
+ value = Math.max(min, value - pageStep);
8399
+ }
8400
+ onkeydown?.(e);
8401
+ }
8341
8402
  </script>
8342
8403
 
8343
8404
  <input
@@ -8353,6 +8414,7 @@ var BUNDLED_DATA = {
8353
8414
  class={className}
8354
8415
  {oninput}
8355
8416
  {onchange}
8417
+ onkeydown={handleKeydown}
8356
8418
  {...ariaAttrs}
8357
8419
  />
8358
8420
  `,
@@ -8455,7 +8517,7 @@ var BUNDLED_DATA = {
8455
8517
  "category": "form",
8456
8518
  "slug": "textarea",
8457
8519
  "files": {
8458
- "Textarea.svelte": "<script lang=\"ts\">\n import { labelAttrs, validationAttrs, mergeAttrs } from '$utils/a11y/index.js';\n import type { AriaBoolean } from '$types/index.js';\n\n interface Props {\n value?: string;\n placeholder?: string;\n class?: string;\n disabled?: boolean;\n readonly?: boolean;\n required?: boolean;\n name?: string;\n id?: string;\n rows?: number;\n cols?: number;\n minlength?: number;\n maxlength?: number;\n wrap?: 'hard' | 'soft' | 'off';\n autocomplete?: 'on' | 'off';\n resize?: 'none' | 'both' | 'horizontal' | 'vertical';\n oninput?: (event: Event) => void;\n onchange?: (event: Event) => void;\n onfocus?: (event: FocusEvent) => void;\n onblur?: (event: FocusEvent) => void;\n onkeydown?: (event: KeyboardEvent) => void;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-invalid'?: AriaBoolean;\n 'aria-required'?: AriaBoolean;\n 'aria-errormessage'?: string;\n tabindex?: number;\n }\n\n let {\n value = $bindable(''),\n placeholder = '',\n class: className = '',\n disabled = false,\n readonly = false,\n required = false,\n name,\n id,\n rows,\n cols,\n minlength,\n maxlength,\n wrap,\n autocomplete,\n resize,\n oninput,\n onchange,\n onfocus,\n onblur,\n onkeydown,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': ariaInvalid,\n 'aria-required': ariaRequired,\n 'aria-errormessage': ariaErrormessage,\n tabindex\n }: Props = $props();\n\n let ariaAttrs: Record<string, string> = $derived(\n mergeAttrs(\n labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby, describedby: ariaDescribedby }),\n validationAttrs({\n invalid: ariaInvalid === 'false' ? false : ariaInvalid === 'true' ? true : ariaInvalid,\n required:\n (ariaRequired === 'false' ? false : ariaRequired === 'true' ? true : ariaRequired) ??\n required,\n errormessage: ariaErrormessage\n })\n )\n );\n\n let style = $derived(resize ? `resize:${resize};` : undefined);\n</script>\n\n<textarea\n bind:value\n {placeholder}\n {disabled}\n {readonly}\n {required}\n {name}\n {id}\n {rows}\n {cols}\n {minlength}\n {maxlength}\n {wrap}\n {autocomplete}\n {style}\n class={className}\n {oninput}\n {onchange}\n {onfocus}\n {onblur}\n {onkeydown}\n {tabindex}\n {...ariaAttrs}\n></textarea>\n",
8520
+ "Textarea.svelte": "<script lang=\"ts\">\n import { labelAttrs, validationAttrs, mergeAttrs } from '$utils/a11y/index.js';\n import type { AriaBoolean } from '$types/index.js';\n\n interface Props {\n value?: string;\n placeholder?: string;\n class?: string;\n disabled?: boolean;\n readonly?: boolean;\n required?: boolean;\n name?: string;\n id?: string;\n rows?: number;\n cols?: number;\n minlength?: number;\n maxlength?: number;\n wrap?: 'hard' | 'soft' | 'off';\n autocomplete?: 'on' | 'off';\n resize?: 'none' | 'both' | 'horizontal' | 'vertical';\n oninput?: (event: Event) => void;\n onchange?: (event: Event) => void;\n onfocus?: (event: FocusEvent) => void;\n onblur?: (event: FocusEvent) => void;\n onkeydown?: (event: KeyboardEvent) => void;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-invalid'?: AriaBoolean;\n 'aria-required'?: AriaBoolean;\n 'aria-errormessage'?: string;\n tabindex?: number;\n autofocus?: boolean;\n spellcheck?: boolean;\n enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n }\n\n let {\n value = $bindable(''),\n placeholder = '',\n class: className = '',\n disabled = false,\n readonly = false,\n required = false,\n name,\n id,\n rows,\n cols,\n minlength,\n maxlength,\n wrap,\n autocomplete,\n resize,\n oninput,\n onchange,\n onfocus,\n onblur,\n onkeydown,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': ariaInvalid,\n 'aria-required': ariaRequired,\n 'aria-errormessage': ariaErrormessage,\n tabindex,\n autofocus,\n spellcheck,\n enterkeyhint\n }: Props = $props();\n\n let ariaAttrs: Record<string, string> = $derived(\n mergeAttrs(\n labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby, describedby: ariaDescribedby }),\n validationAttrs({\n invalid: ariaInvalid === 'false' ? false : ariaInvalid === 'true' ? true : ariaInvalid,\n required:\n (ariaRequired === 'false' ? false : ariaRequired === 'true' ? true : ariaRequired) ??\n required,\n errormessage: ariaErrormessage\n })\n )\n );\n\n let style = $derived(resize ? `resize:${resize};` : undefined);\n</script>\n\n<!-- svelte-ignore a11y_autofocus -->\n<textarea\n bind:value\n {placeholder}\n {disabled}\n {readonly}\n {required}\n {name}\n {id}\n {rows}\n {cols}\n {minlength}\n {maxlength}\n {wrap}\n {autocomplete}\n {style}\n class={className}\n {oninput}\n {onchange}\n {onfocus}\n {onblur}\n {onkeydown}\n {tabindex}\n {autofocus}\n {spellcheck}\n {enterkeyhint}\n {...ariaAttrs}\n></textarea>\n",
8459
8521
  "index.ts": "export { default as Textarea } from './Textarea.svelte';\n"
8460
8522
  }
8461
8523
  },
@@ -8842,7 +8904,7 @@ var BUNDLED_DATA = {
8842
8904
  </div>
8843
8905
  {/if}
8844
8906
  `,
8845
- "AccordionItem.svelte": "<script lang=\"ts\">\n import { getAccordionRoot, setAccordionItem } from './context.js';\n\n interface Props {\n children?: import('svelte').Snippet<[{ open: boolean }]>;\n value: string;\n disabled?: boolean;\n class?: string;\n }\n\n let { children, value, disabled = false, class: className = '' }: Props = $props();\n\n const root = getAccordionRoot();\n\n let triggerId = $derived(`${root.baseId}-trigger-${value}`);\n let contentId = $derived(`${root.baseId}-content-${value}`);\n\n setAccordionItem({\n get value() {\n return value;\n },\n disabled: () => disabled || root.disabled(),\n open: () => root.isOpen(value),\n get triggerId() {\n return `${root.baseId}-trigger-${value}`;\n },\n get contentId() {\n return `${root.baseId}-content-${value}`;\n }\n });\n\n let open = $derived(root.isOpen(value));\n</script>\n\n<div\n class={className}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled || root.disabled() || undefined}\n>\n {#if children}{@render children({ open })}{/if}\n</div>\n",
8907
+ "AccordionItem.svelte": "<script lang=\"ts\">\n import { getAccordionRoot, setAccordionItem } from './context.js';\n\n interface Props {\n children?: import('svelte').Snippet<[{ open: boolean }]>;\n value: string;\n disabled?: boolean;\n class?: string;\n }\n\n let { children, value, disabled = false, class: className = '' }: Props = $props();\n\n const root = getAccordionRoot();\n\n setAccordionItem({\n get value() {\n return value;\n },\n disabled: () => disabled || root.disabled(),\n open: () => root.isOpen(value),\n get triggerId() {\n return `${root.baseId}-trigger-${value}`;\n },\n get contentId() {\n return `${root.baseId}-content-${value}`;\n }\n });\n\n let open = $derived(root.isOpen(value));\n</script>\n\n<div\n class={className}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled || root.disabled() || undefined}\n>\n {#if children}{@render children({ open })}{/if}\n</div>\n",
8846
8908
  "AccordionTrigger.svelte": `<script lang="ts">
8847
8909
  import { getAccordionRoot, getAccordionItem } from './context.js';
8848
8910
  import { interactiveStateAttrs, widgetAttrs, mergeAttrs } from '$utils/a11y/index.js';
@@ -8986,9 +9048,9 @@ var BUNDLED_DATA = {
8986
9048
  let { children, class: className = '' }: Props = $props();
8987
9049
  </script>
8988
9050
 
8989
- <li class={className} aria-hidden="true" role="presentation">
9051
+ <span aria-hidden="true" class={className}>
8990
9052
  {#if children}{@render children()}{:else}/{/if}
8991
- </li>
9053
+ </span>
8992
9054
  `,
8993
9055
  "index.ts": "export { default as Breadcrumb } from './Breadcrumb.svelte';\nexport { default as BreadcrumbItem } from './BreadcrumbItem.svelte';\nexport { default as BreadcrumbSeparator } from './BreadcrumbSeparator.svelte';\n"
8994
9056
  }
@@ -9297,7 +9359,6 @@ var BUNDLED_DATA = {
9297
9359
  </script>
9298
9360
 
9299
9361
  {#if visible}
9300
- <!-- svelte-ignore a11y_click_events_have_key_events -->
9301
9362
  <div
9302
9363
  {id}
9303
9364
  role="option"
@@ -9419,7 +9480,7 @@ var BUNDLED_DATA = {
9419
9480
  <a
9420
9481
  {href}
9421
9482
  target={newTab ? '_blank' : undefined}
9422
- rel={newTab ? 'noopener noreferrer' : undefined}
9483
+ rel="external noopener noreferrer"
9423
9484
  class={className}
9424
9485
  aria-label={ariaLabel}
9425
9486
  aria-describedby={ariaDescribedby}
@@ -9479,7 +9540,6 @@ var BUNDLED_DATA = {
9479
9540
  }: Props = $props();
9480
9541
 
9481
9542
  let isExternal = $derived(external ?? (typeof href === 'string' && /^https?:\\/\\//i.test(href)));
9482
-
9483
9543
  let computedTarget = $derived(target ?? (isExternal ? '_blank' : undefined));
9484
9544
  let computedRel = $derived(rel ?? (isExternal ? 'noopener noreferrer' : undefined));
9485
9545
 
@@ -9637,9 +9697,18 @@ var BUNDLED_DATA = {
9637
9697
  class?: string;
9638
9698
  disabled?: boolean;
9639
9699
  onSelect?: () => void;
9700
+ role?: 'menuitem' | 'menuitemcheckbox' | 'menuitemradio';
9701
+ checked?: boolean;
9640
9702
  }
9641
9703
 
9642
- let { children, class: className = '', disabled = false, onSelect }: Props = $props();
9704
+ let {
9705
+ children,
9706
+ class: className = '',
9707
+ disabled = false,
9708
+ onSelect,
9709
+ role = 'menuitem',
9710
+ checked
9711
+ }: Props = $props();
9643
9712
 
9644
9713
  const ctx = getMenuContext();
9645
9714
 
@@ -9676,10 +9745,17 @@ var BUNDLED_DATA = {
9676
9745
  activate();
9677
9746
  }
9678
9747
  }
9748
+
9749
+ const ariaAttrs = $derived(
9750
+ interactiveStateAttrs({
9751
+ disabled,
9752
+ checked: role === 'menuitemcheckbox' || role === 'menuitemradio' ? checked : undefined
9753
+ })
9754
+ );
9679
9755
  </script>
9680
9756
 
9681
9757
  <div
9682
- role="menuitem"
9758
+ {role}
9683
9759
  tabindex="-1"
9684
9760
  data-highlighted={highlighted || undefined}
9685
9761
  data-disabled={disabled || undefined}
@@ -9687,7 +9763,7 @@ var BUNDLED_DATA = {
9687
9763
  onclick={activate}
9688
9764
  onpointerenter={onPointerEnter}
9689
9765
  onkeydown={onKeydown}
9690
- {...interactiveStateAttrs({ disabled })}
9766
+ {...ariaAttrs}
9691
9767
  {@attach itemRef}
9692
9768
  >
9693
9769
  {#if children}{@render children({ highlighted })}{/if}
@@ -9814,6 +9890,7 @@ var BUNDLED_DATA = {
9814
9890
  next: () => void;
9815
9891
  canPrev: boolean;
9816
9892
  canNext: boolean;
9893
+ isCurrentPage: (p: number) => boolean;
9817
9894
  }
9818
9895
  ]
9819
9896
  >;
@@ -9883,7 +9960,17 @@ var BUNDLED_DATA = {
9883
9960
 
9884
9961
  <nav class={className} aria-label={ariaLabel}>
9885
9962
  {#if children}
9886
- {@render children({ page, totalPages, pages, goto, prev, next, canPrev, canNext })}
9963
+ {@render children({
9964
+ page,
9965
+ totalPages,
9966
+ pages,
9967
+ goto,
9968
+ prev,
9969
+ next,
9970
+ canPrev,
9971
+ canNext,
9972
+ isCurrentPage: (p) => p === page
9973
+ })}
9887
9974
  {/if}
9888
9975
  </nav>
9889
9976
  `,
@@ -9960,7 +10047,12 @@ var BUNDLED_DATA = {
9960
10047
  let ariaAttrs: Record<string, string> = $derived(
9961
10048
  mergeAttrs(
9962
10049
  labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby }),
9963
- widgetAttrs({ orientation })
10050
+ widgetAttrs({
10051
+ orientation,
10052
+ valuenow: current + 1,
10053
+ valuemin: 1,
10054
+ valuemax: total
10055
+ })
9964
10056
  )
9965
10057
  );
9966
10058
  </script>
@@ -10245,9 +10337,9 @@ var BUNDLED_DATA = {
10245
10337
  onkeydown={onPanelKey}
10246
10338
  {@attach panelRef}
10247
10339
  >
10248
- {#each items as it, i}
10340
+ {#each items as it, i (i)}
10249
10341
  {#if it.separator}
10250
- <div role="separator" class={separatorClass}></div>
10342
+ <hr class={separatorClass} />
10251
10343
  {:else if item}
10252
10344
  <!-- svelte-ignore a11y_click_events_have_key_events -->
10253
10345
  <div
@@ -10431,6 +10523,7 @@ var BUNDLED_DATA = {
10431
10523
  <div
10432
10524
  {role}
10433
10525
  aria-live={role === 'alert' ? 'assertive' : 'polite'}
10526
+ aria-atomic="true"
10434
10527
  data-variant={variant}
10435
10528
  class={className}
10436
10529
  {...ariaAttrs}
@@ -10574,7 +10667,7 @@ var BUNDLED_DATA = {
10574
10667
  </script>
10575
10668
 
10576
10669
  {#if open}
10577
- <div
10670
+ <section
10578
10671
  {role}
10579
10672
  aria-live={live ?? (role === 'alert' ? 'assertive' : role === 'status' ? 'polite' : undefined)}
10580
10673
  data-variant={variant}
@@ -10591,7 +10684,7 @@ var BUNDLED_DATA = {
10591
10684
  {#if dismissible}
10592
10685
  <button type="button" aria-label="Dismiss banner" onclick={dismiss}>\xD7</button>
10593
10686
  {/if}
10594
- </div>
10687
+ </section>
10595
10688
  {/if}
10596
10689
  `,
10597
10690
  "index.ts": "export { default as Banner } from './Banner.svelte';\n"
@@ -10863,7 +10956,7 @@ var BUNDLED_DATA = {
10863
10956
  class: className = '',
10864
10957
  indicatorClass = '',
10865
10958
  id,
10866
- 'aria-label': ariaLabel,
10959
+ 'aria-label': ariaLabel = 'Progress',
10867
10960
  'aria-labelledby': ariaLabelledby,
10868
10961
  'aria-describedby': ariaDescribedby
10869
10962
  }: Props = $props();
@@ -10971,7 +11064,7 @@ var BUNDLED_DATA = {
10971
11064
  "slug": "tag",
10972
11065
  "files": {
10973
11066
  "Tag.svelte": `<script lang="ts">
10974
- import { labelAttrs, interactiveStateAttrs, widgetAttrs, mergeAttrs } from '$utils/a11y/index.js';
11067
+ import { labelAttrs, interactiveStateAttrs, mergeAttrs } from '$utils/a11y/index.js';
10975
11068
 
10976
11069
  interface Props {
10977
11070
  children?: import('svelte').Snippet;
@@ -11498,7 +11591,6 @@ var BUNDLED_DATA = {
11498
11591
  }
11499
11592
  </script>
11500
11593
 
11501
- <!-- svelte-ignore a11y_no_static_element_interactions -->
11502
11594
  <section
11503
11595
  aria-roledescription="carousel"
11504
11596
  class={className}
@@ -11569,7 +11661,7 @@ var BUNDLED_DATA = {
11569
11661
  onkeydown={onKeydown}
11570
11662
  bind:this={listEl}
11571
11663
  >
11572
- {#each Array(ctx.count()) as _, i (i)}
11664
+ {#each Array.from({ length: ctx.count() }, (_, idx) => idx) as i (i)}
11573
11665
  {@const active = ctx.index() === i}
11574
11666
  <button
11575
11667
  type="button"
@@ -11678,6 +11770,7 @@ var BUNDLED_DATA = {
11678
11770
  `,
11679
11771
  "CarouselSlides.svelte": `<script lang="ts">
11680
11772
  import { getCarouselContext } from './Carousel.svelte';
11773
+ import { VisuallyHidden } from '$components/utility/visually-hidden/index.js';
11681
11774
 
11682
11775
  interface Props {
11683
11776
  children?: import('svelte').Snippet;
@@ -11689,6 +11782,12 @@ var BUNDLED_DATA = {
11689
11782
  const ctx = getCarouselContext();
11690
11783
  </script>
11691
11784
 
11785
+ <VisuallyHidden as="div">
11786
+ <span aria-live="polite" aria-atomic="true">
11787
+ Slide {ctx.index() + 1} of {ctx.count()}
11788
+ </span>
11789
+ </VisuallyHidden>
11790
+
11692
11791
  <div id={ctx.slidesId} class={className} aria-live={live} aria-atomic="false">
11693
11792
  {#if children}{@render children()}{/if}
11694
11793
  </div>
@@ -11758,7 +11857,8 @@ var BUNDLED_DATA = {
11758
11857
  class={lineNumbersClass}
11759
11858
  aria-hidden="true"
11760
11859
  data-line-numbers
11761
- >{#each lines as _, i}{i + 1}{#if i < lines.length - 1}{'\\n'}{/if}{/each}</span
11860
+ >{#each Array.from({ length: lines.length }, (_, n) => n) as i (i)}{i +
11861
+ 1}{#if i < lines.length - 1}{/if}{/each}</span
11762
11862
  ><code class={codeClass}>{code}</code>{:else}<code class={codeClass}>{code}</code>{/if}</pre>
11763
11863
  </div>
11764
11864
  `,
@@ -11770,7 +11870,7 @@ var BUNDLED_DATA = {
11770
11870
  "category": "display",
11771
11871
  "slug": "compare",
11772
11872
  "files": {
11773
- "Compare.svelte": "<script lang=\"ts\">\n import type { Attachment } from 'svelte/attachments';\n import { labelAttrs, interactiveStateAttrs, widgetAttrs, mergeAttrs } from '$utils/a11y/index.js';\n\n interface Props {\n before: import('svelte').Snippet;\n after: import('svelte').Snippet;\n handle?: import('svelte').Snippet<[{ position: number; dragging: boolean }]>;\n position?: number;\n min?: number;\n max?: number;\n step?: number;\n largeStep?: number;\n orientation?: 'horizontal' | 'vertical';\n disabled?: boolean;\n class?: string;\n beforeClass?: string;\n afterClass?: string;\n handleClass?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-valuetext'?: string;\n onChange?: (position: number) => void;\n }\n\n let {\n before,\n after,\n handle,\n position = $bindable(50),\n min = 0,\n max = 100,\n step = 2,\n largeStep = 10,\n orientation = 'horizontal',\n disabled = false,\n class: className = '',\n beforeClass = '',\n afterClass = '',\n handleClass = '',\n 'aria-label': ariaLabel = 'Before and after comparison',\n 'aria-labelledby': ariaLabelledby,\n 'aria-valuetext': ariaValuetext,\n onChange\n }: Props = $props();\n\n let dragging = $state(false);\n let containerEl: HTMLElement | null = $state(null);\n let lastCoord = 0;\n let containerSize = 0;\n\n const horiz = $derived(orientation === 'horizontal');\n\n function clamp(v: number): number {\n return Math.min(max, Math.max(min, v));\n }\n\n function setPosition(v: number) {\n const next = clamp(v);\n if (next !== position) {\n position = next;\n onChange?.(next);\n }\n }\n\n const attach: Attachment<HTMLDivElement> = (node) => {\n containerEl = node;\n return () => {\n containerEl = null;\n };\n };\n\n function refreshSize() {\n if (!containerEl) {\n containerSize = 0;\n return;\n }\n const rect = containerEl.getBoundingClientRect();\n containerSize = horiz ? rect.width : rect.height;\n }\n\n function pointFromEvent(e: PointerEvent): number {\n return horiz ? e.clientX : e.clientY;\n }\n\n function pctFromAbsolute(e: PointerEvent): number {\n if (!containerEl) return position;\n const rect = containerEl.getBoundingClientRect();\n const offset = horiz ? e.clientX - rect.left : e.clientY - rect.top;\n const size = horiz ? rect.width : rect.height;\n if (size <= 0) return position;\n return (offset / size) * 100;\n }\n\n function onTrackPointerDown(e: PointerEvent) {\n if (disabled) return;\n e.preventDefault();\n dragging = true;\n refreshSize();\n lastCoord = pointFromEvent(e);\n setPosition(pctFromAbsolute(e));\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n }\n\n function onHandlePointerDown(e: PointerEvent) {\n if (disabled) return;\n e.preventDefault();\n e.stopPropagation();\n dragging = true;\n refreshSize();\n lastCoord = pointFromEvent(e);\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n }\n\n function onPointerMove(e: PointerEvent) {\n if (!dragging || containerSize <= 0) return;\n const cur = pointFromEvent(e);\n const deltaPx = cur - lastCoord;\n lastCoord = cur;\n if (deltaPx === 0) return;\n const deltaPct = (deltaPx / containerSize) * 100;\n setPosition(position + deltaPct);\n }\n\n function onPointerUp(e: PointerEvent) {\n if (!dragging) return;\n dragging = false;\n try {\n (e.currentTarget as HTMLElement).releasePointerCapture(e.pointerId);\n } catch {\n /* noop */\n }\n }\n\n function onKeydown(e: KeyboardEvent) {\n if (disabled) return;\n const incKey = horiz ? 'ArrowRight' : 'ArrowDown';\n const decKey = horiz ? 'ArrowLeft' : 'ArrowUp';\n let delta = 0;\n if (e.key === incKey) delta = step;\n else if (e.key === decKey) delta = -step;\n else if (e.key === 'PageDown') delta = largeStep;\n else if (e.key === 'PageUp') delta = -largeStep;\n else if (e.key === 'Home') {\n e.preventDefault();\n setPosition(min);\n return;\n } else if (e.key === 'End') {\n e.preventDefault();\n setPosition(max);\n return;\n } else {\n return;\n }\n e.preventDefault();\n setPosition(position + delta);\n }\n\n const afterClipStyle = $derived(\n horiz\n ? `clip-path:inset(0 ${100 - position}% 0 0);`\n : `clip-path:inset(0 0 ${100 - position}% 0);`\n );\n\n const handleStyle = $derived(\n horiz\n ? `left:${position}%;top:0;bottom:0;transform:translateX(-50%);`\n : `top:${position}%;left:0;right:0;transform:translateY(-50%);`\n );\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n {@attach attach}\n class={className}\n data-orientation={orientation}\n data-dragging={dragging || undefined}\n data-disabled={disabled || undefined}\n style=\"position:relative;overflow:hidden;touch-action:none;\"\n onpointerdown={onTrackPointerDown}\n onpointermove={onPointerMove}\n onpointerup={onPointerUp}\n onpointercancel={onPointerUp}\n>\n <div class={beforeClass} data-layer=\"before\" style=\"position:absolute;inset:0;\">\n {@render before()}\n </div>\n <div class={afterClass} data-layer=\"after\" style={`position:absolute;inset:0;${afterClipStyle}`}>\n {@render after()}\n </div>\n\n <!-- svelte-ignore a11y_no_noninteractive_tabindex -->\n <!-- svelte-ignore a11y_no_noninteractive_element_interactions -->\n <div\n role=\"slider\"\n tabindex={disabled ? -1 : 0}\n data-dragging={dragging || undefined}\n data-orientation={orientation}\n class={handleClass}\n style={`position:absolute;${handleStyle}`}\n onpointerdown={onHandlePointerDown}\n onpointermove={onPointerMove}\n onpointerup={onPointerUp}\n onpointercancel={onPointerUp}\n onkeydown={onKeydown}\n {...mergeAttrs(\n labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby }),\n interactiveStateAttrs({ disabled }),\n widgetAttrs({\n orientation,\n valuenow: Math.round(position),\n valuemin: min,\n valuemax: max,\n valuetext: ariaValuetext\n })\n )}\n >\n {#if handle}\n {@render handle({ position, dragging })}\n {/if}\n </div>\n</div>\n",
11873
+ "Compare.svelte": "<script lang=\"ts\">\n import type { Attachment } from 'svelte/attachments';\n import { labelAttrs, interactiveStateAttrs, widgetAttrs, mergeAttrs } from '$utils/a11y/index.js';\n\n interface Props {\n before: import('svelte').Snippet;\n after: import('svelte').Snippet;\n handle?: import('svelte').Snippet<[{ position: number; dragging: boolean }]>;\n position?: number;\n min?: number;\n max?: number;\n step?: number;\n largeStep?: number;\n orientation?: 'horizontal' | 'vertical';\n disabled?: boolean;\n class?: string;\n beforeClass?: string;\n afterClass?: string;\n handleClass?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-valuetext'?: string;\n onChange?: (position: number) => void;\n }\n\n let {\n before,\n after,\n handle,\n position = $bindable(50),\n min = 0,\n max = 100,\n step = 2,\n largeStep = 10,\n orientation = 'horizontal',\n disabled = false,\n class: className = '',\n beforeClass = '',\n afterClass = '',\n handleClass = '',\n 'aria-label': ariaLabel = 'Before and after comparison',\n 'aria-labelledby': ariaLabelledby,\n 'aria-valuetext': ariaValuetext,\n onChange\n }: Props = $props();\n\n let dragging = $state(false);\n let containerEl: HTMLElement | null = $state(null);\n let lastCoord = 0;\n let containerSize = 0;\n\n const horiz = $derived(orientation === 'horizontal');\n\n function clamp(v: number): number {\n return Math.min(max, Math.max(min, v));\n }\n\n function setPosition(v: number) {\n const next = clamp(v);\n if (next !== position) {\n position = next;\n onChange?.(next);\n }\n }\n\n const attach: Attachment<HTMLDivElement> = (node) => {\n containerEl = node;\n return () => {\n containerEl = null;\n };\n };\n\n function refreshSize() {\n if (!containerEl) {\n containerSize = 0;\n return;\n }\n const rect = containerEl.getBoundingClientRect();\n containerSize = horiz ? rect.width : rect.height;\n }\n\n function pointFromEvent(e: PointerEvent): number {\n return horiz ? e.clientX : e.clientY;\n }\n\n function pctFromAbsolute(e: PointerEvent): number {\n if (!containerEl) return position;\n const rect = containerEl.getBoundingClientRect();\n const offset = horiz ? e.clientX - rect.left : e.clientY - rect.top;\n const size = horiz ? rect.width : rect.height;\n if (size <= 0) return position;\n return (offset / size) * 100;\n }\n\n function onTrackPointerDown(e: PointerEvent) {\n if (disabled) return;\n e.preventDefault();\n dragging = true;\n refreshSize();\n lastCoord = pointFromEvent(e);\n setPosition(pctFromAbsolute(e));\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n }\n\n function onHandlePointerDown(e: PointerEvent) {\n if (disabled) return;\n e.preventDefault();\n e.stopPropagation();\n dragging = true;\n refreshSize();\n lastCoord = pointFromEvent(e);\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n }\n\n function onPointerMove(e: PointerEvent) {\n if (!dragging || containerSize <= 0) return;\n const cur = pointFromEvent(e);\n const deltaPx = cur - lastCoord;\n lastCoord = cur;\n if (deltaPx === 0) return;\n const deltaPct = (deltaPx / containerSize) * 100;\n setPosition(position + deltaPct);\n }\n\n function onPointerUp(e: PointerEvent) {\n if (!dragging) return;\n dragging = false;\n try {\n (e.currentTarget as HTMLElement).releasePointerCapture(e.pointerId);\n } catch {\n /* noop */\n }\n }\n\n function onKeydown(e: KeyboardEvent) {\n if (disabled) return;\n const incKey = horiz ? 'ArrowRight' : 'ArrowDown';\n const decKey = horiz ? 'ArrowLeft' : 'ArrowUp';\n if (e.key === 'Home') {\n e.preventDefault();\n setPosition(min);\n return;\n } else if (e.key === 'End') {\n e.preventDefault();\n setPosition(max);\n return;\n }\n let delta;\n if (e.key === incKey) delta = step;\n else if (e.key === decKey) delta = -step;\n else if (e.key === 'PageDown') delta = largeStep;\n else if (e.key === 'PageUp') delta = -largeStep;\n else return;\n e.preventDefault();\n setPosition(position + delta);\n }\n\n const afterClipStyle = $derived(\n horiz\n ? `clip-path:inset(0 ${100 - position}% 0 0);`\n : `clip-path:inset(0 0 ${100 - position}% 0);`\n );\n\n const handleStyle = $derived(\n horiz\n ? `left:${position}%;top:0;bottom:0;transform:translateX(-50%);`\n : `top:${position}%;left:0;right:0;transform:translateY(-50%);`\n );\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n {@attach attach}\n class={className}\n data-orientation={orientation}\n data-dragging={dragging || undefined}\n data-disabled={disabled || undefined}\n style=\"position:relative;overflow:hidden;touch-action:none;\"\n onpointerdown={onTrackPointerDown}\n onpointermove={onPointerMove}\n onpointerup={onPointerUp}\n onpointercancel={onPointerUp}\n>\n <div class={beforeClass} data-layer=\"before\" style=\"position:absolute;inset:0;\">\n {@render before()}\n </div>\n <div class={afterClass} data-layer=\"after\" style={`position:absolute;inset:0;${afterClipStyle}`}>\n {@render after()}\n </div>\n\n <div\n role=\"slider\"\n tabindex={disabled ? -1 : 0}\n data-dragging={dragging || undefined}\n data-orientation={orientation}\n class={handleClass}\n style={`position:absolute;${handleStyle}`}\n onpointerdown={onHandlePointerDown}\n onpointermove={onPointerMove}\n onpointerup={onPointerUp}\n onpointercancel={onPointerUp}\n onkeydown={onKeydown}\n {...mergeAttrs(\n labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby }),\n interactiveStateAttrs({ disabled }),\n widgetAttrs({\n orientation,\n valuenow: Math.round(position),\n valuemin: min,\n valuemax: max,\n valuetext: ariaValuetext\n })\n )}\n >\n {#if handle}\n {@render handle({ position, dragging })}\n {/if}\n </div>\n</div>\n",
11774
11874
  "index.ts": "export { default as Compare } from './Compare.svelte';\n"
11775
11875
  }
11776
11876
  },
@@ -11972,7 +12072,7 @@ var BUNDLED_DATA = {
11972
12072
 
11973
12073
  {#if keys && keys.length > 0}
11974
12074
  <kbd class={className} aria-label={ariaLabel ?? keys.join(' then ')}>
11975
- {#each keys as key, i}
12075
+ {#each keys as key, i (i)}
11976
12076
  <kbd>{key}</kbd>{#if i < keys.length - 1}<span aria-hidden="true">{separator}</span>{/if}
11977
12077
  {/each}
11978
12078
  </kbd>
@@ -12039,7 +12139,7 @@ var BUNDLED_DATA = {
12039
12139
  "category": "display",
12040
12140
  "slug": "stat-card",
12041
12141
  "files": {
12042
- "StatCard.svelte": "<script lang=\"ts\">\n import { generateCounterId } from '$utils/a11y/id.js';\n import { labelAttrs, mergeAttrs } from '$utils/a11y/index.js';\n\n type Trend = 'up' | 'down' | 'flat';\n\n interface Props {\n label: string;\n value: string | number;\n valueClass?: string;\n labelClass?: string;\n hint?: string;\n change?: string | number;\n trend?: Trend;\n icon?: import('svelte').Snippet;\n actions?: import('svelte').Snippet;\n change_snippet?: import('svelte').Snippet<[{ trend: Trend; change: string | number }]>;\n class?: string;\n hintClass?: string;\n changeClass?: string;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n }\n\n let {\n label,\n value,\n valueClass = '',\n labelClass = '',\n hint,\n change,\n trend,\n icon,\n actions,\n change_snippet,\n class: className = '',\n hintClass = '',\n changeClass = '',\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedby\n }: Props = $props();\n\n const labelId = generateCounterId('stat-label');\n const valueId = generateCounterId('stat-value');\n\n const trendText = $derived(trend === 'up' ? ' increased' : trend === 'down' ? ' decreased' : '');\n const inferredLabel = $derived(`${label}: ${value}${trendText}`);\n</script>\n\n<div\n role=\"group\"\n class={className}\n data-trend={trend}\n {...mergeAttrs(\n labelAttrs({\n label: ariaLabel,\n labelledby: labelId,\n describedby: ariaDescribedby ?? valueId\n })\n )}\n>\n {#if icon}{@render icon()}{/if}\n <div>\n <div id={labelId} class={labelClass}>{label}</div>\n <div id={valueId} class={valueClass} {...labelAttrs({ label: inferredLabel })}>{value}</div>\n {#if change !== undefined}\n {#if change_snippet}\n {@render change_snippet({ trend: trend ?? 'flat', change })}\n {:else}\n <div class={changeClass} data-trend={trend}>{change}</div>\n {/if}\n {/if}\n {#if hint}<div class={hintClass}>{hint}</div>{/if}\n </div>\n {#if actions}{@render actions()}{/if}\n</div>\n",
12142
+ "StatCard.svelte": "<script lang=\"ts\">\n import { generateCounterId } from '$utils/a11y/id.js';\n import { labelAttrs, mergeAttrs } from '$utils/a11y/index.js';\n\n type Trend = 'up' | 'down' | 'flat';\n\n interface Props {\n label: string;\n value: string | number;\n valueClass?: string;\n labelClass?: string;\n hint?: string;\n change?: string | number;\n trend?: Trend;\n icon?: import('svelte').Snippet;\n actions?: import('svelte').Snippet;\n change_snippet?: import('svelte').Snippet<[{ trend: Trend; change: string | number }]>;\n class?: string;\n hintClass?: string;\n changeClass?: string;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n }\n\n let {\n label,\n value,\n valueClass = '',\n labelClass = '',\n hint,\n change,\n trend,\n icon,\n actions,\n change_snippet,\n class: className = '',\n hintClass = '',\n changeClass = '',\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedby\n }: Props = $props();\n\n const labelId = generateCounterId('stat-label');\n const valueId = generateCounterId('stat-value');\n\n const trendText = $derived(trend === 'up' ? ' increased' : trend === 'down' ? ' decreased' : '');\n const inferredLabel = $derived(`${label}: ${value}${trendText}`);\n</script>\n\n<article\n class={className}\n data-trend={trend}\n {...mergeAttrs(\n labelAttrs({\n label: ariaLabel,\n labelledby: labelId,\n describedby: ariaDescribedby ?? valueId\n })\n )}\n>\n {#if icon}{@render icon()}{/if}\n <div>\n <div id={labelId} class={labelClass}>{label}</div>\n <div id={valueId} class={valueClass} {...labelAttrs({ label: inferredLabel })}>{value}</div>\n {#if change !== undefined}\n {#if change_snippet}\n {@render change_snippet({ trend: trend ?? 'flat', change })}\n {:else}\n <div class={changeClass} data-trend={trend}>{change}</div>\n {/if}\n {/if}\n {#if hint}<div class={hintClass}>{hint}</div>{/if}\n </div>\n {#if actions}{@render actions()}{/if}\n</article>\n",
12043
12143
  "index.ts": "export { default as StatCard } from './StatCard.svelte';\n"
12044
12144
  }
12045
12145
  },
@@ -12278,9 +12378,20 @@ var BUNDLED_DATA = {
12278
12378
  const hasChildren = $derived(!!children);
12279
12379
  const expanded = $derived(ctx.isExpanded(id));
12280
12380
  const selected = $derived(ctx.isSelected(id));
12281
- const focused = $derived(ctx.focused() === id);
12282
-
12283
12381
  let itemEl = $state<HTMLLIElement | null>(null);
12382
+ let setsize = $state(1);
12383
+ let posinset = $state(1);
12384
+
12385
+ $effect(() => {
12386
+ if (!itemEl) return;
12387
+ const parent = itemEl.parentElement;
12388
+ if (!parent) return;
12389
+ const siblings = Array.from(parent.children).filter(
12390
+ (c) => c.getAttribute('role') === 'treeitem'
12391
+ );
12392
+ setsize = siblings.length;
12393
+ posinset = siblings.indexOf(itemEl) + 1;
12394
+ });
12284
12395
 
12285
12396
  function onClick(e: MouseEvent) {
12286
12397
  if (disabled) return;
@@ -12302,7 +12413,6 @@ var BUNDLED_DATA = {
12302
12413
  }
12303
12414
  </script>
12304
12415
 
12305
- <!-- svelte-ignore a11y_click_events_have_key_events -->
12306
12416
  <li
12307
12417
  bind:this={itemEl}
12308
12418
  role="treeitem"
@@ -12319,7 +12429,7 @@ var BUNDLED_DATA = {
12319
12429
  selected: selected || undefined,
12320
12430
  disabled
12321
12431
  }),
12322
- widgetAttrs({ level })
12432
+ widgetAttrs({ level, setsize, posinset })
12323
12433
  )}
12324
12434
  >
12325
12435
  {#if label}{@render label({ expanded, selected })}{/if}
@@ -12726,7 +12836,7 @@ var BUNDLED_DATA = {
12726
12836
  onkeydown={onMenuKey}
12727
12837
  {@attach menuRef}
12728
12838
  >
12729
- {#each items as it, i}
12839
+ {#each items as it, i (i)}
12730
12840
  {#if it.separator}
12731
12841
  <div role="separator" class={separatorClass}></div>
12732
12842
  {:else if item}
@@ -13939,7 +14049,6 @@ var BUNDLED_DATA = {
13939
14049
  }
13940
14050
  </script>
13941
14051
 
13942
- <!-- svelte-ignore a11y_no_static_element_interactions -->
13943
14052
  {#if as === 'span'}
13944
14053
  <span
13945
14054
  class={className}
@@ -14240,7 +14349,7 @@ var BUNDLED_DATA = {
14240
14349
  "category": "interactive",
14241
14350
  "slug": "resizable",
14242
14351
  "files": {
14243
- "Resizable.svelte": "<script lang=\"ts\">\n import { labelAttrs, interactiveStateAttrs, widgetAttrs, mergeAttrs } from '$utils/a11y/index.js';\n\n type Side = 'right' | 'bottom' | 'left' | 'top';\n\n interface Props {\n children?: import('svelte').Snippet;\n size?: number;\n minSize?: number;\n maxSize?: number;\n side?: Side;\n step?: number;\n largeStep?: number;\n disabled?: boolean;\n class?: string;\n handleClass?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n onResize?: (size: number) => void;\n }\n\n let {\n children,\n size = $bindable(200),\n minSize = 50,\n maxSize = Number.POSITIVE_INFINITY,\n side = 'right',\n step = 8,\n largeStep = 32,\n disabled = false,\n class: className = '',\n handleClass = '',\n 'aria-label': ariaLabel = 'Resize',\n 'aria-labelledby': ariaLabelledby,\n onResize\n }: Props = $props();\n\n const axis = $derived<'x' | 'y'>(side === 'left' || side === 'right' ? 'x' : 'y');\n const orientation = $derived<'vertical' | 'horizontal'>(axis === 'x' ? 'vertical' : 'horizontal');\n\n let dragging = $state(false);\n let lastCoord = 0;\n\n function clamp(v: number): number {\n const max = Number.isFinite(maxSize) ? maxSize : v;\n return Math.min(max, Math.max(minSize, v));\n }\n\n function commit(v: number) {\n const next = clamp(v);\n if (next !== size) {\n size = next;\n onResize?.(next);\n }\n }\n\n function onPointerDown(e: PointerEvent) {\n if (disabled) return;\n e.preventDefault();\n dragging = true;\n lastCoord = axis === 'x' ? e.clientX : e.clientY;\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n }\n\n function onPointerMove(e: PointerEvent) {\n if (!dragging) return;\n const cur = axis === 'x' ? e.clientX : e.clientY;\n let delta = cur - lastCoord;\n if (side === 'left' || side === 'top') delta = -delta;\n lastCoord = cur;\n if (delta === 0) return;\n commit(size + delta);\n }\n\n function onPointerUp(e: PointerEvent) {\n if (!dragging) return;\n dragging = false;\n try {\n (e.currentTarget as HTMLElement).releasePointerCapture(e.pointerId);\n } catch {\n /* noop */\n }\n }\n\n function onKeydown(e: KeyboardEvent) {\n if (disabled) return;\n const incKey = axis === 'x' ? 'ArrowRight' : 'ArrowDown';\n const decKey = axis === 'x' ? 'ArrowLeft' : 'ArrowUp';\n let delta = 0;\n\n if (e.key === incKey) delta = step;\n else if (e.key === decKey) delta = -step;\n else if (e.key === 'PageDown') delta = largeStep;\n else if (e.key === 'PageUp') delta = -largeStep;\n else if (e.key === 'Home') {\n e.preventDefault();\n commit(minSize);\n return;\n } else if (e.key === 'End') {\n e.preventDefault();\n if (Number.isFinite(maxSize)) commit(maxSize);\n return;\n } else {\n return;\n }\n\n e.preventDefault();\n commit(size + delta);\n }\n\n const containerStyle = $derived(axis === 'x' ? `width:${size}px` : `height:${size}px`);\n</script>\n\n<div\n class={className}\n style={containerStyle}\n data-side={side}\n data-dragging={dragging || undefined}\n>\n {#if children}{@render children()}{/if}\n <!-- svelte-ignore a11y_no_noninteractive_tabindex -->\n <!-- svelte-ignore a11y_no_noninteractive_element_interactions -->\n <div\n role=\"separator\"\n tabindex={disabled ? -1 : 0}\n data-dragging={dragging || undefined}\n data-side={side}\n class={handleClass}\n onpointerdown={onPointerDown}\n onpointermove={onPointerMove}\n onpointerup={onPointerUp}\n onpointercancel={onPointerUp}\n onkeydown={onKeydown}\n {...mergeAttrs(\n labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby }),\n interactiveStateAttrs({ disabled }),\n widgetAttrs({\n orientation,\n valuenow: size,\n valuemin: minSize,\n valuemax: Number.isFinite(maxSize) ? maxSize : undefined\n })\n )}\n ></div>\n</div>\n",
14352
+ "Resizable.svelte": "<script lang=\"ts\">\n import { labelAttrs, interactiveStateAttrs, widgetAttrs, mergeAttrs } from '$utils/a11y/index.js';\n\n type Side = 'right' | 'bottom' | 'left' | 'top';\n\n interface Props {\n children?: import('svelte').Snippet;\n size?: number;\n minSize?: number;\n maxSize?: number;\n side?: Side;\n step?: number;\n largeStep?: number;\n disabled?: boolean;\n class?: string;\n handleClass?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n onResize?: (size: number) => void;\n }\n\n let {\n children,\n size = $bindable(200),\n minSize = 50,\n maxSize = Number.POSITIVE_INFINITY,\n side = 'right',\n step = 8,\n largeStep = 32,\n disabled = false,\n class: className = '',\n handleClass = '',\n 'aria-label': ariaLabel = 'Resize',\n 'aria-labelledby': ariaLabelledby,\n onResize\n }: Props = $props();\n\n const axis = $derived<'x' | 'y'>(side === 'left' || side === 'right' ? 'x' : 'y');\n const orientation = $derived<'vertical' | 'horizontal'>(axis === 'x' ? 'vertical' : 'horizontal');\n\n let dragging = $state(false);\n let lastCoord = 0;\n\n function clamp(v: number): number {\n const max = Number.isFinite(maxSize) ? maxSize : v;\n return Math.min(max, Math.max(minSize, v));\n }\n\n function commit(v: number) {\n const next = clamp(v);\n if (next !== size) {\n size = next;\n onResize?.(next);\n }\n }\n\n function onPointerDown(e: PointerEvent) {\n if (disabled) return;\n e.preventDefault();\n dragging = true;\n lastCoord = axis === 'x' ? e.clientX : e.clientY;\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n }\n\n function onPointerMove(e: PointerEvent) {\n if (!dragging) return;\n const cur = axis === 'x' ? e.clientX : e.clientY;\n let delta = cur - lastCoord;\n if (side === 'left' || side === 'top') delta = -delta;\n lastCoord = cur;\n if (delta === 0) return;\n commit(size + delta);\n }\n\n function onPointerUp(e: PointerEvent) {\n if (!dragging) return;\n dragging = false;\n try {\n (e.currentTarget as HTMLElement).releasePointerCapture(e.pointerId);\n } catch {\n /* noop */\n }\n }\n\n function onKeydown(e: KeyboardEvent) {\n if (disabled) return;\n const incKey = axis === 'x' ? 'ArrowRight' : 'ArrowDown';\n const decKey = axis === 'x' ? 'ArrowLeft' : 'ArrowUp';\n if (e.key === 'Home') {\n e.preventDefault();\n commit(minSize);\n return;\n } else if (e.key === 'End') {\n e.preventDefault();\n if (Number.isFinite(maxSize)) commit(maxSize);\n return;\n }\n let delta;\n if (e.key === incKey) delta = step;\n else if (e.key === decKey) delta = -step;\n else if (e.key === 'PageDown') delta = largeStep;\n else if (e.key === 'PageUp') delta = -largeStep;\n else return;\n\n e.preventDefault();\n commit(size + delta);\n }\n\n const containerStyle = $derived(axis === 'x' ? `width:${size}px` : `height:${size}px`);\n</script>\n\n<div\n class={className}\n style={containerStyle}\n data-side={side}\n data-dragging={dragging || undefined}\n>\n {#if children}{@render children()}{/if}\n <!-- svelte-ignore a11y_no_noninteractive_tabindex -->\n <div\n role=\"separator\"\n tabindex={disabled ? -1 : 0}\n data-dragging={dragging || undefined}\n data-side={side}\n class={handleClass}\n onpointerdown={onPointerDown}\n onpointermove={onPointerMove}\n onpointerup={onPointerUp}\n onpointercancel={onPointerUp}\n onkeydown={onKeydown}\n {...mergeAttrs(\n labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby }),\n interactiveStateAttrs({ disabled }),\n widgetAttrs({\n orientation,\n valuenow: size,\n valuemin: minSize,\n valuemax: Number.isFinite(maxSize) ? maxSize : undefined\n })\n )}\n ></div>\n</div>\n",
14244
14353
  "index.ts": "export { default as Resizable } from './Resizable.svelte';\n"
14245
14354
  }
14246
14355
  },
@@ -14561,7 +14670,7 @@ var BUNDLED_DATA = {
14561
14670
  {#if children}{@render children()}{/if}
14562
14671
  </div>
14563
14672
  `,
14564
- "SplitViewHandle.svelte": "<script lang=\"ts\">\n import type { Attachment } from 'svelte/attachments';\n import { getSplitViewContext } from './SplitView.svelte';\n import { labelAttrs, interactiveStateAttrs, widgetAttrs, mergeAttrs } from '$utils/a11y/index.js';\n\n interface Props {\n class?: string;\n step?: number;\n largeStep?: number;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n }\n\n let {\n class: className = '',\n step = 2,\n largeStep = 10,\n 'aria-label': ariaLabel = 'Resize panes',\n 'aria-labelledby': ariaLabelledby\n }: Props = $props();\n\n const ctx = getSplitViewContext();\n let handleEl: HTMLElement | null = $state(null);\n let lastCoord = 0;\n let containerSize = 0;\n\n function findContainer(node: HTMLElement): HTMLElement {\n return (node.parentElement as HTMLElement) ?? node;\n }\n\n const attach: Attachment<HTMLDivElement> = (node) => {\n handleEl = node;\n return () => {\n handleEl = null;\n };\n };\n\n function onPointerDown(e: PointerEvent) {\n if (ctx.disabled()) return;\n e.preventDefault();\n ctx.setDragging(true);\n const horiz = ctx.orientation() === 'horizontal';\n lastCoord = horiz ? e.clientX : e.clientY;\n const container = handleEl ? findContainer(handleEl) : null;\n const rect = container?.getBoundingClientRect();\n containerSize = rect ? (horiz ? rect.width : rect.height) : 0;\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n }\n\n function onPointerMove(e: PointerEvent) {\n if (!ctx.dragging()) return;\n if (containerSize <= 0) return;\n const horiz = ctx.orientation() === 'horizontal';\n const cur = horiz ? e.clientX : e.clientY;\n const deltaPx = cur - lastCoord;\n lastCoord = cur;\n if (deltaPx === 0) return;\n const deltaPct = (deltaPx / containerSize) * 100;\n ctx.setSize(ctx.size() + deltaPct);\n }\n\n function onPointerUp(e: PointerEvent) {\n if (!ctx.dragging()) return;\n ctx.setDragging(false);\n try {\n (e.currentTarget as HTMLElement).releasePointerCapture(e.pointerId);\n } catch {\n /* noop */\n }\n }\n\n function onKeydown(e: KeyboardEvent) {\n if (ctx.disabled()) return;\n const horiz = ctx.orientation() === 'horizontal';\n const incKey = horiz ? 'ArrowRight' : 'ArrowDown';\n const decKey = horiz ? 'ArrowLeft' : 'ArrowUp';\n let delta = 0;\n if (e.key === incKey) delta = step;\n else if (e.key === decKey) delta = -step;\n else if (e.key === 'PageDown') delta = largeStep;\n else if (e.key === 'PageUp') delta = -largeStep;\n else if (e.key === 'Home') {\n e.preventDefault();\n ctx.setSize(ctx.min());\n return;\n } else if (e.key === 'End') {\n e.preventDefault();\n ctx.setSize(ctx.max());\n return;\n } else {\n return;\n }\n e.preventDefault();\n ctx.setSize(ctx.size() + delta);\n }\n</script>\n\n<!-- svelte-ignore a11y_no_noninteractive_tabindex -->\n<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->\n<div\n {@attach attach}\n role=\"separator\"\n tabindex={ctx.disabled() ? -1 : 0}\n data-dragging={ctx.dragging() || undefined}\n data-orientation={ctx.orientation()}\n class={className}\n onpointerdown={onPointerDown}\n onpointermove={onPointerMove}\n onpointerup={onPointerUp}\n onpointercancel={onPointerUp}\n onkeydown={onKeydown}\n {...mergeAttrs(\n labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby }),\n interactiveStateAttrs({ disabled: ctx.disabled() }),\n widgetAttrs({\n orientation: ctx.orientation() === 'horizontal' ? 'vertical' : 'horizontal',\n valuenow: Math.round(ctx.size()),\n valuemin: ctx.min(),\n valuemax: ctx.max(),\n controls: `${ctx.firstPaneId} ${ctx.secondPaneId}`\n })\n )}\n></div>\n",
14673
+ "SplitViewHandle.svelte": "<script lang=\"ts\">\n import type { Attachment } from 'svelte/attachments';\n import { getSplitViewContext } from './SplitView.svelte';\n import { labelAttrs, interactiveStateAttrs, widgetAttrs, mergeAttrs } from '$utils/a11y/index.js';\n\n interface Props {\n class?: string;\n step?: number;\n largeStep?: number;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n }\n\n let {\n class: className = '',\n step = 2,\n largeStep = 10,\n 'aria-label': ariaLabel = 'Resize panes',\n 'aria-labelledby': ariaLabelledby\n }: Props = $props();\n\n const ctx = getSplitViewContext();\n let handleEl: HTMLElement | null = $state(null);\n let lastCoord = 0;\n let containerSize = 0;\n\n function findContainer(node: HTMLElement): HTMLElement {\n return (node.parentElement as HTMLElement) ?? node;\n }\n\n const attach: Attachment<HTMLDivElement> = (node) => {\n handleEl = node;\n return () => {\n handleEl = null;\n };\n };\n\n function onPointerDown(e: PointerEvent) {\n if (ctx.disabled()) return;\n e.preventDefault();\n ctx.setDragging(true);\n const horiz = ctx.orientation() === 'horizontal';\n lastCoord = horiz ? e.clientX : e.clientY;\n const container = handleEl ? findContainer(handleEl) : null;\n const rect = container?.getBoundingClientRect();\n containerSize = rect ? (horiz ? rect.width : rect.height) : 0;\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n }\n\n function onPointerMove(e: PointerEvent) {\n if (!ctx.dragging()) return;\n if (containerSize <= 0) return;\n const horiz = ctx.orientation() === 'horizontal';\n const cur = horiz ? e.clientX : e.clientY;\n const deltaPx = cur - lastCoord;\n lastCoord = cur;\n if (deltaPx === 0) return;\n const deltaPct = (deltaPx / containerSize) * 100;\n ctx.setSize(ctx.size() + deltaPct);\n }\n\n function onPointerUp(e: PointerEvent) {\n if (!ctx.dragging()) return;\n ctx.setDragging(false);\n try {\n (e.currentTarget as HTMLElement).releasePointerCapture(e.pointerId);\n } catch {\n /* noop */\n }\n }\n\n function onKeydown(e: KeyboardEvent) {\n if (ctx.disabled()) return;\n const horiz = ctx.orientation() === 'horizontal';\n const incKey = horiz ? 'ArrowRight' : 'ArrowDown';\n const decKey = horiz ? 'ArrowLeft' : 'ArrowUp';\n if (e.key === 'Home') {\n e.preventDefault();\n ctx.setSize(ctx.min());\n return;\n } else if (e.key === 'End') {\n e.preventDefault();\n ctx.setSize(ctx.max());\n return;\n }\n let delta;\n if (e.key === incKey) delta = step;\n else if (e.key === decKey) delta = -step;\n else if (e.key === 'PageDown') delta = largeStep;\n else if (e.key === 'PageUp') delta = -largeStep;\n else return;\n e.preventDefault();\n ctx.setSize(ctx.size() + delta);\n }\n</script>\n\n<!-- svelte-ignore a11y_no_noninteractive_tabindex -->\n<div\n {@attach attach}\n role=\"separator\"\n tabindex={ctx.disabled() ? -1 : 0}\n data-dragging={ctx.dragging() || undefined}\n data-orientation={ctx.orientation()}\n class={className}\n onpointerdown={onPointerDown}\n onpointermove={onPointerMove}\n onpointerup={onPointerUp}\n onpointercancel={onPointerUp}\n onkeydown={onKeydown}\n {...mergeAttrs(\n labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby }),\n interactiveStateAttrs({ disabled: ctx.disabled() }),\n widgetAttrs({\n orientation: ctx.orientation() === 'horizontal' ? 'vertical' : 'horizontal',\n valuenow: Math.round(ctx.size()),\n valuemin: ctx.min(),\n valuemax: ctx.max(),\n controls: `${ctx.firstPaneId} ${ctx.secondPaneId}`\n })\n )}\n></div>\n",
14565
14674
  "SplitViewPane.svelte": "<script lang=\"ts\">\n import { getSplitViewContext } from './SplitView.svelte';\n import { labelAttrs } from '$utils/a11y/index.js';\n\n interface Props {\n children?: import('svelte').Snippet;\n side: 'first' | 'second';\n class?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n }\n\n let {\n children,\n side,\n class: className = '',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby\n }: Props = $props();\n\n const ctx = getSplitViewContext();\n\n const paneStyle = $derived.by(() => {\n const horiz = ctx.orientation() === 'horizontal';\n const size = ctx.size();\n const dim = horiz ? 'width' : 'height';\n const value = side === 'first' ? `${size}%` : `${100 - size}%`;\n return `${dim}:${value};flex:0 0 ${value};`;\n });\n\n const paneId = $derived(side === 'first' ? ctx.firstPaneId : ctx.secondPaneId);\n</script>\n\n<div\n id={paneId}\n role=\"group\"\n data-side={side}\n class={className}\n style={paneStyle}\n {...labelAttrs({ label: ariaLabel, labelledby: ariaLabelledby })}\n>\n {#if children}{@render children()}{/if}\n</div>\n",
14566
14675
  "index.ts": "export { default as SplitView } from './SplitView.svelte';\nexport { default as SplitViewPane } from './SplitViewPane.svelte';\nexport { default as SplitViewHandle } from './SplitViewHandle.svelte';\nexport { getSplitViewContext, setSplitViewContext } from './SplitView.svelte';\nexport type { SplitViewContext } from './SplitView.svelte';\n"
14567
14676
  }
@@ -14918,13 +15027,14 @@ var BUNDLED_DATA = {
14918
15027
  ],
14919
15028
  files: {
14920
15029
  "components/index.ts": "/**\n * UI Components\n * @module components\n */\n\n// Form Components\nexport { Button } from './form/button/index.js';\nexport { Input } from './form/input/index.js';\nexport { Checkbox } from './form/checkbox/index.js';\nexport { Radio } from './form/radio/index.js';\nexport { Textarea } from './form/textarea/index.js';\nexport {\n Select,\n SelectTrigger,\n SelectContent,\n SelectOption,\n getSelectContext,\n setSelectContext\n} from './form/select/index.js';\nexport type { SelectContext, SelectOptionEntry } from './form/select/index.js';\nexport { Fieldset } from './form/fieldset/index.js';\nexport { RadioGroup, getRadioGroup, setRadioGroup } from './form/radio-group/index.js';\nexport type { RadioGroupContext } from './form/radio-group/index.js';\nexport { Form } from './form/form/index.js';\nexport { FieldError } from './form/field-error/index.js';\nexport { Label } from './form/label/index.js';\nexport { Switch } from './form/switch/index.js';\nexport { Slider } from './form/slider/index.js';\nexport { FileInput } from './form/file-input/index.js';\nexport { SearchInput } from './form/search-input/index.js';\nexport { NumberInput } from './form/number-input/index.js';\nexport { InputGroup, InputAddon } from './form/input-group/index.js';\nexport { Rating } from './form/rating/index.js';\nexport { IconButton } from './form/icon-button/index.js';\nexport { ToggleButton } from './form/toggle-button/index.js';\nexport { AutoComplete } from './form/auto-complete/index.js';\nexport type { AutoCompleteOption } from './form/auto-complete/index.js';\nexport { Calendar } from './form/calendar/index.js';\nexport type { CalendarDay, CalendarView } from './form/calendar/index.js';\nexport { DatePicker } from './form/date-picker/index.js';\nexport { DateRange } from './form/date-range/index.js';\nexport type { DateRangeValue } from './form/date-range/index.js';\nexport { DateRangePicker } from './form/date-range-picker/index.js';\nexport { TimePicker } from './form/time-picker/index.js';\nexport type { Time } from './form/time-picker/index.js';\nexport { ColorPicker } from './form/color-picker/index.js';\n\n// Navigation Components\nexport {\n Tabs,\n TabList,\n Tab,\n TabPanel,\n getTabsContext,\n setTabsContext\n} from './navigation/tabs/index.js';\nexport type { TabsContext } from './navigation/tabs/index.js';\nexport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n getAccordionRoot,\n setAccordionRoot,\n getAccordionItem,\n setAccordionItem\n} from './navigation/accordion/index.js';\nexport type {\n AccordionRootContext,\n AccordionItemContext,\n AccordionType\n} from './navigation/accordion/index.js';\nexport { Breadcrumb, BreadcrumbItem, BreadcrumbSeparator } from './navigation/breadcrumb/index.js';\nexport { Pagination } from './navigation/pagination/index.js';\nexport { Link } from './navigation/link/index.js';\nexport { ExternalLink } from './navigation/external-link/index.js';\nexport { Navigation } from './navigation/navigation/index.js';\nexport { SubMenu } from './navigation/sub-menu/index.js';\nexport type { SubMenuItem } from './navigation/sub-menu/index.js';\nexport {\n Menu,\n MenuTrigger,\n MenuContent,\n MenuItem,\n getMenuContext,\n setMenuContext\n} from './navigation/menu/index.js';\nexport type { MenuContext, MenuItemEntry } from './navigation/menu/index.js';\nexport {\n Stepper,\n StepperStep,\n getStepperContext,\n setStepperContext\n} from './navigation/stepper/index.js';\nexport type { StepperContext } from './navigation/stepper/index.js';\nexport {\n CommandMenu,\n CommandMenuTrigger,\n CommandMenuContent,\n CommandMenuInput,\n CommandMenuList,\n CommandMenuItem,\n CommandMenuGroup,\n CommandMenuEmpty,\n getCommandMenuContext,\n setCommandMenuContext\n} from './navigation/command-menu/index.js';\nexport type { CommandMenuContext, CommandItemEntry } from './navigation/command-menu/index.js';\n\n// Feedback Components\nexport { Badge } from './feedback/badge/index.js';\nexport { Tag } from './feedback/tag/index.js';\nexport { Spinner } from './feedback/spinner/index.js';\nexport { Skeleton } from './feedback/skeleton/index.js';\nexport { Progress } from './feedback/progress/index.js';\nexport { Alert } from './feedback/alert/index.js';\nexport { Callout } from './feedback/callout/index.js';\nexport { Banner } from './feedback/banner/index.js';\nexport { InlineMessage } from './feedback/inline-message/index.js';\nexport { LiveRegion } from './feedback/live-region/index.js';\nexport { NotificationBell } from './feedback/notification-bell/index.js';\nexport {\n Toaster,\n ToasterStore,\n Toast,\n createToaster,\n getToasterContext,\n setToasterContext\n} from './feedback/toast/index.js';\nexport type {\n Placement as ToastPlacement,\n ToasterProps,\n AddToastArgs,\n UpdateToastArgs,\n ToastType,\n HoverBehavior,\n TabHiddenBehavior\n} from './feedback/toast/index.js';\n\n// Display Components\nexport { Divider } from './display/divider/index.js';\nexport { Kbd } from './display/kbd/index.js';\nexport { AspectRatio } from './display/aspect-ratio/index.js';\nexport { Frame } from './display/frame/index.js';\nexport { Timestamp } from './display/timestamp/index.js';\nexport { CodeBlock } from './display/code-block/index.js';\nexport { StatCard } from './display/stat-card/index.js';\nexport { Avatar } from './display/avatar/index.js';\nexport {\n Card,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardFooter,\n getCardContext,\n setCardContext\n} from './display/card/index.js';\nexport type { CardContext } from './display/card/index.js';\nexport { Image } from './display/image/index.js';\nexport { List, ListItem } from './display/list/index.js';\nexport { DataList, DataListTerm, DataListDescription } from './display/data-list/index.js';\nexport {\n Table,\n TableCaption,\n TableHead,\n TableBody,\n TableFoot,\n TableRow,\n TableHeader,\n TableCell\n} from './display/table/index.js';\nexport {\n TreeView,\n TreeItem,\n getTreeViewContext,\n setTreeViewContext\n} from './display/tree-view/index.js';\nexport type { TreeViewContext } from './display/tree-view/index.js';\nexport { Timeline, TimelineItem } from './display/timeline/index.js';\nexport { Compare } from './display/compare/index.js';\nexport {\n Carousel,\n CarouselSlides,\n CarouselSlide,\n CarouselPrev,\n CarouselNext,\n CarouselIndicators,\n getCarouselContext,\n setCarouselContext\n} from './display/carousel/index.js';\nexport type { CarouselContext } from './display/carousel/index.js';\n\n// Overlay Components\nexport {\n Modal,\n ModalTrigger,\n ModalContent,\n ModalTitle,\n ModalDescription,\n ModalClose,\n getModalContext,\n setModalContext\n} from './overlay/modal/index.js';\nexport type { ModalContext } from './overlay/modal/index.js';\nexport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose\n} from './overlay/dialog/index.js';\nexport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerTitle,\n DrawerDescription,\n DrawerClose\n} from './overlay/drawer/index.js';\nexport type { DrawerSide } from './overlay/drawer/index.js';\nexport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n getTooltipContext,\n setTooltipContext\n} from './overlay/tooltip/index.js';\nexport type { TooltipContext } from './overlay/tooltip/index.js';\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n getPopoverContext,\n setPopoverContext\n} from './overlay/popover/index.js';\nexport type { PopoverContext } from './overlay/popover/index.js';\nexport {\n Dropdown,\n DropdownTrigger,\n DropdownContent,\n DropdownItem,\n getDropdownContext,\n setDropdownContext\n} from './overlay/dropdown/index.js';\nexport type { DropdownContext, DropdownItemEntry } from './overlay/dropdown/index.js';\nexport {\n Sheet,\n SheetContent,\n SheetTrigger,\n SheetTitle,\n SheetDescription,\n SheetClose\n} from './overlay/sheet/index.js';\nexport type { SheetSide } from './overlay/sheet/index.js';\nexport { Overlay } from './overlay/overlay/index.js';\nexport { Lightbox } from './overlay/lightbox/index.js';\nexport type { LightboxImage } from './overlay/lightbox/index.js';\nexport { ContextMenu } from './overlay/context-menu/index.js';\nexport type { ContextMenuItemEntry } from './overlay/context-menu/index.js';\n\n// Layout Components\nexport { Stack } from './layout/stack/index.js';\nexport { Flex } from './layout/flex/index.js';\nexport { Grid } from './layout/grid/index.js';\nexport { Container } from './layout/container/index.js';\nexport { Spacer } from './layout/spacer/index.js';\nexport { Columns } from './layout/columns/index.js';\n\n// Interactive Components\nexport { Sortable } from './interactive/sortable/index.js';\nexport { Swipeable } from './interactive/swipeable/index.js';\nexport type { SwipeDirection } from './interactive/swipeable/index.js';\nexport { Resizable } from './interactive/resizable/index.js';\nexport {\n SplitView,\n SplitViewPane,\n SplitViewHandle,\n getSplitViewContext,\n setSplitViewContext\n} from './interactive/split-view/index.js';\nexport type { SplitViewContext } from './interactive/split-view/index.js';\nexport { Draggable } from './interactive/draggable/index.js';\nexport type { DraggableEvent } from './interactive/draggable/index.js';\nexport { Droppable } from './interactive/droppable/index.js';\nexport type { DroppableEvent } from './interactive/droppable/index.js';\nexport { InfiniteScroll } from './interactive/infinite-scroll/index.js';\nexport { VirtualList } from './interactive/virtual-list/index.js';\n\n// Utility Components\nexport { VisuallyHidden } from './utility/visually-hidden/index.js';\nexport { Portal } from './utility/portal/index.js';\nexport { FocusTrap } from './utility/focus-trap/index.js';\nexport { ScreenReaderOnly } from './utility/screen-reader-only/index.js';\nexport { Conditional } from './utility/conditional/index.js';\n",
14921
- "utils/a11y/aria.ts": "/**\n * ARIA attribute utilities for WCAG compliance\n */\nimport type {\n LabelConfig,\n ValidationConfig,\n InteractiveStateConfig,\n WidgetConfig,\n AriaHaspopup,\n AriaLive,\n AriaOrientation\n} from '$types/index.js';\n\n/**\n * Builds ARIA attributes object from a partial record, filtering out undefined values\n * and converting boolean/number/undefined values to strings for HTML attributes\n *\n * @example\n * ```ts\n * const attrs = buildAriaAttrs({\n * 'aria-label': 'Close',\n * 'aria-expanded': false,\n * 'aria-valuenow': 50,\n * 'aria-hidden': undefined\n * });\n * // { 'aria-label': 'Close', 'aria-expanded': 'false', 'aria-valuenow': '50' }\n * ```\n */\nexport function buildAriaAttrs(\n attrs: Record<string, string | number | boolean | undefined>\n): Record<string, string> {\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(attrs)) {\n if (value !== undefined) {\n result[key] = String(value);\n }\n }\n return result;\n}\n\n/**\n * Creates ARIA attributes for labeling and describing elements\n *\n * @example\n * ```svelte\n * <Input\n * id=\"email\"\n * {...labelAttrs({ label: 'Email address' })}\n * />\n * ```\n */\nexport function labelAttrs(options: LabelConfig = {}) {\n return buildAriaAttrs({\n 'aria-label': options.label,\n 'aria-labelledby': options.labelledby,\n 'aria-describedby': options.describedby\n });\n}\n\n/**\n * Creates ARIA attributes for form validation states\n *\n * @example\n * ```svelte\n * <Input\n * bind:value={email}\n * {...validationAttrs({ invalid: !isValid, errormessage: 'email-error' })}\n * />\n * <p id=\"email-error\" role=\"alert\">{error}</p>\n * ```\n */\nexport function validationAttrs(options: ValidationConfig = {}) {\n return buildAriaAttrs({\n 'aria-invalid': options.invalid,\n 'aria-required': options.required,\n 'aria-errormessage': options.errormessage\n });\n}\n\n/**\n * Creates ARIA attributes for interactive element states\n *\n * @example\n * ```svelte\n * <Button\n * onclick={() => pressed = !pressed}\n * {...interactiveStateAttrs({ pressed })}\n * >\n * Toggle\n * </Button>\n * ```\n */\nexport function interactiveStateAttrs(options: InteractiveStateConfig = {}) {\n return buildAriaAttrs({\n 'aria-pressed': options.pressed,\n 'aria-expanded': options.expanded,\n 'aria-checked': options.checked,\n 'aria-selected': options.selected,\n 'aria-disabled': options.disabled,\n 'aria-busy': options.busy,\n 'aria-current': options.current\n });\n}\n\n/**\n * Creates ARIA attributes for complex widgets and roles\n *\n * @example\n * ```svelte\n * <div role=\"slider\" {...widgetAttrs({\n * valuenow: value,\n * valuemin: 0,\n * valuemax: 100\n * })} />\n * ```\n */\nexport function widgetAttrs(options: WidgetConfig = {}) {\n return buildAriaAttrs({\n 'aria-controls': options.controls,\n 'aria-haspopup': options.haspopup,\n 'aria-valuenow': options.valuenow,\n 'aria-valuetext': options.valuetext,\n 'aria-valuemin': options.valuemin,\n 'aria-valuemax': options.valuemax,\n 'aria-live': options.live,\n 'aria-activedescendant': options.activedescendant,\n 'aria-posinset': options.posinset,\n 'aria-setsize': options.setsize,\n 'aria-level': options.level,\n 'aria-orientation': options.orientation\n });\n}\n\n/**\n * Combines multiple ARIA attribute objects into one\n * Useful for composing different accessibility patterns\n *\n * @example\n * ```svelte\n * <button {...mergeAttrs(\n * labelAttrs({ label: 'Menu' }),\n * interactiveStateAttrs({ expanded: isOpen }),\n * widgetAttrs({ haspopup: 'menu', controls: 'menu-id' })\n * )}>\n * Menu\n * </button>\n * ```\n */\nexport function mergeAttrs(...attrSets: Record<string, string>[]): Record<string, string> {\n return Object.assign({}, ...attrSets);\n}\n",
15030
+ "utils/a11y/aria.ts": "/**\n * ARIA attribute utilities for WCAG compliance\n */\nimport type {\n LabelConfig,\n ValidationConfig,\n InteractiveStateConfig,\n WidgetConfig\n} from '$types/index.js';\n\n/**\n * Builds ARIA attributes object from a partial record, filtering out undefined values\n * and converting boolean/number/undefined values to strings for HTML attributes\n *\n * @example\n * ```ts\n * const attrs = buildAriaAttrs({\n * 'aria-label': 'Close',\n * 'aria-expanded': false,\n * 'aria-valuenow': 50,\n * 'aria-hidden': undefined\n * });\n * // { 'aria-label': 'Close', 'aria-expanded': 'false', 'aria-valuenow': '50' }\n * ```\n */\nexport function buildAriaAttrs(\n attrs: Record<string, string | number | boolean | undefined>\n): Record<string, string> {\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(attrs)) {\n if (value !== undefined) {\n result[key] = String(value);\n }\n }\n return result;\n}\n\n/**\n * Creates ARIA attributes for labeling and describing elements\n *\n * @example\n * ```svelte\n * <Input\n * id=\"email\"\n * {...labelAttrs({ label: 'Email address' })}\n * />\n * ```\n */\nexport function labelAttrs(options: LabelConfig = {}) {\n return buildAriaAttrs({\n 'aria-label': options.label,\n 'aria-labelledby': options.labelledby,\n 'aria-describedby': options.describedby\n });\n}\n\n/**\n * Creates ARIA attributes for form validation states\n *\n * @example\n * ```svelte\n * <Input\n * bind:value={email}\n * {...validationAttrs({ invalid: !isValid, errormessage: 'email-error' })}\n * />\n * <p id=\"email-error\" role=\"alert\">{error}</p>\n * ```\n */\nexport function validationAttrs(options: ValidationConfig = {}) {\n return buildAriaAttrs({\n 'aria-invalid': options.invalid,\n 'aria-required': options.required,\n 'aria-errormessage': options.errormessage\n });\n}\n\n/**\n * Creates ARIA attributes for interactive element states\n *\n * @example\n * ```svelte\n * <Button\n * onclick={() => pressed = !pressed}\n * {...interactiveStateAttrs({ pressed })}\n * >\n * Toggle\n * </Button>\n * ```\n */\nexport function interactiveStateAttrs(options: InteractiveStateConfig = {}) {\n return buildAriaAttrs({\n 'aria-pressed': options.pressed,\n 'aria-expanded': options.expanded,\n 'aria-checked': options.checked,\n 'aria-selected': options.selected,\n 'aria-disabled': options.disabled,\n 'aria-busy': options.busy,\n 'aria-current': options.current\n });\n}\n\n/**\n * Creates ARIA attributes for complex widgets and roles\n *\n * @example\n * ```svelte\n * <div role=\"slider\" {...widgetAttrs({\n * valuenow: value,\n * valuemin: 0,\n * valuemax: 100\n * })} />\n * ```\n */\nexport function widgetAttrs(options: WidgetConfig = {}) {\n return buildAriaAttrs({\n 'aria-controls': options.controls,\n 'aria-haspopup': options.haspopup,\n 'aria-valuenow': options.valuenow,\n 'aria-valuetext': options.valuetext,\n 'aria-valuemin': options.valuemin,\n 'aria-valuemax': options.valuemax,\n 'aria-live': options.live,\n 'aria-activedescendant': options.activedescendant,\n 'aria-posinset': options.posinset,\n 'aria-setsize': options.setsize,\n 'aria-level': options.level,\n 'aria-orientation': options.orientation\n });\n}\n\n/**\n * Combines multiple ARIA attribute objects into one\n * Useful for composing different accessibility patterns\n *\n * @example\n * ```svelte\n * <button {...mergeAttrs(\n * labelAttrs({ label: 'Menu' }),\n * interactiveStateAttrs({ expanded: isOpen }),\n * widgetAttrs({ haspopup: 'menu', controls: 'menu-id' })\n * )}>\n * Menu\n * </button>\n * ```\n */\nexport function mergeAttrs(...attrSets: Record<string, string>[]): Record<string, string> {\n return Object.assign({}, ...attrSets);\n}\n",
14922
15031
  "utils/a11y/focus.ts": "/**\n * Focus management utilities for accessibility\n */\n\n/**\n * Traps focus within a container (for modals, dialogs, dropdowns)\n * Returns a cleanup function that removes the event listener\n *\n * @example\n * ```svelte\n * <script>\n * import { focus } from 'alus-ui';\n * let modalElement;\n *\n * function openModal() {\n * modalElement.showModal();\n * const cleanup = focus.trap(modalElement);\n * // Store cleanup to call when modal closes\n * }\n * </script>\n *\n * <dialog bind:this={modalElement}>\n * <!-- Content -->\n * </dialog>\n * ```\n */\nexport function trap(container: HTMLElement): () => void {\n const focusableElements = container.querySelectorAll(\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n );\n const firstElement = focusableElements[0] as HTMLElement;\n const lastElement = focusableElements[focusableElements.length - 1] as HTMLElement;\n\n const handleTabKey = (e: KeyboardEvent) => {\n if (e.key !== 'Tab') return;\n\n if (e.shiftKey) {\n if (document.activeElement === firstElement) {\n e.preventDefault();\n lastElement?.focus();\n }\n } else {\n if (document.activeElement === lastElement) {\n e.preventDefault();\n firstElement?.focus();\n }\n }\n };\n\n container.addEventListener('keydown', handleTabKey);\n return () => container.removeEventListener('keydown', handleTabKey);\n}\n\n/**\n * Moves focus to first focusable element in container\n *\n * @example\n * ```svelte\n * <script>\n * import { focus } from 'alus-ui';\n * let dialogElement;\n *\n * function open() {\n * dialogElement.showModal();\n * focus.focusFirst(dialogElement);\n * }\n * </script>\n * ```\n */\nexport function focusFirst(container: HTMLElement): void {\n const focusable = container.querySelector<HTMLElement>(\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n );\n focusable?.focus();\n}\n\n/**\n * Moves focus to last focusable element in container\n */\nexport function focusLast(container: HTMLElement): void {\n const focusable = container.querySelectorAll<HTMLElement>(\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n );\n const last = focusable[focusable.length - 1];\n last?.focus();\n}\n\n/**\n * Checks if an element can receive focus\n */\nexport function isFocusable(element: HTMLElement): boolean {\n if (\n element instanceof HTMLButtonElement ||\n element instanceof HTMLInputElement ||\n element instanceof HTMLSelectElement ||\n element instanceof HTMLTextAreaElement\n ) {\n return !element.disabled && element.tabIndex >= 0;\n }\n\n if (element instanceof HTMLAnchorElement) {\n return element.href !== '';\n }\n\n return element.tabIndex >= 0;\n}\n",
14923
15032
  "utils/a11y/id.ts": "/**\n * ID generation utilities for accessibility associations\n */\n\nlet counter = 0;\n\n/**\n * Creates a unique ID for accessibility associations\n * Useful for generating IDs for aria-describedby, aria-labelledby, etc.\n *\n * @param prefix - Descriptive prefix for the ID (e.g., 'label', 'desc', 'error')\n * @returns A unique ID string\n *\n * @example\n * ```svelte\n * <script>\n * import { generateId } from 'alus-ui';\n *\n * const labelId = generateId('label');\n * const errorId = generateId('error');\n * </script>\n *\n * <Input id=\"email\" {...labelAttrs({ labelledby: labelId, describedby: errorId })} />\n * <label {for}>Email</label>\n * <p id={errorId} role=\"alert\">{error}</p>\n * ```\n */\nexport function generateId(prefix: string): string {\n return `alus-${prefix}-${Math.random().toString(36).substring(2, 9)}`;\n}\n\n/**\n * Creates a sequential ID (useful for lists, radios, checkboxes)\n *\n * @param prefix - Descriptive prefix for the ID\n * @returns A sequential ID string\n *\n * @example\n * ```svelte\n * {#each items as item, i}\n * <Radio id={generateSequentialId('option', i)} />\n * {/each}\n * ```\n */\nexport function generateSequentialId(prefix: string, index: number): string {\n return `alus-${prefix}-${index}`;\n}\n\n/**\n * Creates a counter-based ID (guaranteed unique per session)\n *\n * @param prefix - Descriptive prefix for the ID\n * @returns A unique counter-based ID\n */\nexport function generateCounterId(prefix: string): string {\n return `alus-${prefix}-${counter++}`;\n}\n\n/**\n * ID generation utilities object\n */\nexport const id = {\n generate: generateId,\n sequential: generateSequentialId,\n counter: generateCounterId\n};\n",
14924
15033
  "utils/a11y/keyboard.ts": "/**\n * Keyboard event utilities for accessibility\n */\n\n/**\n * Checks if Enter or Space was pressed (for button-like behavior)\n *\n * @example\n * ```svelte\n * <script>\n * import { keyboard } from 'alus-ui';\n *\n * function handleKeydown(e: KeyboardEvent) {\n * if (keyboard.isActivationKey(e)) {\n * // Activate button\n * }\n * }\n * </script>\n * ```\n */\nexport function isActivationKey(event: KeyboardEvent): boolean {\n return event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar';\n}\n\n/**\n * Checks if Escape was pressed\n */\nexport function isEscape(event: KeyboardEvent): boolean {\n return event.key === 'Escape';\n}\n\n/**\n * Checks if Arrow key was pressed\n */\nexport function isArrow(event: KeyboardEvent): boolean {\n return (\n event.key === 'ArrowUp' ||\n event.key === 'ArrowDown' ||\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight'\n );\n}\n\n/**\n * Checks if Home or End was pressed\n */\nexport function isHomeEnd(event: KeyboardEvent): boolean {\n return event.key === 'Home' || event.key === 'End';\n}\n\n/**\n * Checks if Page Up or Page Down was pressed\n */\nexport function isPageUpDown(event: KeyboardEvent): boolean {\n return event.key === 'PageUp' || event.key === 'PageDown';\n}\n\n/**\n * Prevents default behavior for activation keys (Space key scrolling)\n *\n * @example\n * ```svelte\n * <div\n * role=\"button\"\n * onkeydown={(e) => {\n * keyboard.preventActivation(e);\n * if (keyboard.isActivationKey(e)) {\n * // Handle activation\n * }\n * }}\n * >\n * Custom Button\n * </div>\n * ```\n */\nexport function preventActivation(event: KeyboardEvent): void {\n if (event.key === ' ' || event.key === 'Spacebar') {\n event.preventDefault();\n }\n}\n\n/**\n * Gets the direction from an arrow key event\n */\nexport function getArrowDirection(event: KeyboardEvent): 'up' | 'down' | 'left' | 'right' | null {\n switch (event.key) {\n case 'ArrowUp':\n return 'up';\n case 'ArrowDown':\n return 'down';\n case 'ArrowLeft':\n return 'left';\n case 'ArrowRight':\n return 'right';\n default:\n return null;\n }\n}\n\n/**\n * Keyboard event handler utility object\n */\nexport const keyboard = {\n isActivationKey,\n isEscape,\n isArrow,\n isHomeEnd,\n isPageUpDown,\n preventActivation,\n getArrowDirection\n};\n",
14925
15034
  "utils/a11y/index.ts": "/**\n * Accessibility utilities for WCAG compliance and ARIA attributes\n * @module a11y\n */\n\n// Export all ARIA utilities\nexport * from './aria.js';\n\n// Export focus management\nexport * from './focus.js';\n\n// Export keyboard utilities\nexport * from './keyboard.js';\n\n// Export ID generation\nexport * from './id.js';\n",
14926
15035
  "utils/form/state.ts": "/**\n * Form field state management\n * @module form/state\n */\n\n/**\n * Form field state interface\n */\nexport interface FormFieldState<T = string> {\n value: T;\n error: string | undefined;\n touched: boolean;\n dirty: boolean;\n}\n\n/**\n * Create a reactive form field state\n * @param initialValue - Initial value for the field\n * @returns Form field state object\n *\n * @example\n * ```svelte\n * <script>\n * import { createFormField } from 'alus-ui/utils/form';\n *\n * let email = createFormField('');\n * </script>\n *\n * <Input\n * bind:value={email.value}\n * aria-invalid={email.error !== undefined}\n * onblur={() => email.touched = true}\n * />\n *\n * {#if email.error && email.touched}\n * <p class=\"error\">{email.error}</p>\n * {/if}\n * ```\n */\nexport function createFormField<T = string>(initialValue: T): FormFieldState<T> {\n return {\n value: initialValue,\n error: undefined,\n touched: false,\n dirty: false\n };\n}\n\n/**\n * Form state manager for multiple fields\n */\nexport interface FormState<T extends Record<string, unknown>> {\n values: T;\n errors: Record<keyof T, string | undefined>;\n touched: Record<keyof T, boolean>;\n dirty: Record<keyof T, boolean>;\n}\n\n/**\n * Create a form state manager\n * @param initialValues - Initial values for all fields\n * @returns Form state object\n *\n * @example\n * ```svelte\n * <script>\n * import { createFormState } from 'alus-ui/utils/form';\n *\n * let form = createFormState({\n * email: '',\n * password: '',\n * terms: false\n * });\n * </script>\n *\n * <Input bind:value={form.values.email} />\n * <Input bind:value={form.values.password} />\n * ```\n */\nexport function createFormState<T extends Record<string, unknown>>(initialValues: T): FormState<T> {\n const keys = Object.keys(initialValues) as Array<keyof T>;\n\n const touched = {} as Record<keyof T, boolean>;\n const dirty = {} as Record<keyof T, boolean>;\n const errors = {} as Record<keyof T, string | undefined>;\n\n for (const key of keys) {\n touched[key] = false;\n dirty[key] = false;\n errors[key] = undefined;\n }\n\n return {\n values: initialValues,\n errors,\n touched,\n dirty\n };\n}\n\n/**\n * Check if form has any errors\n * @param form - Form state object\n * @returns Whether any field has an error\n */\nexport function hasFormErrors<T extends Record<string, unknown>>(form: FormState<T>): boolean {\n return Object.values(form.errors).some((error) => error !== undefined);\n}\n\n/**\n * Check if form is valid (no errors and all required fields touched)\n * @param form - Form state object\n * @returns Whether form is valid\n */\nexport function isFormValid<T extends Record<string, unknown>>(form: FormState<T>): boolean {\n return !hasFormErrors(form) && Object.values(form.touched).every((t) => t);\n}\n\n/**\n * Reset form to initial state\n * @param form - Form state object\n * @param initialValues - Initial values to reset to\n */\nexport function resetForm<T extends Record<string, unknown>>(\n form: FormState<T>,\n initialValues: T\n): void {\n for (const key of Object.keys(initialValues) as Array<keyof T>) {\n (form.values as Record<keyof T, unknown>)[key] = initialValues[key];\n form.errors[key] = undefined;\n form.touched[key] = false;\n form.dirty[key] = false;\n }\n}\n",
14927
15036
  "demos/accordion/+page.svelte": `<script lang="ts">
15037
+ import { resolve } from '$app/paths';
14928
15038
  import { CaretLeft, Plus } from 'phosphor-svelte';
14929
15039
  import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from 'alus-ui';
14930
15040
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -14949,7 +15059,7 @@ var BUNDLED_DATA = {
14949
15059
  </svelte:head>
14950
15060
 
14951
15061
  <a
14952
- href="/"
15062
+ href={resolve('/')}
14953
15063
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
14954
15064
  >
14955
15065
  <CaretLeft class="h-5 w-5" />
@@ -15006,7 +15116,7 @@ var BUNDLED_DATA = {
15006
15116
 
15007
15117
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
15008
15118
  <Accordion type="multiple" bind:value={multi} class="divide-y divide-(--indigo-dye)/10">
15009
- {#each ['One', 'Two', 'Three'] as label, i}
15119
+ {#each ['One', 'Two', 'Three'] as label, i (i)}
15010
15120
  <AccordionItem value={\`m\${i}\`}>
15011
15121
  <AccordionTrigger class="py-4 text-left text-(--ink) hover:text-(--vermilion)">
15012
15122
  {label}
@@ -15066,6 +15176,7 @@ var BUNDLED_DATA = {
15066
15176
  </main>
15067
15177
  `,
15068
15178
  "demos/alert/+page.svelte": `<script lang="ts">
15179
+ import { resolve } from '$app/paths';
15069
15180
  import { CaretLeft, Info, CheckCircle, Warning, XCircle } from 'phosphor-svelte';
15070
15181
  import { Alert } from 'alus-ui';
15071
15182
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -15083,7 +15194,7 @@ var BUNDLED_DATA = {
15083
15194
  </svelte:head>
15084
15195
 
15085
15196
  <a
15086
- href="/"
15197
+ href={resolve('/')}
15087
15198
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
15088
15199
  >
15089
15200
  <CaretLeft class="h-5 w-5" />
@@ -15208,6 +15319,7 @@ var BUNDLED_DATA = {
15208
15319
  </main>
15209
15320
  `,
15210
15321
  "demos/aspect-ratio/+page.svelte": `<script lang="ts">
15322
+ import { resolve } from '$app/paths';
15211
15323
  import { CaretLeft } from 'phosphor-svelte';
15212
15324
  import { AspectRatio } from 'alus-ui';
15213
15325
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -15230,7 +15342,7 @@ var BUNDLED_DATA = {
15230
15342
  </svelte:head>
15231
15343
 
15232
15344
  <a
15233
- href="/"
15345
+ href={resolve('/')}
15234
15346
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
15235
15347
  >
15236
15348
  <CaretLeft class="h-5 w-5" />
@@ -15258,7 +15370,7 @@ var BUNDLED_DATA = {
15258
15370
  <div
15259
15371
  class="japanese-border grid grid-cols-2 gap-6 bg-white/50 p-8 backdrop-blur-sm md:grid-cols-3 lg:grid-cols-5"
15260
15372
  >
15261
- {#each ratios as r}
15373
+ {#each ratios as r, i (i)}
15262
15374
  <div class="flex flex-col items-center gap-2">
15263
15375
  <AspectRatio
15264
15376
  ratio={r.value}
@@ -15295,6 +15407,7 @@ var BUNDLED_DATA = {
15295
15407
  </main>
15296
15408
  `,
15297
15409
  "demos/auto-complete/+page.svelte": `<script lang="ts">
15410
+ import { resolve } from '$app/paths';
15298
15411
  import { CaretLeft, MapPin, MagnifyingGlass, CircleNotch } from 'phosphor-svelte';
15299
15412
  import { AutoComplete, type AutoCompleteOption } from 'alus-ui';
15300
15413
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -15377,7 +15490,7 @@ var BUNDLED_DATA = {
15377
15490
  </svelte:head>
15378
15491
 
15379
15492
  <a
15380
- href="/"
15493
+ href={resolve('/')}
15381
15494
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
15382
15495
  >
15383
15496
  <CaretLeft class="h-5 w-5" />
@@ -15552,6 +15665,7 @@ var BUNDLED_DATA = {
15552
15665
  </main>
15553
15666
  `,
15554
15667
  "demos/avatar/+page.svelte": `<script lang="ts">
15668
+ import { resolve } from '$app/paths';
15555
15669
  import { CaretLeft } from 'phosphor-svelte';
15556
15670
  import { Avatar } from 'alus-ui';
15557
15671
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -15572,7 +15686,7 @@ var BUNDLED_DATA = {
15572
15686
  </svelte:head>
15573
15687
 
15574
15688
  <a
15575
- href="/"
15689
+ href={resolve('/')}
15576
15690
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
15577
15691
  >
15578
15692
  <CaretLeft class="h-5 w-5" />
@@ -15730,6 +15844,7 @@ var BUNDLED_DATA = {
15730
15844
  </main>
15731
15845
  `,
15732
15846
  "demos/badge/+page.svelte": `<script lang="ts">
15847
+ import { resolve } from '$app/paths';
15733
15848
  import { CaretLeft } from 'phosphor-svelte';
15734
15849
  import { Badge } from 'alus-ui';
15735
15850
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -15748,7 +15863,7 @@ var BUNDLED_DATA = {
15748
15863
  </svelte:head>
15749
15864
 
15750
15865
  <a
15751
- href="/"
15866
+ href={resolve('/')}
15752
15867
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
15753
15868
  >
15754
15869
  <CaretLeft class="h-5 w-5" />
@@ -15890,6 +16005,7 @@ var BUNDLED_DATA = {
15890
16005
  </main>
15891
16006
  `,
15892
16007
  "demos/banner/+page.svelte": `<script lang="ts">
16008
+ import { resolve } from '$app/paths';
15893
16009
  import { CaretLeft, Info, CheckCircle, Warning, XCircle, Megaphone } from 'phosphor-svelte';
15894
16010
  import { Banner, Button } from 'alus-ui';
15895
16011
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -15914,7 +16030,7 @@ var BUNDLED_DATA = {
15914
16030
  </svelte:head>
15915
16031
 
15916
16032
  <a
15917
- href="/"
16033
+ href={resolve('/')}
15918
16034
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
15919
16035
  >
15920
16036
  <CaretLeft class="h-5 w-5" />
@@ -16027,6 +16143,7 @@ var BUNDLED_DATA = {
16027
16143
  </main>
16028
16144
  `,
16029
16145
  "demos/breadcrumb/+page.svelte": `<script lang="ts">
16146
+ import { resolve } from '$app/paths';
16030
16147
  import { CaretLeft, CaretRight, House } from 'phosphor-svelte';
16031
16148
  import { Breadcrumb, BreadcrumbItem, BreadcrumbSeparator } from 'alus-ui';
16032
16149
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -16045,7 +16162,7 @@ var BUNDLED_DATA = {
16045
16162
  </svelte:head>
16046
16163
 
16047
16164
  <a
16048
- href="/"
16165
+ href={resolve('/')}
16049
16166
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
16050
16167
  >
16051
16168
  <CaretLeft class="h-5 w-5" />
@@ -16075,11 +16192,17 @@ var BUNDLED_DATA = {
16075
16192
 
16076
16193
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
16077
16194
  <Breadcrumb listClass="flex flex-wrap items-center gap-2 text-sm">
16078
- <BreadcrumbItem href="/" linkClass="text-(--indigo-dye) hover:text-(--vermilion)">
16195
+ <BreadcrumbItem
16196
+ href={resolve('/')}
16197
+ linkClass="text-(--indigo-dye) hover:text-(--vermilion)"
16198
+ >
16079
16199
  Home
16080
16200
  </BreadcrumbItem>
16081
16201
  <BreadcrumbSeparator class="text-(--charcoal)/30">/</BreadcrumbSeparator>
16082
- <BreadcrumbItem href="/components" linkClass="text-(--indigo-dye) hover:text-(--vermilion)">
16202
+ <BreadcrumbItem
16203
+ href={resolve('/components')}
16204
+ linkClass="text-(--indigo-dye) hover:text-(--vermilion)"
16205
+ >
16083
16206
  Components
16084
16207
  </BreadcrumbItem>
16085
16208
  <BreadcrumbSeparator class="text-(--charcoal)/30">/</BreadcrumbSeparator>
@@ -16097,7 +16220,7 @@ var BUNDLED_DATA = {
16097
16220
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
16098
16221
  <Breadcrumb listClass="flex flex-wrap items-center gap-2 text-sm">
16099
16222
  <BreadcrumbItem
16100
- href="/"
16223
+ href={resolve('/')}
16101
16224
  linkClass="inline-flex items-center gap-1 text-(--indigo-dye) hover:text-(--vermilion)"
16102
16225
  >
16103
16226
  <House class="h-4 w-4" />
@@ -16106,7 +16229,10 @@ var BUNDLED_DATA = {
16106
16229
  <BreadcrumbSeparator class="text-(--charcoal)/30">
16107
16230
  <CaretRight class="h-3 w-3" />
16108
16231
  </BreadcrumbSeparator>
16109
- <BreadcrumbItem href="/docs" linkClass="text-(--indigo-dye) hover:text-(--vermilion)">
16232
+ <BreadcrumbItem
16233
+ href={resolve('/docs')}
16234
+ linkClass="text-(--indigo-dye) hover:text-(--vermilion)"
16235
+ >
16110
16236
  Docs
16111
16237
  </BreadcrumbItem>
16112
16238
  <BreadcrumbSeparator class="text-(--charcoal)/30">
@@ -16149,6 +16275,7 @@ var BUNDLED_DATA = {
16149
16275
  </main>
16150
16276
  `,
16151
16277
  "demos/button/+page.svelte": `<script lang="ts">
16278
+ import { resolve } from '$app/paths';
16152
16279
  import { CaretLeft } from 'phosphor-svelte';
16153
16280
  import { Button } from 'alus-ui';
16154
16281
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -16180,7 +16307,7 @@ var BUNDLED_DATA = {
16180
16307
  </svelte:head>
16181
16308
 
16182
16309
  <a
16183
- href="/"
16310
+ href={resolve('/')}
16184
16311
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
16185
16312
  >
16186
16313
  <CaretLeft class="h-5 w-5" />
@@ -16319,6 +16446,7 @@ var BUNDLED_DATA = {
16319
16446
  </main>
16320
16447
  `,
16321
16448
  "demos/calendar/+page.svelte": `<script lang="ts">
16449
+ import { resolve } from '$app/paths';
16322
16450
  import { CaretLeft } from 'phosphor-svelte';
16323
16451
  import { Calendar } from 'alus-ui';
16324
16452
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -16398,7 +16526,7 @@ var BUNDLED_DATA = {
16398
16526
  </svelte:head>
16399
16527
 
16400
16528
  <a
16401
- href="/"
16529
+ href={resolve('/')}
16402
16530
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
16403
16531
  >
16404
16532
  <CaretLeft class="h-5 w-5" />
@@ -16612,6 +16740,7 @@ var BUNDLED_DATA = {
16612
16740
  </main>
16613
16741
  `,
16614
16742
  "demos/callout/+page.svelte": `<script lang="ts">
16743
+ import { resolve } from '$app/paths';
16615
16744
  import { CaretLeft, Info, CheckCircle, Warning, XCircle, Lightbulb, Note } from 'phosphor-svelte';
16616
16745
  import { Callout } from 'alus-ui';
16617
16746
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -16672,7 +16801,7 @@ var BUNDLED_DATA = {
16672
16801
  </svelte:head>
16673
16802
 
16674
16803
  <a
16675
- href="/"
16804
+ href={resolve('/')}
16676
16805
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
16677
16806
  >
16678
16807
  <CaretLeft class="h-5 w-5" />
@@ -16698,7 +16827,7 @@ var BUNDLED_DATA = {
16698
16827
  <h2 class="font-display mb-8 text-2xl text-(--ink)">Variants</h2>
16699
16828
 
16700
16829
  <div class="japanese-border space-y-4 bg-white/50 p-8 backdrop-blur-sm">
16701
- {#each items as item}
16830
+ {#each items as item, i (i)}
16702
16831
  {@const Icon = icon(item.variant)}
16703
16832
  <Callout
16704
16833
  variant={item.variant}
@@ -16741,6 +16870,7 @@ var BUNDLED_DATA = {
16741
16870
  </main>
16742
16871
  `,
16743
16872
  "demos/card/+page.svelte": `<script lang="ts">
16873
+ import { resolve } from '$app/paths';
16744
16874
  import { CaretLeft } from 'phosphor-svelte';
16745
16875
  import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from 'alus-ui';
16746
16876
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -16762,7 +16892,7 @@ var BUNDLED_DATA = {
16762
16892
  </svelte:head>
16763
16893
 
16764
16894
  <a
16765
- href="/"
16895
+ href={resolve('/')}
16766
16896
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
16767
16897
  >
16768
16898
  <CaretLeft class="h-5 w-5" />
@@ -16835,6 +16965,7 @@ var BUNDLED_DATA = {
16835
16965
  </main>
16836
16966
  `,
16837
16967
  "demos/carousel/+page.svelte": `<script lang="ts">
16968
+ import { resolve } from '$app/paths';
16838
16969
  import { CaretLeft, CaretRight, ArrowLeft, ArrowRight } from 'phosphor-svelte';
16839
16970
  import {
16840
16971
  Carousel,
@@ -16876,7 +17007,7 @@ var BUNDLED_DATA = {
16876
17007
  </svelte:head>
16877
17008
 
16878
17009
  <a
16879
- href="/"
17010
+ href={resolve('/')}
16880
17011
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
16881
17012
  >
16882
17013
  <CaretLeft class="h-5 w-5" />
@@ -16982,6 +17113,7 @@ var BUNDLED_DATA = {
16982
17113
  </main>
16983
17114
  `,
16984
17115
  "demos/checkbox/+page.svelte": `<script lang="ts">
17116
+ import { resolve } from '$app/paths';
16985
17117
  import { CaretLeft, Check } from 'phosphor-svelte';
16986
17118
  import { Checkbox } from 'alus-ui';
16987
17119
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -17043,7 +17175,7 @@ var BUNDLED_DATA = {
17043
17175
  </svelte:head>
17044
17176
 
17045
17177
  <a
17046
- href="/"
17178
+ href={resolve('/')}
17047
17179
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
17048
17180
  >
17049
17181
  <CaretLeft class="h-5 w-5" />
@@ -17389,6 +17521,7 @@ var BUNDLED_DATA = {
17389
17521
  </main>
17390
17522
  `,
17391
17523
  "demos/code-block/+page.svelte": `<script lang="ts">
17524
+ import { resolve } from '$app/paths';
17392
17525
  import { CaretLeft, Copy, Check } from 'phosphor-svelte';
17393
17526
  import { CodeBlock } from 'alus-ui';
17394
17527
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -17424,7 +17557,7 @@ sum(1, 2);\`;
17424
17557
  </svelte:head>
17425
17558
 
17426
17559
  <a
17427
- href="/"
17560
+ href={resolve('/')}
17428
17561
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
17429
17562
  >
17430
17563
  <CaretLeft class="h-5 w-5" />
@@ -17523,6 +17656,7 @@ sum(1, 2);\`;
17523
17656
  </main>
17524
17657
  `,
17525
17658
  "demos/color-picker/+page.svelte": `<script lang="ts">
17659
+ import { resolve } from '$app/paths';
17526
17660
  import { CaretLeft, Lock, Drop } from 'phosphor-svelte';
17527
17661
  import { ColorPicker } from 'alus-ui';
17528
17662
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -17575,7 +17709,7 @@ sum(1, 2);\`;
17575
17709
  </svelte:head>
17576
17710
 
17577
17711
  <a
17578
- href="/"
17712
+ href={resolve('/')}
17579
17713
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
17580
17714
  >
17581
17715
  <CaretLeft class="h-5 w-5" />
@@ -17758,6 +17892,7 @@ sum(1, 2);\`;
17758
17892
  </main>
17759
17893
  `,
17760
17894
  "demos/command-menu/+page.svelte": `<script lang="ts">
17895
+ import { resolve } from '$app/paths';
17761
17896
  import {
17762
17897
  CaretLeft,
17763
17898
  MagnifyingGlass,
@@ -17818,7 +17953,7 @@ sum(1, 2);\`;
17818
17953
  </svelte:head>
17819
17954
 
17820
17955
  <a
17821
- href="/"
17956
+ href={resolve('/')}
17822
17957
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
17823
17958
  >
17824
17959
  <CaretLeft class="h-5 w-5" />
@@ -17876,127 +18011,111 @@ sum(1, 2);\`;
17876
18011
  </CommandMenuEmpty>
17877
18012
 
17878
18013
  <CommandMenuGroup class="mb-1">
17879
- {#snippet children()}
17880
- <div
17881
- class="font-display px-2 py-1 text-xs tracking-widest text-(--bamboo) uppercase"
17882
- >
17883
- Files
17884
- </div>
17885
- <CommandMenuItem
17886
- value="New file"
17887
- keywords="create document \u65B0\u898F \u30D5\u30A1\u30A4\u30EB \u4F5C\u6210"
17888
- onSelect={() => handle('New file')}
17889
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17890
- >
17891
- <File class="h-4 w-4 text-(--indigo-dye)" />
17892
- <span>New file</span>
17893
- <kbd class="ml-auto font-mono text-xs text-(--charcoal)/50">\u2318N</kbd>
17894
- </CommandMenuItem>
17895
- <CommandMenuItem
17896
- value="Open folder"
17897
- keywords="directory browse \u30D5\u30A9\u30EB\u30C0 \u958B\u304F"
17898
- onSelect={() => handle('Open folder')}
17899
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17900
- >
17901
- <Folder class="h-4 w-4 text-(--indigo-dye)" />
17902
- <span>Open folder</span>
17903
- <kbd class="ml-auto font-mono text-xs text-(--charcoal)/50">\u2318O</kbd>
17904
- </CommandMenuItem>
17905
- {/snippet}
18014
+ <div class="font-display px-2 py-1 text-xs tracking-widest text-(--bamboo) uppercase">
18015
+ Files
18016
+ </div>
18017
+ <CommandMenuItem
18018
+ value="New file"
18019
+ keywords="create document \u65B0\u898F \u30D5\u30A1\u30A4\u30EB \u4F5C\u6210"
18020
+ onSelect={() => handle('New file')}
18021
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18022
+ >
18023
+ <File class="h-4 w-4 text-(--indigo-dye)" />
18024
+ <span>New file</span>
18025
+ <kbd class="ml-auto font-mono text-xs text-(--charcoal)/50">\u2318N</kbd>
18026
+ </CommandMenuItem>
18027
+ <CommandMenuItem
18028
+ value="Open folder"
18029
+ keywords="directory browse \u30D5\u30A9\u30EB\u30C0 \u958B\u304F"
18030
+ onSelect={() => handle('Open folder')}
18031
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18032
+ >
18033
+ <Folder class="h-4 w-4 text-(--indigo-dye)" />
18034
+ <span>Open folder</span>
18035
+ <kbd class="ml-auto font-mono text-xs text-(--charcoal)/50">\u2318O</kbd>
18036
+ </CommandMenuItem>
17906
18037
  </CommandMenuGroup>
17907
18038
 
17908
18039
  <CommandMenuGroup>
17909
- {#snippet children()}
17910
- <div
17911
- class="font-display px-2 py-1 text-xs tracking-widest text-(--bamboo) uppercase"
17912
- >
17913
- Account
17914
- </div>
17915
- <CommandMenuItem
17916
- value="Profile"
17917
- keywords="account user me \u30D7\u30ED\u30D5\u30A3\u30FC\u30EB \u81EA\u5206"
17918
- onSelect={() => handle('Profile')}
17919
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17920
- >
17921
- <User class="h-4 w-4 text-(--indigo-dye)" />
17922
- <span>View profile</span>
17923
- </CommandMenuItem>
17924
- <CommandMenuItem
17925
- value="Settings"
17926
- keywords="preferences config gear \u8A2D\u5B9A \u74B0\u5883"
17927
- onSelect={() => handle('Settings')}
17928
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17929
- >
17930
- <Gear class="h-4 w-4 text-(--indigo-dye)" />
17931
- <span>Settings</span>
17932
- <kbd class="ml-auto font-mono text-xs text-(--charcoal)/50">\u2318,</kbd>
17933
- </CommandMenuItem>
17934
- {/snippet}
18040
+ <div class="font-display px-2 py-1 text-xs tracking-widest text-(--bamboo) uppercase">
18041
+ Account
18042
+ </div>
18043
+ <CommandMenuItem
18044
+ value="Profile"
18045
+ keywords="account user me \u30D7\u30ED\u30D5\u30A3\u30FC\u30EB \u81EA\u5206"
18046
+ onSelect={() => handle('Profile')}
18047
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18048
+ >
18049
+ <User class="h-4 w-4 text-(--indigo-dye)" />
18050
+ <span>View profile</span>
18051
+ </CommandMenuItem>
18052
+ <CommandMenuItem
18053
+ value="Settings"
18054
+ keywords="preferences config gear \u8A2D\u5B9A \u74B0\u5883"
18055
+ onSelect={() => handle('Settings')}
18056
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18057
+ >
18058
+ <Gear class="h-4 w-4 text-(--indigo-dye)" />
18059
+ <span>Settings</span>
18060
+ <kbd class="ml-auto font-mono text-xs text-(--charcoal)/50">\u2318,</kbd>
18061
+ </CommandMenuItem>
17935
18062
  </CommandMenuGroup>
17936
18063
 
17937
18064
  <CommandMenuGroup>
17938
- {#snippet children()}
17939
- <div
17940
- class="font-display px-2 py-1 text-xs tracking-widest text-(--bamboo) uppercase"
17941
- >
17942
- Theme
17943
- </div>
17944
- <CommandMenuItem
17945
- value="Light theme"
17946
- keywords="day bright sun \u660E\u308B\u3044 \u592A\u967D \u663C"
17947
- onSelect={() => handle('Light theme')}
17948
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17949
- >
17950
- <Sun class="h-4 w-4 text-(--muted-gold)" />
17951
- <span>Switch to light</span>
17952
- </CommandMenuItem>
17953
- <CommandMenuItem
17954
- value="Dark theme"
17955
- keywords="night moon \u6697\u3044 \u591C \u6708"
17956
- onSelect={() => handle('Dark theme')}
17957
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17958
- >
17959
- <Moon class="h-4 w-4 text-(--indigo-dye)" />
17960
- <span>Switch to dark</span>
17961
- </CommandMenuItem>
17962
- {/snippet}
18065
+ <div class="font-display px-2 py-1 text-xs tracking-widest text-(--bamboo) uppercase">
18066
+ Theme
18067
+ </div>
18068
+ <CommandMenuItem
18069
+ value="Light theme"
18070
+ keywords="day bright sun \u660E\u308B\u3044 \u592A\u967D \u663C"
18071
+ onSelect={() => handle('Light theme')}
18072
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18073
+ >
18074
+ <Sun class="h-4 w-4 text-(--muted-gold)" />
18075
+ <span>Switch to light</span>
18076
+ </CommandMenuItem>
18077
+ <CommandMenuItem
18078
+ value="Dark theme"
18079
+ keywords="night moon \u6697\u3044 \u591C \u6708"
18080
+ onSelect={() => handle('Dark theme')}
18081
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18082
+ >
18083
+ <Moon class="h-4 w-4 text-(--indigo-dye)" />
18084
+ <span>Switch to dark</span>
18085
+ </CommandMenuItem>
17963
18086
  </CommandMenuGroup>
17964
18087
 
17965
18088
  <CommandMenuGroup>
17966
- {#snippet children()}
17967
- <div
17968
- class="font-display px-2 py-1 text-xs tracking-widest text-(--bamboo) uppercase"
17969
- >
17970
- Actions
17971
- </div>
17972
- <CommandMenuItem
17973
- value="Open terminal"
17974
- keywords="shell command line cli \u7AEF\u672B \u30BF\u30FC\u30DF\u30CA\u30EB"
17975
- onSelect={() => handle('Open terminal')}
17976
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17977
- >
17978
- <Terminal class="h-4 w-4 text-(--indigo-dye)" />
17979
- <span>Open terminal</span>
17980
- </CommandMenuItem>
17981
- <CommandMenuItem
17982
- value="Reload"
17983
- keywords="refresh restart \u66F4\u65B0 \u518D\u8AAD\u307F\u8FBC\u307F"
17984
- onSelect={() => handle('Reload')}
17985
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17986
- >
17987
- <ArrowsClockwise class="h-4 w-4 text-(--indigo-dye)" />
17988
- <span>Reload window</span>
17989
- </CommandMenuItem>
17990
- <CommandMenuItem
17991
- value="Clear cache"
17992
- keywords="delete trash purge \u524A\u9664 \u6D88\u53BB \u30B4\u30DF\u7BB1"
17993
- onSelect={() => handle('Clear cache')}
17994
- class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
17995
- >
17996
- <Trash class="h-4 w-4 text-(--vermilion)" />
17997
- <span>Clear cache</span>
17998
- </CommandMenuItem>
17999
- {/snippet}
18089
+ <div class="font-display px-2 py-1 text-xs tracking-widest text-(--bamboo) uppercase">
18090
+ Actions
18091
+ </div>
18092
+ <CommandMenuItem
18093
+ value="Open terminal"
18094
+ keywords="shell command line cli \u7AEF\u672B \u30BF\u30FC\u30DF\u30CA\u30EB"
18095
+ onSelect={() => handle('Open terminal')}
18096
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18097
+ >
18098
+ <Terminal class="h-4 w-4 text-(--indigo-dye)" />
18099
+ <span>Open terminal</span>
18100
+ </CommandMenuItem>
18101
+ <CommandMenuItem
18102
+ value="Reload"
18103
+ keywords="refresh restart \u66F4\u65B0 \u518D\u8AAD\u307F\u8FBC\u307F"
18104
+ onSelect={() => handle('Reload')}
18105
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18106
+ >
18107
+ <ArrowsClockwise class="h-4 w-4 text-(--indigo-dye)" />
18108
+ <span>Reload window</span>
18109
+ </CommandMenuItem>
18110
+ <CommandMenuItem
18111
+ value="Clear cache"
18112
+ keywords="delete trash purge \u524A\u9664 \u6D88\u53BB \u30B4\u30DF\u7BB1"
18113
+ onSelect={() => handle('Clear cache')}
18114
+ class="flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-sm transition-colors data-highlighted:bg-(--cream)"
18115
+ >
18116
+ <Trash class="h-4 w-4 text-(--vermilion)" />
18117
+ <span>Clear cache</span>
18118
+ </CommandMenuItem>
18000
18119
  </CommandMenuGroup>
18001
18120
  </CommandMenuList>
18002
18121
  </CommandMenuContent>
@@ -18057,6 +18176,7 @@ sum(1, 2);\`;
18057
18176
  </main>
18058
18177
  `,
18059
18178
  "demos/compare/+page.svelte": `<script lang="ts">
18179
+ import { resolve } from '$app/paths';
18060
18180
  import { CaretLeft, CaretLeft as Left, CaretRight as Right } from 'phosphor-svelte';
18061
18181
  import { Compare } from 'alus-ui';
18062
18182
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -18075,7 +18195,7 @@ sum(1, 2);\`;
18075
18195
  </svelte:head>
18076
18196
 
18077
18197
  <a
18078
- href="/"
18198
+ href={resolve('/')}
18079
18199
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
18080
18200
  >
18081
18201
  <CaretLeft class="h-5 w-5" />
@@ -18185,6 +18305,7 @@ sum(1, 2);\`;
18185
18305
  </main>
18186
18306
  `,
18187
18307
  "demos/conditional/+page.svelte": `<script lang="ts">
18308
+ import { resolve } from '$app/paths';
18188
18309
  import { CaretLeft } from 'phosphor-svelte';
18189
18310
  import { Conditional, Button } from 'alus-ui';
18190
18311
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -18205,7 +18326,7 @@ sum(1, 2);\`;
18205
18326
  </svelte:head>
18206
18327
 
18207
18328
  <a
18208
- href="/"
18329
+ href={resolve('/')}
18209
18330
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
18210
18331
  >
18211
18332
  <CaretLeft class="h-5 w-5" />
@@ -18285,6 +18406,7 @@ sum(1, 2);\`;
18285
18406
  </main>
18286
18407
  `,
18287
18408
  "demos/context-menu/+page.svelte": `<script lang="ts">
18409
+ import { resolve } from '$app/paths';
18288
18410
  import { CaretLeft, Copy, Scissors, Clipboard, Trash, ArrowsClockwise } from 'phosphor-svelte';
18289
18411
  import { ContextMenu, type ContextMenuItemEntry } from 'alus-ui';
18290
18412
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -18336,7 +18458,7 @@ sum(1, 2);\`;
18336
18458
  </svelte:head>
18337
18459
 
18338
18460
  <a
18339
- href="/"
18461
+ href={resolve('/')}
18340
18462
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
18341
18463
  >
18342
18464
  <CaretLeft class="h-5 w-5" />
@@ -18416,6 +18538,7 @@ sum(1, 2);\`;
18416
18538
  </main>
18417
18539
  `,
18418
18540
  "demos/data-list/+page.svelte": `<script lang="ts">
18541
+ import { resolve } from '$app/paths';
18419
18542
  import { CaretLeft } from 'phosphor-svelte';
18420
18543
  import { DataList, DataListTerm, DataListDescription } from 'alus-ui';
18421
18544
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -18433,7 +18556,7 @@ sum(1, 2);\`;
18433
18556
  </svelte:head>
18434
18557
 
18435
18558
  <a
18436
- href="/"
18559
+ href={resolve('/')}
18437
18560
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
18438
18561
  >
18439
18562
  <CaretLeft class="h-5 w-5" />
@@ -18488,6 +18611,7 @@ sum(1, 2);\`;
18488
18611
  </main>
18489
18612
  `,
18490
18613
  "demos/date-picker/+page.svelte": `<script lang="ts">
18614
+ import { resolve } from '$app/paths';
18491
18615
  import { CaretLeft, Calendar as CalIcon, Lock } from 'phosphor-svelte';
18492
18616
  import { DatePicker } from 'alus-ui';
18493
18617
  import { type DateValue, getLocalTimeZone, today } from '@internationalized/date';
@@ -18545,7 +18669,7 @@ sum(1, 2);\`;
18545
18669
  </svelte:head>
18546
18670
 
18547
18671
  <a
18548
- href="/"
18672
+ href={resolve('/')}
18549
18673
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
18550
18674
  >
18551
18675
  <CaretLeft class="h-5 w-5" />
@@ -18773,6 +18897,7 @@ sum(1, 2);\`;
18773
18897
  </main>
18774
18898
  `,
18775
18899
  "demos/date-range/+page.svelte": `<script lang="ts">
18900
+ import { resolve } from '$app/paths';
18776
18901
  import { CaretLeft } from 'phosphor-svelte';
18777
18902
  import { DateRange, type DateRangeValue } from 'alus-ui';
18778
18903
  import { type DateValue, getLocalTimeZone, today } from '@internationalized/date';
@@ -18836,7 +18961,7 @@ sum(1, 2);\`;
18836
18961
  </svelte:head>
18837
18962
 
18838
18963
  <a
18839
- href="/"
18964
+ href={resolve('/')}
18840
18965
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
18841
18966
  >
18842
18967
  <CaretLeft class="h-5 w-5" />
@@ -18951,9 +19076,10 @@ sum(1, 2);\`;
18951
19076
  </main>
18952
19077
  `,
18953
19078
  "demos/date-range-picker/+page.svelte": `<script lang="ts">
19079
+ import { resolve } from '$app/paths';
18954
19080
  import { CaretLeft, CalendarBlank } from 'phosphor-svelte';
18955
19081
  import { DateRangePicker } from 'alus-ui';
18956
- import { type DateValue, getLocalTimeZone, today } from '@internationalized/date';
19082
+ import { type DateValue } from '@internationalized/date';
18957
19083
  import DemoFooter from '$components/DemoFooter.svelte';
18958
19084
 
18959
19085
  const code = \`<script lang="ts">
@@ -18965,9 +19091,6 @@ sum(1, 2);\`;
18965
19091
 
18966
19092
  <DateRangePicker bind:start bind:end placeholder="Pick dates\u2026" aria-label="Trip dates" />\`;
18967
19093
 
18968
- const tz = getLocalTimeZone();
18969
- const now = today(tz);
18970
-
18971
19094
  let start = $state<DateValue | null>(null);
18972
19095
  let end = $state<DateValue | null>(null);
18973
19096
 
@@ -19006,7 +19129,7 @@ sum(1, 2);\`;
19006
19129
  </svelte:head>
19007
19130
 
19008
19131
  <a
19009
- href="/"
19132
+ href={resolve('/')}
19010
19133
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19011
19134
  >
19012
19135
  <CaretLeft class="h-5 w-5" />
@@ -19104,6 +19227,7 @@ sum(1, 2);\`;
19104
19227
  </main>
19105
19228
  `,
19106
19229
  "demos/dialog/+page.svelte": `<script lang="ts">
19230
+ import { resolve } from '$app/paths';
19107
19231
  import { CaretLeft } from 'phosphor-svelte';
19108
19232
  import {
19109
19233
  Dialog,
@@ -19130,7 +19254,7 @@ sum(1, 2);\`;
19130
19254
  </svelte:head>
19131
19255
 
19132
19256
  <a
19133
- href="/"
19257
+ href={resolve('/')}
19134
19258
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19135
19259
  >
19136
19260
  <CaretLeft class="h-5 w-5" />
@@ -19199,6 +19323,7 @@ sum(1, 2);\`;
19199
19323
  </main>
19200
19324
  `,
19201
19325
  "demos/divider/+page.svelte": `<script lang="ts">
19326
+ import { resolve } from '$app/paths';
19202
19327
  import { CaretLeft } from 'phosphor-svelte';
19203
19328
  import { Divider } from 'alus-ui';
19204
19329
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -19213,7 +19338,7 @@ sum(1, 2);\`;
19213
19338
  </svelte:head>
19214
19339
 
19215
19340
  <a
19216
- href="/"
19341
+ href={resolve('/')}
19217
19342
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19218
19343
  >
19219
19344
  <CaretLeft class="h-5 w-5" />
@@ -19287,6 +19412,7 @@ sum(1, 2);\`;
19287
19412
  </main>
19288
19413
  `,
19289
19414
  "demos/draggable/+page.svelte": `<script lang="ts">
19415
+ import { resolve } from '$app/paths';
19290
19416
  import { CaretLeft } from 'phosphor-svelte';
19291
19417
  import { Draggable, Droppable } from 'alus-ui';
19292
19418
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -19333,7 +19459,7 @@ sum(1, 2);\`;
19333
19459
  </svelte:head>
19334
19460
 
19335
19461
  <a
19336
- href="/"
19462
+ href={resolve('/')}
19337
19463
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19338
19464
  >
19339
19465
  <CaretLeft class="h-5 w-5" />
@@ -19421,6 +19547,7 @@ sum(1, 2);\`;
19421
19547
  </main>
19422
19548
  `,
19423
19549
  "demos/drawer/+page.svelte": `<script lang="ts">
19550
+ import { resolve } from '$app/paths';
19424
19551
  import { CaretLeft, X } from 'phosphor-svelte';
19425
19552
  import {
19426
19553
  Drawer,
@@ -19449,7 +19576,7 @@ sum(1, 2);\`;
19449
19576
  </svelte:head>
19450
19577
 
19451
19578
  <a
19452
- href="/"
19579
+ href={resolve('/')}
19453
19580
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19454
19581
  >
19455
19582
  <CaretLeft class="h-5 w-5" />
@@ -19540,6 +19667,7 @@ sum(1, 2);\`;
19540
19667
  </main>
19541
19668
  `,
19542
19669
  "demos/dropdown/+page.svelte": `<script lang="ts">
19670
+ import { resolve } from '$app/paths';
19543
19671
  import { CaretLeft, CaretDown } from 'phosphor-svelte';
19544
19672
  import { Dropdown, DropdownTrigger, DropdownContent, DropdownItem } from 'alus-ui';
19545
19673
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -19561,7 +19689,7 @@ sum(1, 2);\`;
19561
19689
  </svelte:head>
19562
19690
 
19563
19691
  <a
19564
- href="/"
19692
+ href={resolve('/')}
19565
19693
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19566
19694
  >
19567
19695
  <CaretLeft class="h-5 w-5" />
@@ -19645,8 +19773,9 @@ sum(1, 2);\`;
19645
19773
  />
19646
19774
  </main>
19647
19775
  `,
19648
- "demos/droppable/+page.svelte": "<script>\n import { goto } from '$app/navigation';\n import { onMount } from 'svelte';\n onMount(() => goto('/components/draggable'));\n</script>\n\n<p>Redirecting\u2026</p>\n",
19776
+ "demos/droppable/+page.svelte": "<script>\n import { goto } from '$app/navigation';\n import { resolve } from '$app/paths';\n import { onMount } from 'svelte';\n onMount(() => goto(resolve('/components/draggable')));\n</script>\n\n<p>Redirecting\u2026</p>\n",
19649
19777
  "demos/external-link/+page.svelte": `<script lang="ts">
19778
+ import { resolve } from '$app/paths';
19650
19779
  import { CaretLeft, ArrowSquareOut } from 'phosphor-svelte';
19651
19780
  import { ExternalLink } from 'alus-ui';
19652
19781
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -19661,7 +19790,7 @@ sum(1, 2);\`;
19661
19790
  </svelte:head>
19662
19791
 
19663
19792
  <a
19664
- href="/"
19793
+ href={resolve('/')}
19665
19794
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19666
19795
  >
19667
19796
  <CaretLeft class="h-5 w-5" />
@@ -19740,6 +19869,7 @@ sum(1, 2);\`;
19740
19869
  </main>
19741
19870
  `,
19742
19871
  "demos/fieldset/+page.svelte": `<script lang="ts">
19872
+ import { resolve } from '$app/paths';
19743
19873
  import { CaretLeft } from 'phosphor-svelte';
19744
19874
  import { Fieldset, Input } from 'alus-ui';
19745
19875
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -19759,7 +19889,7 @@ sum(1, 2);\`;
19759
19889
  </svelte:head>
19760
19890
 
19761
19891
  <a
19762
- href="/"
19892
+ href={resolve('/')}
19763
19893
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19764
19894
  >
19765
19895
  <CaretLeft class="h-5 w-5" />
@@ -19862,6 +19992,7 @@ sum(1, 2);\`;
19862
19992
  </main>
19863
19993
  `,
19864
19994
  "demos/file-input/+page.svelte": `<script lang="ts">
19995
+ import { resolve } from '$app/paths';
19865
19996
  import { CaretLeft, UploadSimple } from 'phosphor-svelte';
19866
19997
  import { FileInput, Label } from 'alus-ui';
19867
19998
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -19886,7 +20017,7 @@ sum(1, 2);\`;
19886
20017
  </svelte:head>
19887
20018
 
19888
20019
  <a
19889
- href="/"
20020
+ href={resolve('/')}
19890
20021
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
19891
20022
  >
19892
20023
  <CaretLeft class="h-5 w-5" />
@@ -19945,7 +20076,7 @@ sum(1, 2);\`;
19945
20076
  </button>
19946
20077
  {#if f?.length}
19947
20078
  <ul class="mt-3 space-y-1 text-sm text-(--charcoal)/70">
19948
- {#each Array.from(f) as file}
20079
+ {#each Array.from(f) as file, i (i)}
19949
20080
  <li>{file.name}</li>
19950
20081
  {/each}
19951
20082
  </ul>
@@ -19984,6 +20115,7 @@ sum(1, 2);\`;
19984
20115
  </main>
19985
20116
  `,
19986
20117
  "demos/focus-trap/+page.svelte": `<script lang="ts">
20118
+ import { resolve } from '$app/paths';
19987
20119
  import { CaretLeft } from 'phosphor-svelte';
19988
20120
  import { FocusTrap, Portal } from 'alus-ui';
19989
20121
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -20006,7 +20138,7 @@ sum(1, 2);\`;
20006
20138
  </svelte:head>
20007
20139
 
20008
20140
  <a
20009
- href="/"
20141
+ href={resolve('/')}
20010
20142
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
20011
20143
  >
20012
20144
  <CaretLeft class="h-5 w-5" />
@@ -20114,6 +20246,7 @@ sum(1, 2);\`;
20114
20246
  </main>
20115
20247
  `,
20116
20248
  "demos/form/+page.svelte": `<script lang="ts">
20249
+ import { resolve } from '$app/paths';
20117
20250
  import { CaretLeft } from 'phosphor-svelte';
20118
20251
  import { Form, Input, Textarea, Button, FieldError } from 'alus-ui';
20119
20252
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -20156,7 +20289,7 @@ sum(1, 2);\`;
20156
20289
  </svelte:head>
20157
20290
 
20158
20291
  <a
20159
- href="/"
20292
+ href={resolve('/')}
20160
20293
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
20161
20294
  >
20162
20295
  <CaretLeft class="h-5 w-5" />
@@ -20304,6 +20437,7 @@ sum(1, 2);\`;
20304
20437
  </main>
20305
20438
  `,
20306
20439
  "demos/frame/+page.svelte": `<script lang="ts">
20440
+ import { resolve } from '$app/paths';
20307
20441
  import { CaretLeft } from 'phosphor-svelte';
20308
20442
  import { Frame } from 'alus-ui';
20309
20443
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -20318,7 +20452,7 @@ sum(1, 2);\`;
20318
20452
  </svelte:head>
20319
20453
 
20320
20454
  <a
20321
- href="/"
20455
+ href={resolve('/')}
20322
20456
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
20323
20457
  >
20324
20458
  <CaretLeft class="h-5 w-5" />
@@ -20402,6 +20536,7 @@ sum(1, 2);\`;
20402
20536
  </main>
20403
20537
  `,
20404
20538
  "demos/icon-button/+page.svelte": `<script lang="ts">
20539
+ import { resolve } from '$app/paths';
20405
20540
  import { CaretLeft, Heart, Bell, Gear, Trash, Plus, Star } from 'phosphor-svelte';
20406
20541
  import { IconButton } from 'alus-ui';
20407
20542
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -20419,7 +20554,7 @@ sum(1, 2);\`;
20419
20554
  </svelte:head>
20420
20555
 
20421
20556
  <a
20422
- href="/"
20557
+ href={resolve('/')}
20423
20558
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
20424
20559
  >
20425
20560
  <CaretLeft class="h-5 w-5" />
@@ -20534,6 +20669,7 @@ sum(1, 2);\`;
20534
20669
  </main>
20535
20670
  `,
20536
20671
  "demos/image/+page.svelte": `<script lang="ts">
20672
+ import { resolve } from '$app/paths';
20537
20673
  import { CaretLeft, ImageBroken } from 'phosphor-svelte';
20538
20674
  import { Image } from 'alus-ui';
20539
20675
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -20552,7 +20688,7 @@ sum(1, 2);\`;
20552
20688
  </svelte:head>
20553
20689
 
20554
20690
  <a
20555
- href="/"
20691
+ href={resolve('/')}
20556
20692
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
20557
20693
  >
20558
20694
  <CaretLeft class="h-5 w-5" />
@@ -20636,6 +20772,7 @@ sum(1, 2);\`;
20636
20772
  </main>
20637
20773
  `,
20638
20774
  "demos/infinite-scroll/+page.svelte": `<script lang="ts">
20775
+ import { resolve } from '$app/paths';
20639
20776
  import { CaretLeft, CircleNotch, WarningCircle, ArrowClockwise } from 'phosphor-svelte';
20640
20777
  import { InfiniteScroll, Button } from 'alus-ui';
20641
20778
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -20699,7 +20836,7 @@ sum(1, 2);\`;
20699
20836
  </svelte:head>
20700
20837
 
20701
20838
  <a
20702
- href="/"
20839
+ href={resolve('/')}
20703
20840
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
20704
20841
  >
20705
20842
  <CaretLeft class="h-5 w-5" />
@@ -20840,6 +20977,7 @@ sum(1, 2);\`;
20840
20977
  </main>
20841
20978
  `,
20842
20979
  "demos/inline-message/+page.svelte": `<script lang="ts">
20980
+ import { resolve } from '$app/paths';
20843
20981
  import { CaretLeft, Info, CheckCircle, Warning, XCircle } from 'phosphor-svelte';
20844
20982
  import { InlineMessage, Input, Button } from 'alus-ui';
20845
20983
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -20862,7 +21000,7 @@ sum(1, 2);\`;
20862
21000
  </svelte:head>
20863
21001
 
20864
21002
  <a
20865
- href="/"
21003
+ href={resolve('/')}
20866
21004
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
20867
21005
  >
20868
21006
  <CaretLeft class="h-5 w-5" />
@@ -20984,6 +21122,7 @@ sum(1, 2);\`;
20984
21122
  </main>
20985
21123
  `,
20986
21124
  "demos/input/+page.svelte": `<script lang="ts">
21125
+ import { resolve } from '$app/paths';
20987
21126
  import { CaretLeft, Warning, Check } from 'phosphor-svelte';
20988
21127
  import { Input } from 'alus-ui';
20989
21128
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -21043,7 +21182,7 @@ sum(1, 2);\`;
21043
21182
  </svelte:head>
21044
21183
 
21045
21184
  <a
21046
- href="/"
21185
+ href={resolve('/')}
21047
21186
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
21048
21187
  >
21049
21188
  <CaretLeft class="h-5 w-5" />
@@ -21503,6 +21642,7 @@ sum(1, 2);\`;
21503
21642
  </main>
21504
21643
  `,
21505
21644
  "demos/input-group/+page.svelte": `<script lang="ts">
21645
+ import { resolve } from '$app/paths';
21506
21646
  import { CaretLeft, At, MagnifyingGlass, CurrencyDollar } from 'phosphor-svelte';
21507
21647
  import { InputGroup, Input } from 'alus-ui';
21508
21648
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -21519,7 +21659,7 @@ sum(1, 2);\`;
21519
21659
  </svelte:head>
21520
21660
 
21521
21661
  <a
21522
- href="/"
21662
+ href={resolve('/')}
21523
21663
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
21524
21664
  >
21525
21665
  <CaretLeft class="h-5 w-5" />
@@ -21615,6 +21755,7 @@ sum(1, 2);\`;
21615
21755
  </main>
21616
21756
  `,
21617
21757
  "demos/kbd/+page.svelte": `<script lang="ts">
21758
+ import { resolve } from '$app/paths';
21618
21759
  import { CaretLeft } from 'phosphor-svelte';
21619
21760
  import { Kbd } from 'alus-ui';
21620
21761
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -21629,7 +21770,7 @@ sum(1, 2);\`;
21629
21770
  </svelte:head>
21630
21771
 
21631
21772
  <a
21632
- href="/"
21773
+ href={resolve('/')}
21633
21774
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
21634
21775
  >
21635
21776
  <CaretLeft class="h-5 w-5" />
@@ -21718,6 +21859,7 @@ sum(1, 2);\`;
21718
21859
  </main>
21719
21860
  `,
21720
21861
  "demos/label/+page.svelte": `<script lang="ts">
21862
+ import { resolve } from '$app/paths';
21721
21863
  import { CaretLeft } from 'phosphor-svelte';
21722
21864
  import { Label, Input } from 'alus-ui';
21723
21865
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -21731,7 +21873,7 @@ sum(1, 2);\`;
21731
21873
  </svelte:head>
21732
21874
 
21733
21875
  <a
21734
- href="/"
21876
+ href={resolve('/')}
21735
21877
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
21736
21878
  >
21737
21879
  <CaretLeft class="h-5 w-5" />
@@ -21811,6 +21953,7 @@ sum(1, 2);\`;
21811
21953
  </main>
21812
21954
  `,
21813
21955
  "demos/layout/+page.svelte": `<script lang="ts">
21956
+ import { resolve } from '$app/paths';
21814
21957
  import { CaretLeft } from 'phosphor-svelte';
21815
21958
  import { Stack, Flex, Grid, Container, Spacer, Columns } from 'alus-ui';
21816
21959
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -21847,7 +21990,7 @@ sum(1, 2);\`;
21847
21990
  </svelte:head>
21848
21991
 
21849
21992
  <a
21850
- href="/"
21993
+ href={resolve('/')}
21851
21994
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
21852
21995
  >
21853
21996
  <CaretLeft class="h-5 w-5" />
@@ -21874,7 +22017,7 @@ sum(1, 2);\`;
21874
22017
  <h2 class="font-display mb-6 text-2xl text-(--ink)">Stack \u2014 vertical</h2>
21875
22018
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
21876
22019
  <Stack gap="0.75rem" align="stretch">
21877
- {#each tiles.slice(0, 4) as n}
22020
+ {#each tiles.slice(0, 4) as n, i (i)}
21878
22021
  <div class="{card} h-12">{n}</div>
21879
22022
  {/each}
21880
22023
  </Stack>
@@ -21885,7 +22028,7 @@ sum(1, 2);\`;
21885
22028
  <h2 class="font-display mb-6 text-2xl text-(--ink)">Stack \u2014 horizontal with wrap</h2>
21886
22029
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
21887
22030
  <Stack direction="horizontal" gap="0.5rem" wrap>
21888
- {#each tiles as n}
22031
+ {#each tiles as n, i (i)}
21889
22032
  <div class="{card} h-12 w-24">{n}</div>
21890
22033
  {/each}
21891
22034
  </Stack>
@@ -21922,7 +22065,7 @@ sum(1, 2);\`;
21922
22065
  <h2 class="font-display mb-6 text-2xl text-(--ink)">Grid \u2014 fixed columns</h2>
21923
22066
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
21924
22067
  <Grid cols={4} gap="0.75rem">
21925
- {#each tiles as n}
22068
+ {#each tiles as n, i (i)}
21926
22069
  <div class="{card} h-20">{n}</div>
21927
22070
  {/each}
21928
22071
  </Grid>
@@ -21933,7 +22076,7 @@ sum(1, 2);\`;
21933
22076
  <h2 class="font-display mb-6 text-2xl text-(--ink)">Grid \u2014 auto-fill with minColWidth</h2>
21934
22077
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
21935
22078
  <Grid minColWidth="140px" gap="0.75rem">
21936
- {#each tiles as n}
22079
+ {#each tiles as n, i (i)}
21937
22080
  <div class="{card} h-20">{n}</div>
21938
22081
  {/each}
21939
22082
  </Grid>
@@ -21960,7 +22103,7 @@ sum(1, 2);\`;
21960
22103
  <h2 class="font-display mb-6 text-2xl text-(--ink)">Columns \u2014 multi-column text flow</h2>
21961
22104
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
21962
22105
  <Columns count={3} gap="2rem" class="text-sm text-(--charcoal)/80">
21963
- {#each paragraphs as p, i}
22106
+ {#each paragraphs as p, i (i)}
21964
22107
  <p class="mb-3" style={i === 0 ? '' : 'break-inside:avoid;'}>{p}</p>
21965
22108
  {/each}
21966
22109
  </Columns>
@@ -22019,6 +22162,7 @@ sum(1, 2);\`;
22019
22162
  </main>
22020
22163
  `,
22021
22164
  "demos/lightbox/+page.svelte": `<script lang="ts">
22165
+ import { resolve } from '$app/paths';
22022
22166
  import { CaretLeft, X, CaretLeft as Prev, CaretRight as Next } from 'phosphor-svelte';
22023
22167
  import { Lightbox, type LightboxImage } from 'alus-ui';
22024
22168
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -22067,7 +22211,7 @@ sum(1, 2);\`;
22067
22211
  </svelte:head>
22068
22212
 
22069
22213
  <a
22070
- href="/"
22214
+ href={resolve('/')}
22071
22215
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
22072
22216
  >
22073
22217
  <CaretLeft class="h-5 w-5" />
@@ -22091,7 +22235,7 @@ sum(1, 2);\`;
22091
22235
  <section class="mb-16">
22092
22236
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
22093
22237
  <div class="grid grid-cols-3 gap-2">
22094
- {#each images as img, i}
22238
+ {#each images as img, i (i)}
22095
22239
  <button
22096
22240
  class="overflow-hidden rounded border border-(--charcoal)/15"
22097
22241
  onclick={() => openAt(i)}
@@ -22170,6 +22314,7 @@ sum(1, 2);\`;
22170
22314
  </Lightbox>
22171
22315
  `,
22172
22316
  "demos/link/+page.svelte": `<script lang="ts">
22317
+ import { resolve } from '$app/paths';
22173
22318
  import { CaretLeft, ArrowSquareOut } from 'phosphor-svelte';
22174
22319
  import { Link } from 'alus-ui';
22175
22320
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -22183,7 +22328,7 @@ sum(1, 2);\`;
22183
22328
  </svelte:head>
22184
22329
 
22185
22330
  <a
22186
- href="/"
22331
+ href={resolve('/')}
22187
22332
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
22188
22333
  >
22189
22334
  <CaretLeft class="h-5 w-5" />
@@ -22213,7 +22358,7 @@ sum(1, 2);\`;
22213
22358
 
22214
22359
  <div class="japanese-border space-y-4 bg-white/50 p-8 backdrop-blur-sm">
22215
22360
  <p>
22216
- <Link href="/" class="text-(--indigo-dye) underline hover:text-(--vermilion)">
22361
+ <Link href={resolve('/')} class="text-(--indigo-dye) underline hover:text-(--vermilion)">
22217
22362
  Internal link
22218
22363
  </Link>
22219
22364
  \u2014 points within the app.
@@ -22230,7 +22375,7 @@ sum(1, 2);\`;
22230
22375
  </p>
22231
22376
  <p>
22232
22377
  <Link
22233
- href="/components"
22378
+ href={resolve('/components')}
22234
22379
  current="page"
22235
22380
  class="text-(--vermilion) underline aria-[current=page]:font-semibold"
22236
22381
  >
@@ -22268,6 +22413,7 @@ sum(1, 2);\`;
22268
22413
  </main>
22269
22414
  `,
22270
22415
  "demos/list/+page.svelte": `<script lang="ts">
22416
+ import { resolve } from '$app/paths';
22271
22417
  import { CaretLeft, Circle } from 'phosphor-svelte';
22272
22418
  import { List, ListItem } from 'alus-ui';
22273
22419
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -22287,7 +22433,7 @@ sum(1, 2);\`;
22287
22433
  </svelte:head>
22288
22434
 
22289
22435
  <a
22290
- href="/"
22436
+ href={resolve('/')}
22291
22437
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
22292
22438
  >
22293
22439
  <CaretLeft class="h-5 w-5" />
@@ -22353,6 +22499,7 @@ sum(1, 2);\`;
22353
22499
  </main>
22354
22500
  `,
22355
22501
  "demos/live-region/+page.svelte": `<script lang="ts">
22502
+ import { resolve } from '$app/paths';
22356
22503
  import { CaretLeft } from 'phosphor-svelte';
22357
22504
  import { LiveRegion, Button } from 'alus-ui';
22358
22505
  import DemoFooter from '$components/DemoFooter.svelte';
@@ -22379,7 +22526,7 @@ sum(1, 2);\`;
22379
22526
  </svelte:head>
22380
22527
 
22381
22528
  <a
22382
- href="/"
22529
+ href={resolve('/')}
22383
22530
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
22384
22531
  >
22385
22532
  <CaretLeft class="h-5 w-5" />
@@ -22465,6 +22612,7 @@ sum(1, 2);\`;
22465
22612
  import { CaretLeft, CaretDown, PencilSimple, Trash, Copy, Share } from 'phosphor-svelte';
22466
22613
  import { Menu, MenuTrigger, MenuContent, MenuItem } from 'alus-ui';
22467
22614
  import DemoFooter from '$components/DemoFooter.svelte';
22615
+ import { resolve } from '$app/paths';
22468
22616
 
22469
22617
  const code = \`<Menu>
22470
22618
  <MenuTrigger>File</MenuTrigger>
@@ -22483,7 +22631,7 @@ sum(1, 2);\`;
22483
22631
  </svelte:head>
22484
22632
 
22485
22633
  <a
22486
- href="/"
22634
+ href={resolve('/')}
22487
22635
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
22488
22636
  >
22489
22637
  <CaretLeft class="h-5 w-5" />
@@ -22607,6 +22755,7 @@ sum(1, 2);\`;
22607
22755
  ModalClose
22608
22756
  } from 'alus-ui';
22609
22757
  import DemoFooter from '$components/DemoFooter.svelte';
22758
+ import { resolve } from '$app/paths';
22610
22759
 
22611
22760
  const code = \`<Modal>
22612
22761
  <ModalTrigger>Open</ModalTrigger>
@@ -22624,7 +22773,7 @@ sum(1, 2);\`;
22624
22773
  </svelte:head>
22625
22774
 
22626
22775
  <a
22627
- href="/"
22776
+ href={resolve('/')}
22628
22777
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
22629
22778
  >
22630
22779
  <CaretLeft class="h-5 w-5" />
@@ -22724,6 +22873,7 @@ sum(1, 2);\`;
22724
22873
  import { CaretLeft, House, Compass, BookOpen, Gear } from 'phosphor-svelte';
22725
22874
  import { Navigation } from 'alus-ui';
22726
22875
  import DemoFooter from '$components/DemoFooter.svelte';
22876
+ import { resolve } from '$app/paths';
22727
22877
 
22728
22878
  const code = \`<Navigation aria-label="Primary">
22729
22879
  <a href="/" aria-current="page">Home</a>
@@ -22737,7 +22887,7 @@ sum(1, 2);\`;
22737
22887
  </svelte:head>
22738
22888
 
22739
22889
  <a
22740
- href="/"
22890
+ href={resolve('/')}
22741
22891
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
22742
22892
  >
22743
22893
  <CaretLeft class="h-5 w-5" />
@@ -22767,26 +22917,26 @@ sum(1, 2);\`;
22767
22917
  class="flex items-center gap-1 rounded border border-(--charcoal)/15 bg-white p-1"
22768
22918
  >
22769
22919
  <a
22770
- href="/"
22920
+ href={resolve('/')}
22771
22921
  aria-current="page"
22772
22922
  class="inline-flex items-center gap-2 rounded px-3 py-1.5 text-sm text-(--ink) aria-[current=page]:bg-(--indigo-dye) aria-[current=page]:text-white"
22773
22923
  >
22774
22924
  <House class="h-4 w-4" />Home
22775
22925
  </a>
22776
22926
  <a
22777
- href="/components"
22927
+ href={resolve('/components')}
22778
22928
  class="inline-flex items-center gap-2 rounded px-3 py-1.5 text-sm text-(--ink) hover:bg-(--cream)"
22779
22929
  >
22780
22930
  <Compass class="h-4 w-4" />Components
22781
22931
  </a>
22782
22932
  <a
22783
- href="/docs"
22933
+ href={resolve('/docs')}
22784
22934
  class="inline-flex items-center gap-2 rounded px-3 py-1.5 text-sm text-(--ink) hover:bg-(--cream)"
22785
22935
  >
22786
22936
  <BookOpen class="h-4 w-4" />Docs
22787
22937
  </a>
22788
22938
  <a
22789
- href="/settings"
22939
+ href={resolve('/settings')}
22790
22940
  class="inline-flex items-center gap-2 rounded px-3 py-1.5 text-sm text-(--ink) hover:bg-(--cream)"
22791
22941
  >
22792
22942
  <Gear class="h-4 w-4" />Settings
@@ -22838,6 +22988,7 @@ sum(1, 2);\`;
22838
22988
  import { CaretLeft, Bell, BellRinging } from 'phosphor-svelte';
22839
22989
  import { NotificationBell, Button } from 'alus-ui';
22840
22990
  import DemoFooter from '$components/DemoFooter.svelte';
22991
+ import { resolve } from '$app/paths';
22841
22992
 
22842
22993
  const code = \`<NotificationBell count={3} max={99} onclick={open}>
22843
22994
  {#snippet children({ hasUnread })}
@@ -22855,7 +23006,7 @@ sum(1, 2);\`;
22855
23006
  </svelte:head>
22856
23007
 
22857
23008
  <a
22858
- href="/"
23009
+ href={resolve('/')}
22859
23010
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
22860
23011
  >
22861
23012
  <CaretLeft class="h-5 w-5" />
@@ -22920,9 +23071,7 @@ sum(1, 2);\`;
22920
23071
  class="relative rounded-full border border-(--charcoal)/15 bg-white p-3 text-(--ink) hover:border-(--vermilion)"
22921
23072
  badgeClass="absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-(--vermilion) px-1 text-[10px] font-bold text-white"
22922
23073
  >
22923
- {#snippet children()}
22924
- <BellRinging class="h-6 w-6" weight="duotone" />
22925
- {/snippet}
23074
+ <BellRinging class="h-6 w-6" weight="duotone" />
22926
23075
  </NotificationBell>
22927
23076
  <span class="font-mono text-xs text-(--charcoal)/60">count: {big} (capped)</span>
22928
23077
  <Button
@@ -22940,9 +23089,7 @@ sum(1, 2);\`;
22940
23089
  class="relative rounded-full border border-(--charcoal)/15 bg-white p-3 text-(--charcoal)/50"
22941
23090
  badgeClass="absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-(--charcoal)/20 px-1 text-[10px] font-bold text-(--ink)"
22942
23091
  >
22943
- {#snippet children()}
22944
- <Bell class="h-6 w-6" />
22945
- {/snippet}
23092
+ <Bell class="h-6 w-6" />
22946
23093
  </NotificationBell>
22947
23094
  <span class="font-mono text-xs text-(--charcoal)/60">count: 0 (showZero)</span>
22948
23095
  </div>
@@ -22982,9 +23129,11 @@ sum(1, 2);\`;
22982
23129
  import { CaretLeft, Plus, Minus } from 'phosphor-svelte';
22983
23130
  import { NumberInput, Label } from 'alus-ui';
22984
23131
  import DemoFooter from '$components/DemoFooter.svelte';
23132
+ import { resolve } from '$app/paths';
22985
23133
 
22986
23134
  const code = \`<script lang="ts">
22987
23135
  import { NumberInput } from 'alus-ui';
23136
+ import { resolve } from '$app/paths';
22988
23137
  let qty = $state(1);
22989
23138
  <\\/script>
22990
23139
 
@@ -22999,7 +23148,7 @@ sum(1, 2);\`;
22999
23148
  </svelte:head>
23000
23149
 
23001
23150
  <a
23002
- href="/"
23151
+ href={resolve('/')}
23003
23152
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
23004
23153
  >
23005
23154
  <CaretLeft class="h-5 w-5" />
@@ -23092,11 +23241,13 @@ sum(1, 2);\`;
23092
23241
  `,
23093
23242
  "demos/overlay/+page.svelte": `<script lang="ts">
23094
23243
  import { CaretLeft } from 'phosphor-svelte';
23244
+ import { resolve } from '$app/paths';
23095
23245
  import { Overlay, Button } from 'alus-ui';
23096
23246
  import DemoFooter from '$components/DemoFooter.svelte';
23097
23247
 
23098
23248
  const code = \`<script lang="ts">
23099
23249
  import { Overlay, Button } from 'alus-ui';
23250
+ import { resolve } from '$app/paths';
23100
23251
  let open = $state(false);
23101
23252
  <\\/script>
23102
23253
 
@@ -23115,7 +23266,7 @@ sum(1, 2);\`;
23115
23266
  </svelte:head>
23116
23267
 
23117
23268
  <a
23118
- href="/"
23269
+ href={resolve('/')}
23119
23270
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
23120
23271
  >
23121
23272
  <CaretLeft class="h-5 w-5" />
@@ -23182,11 +23333,13 @@ sum(1, 2);\`;
23182
23333
  `,
23183
23334
  "demos/pagination/+page.svelte": `<script lang="ts">
23184
23335
  import { CaretLeft, CaretRight, CaretDoubleLeft, CaretDoubleRight } from 'phosphor-svelte';
23336
+ import { resolve } from '$app/paths';
23185
23337
  import { Pagination } from 'alus-ui';
23186
23338
  import DemoFooter from '$components/DemoFooter.svelte';
23187
23339
 
23188
23340
  const code = \`<script lang="ts">
23189
23341
  import { Pagination } from 'alus-ui';
23342
+ import { resolve } from '$app/paths';
23190
23343
  let page = $state(1);
23191
23344
  <\\/script>
23192
23345
 
@@ -23200,7 +23353,7 @@ sum(1, 2);\`;
23200
23353
  </svelte:head>
23201
23354
 
23202
23355
  <a
23203
- href="/"
23356
+ href={resolve('/')}
23204
23357
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
23205
23358
  >
23206
23359
  <CaretLeft class="h-5 w-5" />
@@ -23249,7 +23402,7 @@ sum(1, 2);\`;
23249
23402
  >
23250
23403
  <CaretLeft class="h-4 w-4" />
23251
23404
  </button>
23252
- {#each pages as item}
23405
+ {#each pages as item, i (i)}
23253
23406
  {#if item === 'ellipsis'}
23254
23407
  <span class="px-2 text-(--charcoal)/40">\u2026</span>
23255
23408
  {:else}
@@ -23322,6 +23475,7 @@ sum(1, 2);\`;
23322
23475
  import { CaretLeft } from 'phosphor-svelte';
23323
23476
  import { Popover, PopoverTrigger, PopoverContent } from 'alus-ui';
23324
23477
  import DemoFooter from '$components/DemoFooter.svelte';
23478
+ import { resolve } from '$app/paths';
23325
23479
 
23326
23480
  const code = \`<Popover>
23327
23481
  <PopoverTrigger>Open</PopoverTrigger>
@@ -23336,7 +23490,7 @@ sum(1, 2);\`;
23336
23490
  </svelte:head>
23337
23491
 
23338
23492
  <a
23339
- href="/"
23493
+ href={resolve('/')}
23340
23494
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
23341
23495
  >
23342
23496
  <CaretLeft class="h-5 w-5" />
@@ -23411,6 +23565,7 @@ sum(1, 2);\`;
23411
23565
  import { CaretLeft } from 'phosphor-svelte';
23412
23566
  import { Portal } from 'alus-ui';
23413
23567
  import DemoFooter from '$components/DemoFooter.svelte';
23568
+ import { resolve } from '$app/paths';
23414
23569
 
23415
23570
  const code = \`{#if open}
23416
23571
  <Portal>
@@ -23427,7 +23582,7 @@ sum(1, 2);\`;
23427
23582
  </svelte:head>
23428
23583
 
23429
23584
  <a
23430
- href="/"
23585
+ href={resolve('/')}
23431
23586
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
23432
23587
  >
23433
23588
  <CaretLeft class="h-5 w-5" />
@@ -23508,6 +23663,7 @@ sum(1, 2);\`;
23508
23663
  import { Progress } from 'alus-ui';
23509
23664
  import { onMount } from 'svelte';
23510
23665
  import DemoFooter from '$components/DemoFooter.svelte';
23666
+ import { resolve } from '$app/paths';
23511
23667
 
23512
23668
  const code = \`<Progress
23513
23669
  value={45}
@@ -23531,7 +23687,7 @@ sum(1, 2);\`;
23531
23687
  </svelte:head>
23532
23688
 
23533
23689
  <a
23534
- href="/"
23690
+ href={resolve('/')}
23535
23691
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
23536
23692
  >
23537
23693
  <CaretLeft class="h-5 w-5" />
@@ -23616,11 +23772,13 @@ sum(1, 2);\`;
23616
23772
  `,
23617
23773
  "demos/radio/+page.svelte": `<script lang="ts">
23618
23774
  import { CaretLeft, Check } from 'phosphor-svelte';
23775
+ import { resolve } from '$app/paths';
23619
23776
  import { Radio } from 'alus-ui';
23620
23777
  import DemoFooter from '$components/DemoFooter.svelte';
23621
23778
 
23622
23779
  const code = \`<script lang="ts">
23623
23780
  import { Radio } from 'alus-ui';
23781
+ import { resolve } from '$app/paths';
23624
23782
  let choice = $state('email');
23625
23783
  <\\/script>
23626
23784
 
@@ -23642,7 +23800,7 @@ sum(1, 2);\`;
23642
23800
  </svelte:head>
23643
23801
 
23644
23802
  <a
23645
- href="/"
23803
+ href={resolve('/')}
23646
23804
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
23647
23805
  >
23648
23806
  <CaretLeft class="h-5 w-5" />
@@ -24137,11 +24295,13 @@ sum(1, 2);\`;
24137
24295
  `,
24138
24296
  "demos/radio-group/+page.svelte": `<script lang="ts">
24139
24297
  import { CaretLeft } from 'phosphor-svelte';
24298
+ import { resolve } from '$app/paths';
24140
24299
  import { RadioGroup, Radio } from 'alus-ui';
24141
24300
  import DemoFooter from '$components/DemoFooter.svelte';
24142
24301
 
24143
24302
  const code = \`<script lang="ts">
24144
24303
  import { RadioGroup, Radio } from 'alus-ui';
24304
+ import { resolve } from '$app/paths';
24145
24305
  let plan = $state('pro');
24146
24306
  <\\/script>
24147
24307
 
@@ -24161,7 +24321,7 @@ sum(1, 2);\`;
24161
24321
  </svelte:head>
24162
24322
 
24163
24323
  <a
24164
- href="/"
24324
+ href={resolve('/')}
24165
24325
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
24166
24326
  >
24167
24327
  <CaretLeft class="h-5 w-5" />
@@ -24221,7 +24381,7 @@ sum(1, 2);\`;
24221
24381
  aria-label="Size"
24222
24382
  class="flex gap-6"
24223
24383
  >
24224
- {#each ['s', 'm', 'l', 'xl'] as s}
24384
+ {#each ['s', 'm', 'l', 'xl'] as s, i (i)}
24225
24385
  <label class="flex items-center gap-2 text-(--charcoal) uppercase">
24226
24386
  <Radio name="size" value={s} bind:group={size} class="accent-(--vermilion)" />
24227
24387
  <span>{s}</span>
@@ -24254,11 +24414,13 @@ sum(1, 2);\`;
24254
24414
  `,
24255
24415
  "demos/rating/+page.svelte": `<script lang="ts">
24256
24416
  import { CaretLeft, Star } from 'phosphor-svelte';
24417
+ import { resolve } from '$app/paths';
24257
24418
  import { Rating } from 'alus-ui';
24258
24419
  import DemoFooter from '$components/DemoFooter.svelte';
24259
24420
 
24260
24421
  const code = \`<script lang="ts">
24261
24422
  import { Rating } from 'alus-ui';
24423
+ import { resolve } from '$app/paths';
24262
24424
  let score = $state(3);
24263
24425
  <\\/script>
24264
24426
 
@@ -24273,7 +24435,7 @@ sum(1, 2);\`;
24273
24435
  </svelte:head>
24274
24436
 
24275
24437
  <a
24276
- href="/"
24438
+ href={resolve('/')}
24277
24439
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
24278
24440
  >
24279
24441
  <CaretLeft class="h-5 w-5" />
@@ -24367,9 +24529,10 @@ sum(1, 2);\`;
24367
24529
  </main>
24368
24530
  `,
24369
24531
  "demos/resizable/+page.svelte": `<script lang="ts">
24370
- import { CaretLeft, DotsSixVertical, DotsSix } from 'phosphor-svelte';
24532
+ import { CaretLeft } from 'phosphor-svelte';
24371
24533
  import { Resizable } from 'alus-ui';
24372
24534
  import DemoFooter from '$components/DemoFooter.svelte';
24535
+ import { resolve } from '$app/paths';
24373
24536
 
24374
24537
  const code = \`<Resizable
24375
24538
  bind:size={width}
@@ -24390,7 +24553,7 @@ sum(1, 2);\`;
24390
24553
  </svelte:head>
24391
24554
 
24392
24555
  <a
24393
- href="/"
24556
+ href={resolve('/')}
24394
24557
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
24395
24558
  >
24396
24559
  <CaretLeft class="h-5 w-5" />
@@ -24479,6 +24642,7 @@ sum(1, 2);\`;
24479
24642
  import { CaretLeft, Trash, MagnifyingGlass } from 'phosphor-svelte';
24480
24643
  import { ScreenReaderOnly } from 'alus-ui';
24481
24644
  import DemoFooter from '$components/DemoFooter.svelte';
24645
+ import { resolve } from '$app/paths';
24482
24646
 
24483
24647
  const code = \`<button>
24484
24648
  <Trash class="h-5 w-5" />
@@ -24491,7 +24655,7 @@ sum(1, 2);\`;
24491
24655
  </svelte:head>
24492
24656
 
24493
24657
  <a
24494
- href="/"
24658
+ href={resolve('/')}
24495
24659
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
24496
24660
  >
24497
24661
  <CaretLeft class="h-5 w-5" />
@@ -24557,11 +24721,13 @@ sum(1, 2);\`;
24557
24721
  `,
24558
24722
  "demos/search-input/+page.svelte": `<script lang="ts">
24559
24723
  import { CaretLeft, MagnifyingGlass, X } from 'phosphor-svelte';
24724
+ import { resolve } from '$app/paths';
24560
24725
  import { SearchInput, Label } from 'alus-ui';
24561
24726
  import DemoFooter from '$components/DemoFooter.svelte';
24562
24727
 
24563
24728
  const code = \`<script lang="ts">
24564
24729
  import { SearchInput } from 'alus-ui';
24730
+ import { resolve } from '$app/paths';
24565
24731
  let q = $state('');
24566
24732
  <\\/script>
24567
24733
 
@@ -24576,7 +24742,7 @@ sum(1, 2);\`;
24576
24742
  </svelte:head>
24577
24743
 
24578
24744
  <a
24579
- href="/"
24745
+ href={resolve('/')}
24580
24746
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
24581
24747
  >
24582
24748
  <CaretLeft class="h-5 w-5" />
@@ -24677,11 +24843,13 @@ sum(1, 2);\`;
24677
24843
  `,
24678
24844
  "demos/select/+page.svelte": `<script lang="ts">
24679
24845
  import { CaretLeft, CaretDown, Check } from 'phosphor-svelte';
24846
+ import { resolve } from '$app/paths';
24680
24847
  import { Select, SelectTrigger, SelectContent, SelectOption } from 'alus-ui';
24681
24848
  import DemoFooter from '$components/DemoFooter.svelte';
24682
24849
 
24683
24850
  const code = \`<script lang="ts">
24684
24851
  import { Select, SelectTrigger, SelectContent, SelectOption } from 'alus-ui';
24852
+ import { resolve } from '$app/paths';
24685
24853
  let value = $state('');
24686
24854
  <\\/script>
24687
24855
 
@@ -24728,7 +24896,7 @@ sum(1, 2);\`;
24728
24896
  </svelte:head>
24729
24897
 
24730
24898
  <a
24731
- href="/"
24899
+ href={resolve('/')}
24732
24900
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
24733
24901
  >
24734
24902
  <CaretLeft class="h-5 w-5" />
@@ -24918,6 +25086,7 @@ sum(1, 2);\`;
24918
25086
  SheetClose
24919
25087
  } from 'alus-ui';
24920
25088
  import DemoFooter from '$components/DemoFooter.svelte';
25089
+ import { resolve } from '$app/paths';
24921
25090
 
24922
25091
  const code = \`<Sheet side="bottom">
24923
25092
  <SheetTrigger>Open</SheetTrigger>
@@ -24935,7 +25104,7 @@ sum(1, 2);\`;
24935
25104
  </svelte:head>
24936
25105
 
24937
25106
  <a
24938
- href="/"
25107
+ href={resolve('/')}
24939
25108
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
24940
25109
  >
24941
25110
  <CaretLeft class="h-5 w-5" />
@@ -25029,6 +25198,7 @@ sum(1, 2);\`;
25029
25198
  import { CaretLeft } from 'phosphor-svelte';
25030
25199
  import { Skeleton } from 'alus-ui';
25031
25200
  import DemoFooter from '$components/DemoFooter.svelte';
25201
+ import { resolve } from '$app/paths';
25032
25202
 
25033
25203
  const code = \`<Skeleton class="block h-4 w-1/3 animate-pulse rounded bg-gray-200" />
25034
25204
  <Skeleton class="block h-32 w-full animate-pulse bg-gray-200" />\`;
@@ -25039,7 +25209,7 @@ sum(1, 2);\`;
25039
25209
  </svelte:head>
25040
25210
 
25041
25211
  <a
25042
- href="/"
25212
+ href={resolve('/')}
25043
25213
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
25044
25214
  >
25045
25215
  <CaretLeft class="h-5 w-5" />
@@ -25102,11 +25272,13 @@ sum(1, 2);\`;
25102
25272
  `,
25103
25273
  "demos/slider/+page.svelte": `<script lang="ts">
25104
25274
  import { CaretLeft } from 'phosphor-svelte';
25275
+ import { resolve } from '$app/paths';
25105
25276
  import { Slider, Label } from 'alus-ui';
25106
25277
  import DemoFooter from '$components/DemoFooter.svelte';
25107
25278
 
25108
25279
  const code = \`<script lang="ts">
25109
25280
  import { Slider } from 'alus-ui';
25281
+ import { resolve } from '$app/paths';
25110
25282
  let volume = $state(50);
25111
25283
  <\\/script>
25112
25284
 
@@ -25121,7 +25293,7 @@ sum(1, 2);\`;
25121
25293
  </svelte:head>
25122
25294
 
25123
25295
  <a
25124
- href="/"
25296
+ href={resolve('/')}
25125
25297
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
25126
25298
  >
25127
25299
  <CaretLeft class="h-5 w-5" />
@@ -25193,6 +25365,7 @@ sum(1, 2);\`;
25193
25365
  import { CaretLeft, DotsSixVertical } from 'phosphor-svelte';
25194
25366
  import { Sortable } from 'alus-ui';
25195
25367
  import DemoFooter from '$components/DemoFooter.svelte';
25368
+ import { resolve } from '$app/paths';
25196
25369
 
25197
25370
  const code = \`<Sortable bind:items={tasks} getKey={(t) => t.id} aria-label="Tasks">
25198
25371
  {#snippet item({ value, grabbed, itemAttrs })}
@@ -25218,7 +25391,7 @@ sum(1, 2);\`;
25218
25391
  </svelte:head>
25219
25392
 
25220
25393
  <a
25221
- href="/"
25394
+ href={resolve('/')}
25222
25395
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
25223
25396
  >
25224
25397
  <CaretLeft class="h-5 w-5" />
@@ -25340,6 +25513,7 @@ sum(1, 2);\`;
25340
25513
  import { CaretLeft } from 'phosphor-svelte';
25341
25514
  import { Spinner } from 'alus-ui';
25342
25515
  import DemoFooter from '$components/DemoFooter.svelte';
25516
+ import { resolve } from '$app/paths';
25343
25517
 
25344
25518
  const code = \`<Spinner
25345
25519
  label="Loading content"
@@ -25352,7 +25526,7 @@ sum(1, 2);\`;
25352
25526
  </svelte:head>
25353
25527
 
25354
25528
  <a
25355
- href="/"
25529
+ href={resolve('/')}
25356
25530
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
25357
25531
  >
25358
25532
  <CaretLeft class="h-5 w-5" />
@@ -25425,6 +25599,7 @@ sum(1, 2);\`;
25425
25599
  import { CaretLeft } from 'phosphor-svelte';
25426
25600
  import { SplitView, SplitViewPane, SplitViewHandle } from 'alus-ui';
25427
25601
  import DemoFooter from '$components/DemoFooter.svelte';
25602
+ import { resolve } from '$app/paths';
25428
25603
 
25429
25604
  const code = \`<SplitView bind:size={pct} min={20} max={80} orientation="horizontal" aria-label="Editor">
25430
25605
  <SplitViewPane side="first">Left</SplitViewPane>
@@ -25441,7 +25616,7 @@ sum(1, 2);\`;
25441
25616
  </svelte:head>
25442
25617
 
25443
25618
  <a
25444
- href="/"
25619
+ href={resolve('/')}
25445
25620
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
25446
25621
  >
25447
25622
  <CaretLeft class="h-5 w-5" />
@@ -25568,6 +25743,7 @@ sum(1, 2);\`;
25568
25743
  } from 'phosphor-svelte';
25569
25744
  import { StatCard } from 'alus-ui';
25570
25745
  import DemoFooter from '$components/DemoFooter.svelte';
25746
+ import { resolve } from '$app/paths';
25571
25747
 
25572
25748
  const code = \`<StatCard
25573
25749
  label="Active users"
@@ -25591,7 +25767,7 @@ sum(1, 2);\`;
25591
25767
  </svelte:head>
25592
25768
 
25593
25769
  <a
25594
- href="/"
25770
+ href={resolve('/')}
25595
25771
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
25596
25772
  >
25597
25773
  <CaretLeft class="h-5 w-5" />
@@ -25735,6 +25911,7 @@ sum(1, 2);\`;
25735
25911
  import { CaretLeft, Check } from 'phosphor-svelte';
25736
25912
  import { Stepper, StepperStep, Button } from 'alus-ui';
25737
25913
  import DemoFooter from '$components/DemoFooter.svelte';
25914
+ import { resolve } from '$app/paths';
25738
25915
 
25739
25916
  const code = \`<Stepper value={1} steps={3}>
25740
25917
  <StepperStep index={0}>Account</StepperStep>
@@ -25756,7 +25933,7 @@ sum(1, 2);\`;
25756
25933
  </svelte:head>
25757
25934
 
25758
25935
  <a
25759
- href="/"
25936
+ href={resolve('/')}
25760
25937
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
25761
25938
  >
25762
25939
  <CaretLeft class="h-5 w-5" />
@@ -25782,7 +25959,7 @@ sum(1, 2);\`;
25782
25959
 
25783
25960
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
25784
25961
  <Stepper bind:current aria-label="Onboarding" class="mb-8 flex items-center gap-2">
25785
- {#each steps as step, i}
25962
+ {#each steps as step, i (i)}
25786
25963
  <StepperStep index={i} class="flex flex-1 items-center gap-3">
25787
25964
  {#snippet children({ status })}
25788
25965
  <span
@@ -25867,6 +26044,7 @@ sum(1, 2);\`;
25867
26044
  import { CaretLeft, CaretRight, File, Folder, Image, Code } from 'phosphor-svelte';
25868
26045
  import { Menu, MenuTrigger, MenuContent, MenuItem, SubMenu, type SubMenuItem } from 'alus-ui';
25869
26046
  import DemoFooter from '$components/DemoFooter.svelte';
26047
+ import { resolve } from '$app/paths';
25870
26048
 
25871
26049
  const code = \`<Menu>
25872
26050
  <MenuTrigger>File</MenuTrigger>
@@ -25908,7 +26086,7 @@ sum(1, 2);\`;
25908
26086
  </svelte:head>
25909
26087
 
25910
26088
  <a
25911
- href="/"
26089
+ href={resolve('/')}
25912
26090
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
25913
26091
  >
25914
26092
  <CaretLeft class="h-5 w-5" />
@@ -25956,10 +26134,8 @@ sum(1, 2);\`;
25956
26134
  separatorClass="my-1 h-px bg-(--charcoal)/15"
25957
26135
  class="flex items-center justify-between rounded px-3 py-1.5 text-sm text-(--ink) hover:bg-(--cream) data-highlighted:bg-(--indigo-dye) data-highlighted:text-white data-[state=open]:bg-(--indigo-dye)/10"
25958
26136
  >
25959
- {#snippet children()}
25960
- <span>New</span>
25961
- <CaretRight class="h-3 w-3" />
25962
- {/snippet}
26137
+ <span>New</span>
26138
+ <CaretRight class="h-3 w-3" />
25963
26139
  {#snippet item({ item })}
25964
26140
  {#if item.label}
25965
26141
  {@const Icon = iconMap[item.label]}
@@ -26015,6 +26191,7 @@ sum(1, 2);\`;
26015
26191
  import { CaretLeft, ArrowLeft, ArrowRight, ArrowUp, ArrowDown } from 'phosphor-svelte';
26016
26192
  import { Swipeable, type SwipeDirection } from 'alus-ui';
26017
26193
  import DemoFooter from '$components/DemoFooter.svelte';
26194
+ import { resolve } from '$app/paths';
26018
26195
 
26019
26196
  const code = \`<Swipeable
26020
26197
  onSwipe={(d) => handle(d)}
@@ -26046,7 +26223,7 @@ sum(1, 2);\`;
26046
26223
  </svelte:head>
26047
26224
 
26048
26225
  <a
26049
- href="/"
26226
+ href={resolve('/')}
26050
26227
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
26051
26228
  >
26052
26229
  <CaretLeft class="h-5 w-5" />
@@ -26163,11 +26340,13 @@ sum(1, 2);\`;
26163
26340
  `,
26164
26341
  "demos/switch/+page.svelte": `<script lang="ts">
26165
26342
  import { CaretLeft } from 'phosphor-svelte';
26343
+ import { resolve } from '$app/paths';
26166
26344
  import { Switch, Label } from 'alus-ui';
26167
26345
  import DemoFooter from '$components/DemoFooter.svelte';
26168
26346
 
26169
26347
  const code = \`<script lang="ts">
26170
26348
  import { Switch } from 'alus-ui';
26349
+ import { resolve } from '$app/paths';
26171
26350
  let on = $state(true);
26172
26351
  <\\/script>
26173
26352
 
@@ -26187,7 +26366,7 @@ sum(1, 2);\`;
26187
26366
  </svelte:head>
26188
26367
 
26189
26368
  <a
26190
- href="/"
26369
+ href={resolve('/')}
26191
26370
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
26192
26371
  >
26193
26372
  <CaretLeft class="h-5 w-5" />
@@ -26288,6 +26467,7 @@ sum(1, 2);\`;
26288
26467
  TableCell
26289
26468
  } from 'alus-ui';
26290
26469
  import DemoFooter from '$components/DemoFooter.svelte';
26470
+ import { resolve } from '$app/paths';
26291
26471
 
26292
26472
  const code = \`<Table>
26293
26473
  <TableCaption>Team scoreboard</TableCaption>
@@ -26346,7 +26526,7 @@ sum(1, 2);\`;
26346
26526
  </svelte:head>
26347
26527
 
26348
26528
  <a
26349
- href="/"
26529
+ href={resolve('/')}
26350
26530
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
26351
26531
  >
26352
26532
  <CaretLeft class="h-5 w-5" />
@@ -26377,7 +26557,7 @@ sum(1, 2);\`;
26377
26557
  </TableCaption>
26378
26558
  <TableHead>
26379
26559
  <TableRow>
26380
- {#each [{ k: 'name', label: 'Name' }, { k: 'role', label: 'Role' }, { k: 'score', label: 'Score' }] as col}
26560
+ {#each [{ k: 'name', label: 'Name' }, { k: 'role', label: 'Role' }, { k: 'score', label: 'Score' }] as col (col.k)}
26381
26561
  <TableHeader
26382
26562
  scope="col"
26383
26563
  sort={sortKey === col.k ? sortDir : 'none'}
@@ -26453,6 +26633,7 @@ sum(1, 2);\`;
26453
26633
  import { CaretLeft } from 'phosphor-svelte';
26454
26634
  import { Tabs, TabList, Tab, TabPanel } from 'alus-ui';
26455
26635
  import DemoFooter from '$components/DemoFooter.svelte';
26636
+ import { resolve } from '$app/paths';
26456
26637
 
26457
26638
  const code = \`<Tabs value="overview">
26458
26639
  <TabList>
@@ -26471,7 +26652,7 @@ sum(1, 2);\`;
26471
26652
  </svelte:head>
26472
26653
 
26473
26654
  <a
26474
- href="/"
26655
+ href={resolve('/')}
26475
26656
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
26476
26657
  >
26477
26658
  <CaretLeft class="h-5 w-5" />
@@ -26564,6 +26745,7 @@ sum(1, 2);\`;
26564
26745
  import { CaretLeft } from 'phosphor-svelte';
26565
26746
  import { Tag } from 'alus-ui';
26566
26747
  import DemoFooter from '$components/DemoFooter.svelte';
26748
+ import { resolve } from '$app/paths';
26567
26749
 
26568
26750
  const code = \`<Tag removable onremove={() => remove(id)} aria-label="React tag">
26569
26751
  React
@@ -26587,7 +26769,7 @@ sum(1, 2);\`;
26587
26769
  </svelte:head>
26588
26770
 
26589
26771
  <a
26590
- href="/"
26772
+ href={resolve('/')}
26591
26773
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
26592
26774
  >
26593
26775
  <CaretLeft class="h-5 w-5" />
@@ -26698,11 +26880,13 @@ sum(1, 2);\`;
26698
26880
  `,
26699
26881
  "demos/textarea/+page.svelte": `<script lang="ts">
26700
26882
  import { CaretLeft } from 'phosphor-svelte';
26883
+ import { resolve } from '$app/paths';
26701
26884
  import { Textarea } from 'alus-ui';
26702
26885
  import DemoFooter from '$components/DemoFooter.svelte';
26703
26886
 
26704
26887
  const code = \`<script lang="ts">
26705
26888
  import { Textarea } from 'alus-ui';
26889
+ import { resolve } from '$app/paths';
26706
26890
  let bio = $state('');
26707
26891
  <\\/script>
26708
26892
 
@@ -26723,7 +26907,7 @@ sum(1, 2);\`;
26723
26907
  </svelte:head>
26724
26908
 
26725
26909
  <a
26726
- href="/"
26910
+ href={resolve('/')}
26727
26911
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
26728
26912
  >
26729
26913
  <CaretLeft class="h-5 w-5" />
@@ -26813,11 +26997,13 @@ sum(1, 2);\`;
26813
26997
  `,
26814
26998
  "demos/time-picker/+page.svelte": `<script lang="ts">
26815
26999
  import { CaretLeft, Lock, WarningCircle, CheckCircle } from 'phosphor-svelte';
27000
+ import { resolve } from '$app/paths';
26816
27001
  import { TimePicker, type Time } from 'alus-ui';
26817
27002
  import DemoFooter from '$components/DemoFooter.svelte';
26818
27003
 
26819
27004
  const code = \`<script lang="ts">
26820
27005
  import { TimePicker, type Time } from 'alus-ui';
27006
+ import { resolve } from '$app/paths';
26821
27007
  let t = $state<Time | null>({ hour: 9, minute: 30 });
26822
27008
  <\\/script>
26823
27009
 
@@ -26843,7 +27029,7 @@ sum(1, 2);\`;
26843
27029
  </svelte:head>
26844
27030
 
26845
27031
  <a
26846
- href="/"
27032
+ href={resolve('/')}
26847
27033
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
26848
27034
  >
26849
27035
  <CaretLeft class="h-5 w-5" />
@@ -27033,6 +27219,7 @@ sum(1, 2);\`;
27033
27219
  import { CaretLeft, Check, Circle, CircleNotch } from 'phosphor-svelte';
27034
27220
  import { Timeline, TimelineItem } from 'alus-ui';
27035
27221
  import DemoFooter from '$components/DemoFooter.svelte';
27222
+ import { resolve } from '$app/paths';
27036
27223
 
27037
27224
  const code = \`<Timeline aria-label="Project milestones">
27038
27225
  <TimelineItem status="completed" time="Q1" datetime="2026-01-01">
@@ -27050,7 +27237,7 @@ sum(1, 2);\`;
27050
27237
  </svelte:head>
27051
27238
 
27052
27239
  <a
27053
- href="/"
27240
+ href={resolve('/')}
27054
27241
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
27055
27242
  >
27056
27243
  <CaretLeft class="h-5 w-5" />
@@ -27173,6 +27360,7 @@ sum(1, 2);\`;
27173
27360
  import { CaretLeft } from 'phosphor-svelte';
27174
27361
  import { Timestamp } from 'alus-ui';
27175
27362
  import DemoFooter from '$components/DemoFooter.svelte';
27363
+ import { resolve } from '$app/paths';
27176
27364
 
27177
27365
  const code = \`<Timestamp value={Date.now() - 60_000} />
27178
27366
  <Timestamp value={ts} mode="absolute" />
@@ -27195,7 +27383,7 @@ sum(1, 2);\`;
27195
27383
  </svelte:head>
27196
27384
 
27197
27385
  <a
27198
- href="/"
27386
+ href={resolve('/')}
27199
27387
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
27200
27388
  >
27201
27389
  <CaretLeft class="h-5 w-5" />
@@ -27222,7 +27410,7 @@ sum(1, 2);\`;
27222
27410
  <h2 class="font-display mb-6 text-2xl text-(--ink)">Relative</h2>
27223
27411
  <div class="japanese-border bg-white/50 p-8 backdrop-blur-sm">
27224
27412
  <ul class="divide-y divide-(--charcoal)/10">
27225
- {#each samples as s}
27413
+ {#each samples as s, i (i)}
27226
27414
  <li class="flex items-center justify-between py-3">
27227
27415
  <span class="text-(--ink)">{s.label}</span>
27228
27416
  <Timestamp value={s.value} class="font-mono text-sm text-(--charcoal)/70" />
@@ -27292,11 +27480,13 @@ sum(1, 2);\`;
27292
27480
  `,
27293
27481
  "demos/toast/+page.svelte": `<script lang="ts">
27294
27482
  import { CaretLeft, CheckCircle, Warning, XCircle, Info, X } from 'phosphor-svelte';
27483
+ import { resolve } from '$app/paths';
27295
27484
  import { Toaster, createToaster, Button, type ToastPlacement } from 'alus-ui';
27296
27485
  import DemoFooter from '$components/DemoFooter.svelte';
27297
27486
 
27298
27487
  const code = \`<script lang="ts">
27299
27488
  import { Toaster, createToaster } from 'alus-ui';
27489
+ import { resolve } from '$app/paths';
27300
27490
  const tt = createToaster<{ title: string }>();
27301
27491
  <\\/script>
27302
27492
 
@@ -27373,7 +27563,7 @@ sum(1, 2);\`;
27373
27563
  </svelte:head>
27374
27564
 
27375
27565
  <a
27376
- href="/"
27566
+ href={resolve('/')}
27377
27567
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
27378
27568
  >
27379
27569
  <CaretLeft class="h-5 w-5" />
@@ -27451,108 +27641,106 @@ sum(1, 2);\`;
27451
27641
  </div>
27452
27642
  {/snippet}
27453
27643
 
27454
- {#snippet children()}
27455
- <section class="mb-12">
27456
- <h2 class="font-display mb-6 text-2xl text-(--ink)">Placement</h2>
27457
- <div class="japanese-border bg-white/50 p-6 backdrop-blur-sm">
27458
- <div role="radiogroup" aria-label="Toast placement" class="grid grid-cols-3 gap-2">
27459
- {#each placements as p}
27460
- <button
27461
- type="button"
27462
- role="radio"
27463
- aria-checked={placement === p.value}
27464
- onclick={() => (placement = p.value)}
27465
- class="rounded border px-3 py-2 text-sm transition-colors"
27466
- style={placement === p.value
27467
- ? 'background:var(--indigo-dye);border-color:var(--indigo-dye);color:white;'
27468
- : 'border-color:rgba(45,45,45,0.2);color:var(--ink);'}
27469
- >
27470
- {p.label}
27471
- </button>
27472
- {/each}
27473
- </div>
27474
- <p class="mt-3 font-mono text-xs text-(--charcoal)/60">
27475
- current: <code>{placement}</code>
27476
- </p>
27644
+ <section class="mb-12">
27645
+ <h2 class="font-display mb-6 text-2xl text-(--ink)">Placement</h2>
27646
+ <div class="japanese-border bg-white/50 p-6 backdrop-blur-sm">
27647
+ <div role="radiogroup" aria-label="Toast placement" class="grid grid-cols-3 gap-2">
27648
+ {#each placements as p, i (i)}
27649
+ <button
27650
+ type="button"
27651
+ role="radio"
27652
+ aria-checked={placement === p.value}
27653
+ onclick={() => (placement = p.value)}
27654
+ class="rounded border px-3 py-2 text-sm transition-colors"
27655
+ style={placement === p.value
27656
+ ? 'background:var(--indigo-dye);border-color:var(--indigo-dye);color:white;'
27657
+ : 'border-color:rgba(45,45,45,0.2);color:var(--ink);'}
27658
+ >
27659
+ {p.label}
27660
+ </button>
27661
+ {/each}
27477
27662
  </div>
27478
- </section>
27663
+ <p class="mt-3 font-mono text-xs text-(--charcoal)/60">
27664
+ current: <code>{placement}</code>
27665
+ </p>
27666
+ </div>
27667
+ </section>
27479
27668
 
27480
- <section class="mb-16">
27481
- <h2 class="font-display mb-8 text-2xl text-(--ink)">Trigger variants</h2>
27669
+ <section class="mb-16">
27670
+ <h2 class="font-display mb-8 text-2xl text-(--ink)">Trigger variants</h2>
27482
27671
 
27483
- <div class="japanese-border flex flex-wrap gap-3 bg-white/50 p-8 backdrop-blur-sm">
27484
- <Button
27485
- onclick={() =>
27486
- tt.addToast({
27487
- data: {
27488
- title: 'Saved',
27489
- description: 'Settings synced to the cloud.',
27490
- variant: 'success'
27491
- }
27492
- })}
27493
- class="rounded border border-(--matcha) bg-(--matcha) px-4 py-2 text-sm text-white"
27494
- >
27495
- Success
27496
- </Button>
27497
- <Button
27498
- onclick={() =>
27499
- tt.addToast({
27500
- type: 'assertive',
27501
- data: {
27502
- title: 'Heads up',
27503
- description: 'Token expires in 5 minutes.',
27504
- variant: 'warning'
27505
- }
27506
- })}
27507
- class="rounded border border-(--muted-gold) bg-(--muted-gold) px-4 py-2 text-sm text-(--ink)"
27508
- >
27509
- Warning
27510
- </Button>
27511
- <Button
27512
- onclick={() =>
27513
- tt.addToast({
27514
- type: 'assertive',
27515
- data: {
27516
- title: 'Upload failed',
27517
- description: 'Could not reach the server.',
27518
- variant: 'error',
27519
- action: {
27520
- label: 'Retry',
27521
- onClick: () => tt.addToast({ data: { title: 'Retrying\u2026', variant: 'info' } })
27522
- }
27523
- }
27524
- })}
27525
- class="rounded border border-(--vermilion) bg-(--vermilion) px-4 py-2 text-sm text-white"
27526
- >
27527
- Error + action
27528
- </Button>
27529
- <Button
27530
- onclick={() =>
27531
- tt.addToast({
27532
- closeDelay: 0,
27533
- data: {
27534
- title: 'Persistent',
27535
- description: 'Stays until dismissed.',
27536
- variant: 'info'
27672
+ <div class="japanese-border flex flex-wrap gap-3 bg-white/50 p-8 backdrop-blur-sm">
27673
+ <Button
27674
+ onclick={() =>
27675
+ tt.addToast({
27676
+ data: {
27677
+ title: 'Saved',
27678
+ description: 'Settings synced to the cloud.',
27679
+ variant: 'success'
27680
+ }
27681
+ })}
27682
+ class="rounded border border-(--matcha) bg-(--matcha) px-4 py-2 text-sm text-white"
27683
+ >
27684
+ Success
27685
+ </Button>
27686
+ <Button
27687
+ onclick={() =>
27688
+ tt.addToast({
27689
+ type: 'assertive',
27690
+ data: {
27691
+ title: 'Heads up',
27692
+ description: 'Token expires in 5 minutes.',
27693
+ variant: 'warning'
27694
+ }
27695
+ })}
27696
+ class="rounded border border-(--muted-gold) bg-(--muted-gold) px-4 py-2 text-sm text-(--ink)"
27697
+ >
27698
+ Warning
27699
+ </Button>
27700
+ <Button
27701
+ onclick={() =>
27702
+ tt.addToast({
27703
+ type: 'assertive',
27704
+ data: {
27705
+ title: 'Upload failed',
27706
+ description: 'Could not reach the server.',
27707
+ variant: 'error',
27708
+ action: {
27709
+ label: 'Retry',
27710
+ onClick: () => tt.addToast({ data: { title: 'Retrying\u2026', variant: 'info' } })
27537
27711
  }
27538
- })}
27539
- class="rounded border border-(--indigo-dye) px-4 py-2 text-sm text-(--indigo-dye)"
27540
- >
27541
- Persistent
27542
- </Button>
27543
- <Button
27544
- onclick={() => tt.clear()}
27545
- class="rounded border border-(--charcoal)/30 px-4 py-2 text-sm text-(--charcoal)"
27546
- >
27547
- Clear all
27548
- </Button>
27549
- </div>
27712
+ }
27713
+ })}
27714
+ class="rounded border border-(--vermilion) bg-(--vermilion) px-4 py-2 text-sm text-white"
27715
+ >
27716
+ Error + action
27717
+ </Button>
27718
+ <Button
27719
+ onclick={() =>
27720
+ tt.addToast({
27721
+ closeDelay: 0,
27722
+ data: {
27723
+ title: 'Persistent',
27724
+ description: 'Stays until dismissed.',
27725
+ variant: 'info'
27726
+ }
27727
+ })}
27728
+ class="rounded border border-(--indigo-dye) px-4 py-2 text-sm text-(--indigo-dye)"
27729
+ >
27730
+ Persistent
27731
+ </Button>
27732
+ <Button
27733
+ onclick={() => tt.clear()}
27734
+ class="rounded border border-(--charcoal)/30 px-4 py-2 text-sm text-(--charcoal)"
27735
+ >
27736
+ Clear all
27737
+ </Button>
27738
+ </div>
27550
27739
 
27551
- <p class="mt-4 font-mono text-sm text-(--charcoal)/60">
27552
- Hover any toast to pause its timer. Switch tabs to pause all.
27553
- </p>
27554
- </section>
27555
- {/snippet}
27740
+ <p class="mt-4 font-mono text-sm text-(--charcoal)/60">
27741
+ Hover any toast to pause its timer. Switch tabs to pause all.
27742
+ </p>
27743
+ </section>
27556
27744
  </Toaster>
27557
27745
 
27558
27746
  <DemoFooter
@@ -27586,11 +27774,13 @@ sum(1, 2);\`;
27586
27774
  `,
27587
27775
  "demos/toggle-button/+page.svelte": `<script lang="ts">
27588
27776
  import { CaretLeft, TextB, TextItalic, TextUnderline, Sun, Moon } from 'phosphor-svelte';
27777
+ import { resolve } from '$app/paths';
27589
27778
  import { ToggleButton } from 'alus-ui';
27590
27779
  import DemoFooter from '$components/DemoFooter.svelte';
27591
27780
 
27592
27781
  const code = \`<script lang="ts">
27593
27782
  import { ToggleButton } from 'alus-ui';
27783
+ import { resolve } from '$app/paths';
27594
27784
  let bold = $state(false);
27595
27785
  <\\/script>
27596
27786
 
@@ -27609,7 +27799,7 @@ sum(1, 2);\`;
27609
27799
  </svelte:head>
27610
27800
 
27611
27801
  <a
27612
- href="/"
27802
+ href={resolve('/')}
27613
27803
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
27614
27804
  >
27615
27805
  <CaretLeft class="h-5 w-5" />
@@ -27699,6 +27889,7 @@ sum(1, 2);\`;
27699
27889
  import { CaretLeft, Info } from 'phosphor-svelte';
27700
27890
  import { Tooltip, TooltipTrigger, TooltipContent } from 'alus-ui';
27701
27891
  import DemoFooter from '$components/DemoFooter.svelte';
27892
+ import { resolve } from '$app/paths';
27702
27893
 
27703
27894
  const code = \`<Tooltip>
27704
27895
  <TooltipTrigger>Hover me</TooltipTrigger>
@@ -27711,7 +27902,7 @@ sum(1, 2);\`;
27711
27902
  </svelte:head>
27712
27903
 
27713
27904
  <a
27714
- href="/"
27905
+ href={resolve('/')}
27715
27906
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
27716
27907
  >
27717
27908
  <CaretLeft class="h-5 w-5" />
@@ -27787,6 +27978,7 @@ sum(1, 2);\`;
27787
27978
  import { CaretLeft, CaretRight, Folder, FolderOpen, File } from 'phosphor-svelte';
27788
27979
  import { TreeView, TreeItem } from 'alus-ui';
27789
27980
  import DemoFooter from '$components/DemoFooter.svelte';
27981
+ import { resolve } from '$app/paths';
27790
27982
 
27791
27983
  const code = \`<TreeView bind:selected aria-label="Project files">
27792
27984
  <TreeItem id="src">
@@ -27805,7 +27997,7 @@ sum(1, 2);\`;
27805
27997
  </svelte:head>
27806
27998
 
27807
27999
  <a
27808
- href="/"
28000
+ href={resolve('/')}
27809
28001
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
27810
28002
  >
27811
28003
  <CaretLeft class="h-5 w-5" />
@@ -27963,6 +28155,7 @@ sum(1, 2);\`;
27963
28155
  import { CaretLeft, Plus, Trash, Shuffle } from 'phosphor-svelte';
27964
28156
  import { VirtualList } from 'alus-ui';
27965
28157
  import DemoFooter from '$components/DemoFooter.svelte';
28158
+ import { resolve } from '$app/paths';
27966
28159
 
27967
28160
  const code = \`<VirtualList items={rows} itemHeight={56} overscan={4} aria-label="Rows">
27968
28161
  {#snippet item({ item, index })}
@@ -28016,7 +28209,7 @@ sum(1, 2);\`;
28016
28209
  </svelte:head>
28017
28210
 
28018
28211
  <a
28019
- href="/"
28212
+ href={resolve('/')}
28020
28213
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
28021
28214
  >
28022
28215
  <CaretLeft class="h-5 w-5" />
@@ -28176,6 +28369,7 @@ sum(1, 2);\`;
28176
28369
  import { CaretLeft } from 'phosphor-svelte';
28177
28370
  import { VisuallyHidden } from 'alus-ui';
28178
28371
  import DemoFooter from '$components/DemoFooter.svelte';
28372
+ import { resolve } from '$app/paths';
28179
28373
 
28180
28374
  const code = \`<button>
28181
28375
  <span aria-hidden="true">\xD7</span>
@@ -28189,7 +28383,7 @@ sum(1, 2);\`;
28189
28383
  </svelte:head>
28190
28384
 
28191
28385
  <a
28192
- href="/"
28386
+ href={resolve('/')}
28193
28387
  class="mb-8 inline-flex items-center gap-2 text-(--indigo-dye) transition-colors duration-300 hover:text-(--vermilion)"
28194
28388
  >
28195
28389
  <CaretLeft class="h-5 w-5" />
@@ -28260,7 +28454,7 @@ sum(1, 2);\`;
28260
28454
  </main>
28261
28455
  `
28262
28456
  },
28263
- generated_at: "2026-05-31T12:31:38.888Z"
28457
+ generated_at: "2026-06-20T14:48:51.850Z"
28264
28458
  };
28265
28459
 
28266
28460
  // ../mcp-server/src/lib/fs.ts
@@ -28327,9 +28521,7 @@ function truncate(text, hint) {
28327
28521
 
28328
28522
  // ../mcp-server/src/mcp/handlers/tools/list-components.ts
28329
28523
  var schema = object({
28330
- category: optional(
28331
- picklist(CATEGORIES, "Must be one of the alus-ui component categories")
28332
- ),
28524
+ category: optional(picklist(CATEGORIES, "Must be one of the alus-ui component categories")),
28333
28525
  response_format: optional(picklist(["markdown", "json"]), "markdown")
28334
28526
  });
28335
28527
  async function list_components_handler(params) {
@@ -28398,9 +28590,7 @@ function get_component(server2) {
28398
28590
  try {
28399
28591
  const all = await list_all_components();
28400
28592
  const needle = name.toLowerCase().replace(/[-_\s]/g, "");
28401
- let matches = all.filter(
28402
- (c) => c.name.toLowerCase().replace(/[-_\s]/g, "") === needle
28403
- );
28593
+ let matches = all.filter((c) => c.name.toLowerCase().replace(/[-_\s]/g, "") === needle);
28404
28594
  if (category) matches = matches.filter((c) => c.category === category);
28405
28595
  if (!matches.length) {
28406
28596
  const similar = all.filter(
@@ -28490,7 +28680,9 @@ function search_components(server2) {
28490
28680
  ""
28491
28681
  );
28492
28682
  }
28493
- return tool.text(truncate(lines.join("\n"), "Narrow with category or a more specific query."));
28683
+ return tool.text(
28684
+ truncate(lines.join("\n"), "Narrow with category or a more specific query.")
28685
+ );
28494
28686
  } catch (e) {
28495
28687
  return tool.error(e.message);
28496
28688
  }
@@ -28503,7 +28695,9 @@ import { readFile as readFile3, readdir as readdir2 } from "fs/promises";
28503
28695
  var schema4 = object({
28504
28696
  name: pipe(
28505
28697
  string(),
28506
- description("Component route folder name, lowercase hyphenated (e.g. 'button', 'date-picker')")
28698
+ description(
28699
+ "Component route folder name, lowercase hyphenated (e.g. 'button', 'date-picker')"
28700
+ )
28507
28701
  )
28508
28702
  });
28509
28703
  function get_component_demo(server2) {
@@ -28578,7 +28772,10 @@ ${content}
28578
28772
  import { readFile as readFile5 } from "fs/promises";
28579
28773
  var MODULES = ["aria", "focus", "id", "keyboard", "index", "form/state"];
28580
28774
  var schema5 = object({
28581
- module: picklist(MODULES, "Utility module \u2014 one of: aria, focus, id, keyboard, index, form/state")
28775
+ module: picklist(
28776
+ MODULES,
28777
+ "Utility module \u2014 one of: aria, focus, id, keyboard, index, form/state"
28778
+ )
28582
28779
  });
28583
28780
  function get_utils(server2) {
28584
28781
  server2.tool(