@soybeanjs/headless 0.26.1 → 0.26.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/components/alert/alert-compact.vue.d.ts +2 -2
  2. package/dist/components/autocomplete/autocomplete-compact.js +1 -1
  3. package/dist/components/autocomplete/autocomplete-compact.vue.d.ts +2 -2
  4. package/dist/components/autocomplete/autocomplete-root.vue.d.ts +3 -3
  5. package/dist/components/autocomplete/types.d.ts +1 -1
  6. package/dist/components/backtop/backtop.vue.d.ts +2 -2
  7. package/dist/components/bottom-sheet/bottom-sheet-root-nested.vue.d.ts +2 -2
  8. package/dist/components/calendar/calendar-compact.js +1 -1
  9. package/dist/components/calendar-range/calendar-range-root.vue.d.ts +1 -1
  10. package/dist/components/clipboard/clipboard.vue.d.ts +4 -4
  11. package/dist/components/color-area/color-area-root.vue.d.ts +1 -1
  12. package/dist/components/color-field/color-field-root.vue.d.ts +1 -1
  13. package/dist/components/color-picker/color-picker-compact.vue.d.ts +2 -2
  14. package/dist/components/color-picker/color-picker-root.vue.d.ts +4 -4
  15. package/dist/components/color-slider/color-slider-root.vue.d.ts +1 -1
  16. package/dist/components/combobox/combobox-compact.vue.d.ts +2 -2
  17. package/dist/components/combobox/combobox-root.vue.d.ts +2 -2
  18. package/dist/components/command/command-compact.js +1 -1
  19. package/dist/components/command/types.d.ts +1 -1
  20. package/dist/components/context-menu/context-menu-checkbox-compact.vue.d.ts +2 -2
  21. package/dist/components/context-menu/context-menu-radio-compact.vue.d.ts +2 -2
  22. package/dist/components/date-field/date-field-root.vue.d.ts +2 -2
  23. package/dist/components/date-picker/date-picker-compact.js +1 -1
  24. package/dist/components/date-picker/date-picker-compact.vue.d.ts +4 -4
  25. package/dist/components/date-range-field/date-range-field-root.vue.d.ts +2 -2
  26. package/dist/components/date-range-picker/date-range-picker-compact.vue.d.ts +4 -4
  27. package/dist/components/dialog/dialog-compact.vue.d.ts +4 -4
  28. package/dist/components/dialog/state.js +1 -1
  29. package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.vue.d.ts +2 -2
  30. package/dist/components/dropdown-menu/dropdown-menu-radio-compact.vue.d.ts +2 -2
  31. package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +1 -1
  32. package/dist/components/input-otp/input-otp-compact.vue.d.ts +2 -2
  33. package/dist/components/input-otp/input-otp-root.vue.d.ts +3 -3
  34. package/dist/components/menubar/menubar-compact.vue.d.ts +2 -2
  35. package/dist/components/menubar/menubar-root.vue.d.ts +1 -1
  36. package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +1 -1
  37. package/dist/components/page-tabs/page-tabs-compact.vue.d.ts +1 -1
  38. package/dist/components/page-tabs/page-tabs-root.vue.d.ts +1 -1
  39. package/dist/components/popconfirm/popconfirm-compact.vue.d.ts +2 -2
  40. package/dist/components/popper/popper-positioner.vue.d.ts +1 -1
  41. package/dist/components/progress/state.js +1 -1
  42. package/dist/components/select/select-compact.vue.d.ts +2 -2
  43. package/dist/components/select/select-root.vue.d.ts +2 -2
  44. package/dist/components/slider/slider-root.vue.d.ts +2 -2
  45. package/dist/components/splitter/splitter-group.vue.d.ts +1 -1
  46. package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
  47. package/dist/components/splitter/splitter-resize-handle.vue.d.ts +1 -1
  48. package/dist/components/stepper/stepper-root.vue.d.ts +1 -1
  49. package/dist/components/tabs/tabs-root.vue.d.ts +1 -1
  50. package/dist/components/tags-input/tags-input-compact.vue.d.ts +2 -2
  51. package/dist/components/tags-input/tags-input-root.vue.d.ts +3 -3
  52. package/dist/components/time-field/time-field-root.vue.d.ts +2 -2
  53. package/dist/components/time-range-field/time-range-field-root.vue.d.ts +2 -2
  54. package/dist/components/toast/state.js +1 -1
  55. package/dist/components/toast/toast.js +1 -1
  56. package/dist/components/toast/toaster.vue.d.ts +1 -1
  57. package/dist/components/toggle/toggle.vue.d.ts +1 -1
  58. package/dist/components/visually-hidden/visually-hidden-input.vue.d.ts +1 -1
  59. package/dist/composables/index.d.ts +2 -1
  60. package/dist/composables/index.js +1 -1
  61. package/dist/composables/use-fuse.d.ts +17 -0
  62. package/dist/composables/use-fuse.js +1 -0
  63. package/dist/shared/vue.js +1 -1
  64. package/package.json +10 -6
  65. /package/dist/_virtual/{_@oxc-project_runtime@0.132.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/defineProperty.js +0 -0
  66. /package/dist/_virtual/{_@oxc-project_runtime@0.132.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/toPrimitive.js +0 -0
  67. /package/dist/_virtual/{_@oxc-project_runtime@0.132.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/toPropertyKey.js +0 -0
  68. /package/dist/_virtual/{_@oxc-project_runtime@0.132.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/typeof.js +0 -0
@@ -6,8 +6,8 @@ import { DropdownMenuCheckboxCompactProps, DropdownMenuCheckboxCompactSlots } fr
6
6
  declare const __VLS_export: <T extends DefinedValue = DefinedValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
7
  props: import("vue").PublicProps & __VLS_PrettifyLocal<DropdownMenuCheckboxCompactProps<T> & {
8
8
  onSelect?: ((item: MenuCheckboxOptionData<T>, event: Event) => any) | undefined;
9
- "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
10
9
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
11
11
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
12
12
  onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
13
13
  onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
@@ -21,7 +21,7 @@ declare const __VLS_export: <T extends DefinedValue = DefinedValue>(__VLS_props:
21
21
  expose: (exposed: {}) => void;
22
22
  attrs: any;
23
23
  slots: DropdownMenuCheckboxCompactSlots<T>;
24
- emit: ((evt: "select", item: MenuCheckboxOptionData<T>, event: Event) => void) & ((evt: "update:modelValue", value: T[]) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: FocusOutsideEvent) => void) & ((evt: "interactOutside", event: PointerDownOutsideEvent | FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
24
+ emit: ((evt: "select", item: MenuCheckboxOptionData<T>, event: Event) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: T[]) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: FocusOutsideEvent) => void) & ((evt: "interactOutside", event: PointerDownOutsideEvent | FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
25
25
  }>) => import("vue").VNode & {
26
26
  __ctx?: Awaited<typeof __VLS_setup>;
27
27
  };
@@ -6,8 +6,8 @@ import { DropdownMenuRadioCompactProps, DropdownMenuRadioCompactSlots } from "./
6
6
  declare const __VLS_export: <T extends AcceptableBooleanValue = AcceptableBooleanValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
7
  props: import("vue").PublicProps & __VLS_PrettifyLocal<DropdownMenuRadioCompactProps<T> & {
8
8
  onSelect?: ((item: MenuRadioOptionData<T>, event: Event) => any) | undefined;
9
- "onUpdate:modelValue"?: ((payload: Exclude<T, undefined>) => any) | undefined;
10
9
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((payload: Exclude<T, undefined>) => any) | undefined;
11
11
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
12
12
  onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
13
13
  onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
@@ -21,7 +21,7 @@ declare const __VLS_export: <T extends AcceptableBooleanValue = AcceptableBoolea
21
21
  expose: (exposed: {}) => void;
22
22
  attrs: any;
23
23
  slots: DropdownMenuRadioCompactSlots<T>;
24
- emit: ((evt: "select", item: MenuRadioOptionData<T>, event: Event) => void) & ((evt: "update:modelValue", payload: Exclude<T, undefined>) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: FocusOutsideEvent) => void) & ((evt: "interactOutside", event: PointerDownOutsideEvent | FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
24
+ emit: ((evt: "select", item: MenuRadioOptionData<T>, event: Event) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", payload: Exclude<T, undefined>) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: FocusOutsideEvent) => void) & ((evt: "interactOutside", event: PointerDownOutsideEvent | FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
25
25
  }>) => import("vue").VNode & {
26
26
  __ctx?: Awaited<typeof __VLS_setup>;
27
27
  };
@@ -12,9 +12,9 @@ declare const __VLS_base: import("vue").DefineComponent<DropdownMenuRootProps, {
12
12
  }, string, import("vue").PublicProps, Readonly<DropdownMenuRootProps> & Readonly<{
13
13
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
14
14
  }>, {
15
+ open: boolean;
15
16
  delayDuration: number;
16
17
  skipDelayDuration: number;
17
- open: boolean;
18
18
  trigger: DropdownMenuTriggerType;
19
19
  modal: boolean;
20
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -6,23 +6,23 @@ declare const __VLS_base: import("vue").DefineComponent<InputOtpCompactProps, {}
6
6
  input: (value: string) => any;
7
7
  select: (event: Event) => any;
8
8
  change: (event: Event) => any;
9
+ "update:modelValue": (value: string) => any;
9
10
  blur: (event: FocusEvent) => any;
10
11
  focus: (event: FocusEvent) => any;
11
12
  mouseleave: (event: MouseEvent) => any;
12
13
  mouseover: (event: MouseEvent) => any;
13
14
  paste: (event: ClipboardEvent) => any;
14
- "update:modelValue": (value: string) => any;
15
15
  complete: (value: string) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<InputOtpCompactProps> & Readonly<{
17
17
  onInput?: ((value: string) => any) | undefined;
18
18
  onSelect?: ((event: Event) => any) | undefined;
19
19
  onChange?: ((event: Event) => any) | undefined;
20
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
20
21
  onBlur?: ((event: FocusEvent) => any) | undefined;
21
22
  onFocus?: ((event: FocusEvent) => any) | undefined;
22
23
  onMouseleave?: ((event: MouseEvent) => any) | undefined;
23
24
  onMouseover?: ((event: MouseEvent) => any) | undefined;
24
25
  onPaste?: ((event: ClipboardEvent) => any) | undefined;
25
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
26
26
  onComplete?: ((value: string) => any) | undefined;
27
27
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -18,29 +18,29 @@ declare const __VLS_base: import("vue").DefineComponent<InputOtpRootProps, {
18
18
  input: (value: string) => any;
19
19
  select: (event: Event) => any;
20
20
  change: (event: Event) => any;
21
+ "update:modelValue": (value: string) => any;
21
22
  blur: (event: FocusEvent) => any;
22
23
  focus: (event: FocusEvent) => any;
23
24
  mouseleave: (event: MouseEvent) => any;
24
25
  mouseover: (event: MouseEvent) => any;
25
26
  paste: (event: ClipboardEvent) => any;
26
- "update:modelValue": (value: string) => any;
27
27
  complete: (value: string) => any;
28
28
  }, string, import("vue").PublicProps, Readonly<InputOtpRootProps> & Readonly<{
29
29
  onInput?: ((value: string) => any) | undefined;
30
30
  onSelect?: ((event: Event) => any) | undefined;
31
31
  onChange?: ((event: Event) => any) | undefined;
32
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
32
33
  onBlur?: ((event: FocusEvent) => any) | undefined;
33
34
  onFocus?: ((event: FocusEvent) => any) | undefined;
34
35
  onMouseleave?: ((event: MouseEvent) => any) | undefined;
35
36
  onMouseover?: ((event: MouseEvent) => any) | undefined;
36
37
  onPaste?: ((event: ClipboardEvent) => any) | undefined;
37
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
38
38
  onComplete?: ((value: string) => any) | undefined;
39
39
  }>, {
40
40
  autocomplete: string;
41
41
  inputmode: InputOtpInputMode;
42
- defaultValue: string;
43
42
  modelValue: string;
43
+ defaultValue: string;
44
44
  pushPasswordManagerStrategy: InputOtpPushPasswordManagerStrategy;
45
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -6,8 +6,8 @@ import { MenubarCompactProps, MenubarCompactSlots } from "./types.js";
6
6
  declare const __VLS_export: <T extends DefinedValue = DefinedValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
7
  props: import("vue").PublicProps & __VLS_PrettifyLocal<MenubarCompactProps<T> & {
8
8
  onSelect?: ((item: MenuOptionData<T>, event: Event) => any) | undefined;
9
- "onUpdate:modelValue"?: ((value: T) => any) | undefined;
10
9
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: T) => any) | undefined;
11
11
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
12
12
  onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
13
13
  onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
@@ -21,7 +21,7 @@ declare const __VLS_export: <T extends DefinedValue = DefinedValue>(__VLS_props:
21
21
  expose: (exposed: {}) => void;
22
22
  attrs: any;
23
23
  slots: MenubarCompactSlots<T>;
24
- emit: ((evt: "select", item: MenuOptionData<T>, event: Event) => void) & ((evt: "update:modelValue", value: T) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: FocusOutsideEvent) => void) & ((evt: "interactOutside", event: PointerDownOutsideEvent | FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
24
+ emit: ((evt: "select", item: MenuOptionData<T>, event: Event) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: T) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: FocusOutsideEvent) => void) & ((evt: "interactOutside", event: PointerDownOutsideEvent | FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
25
25
  }>) => import("vue").VNode & {
26
26
  __ctx?: Awaited<typeof __VLS_setup>;
27
27
  };
@@ -13,8 +13,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
13
13
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
14
  "onUpdate:modelValue"?: ((value: DefinedValue) => any) | undefined;
15
15
  }>, {
16
- modelValue: DefinedValue;
17
16
  loop: boolean;
17
+ modelValue: DefinedValue;
18
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
20
  declare const _default: typeof __VLS_export;
@@ -13,9 +13,9 @@ declare const __VLS_base: import("vue").DefineComponent<NavigationMenuRootProps,
13
13
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
14
14
  }>, {
15
15
  orientation: DataOrientation;
16
+ unmountOnHide: boolean;
16
17
  delayDuration: number;
17
18
  skipDelayDuration: number;
18
- unmountOnHide: boolean;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
@@ -7,8 +7,8 @@ declare const __VLS_export: <T extends PageTabsOptionData = PageTabsOptionData>(
7
7
  onClick?: ((tab: T) => any) | undefined;
8
8
  onClose?: ((tab: T) => any) | undefined;
9
9
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
10
- "onUpdate:items"?: ((items: T[]) => any) | undefined;
11
10
  onPin?: ((tab: T) => any) | undefined;
11
+ "onUpdate:items"?: ((items: T[]) => any) | undefined;
12
12
  onSelectContextMenu?: ((menu: PageTabsContextMenuOptionData, tab: T) => any) | undefined;
13
13
  }> & (typeof globalThis extends {
14
14
  __VLS_PROPS_FALLBACK: infer P;
@@ -10,8 +10,8 @@ declare const __VLS_base: import("vue").DefineComponent<PageTabsRootProps, {}, {
10
10
  }, string, import("vue").PublicProps, Readonly<PageTabsRootProps> & Readonly<{
11
11
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
12
12
  }>, {
13
- modelValue: string;
14
13
  loop: boolean;
14
+ modelValue: string;
15
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
17
  declare const _default: typeof __VLS_export;
@@ -3,8 +3,8 @@ import { PopconfirmCompactProps, PopconfirmCompactSlots } from "./types.js";
3
3
  //#region src/components/popconfirm/popconfirm-compact.vue.d.ts
4
4
  type __VLS_Slots = PopconfirmCompactSlots;
5
5
  declare const __VLS_base: import("vue").DefineComponent<PopconfirmCompactProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
- cancel: (event: PointerEvent) => any;
7
6
  "update:open": (value: boolean) => any;
7
+ cancel: (event: PointerEvent) => any;
8
8
  escapeKeyDown: (event: KeyboardEvent) => any;
9
9
  pointerDownOutside: (event: PointerDownOutsideEvent) => any;
10
10
  focusOutside: (event: FocusOutsideEvent) => any;
@@ -13,8 +13,8 @@ declare const __VLS_base: import("vue").DefineComponent<PopconfirmCompactProps,
13
13
  closeAutoFocus: (event: Event) => any;
14
14
  confirm: (event: PointerEvent) => any;
15
15
  }, string, import("vue").PublicProps, Readonly<PopconfirmCompactProps> & Readonly<{
16
- onCancel?: ((event: PointerEvent) => any) | undefined;
17
16
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
17
+ onCancel?: ((event: PointerEvent) => any) | undefined;
18
18
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
19
19
  onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
20
20
  onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
@@ -201,6 +201,7 @@ declare const __VLS_base: import("vue").DefineComponent<PopperPositionerProps, {
201
201
  'aria-valuenow': string | number;
202
202
  'aria-valuetext': string;
203
203
  placement: Placement;
204
+ reference: import("@floating-ui/dom").ReferenceElement;
204
205
  side: import("@floating-ui/utils").Side;
205
206
  sideOffset: number;
206
207
  sideFlip: boolean;
@@ -218,7 +219,6 @@ declare const __VLS_base: import("vue").DefineComponent<PopperPositionerProps, {
218
219
  updatePositionStrategy: "optimized" | "always";
219
220
  disableUpdateOnLayoutShift: boolean;
220
221
  prioritizePosition: boolean;
221
- reference: import("@floating-ui/dom").ReferenceElement;
222
222
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
223
223
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
224
224
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- import{clamp as e}from"../../shared/value.js";import{isClient as t}from"../../shared/env.js";import"../../shared/index.js";import{_defineProperty as n}from"../../_virtual/_@oxc-project_runtime@0.132.0/helpers/defineProperty.js";import{defu as r}from"defu";const i={direction:`ltr`,minimum:.08,maximum:1,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200};var a=class{static reset(){return this.status=null,this.isPaused=!1,this.pending=[],this.options=i,this.clearTrickleTimer(),this}static configure(e){return this.options=r({...e},this.options),this}static isStarted(){return typeof this.status==`number`}static isRendered(){return t?document.querySelector(`[data-soybean-progress-provider]`)!==null:!1}static set(n){if(!t||this.isPaused)return this;let r=this.isStarted();n=e(n,this.options.minimum,this.options.maximum),this.status=n===this.options.maximum?null:n,this.status===null&&this.clearTrickleTimer();let i=this.render(!r),a=this.options.speed,o=this.options.easing;return i.forEach(e=>e.offsetWidth),this.queue(e=>{i.forEach(e=>{c(e.querySelector(`[data-soybean-progress-bar]`),this.barPositionCSS({n,speed:a,ease:o}))}),n===this.options.maximum?(i.forEach(e=>{c(e,{transition:`none`,opacity:`1`}),e.offsetWidth}),setTimeout(()=>{i.forEach(e=>{c(e,{transition:`all ${a}ms ${o}`,opacity:`0`})}),setTimeout(()=>{i.forEach(e=>{this.remove(e),c(e,{transition:`none`,opacity:`1`})}),e()},a)},a)):setTimeout(e,a)}),this}static start(){return t?(this.status||this.set(0),this.options.trickle&&this.startTrickling(),this):this}static done(e){return!t||!e&&!this.status?this:this.inc(.3+.5*Math.random()).set(1)}static inc(t){if(this.isPaused)return this;let n=this.status;return n?n>1?this:(typeof t!=`number`&&(t=n>=0&&n<.2?.1:n>=.2&&n<.5?.04:n>=.5&&n<.8?.02:n>=.8&&n<.99?.005:0),n=e(n+t,0,.994),this.set(n)):this.start()}static dec(t){if(this.isPaused)return this;let n=this.status;return typeof n==`number`?(typeof t!=`number`&&(t=n>.8?.1:n>.5?.05:n>.2?.02:.01),n=e(n-t,0,.994),this.set(n)):this}static trickle(){return this.isPaused?this:this.inc()}static promise(e){let t=typeof e==`function`?e():e;if(!t)return this;if(typeof t.then==`function`)return this.start(),Promise.resolve(t).then(()=>{this.done()},()=>{this.done(!0)}),this;if(typeof t.state!=`function`||typeof t.always!=`function`||t.state()===`resolved`)return this;let n=0,r=0;return this.start(),n++,r++,t.always(()=>{r--,r===0?(n=0,this.done()):this.set((n-r)/n)}),this}static render(e=!1){if(!t)return[];let n=Array.from(document.querySelectorAll(`[data-soybean-progress-provider]`));return n.forEach(t=>{t.style.display=``;let n=t.querySelector(`[data-soybean-progress-bar]`),r=s(e?0:this.status||0,this.options.direction);c(n,this.barPositionCSS({n:this.status||0,speed:this.options.speed,ease:this.options.easing,percent:r})),typeof this.status==`number`?t.setAttribute(`aria-valuenow`,`${this.status}`):t.removeAttribute(`aria-valuenow`)}),n}static remove(e){t&&(this.clearTrickleTimer(),e?e.style.display=`none`:document.querySelectorAll(`[data-soybean-progress-provider]`).forEach(e=>{let t=e;t.style.display=`none`}))}static pause(){return this.isStarted()?(this.isPaused=!0,this.clearTrickleTimer(),this):this}static resume(){return this.isStarted()?(this.isPaused=!1,this.options.trickle&&this.startTrickling(),this):this}static queue(e){this.pending.push(e),this.pending.length===1&&this.next()}static next(){let e=this.pending.shift();e&&e(this.next.bind(this))}static clearTrickleTimer(){this.trickleTimer&&(clearTimeout(this.trickleTimer),this.trickleTimer=void 0)}static startTrickling(){if(this.trickleTimer||this.isPaused||!this.isStarted())return;let e=()=>{this.trickleTimer=void 0,!(this.isPaused||!this.isStarted())&&(this.trickle(),!this.isPaused&&this.isStarted()&&(this.trickleTimer=setTimeout(e,this.options.trickleSpeed)))};this.trickleTimer=setTimeout(e,this.options.trickleSpeed)}static barPositionCSS({n:e,speed:t,ease:n,percent:r}){return{transform:`translate3d(${r??s(e,this.options.direction)}%,0,0)`,transition:`all ${t}ms ${n}`}}};n(a,`options`,i),n(a,`status`,null),n(a,`pending`,[]),n(a,`isPaused`,!1),n(a,`trickleTimer`,void 0);const o=a;function s(e,t){return t===`rtl`?(1-e)*100:(-1+e)*100}function c(e,t,n){if(typeof t==`string`)n!==void 0&&(e.style[t]=n);else for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];r!==void 0&&(e.style[n]=r)}}export{o as progress};
1
+ import{clamp as e}from"../../shared/value.js";import{isClient as t}from"../../shared/env.js";import"../../shared/index.js";import{_defineProperty as n}from"../../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/defineProperty.js";import{defu as r}from"defu";const i={direction:`ltr`,minimum:.08,maximum:1,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200};var a=class{static reset(){return this.status=null,this.isPaused=!1,this.pending=[],this.options=i,this.clearTrickleTimer(),this}static configure(e){return this.options=r({...e},this.options),this}static isStarted(){return typeof this.status==`number`}static isRendered(){return t?document.querySelector(`[data-soybean-progress-provider]`)!==null:!1}static set(n){if(!t||this.isPaused)return this;let r=this.isStarted();n=e(n,this.options.minimum,this.options.maximum),this.status=n===this.options.maximum?null:n,this.status===null&&this.clearTrickleTimer();let i=this.render(!r),a=this.options.speed,o=this.options.easing;return i.forEach(e=>e.offsetWidth),this.queue(e=>{i.forEach(e=>{c(e.querySelector(`[data-soybean-progress-bar]`),this.barPositionCSS({n,speed:a,ease:o}))}),n===this.options.maximum?(i.forEach(e=>{c(e,{transition:`none`,opacity:`1`}),e.offsetWidth}),setTimeout(()=>{i.forEach(e=>{c(e,{transition:`all ${a}ms ${o}`,opacity:`0`})}),setTimeout(()=>{i.forEach(e=>{this.remove(e),c(e,{transition:`none`,opacity:`1`})}),e()},a)},a)):setTimeout(e,a)}),this}static start(){return t?(this.status||this.set(0),this.options.trickle&&this.startTrickling(),this):this}static done(e){return!t||!e&&!this.status?this:this.inc(.3+.5*Math.random()).set(1)}static inc(t){if(this.isPaused)return this;let n=this.status;return n?n>1?this:(typeof t!=`number`&&(t=n>=0&&n<.2?.1:n>=.2&&n<.5?.04:n>=.5&&n<.8?.02:n>=.8&&n<.99?.005:0),n=e(n+t,0,.994),this.set(n)):this.start()}static dec(t){if(this.isPaused)return this;let n=this.status;return typeof n==`number`?(typeof t!=`number`&&(t=n>.8?.1:n>.5?.05:n>.2?.02:.01),n=e(n-t,0,.994),this.set(n)):this}static trickle(){return this.isPaused?this:this.inc()}static promise(e){let t=typeof e==`function`?e():e;if(!t)return this;if(typeof t.then==`function`)return this.start(),Promise.resolve(t).then(()=>{this.done()},()=>{this.done(!0)}),this;if(typeof t.state!=`function`||typeof t.always!=`function`||t.state()===`resolved`)return this;let n=0,r=0;return this.start(),n++,r++,t.always(()=>{r--,r===0?(n=0,this.done()):this.set((n-r)/n)}),this}static render(e=!1){if(!t)return[];let n=Array.from(document.querySelectorAll(`[data-soybean-progress-provider]`));return n.forEach(t=>{t.style.display=``;let n=t.querySelector(`[data-soybean-progress-bar]`),r=s(e?0:this.status||0,this.options.direction);c(n,this.barPositionCSS({n:this.status||0,speed:this.options.speed,ease:this.options.easing,percent:r})),typeof this.status==`number`?t.setAttribute(`aria-valuenow`,`${this.status}`):t.removeAttribute(`aria-valuenow`)}),n}static remove(e){t&&(this.clearTrickleTimer(),e?e.style.display=`none`:document.querySelectorAll(`[data-soybean-progress-provider]`).forEach(e=>{let t=e;t.style.display=`none`}))}static pause(){return this.isStarted()?(this.isPaused=!0,this.clearTrickleTimer(),this):this}static resume(){return this.isStarted()?(this.isPaused=!1,this.options.trickle&&this.startTrickling(),this):this}static queue(e){this.pending.push(e),this.pending.length===1&&this.next()}static next(){let e=this.pending.shift();e&&e(this.next.bind(this))}static clearTrickleTimer(){this.trickleTimer&&(clearTimeout(this.trickleTimer),this.trickleTimer=void 0)}static startTrickling(){if(this.trickleTimer||this.isPaused||!this.isStarted())return;let e=()=>{this.trickleTimer=void 0,!(this.isPaused||!this.isStarted())&&(this.trickle(),!this.isPaused&&this.isStarted()&&(this.trickleTimer=setTimeout(e,this.options.trickleSpeed)))};this.trickleTimer=setTimeout(e,this.options.trickleSpeed)}static barPositionCSS({n:e,speed:t,ease:n,percent:r}){return{transform:`translate3d(${r??s(e,this.options.direction)}%,0,0)`,transition:`all ${t}ms ${n}`}}};n(a,`options`,i),n(a,`status`,null),n(a,`pending`,[]),n(a,`isPaused`,!1),n(a,`trickleTimer`,void 0);const o=a;function s(e,t){return t===`rtl`?(1-e)*100:(-1+e)*100}function c(e,t,n){if(typeof t==`string`)n!==void 0&&(e.style[t]=n);else for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];r!==void 0&&(e.style[n]=r)}}export{o as progress};
@@ -5,8 +5,8 @@ import { SelectCompactProps, SelectCompactSlots, SelectItemEvent } from "./types
5
5
  declare const __VLS_export: <T extends DefinedValue = DefinedValue, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectCompactProps<T, M> & {
7
7
  onSelect?: ((event: SelectItemEvent<T>) => any) | undefined;
8
- "onUpdate:modelValue"?: ((value: M extends true ? T[] : T) => any) | undefined;
9
8
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
9
+ "onUpdate:modelValue"?: ((value: M extends true ? T[] : T) => any) | undefined;
10
10
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
11
11
  onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
12
12
  onCloseAutoFocus?: ((event: Event) => any) | undefined;
@@ -16,7 +16,7 @@ declare const __VLS_export: <T extends DefinedValue = DefinedValue, M extends bo
16
16
  expose: (exposed: {}) => void;
17
17
  attrs: any;
18
18
  slots: SelectCompactSlots<T, M>;
19
- emit: ((evt: "select", event: SelectItemEvent<T>) => void) & ((evt: "update:modelValue", value: M extends true ? T[] : T) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "closeAutoFocus", event: Event) => void);
19
+ emit: ((evt: "select", event: SelectItemEvent<T>) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: M extends true ? T[] : T) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "closeAutoFocus", event: Event) => void);
20
20
  }>) => import("vue").VNode & {
21
21
  __ctx?: Awaited<typeof __VLS_setup>;
22
22
  };
@@ -4,8 +4,8 @@ import { SelectRootProps } from "./types.js";
4
4
  //#region src/components/select/select-root.vue.d.ts
5
5
  declare const __VLS_export: <T extends DefinedValue, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectRootProps<T, M> & {
7
- "onUpdate:modelValue"?: ((value: M extends true ? T[] : T) => any) | undefined;
8
7
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
8
+ "onUpdate:modelValue"?: ((value: M extends true ? T[] : T) => any) | undefined;
9
9
  }> & (typeof globalThis extends {
10
10
  __VLS_PROPS_FALLBACK: infer P;
11
11
  } ? P : {});
@@ -17,7 +17,7 @@ declare const __VLS_export: <T extends DefinedValue, M extends boolean = false>(
17
17
  open: boolean;
18
18
  }) => any;
19
19
  };
20
- emit: ((evt: "update:modelValue", value: M extends true ? T[] : T) => void) & ((evt: "update:open", value: boolean) => void);
20
+ emit: ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: M extends true ? T[] : T) => void);
21
21
  }>) => import("vue").VNode & {
22
22
  __ctx?: Awaited<typeof __VLS_setup>;
23
23
  };
@@ -14,14 +14,14 @@ declare const __VLS_base: import("vue").DefineComponent<SliderRootProps, {}, {},
14
14
  "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
15
15
  onValueCommit?: ((value: number[]) => any) | undefined;
16
16
  }>, {
17
- disabled: boolean;
18
17
  dir: Direction;
18
+ disabled: boolean;
19
19
  max: number;
20
20
  min: number;
21
21
  orientation: DataOrientation;
22
22
  step: number;
23
- defaultValue: number[];
24
23
  modelValue: number[];
24
+ defaultValue: number[];
25
25
  inverted: boolean;
26
26
  minStepsBetweenThumbs: number;
27
27
  thumbAlignment: SliderThumbAlignment;
@@ -14,8 +14,8 @@ declare const __VLS_base: import("vue").DefineComponent<SplitterGroupProps, {},
14
14
  }>, {
15
15
  dir: Direction;
16
16
  direction: DataOrientation;
17
- defaultLayout: number[];
18
17
  keyboardResizeBy: number;
18
+ defaultLayout: number[];
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
@@ -33,9 +33,9 @@ declare const __VLS_base: import("vue").DefineComponent<SplitterPanelProps, {
33
33
  collapsible: boolean;
34
34
  order: number;
35
35
  defaultSize: number;
36
- collapsedSize: number;
37
- maxSize: number;
38
36
  minSize: number;
37
+ maxSize: number;
38
+ collapsedSize: number;
39
39
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
40
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
41
  declare const _default: typeof __VLS_export;
@@ -13,8 +13,8 @@ declare const __VLS_base: import("vue").DefineComponent<SplitterResizeHandleProp
13
13
  }, string, import("vue").PublicProps, Readonly<SplitterResizeHandleProps> & Readonly<{
14
14
  onDragging?: ((value: boolean) => any) | undefined;
15
15
  }>, {
16
- disabled: boolean;
17
16
  tabindex: number;
17
+ disabled: boolean;
18
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
20
  declare const _default: typeof __VLS_export;
@@ -37,8 +37,8 @@ declare const __VLS_base: import("vue").DefineComponent<StepperRootProps, {
37
37
  "onUpdate:modelValue"?: ((payload: number) => any) | undefined;
38
38
  }>, {
39
39
  orientation: DataOrientation;
40
- defaultValue: number;
41
40
  modelValue: number;
41
+ defaultValue: number;
42
42
  linear: boolean;
43
43
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
44
44
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -14,8 +14,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
14
14
  "onUpdate:modelValue"?: ((payload: DefinedValue | null) => any) | undefined;
15
15
  }>, {
16
16
  orientation: DataOrientation;
17
- modelValue: DefinedValue | null;
18
17
  loop: boolean;
18
+ modelValue: DefinedValue | null;
19
19
  activationMode: TabsActivationMode;
20
20
  unmountOnHide: boolean;
21
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -3,13 +3,13 @@ import { TagsInputCompactProps, TagsInputCompactSlots } from "./types.js";
3
3
  //#region src/components/tags-input/tags-input-compact.vue.d.ts
4
4
  type __VLS_Slots = TagsInputCompactSlots;
5
5
  declare const __VLS_base: import("vue").DefineComponent<TagsInputCompactProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
- invalid: (value: string) => any;
7
6
  "update:modelValue": (value: string[]) => any;
7
+ invalid: (value: string) => any;
8
8
  addTag: (value: string) => any;
9
9
  removeTag: (value: string) => any;
10
10
  }, string, import("vue").PublicProps, Readonly<TagsInputCompactProps> & Readonly<{
11
- onInvalid?: ((value: string) => any) | undefined;
12
11
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
12
+ onInvalid?: ((value: string) => any) | undefined;
13
13
  onAddTag?: ((value: string) => any) | undefined;
14
14
  onRemoveTag?: ((value: string) => any) | undefined;
15
15
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -9,19 +9,19 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_1) => any;
10
10
  };
11
11
  declare const __VLS_base: import("vue").DefineComponent<TagsInputRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- invalid: (value: string) => any;
13
12
  "update:modelValue": (value: string[]) => any;
13
+ invalid: (value: string) => any;
14
14
  addTag: (value: string) => any;
15
15
  removeTag: (value: string) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<TagsInputRootProps> & Readonly<{
17
- onInvalid?: ((value: string) => any) | undefined;
18
17
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
18
+ onInvalid?: ((value: string) => any) | undefined;
19
19
  onAddTag?: ((value: string) => any) | undefined;
20
20
  onRemoveTag?: ((value: string) => any) | undefined;
21
21
  }>, {
22
22
  max: number;
23
- defaultValue: string[];
24
23
  modelValue: string[];
24
+ defaultValue: string[];
25
25
  delimiter: string | RegExp;
26
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
27
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -10,14 +10,14 @@ declare const __VLS_base: import("vue").DefineComponent<TimeFieldRootProps, {},
10
10
  "onUpdate:modelValue"?: ((time: TimeValue | undefined) => any) | undefined;
11
11
  "onUpdate:placeholder"?: ((time: TimeValue) => any) | undefined;
12
12
  }>, {
13
- disabled: boolean;
14
13
  placeholder: TimeValue;
14
+ disabled: boolean;
15
15
  step: DateStep;
16
16
  defaultValue: TimeValue;
17
17
  defaultPlaceholder: TimeValue;
18
18
  readonly: boolean;
19
- granularity: TimeGranularity;
20
19
  hourCycle: 12 | 24;
20
+ granularity: TimeGranularity;
21
21
  hideTimeZone: boolean;
22
22
  isTimeUnavailable: TimeMatcher;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -14,14 +14,14 @@ declare const __VLS_base: import("vue").DefineComponent<TimeRangeFieldRootProps,
14
14
  "onUpdate:startValue"?: ((time: TimeValue | undefined) => any) | undefined;
15
15
  "onUpdate:endValue"?: ((time: TimeValue | undefined) => any) | undefined;
16
16
  }>, {
17
- disabled: boolean;
18
17
  placeholder: TimeValue;
18
+ disabled: boolean;
19
19
  step: DateStep;
20
20
  defaultValue: TimeRange;
21
21
  defaultPlaceholder: TimeValue;
22
22
  readonly: boolean;
23
- granularity: TimeGranularity;
24
23
  hourCycle: 12 | 24;
24
+ granularity: TimeGranularity;
25
25
  hideTimeZone: boolean;
26
26
  startName: string;
27
27
  endName: string;
@@ -1 +1 @@
1
- import{_defineProperty as e}from"../../_virtual/_@oxc-project_runtime@0.132.0/helpers/defineProperty.js";import{isVNode as t}from"vue";let n=1;const r=new class{constructor(){e(this,`subscribers`,void 0),e(this,`toasts`,void 0),e(this,`dismissed`,void 0),e(this,`subscribe`,e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)})),e(this,`publish`,e=>{this.subscribers.forEach(t=>t(e))}),e(this,`resetDismissed`,e=>{this.dismissed.has(e)&&this.dismissed.delete(e)}),e(this,`upsert`,e=>{let t=this.toasts.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.toasts=[...this.toasts,e];return}let n={...this.toasts[t],...e};this.publish(n),this.toasts=this.toasts.map((e,r)=>r===t?n:e)}),e(this,`create`,e=>{let{message:t,dismissible:n=!0,...r}=e,i=s(e.id);this.resetDismissed(i);let a={...r,id:i,dismissible:n,title:t};return this.upsert(a),i}),e(this,`dismiss`,e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,dismiss:!0})),e;this.toasts.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,dismiss:!0})})}),e(this,`message`,(e,t)=>this.create({...t,message:e,type:`default`})),e(this,`error`,(e,t)=>this.create({...t,message:e,type:`error`})),e(this,`success`,(e,t)=>this.create({...t,message:e,type:`success`})),e(this,`info`,(e,t)=>this.create({...t,message:e,type:`info`})),e(this,`warning`,(e,t)=>this.create({...t,message:e,type:`warning`})),e(this,`loading`,(e,t)=>this.create({...t,message:e,type:`loading`})),e(this,`custom`,(e,t)=>{let n=s(t?.id),r=t?.dismissible??!0;return this.resetDismissed(n),this.upsert({custom:e,dismissible:r,id:n,...t}),n}),e(this,`promise`,(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:`loading`,message:n.loading,description:typeof n.description==`function`?void 0:n.description}));let i=Promise.resolve(typeof e==`function`?e():e),a=r!==void 0,s,l=async(e,t,n,i)=>{a=!1;let{description:o,settings:s}=await c(t,n,i,r);this.create({id:r,type:e,description:o,...s})},u=i.then(async e=>{if(s=[`resolve`,e],t(e)){a=!1,this.create({id:r,type:`default`,message:e});return}if(o(e)&&!e.ok){await l(`error`,n.error,n.description,`HTTP error! status: ${e.status}`);return}if(e instanceof Error){await l(`error`,n.error,n.description,e);return}n.success!==void 0&&await l(`success`,n.success,n.description,e)}).catch(async e=>{s=[`reject`,e],n.error!==void 0&&await l(`error`,n.error,n.description,e)}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally?.()}),d=()=>new Promise((e,t)=>u.then(()=>s[0]===`reject`?t(s[1]):e(s[1])).catch(t));return typeof r!=`string`&&typeof r!=`number`?{unwrap:d}:Object.assign(r,{unwrap:d})}),e(this,`getActives`,()=>this.toasts.filter(e=>!this.dismissed.has(e.id))),this.subscribers=[],this.toasts=[],this.dismissed=new Set}},i=r.message,a=Object.assign(i,{success:r.success,info:r.info,warning:r.warning,error:r.error,custom:r.custom,message:r.message,promise:r.promise,dismiss:r.dismiss,loading:r.loading},{getHistory:()=>r.toasts,getToasts:()=>r.getActives()});function o(e){return typeof e==`object`&&!!e&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}function s(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:n++}async function c(e,t,n,r){let[i,a]=await Promise.all([l(e,n),l(t,n)]);return{description:a,settings:d(i,r)}}async function l(e,t){return typeof e==`function`?await e(t):e}function u(e){return typeof e==`object`&&!!e&&`message`in e}function d(e,t){return u(e)?e:{id:t??``,message:e??``}}export{r as ToastState,a as toast};
1
+ import{_defineProperty as e}from"../../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/defineProperty.js";import{isVNode as t}from"vue";let n=1;const r=new class{constructor(){e(this,`subscribers`,void 0),e(this,`toasts`,void 0),e(this,`dismissed`,void 0),e(this,`subscribe`,e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)})),e(this,`publish`,e=>{this.subscribers.forEach(t=>t(e))}),e(this,`resetDismissed`,e=>{this.dismissed.has(e)&&this.dismissed.delete(e)}),e(this,`upsert`,e=>{let t=this.toasts.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.toasts=[...this.toasts,e];return}let n={...this.toasts[t],...e};this.publish(n),this.toasts=this.toasts.map((e,r)=>r===t?n:e)}),e(this,`create`,e=>{let{message:t,dismissible:n=!0,...r}=e,i=s(e.id);this.resetDismissed(i);let a={...r,id:i,dismissible:n,title:t};return this.upsert(a),i}),e(this,`dismiss`,e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,dismiss:!0})),e;this.toasts.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,dismiss:!0})})}),e(this,`message`,(e,t)=>this.create({...t,message:e,type:`default`})),e(this,`error`,(e,t)=>this.create({...t,message:e,type:`error`})),e(this,`success`,(e,t)=>this.create({...t,message:e,type:`success`})),e(this,`info`,(e,t)=>this.create({...t,message:e,type:`info`})),e(this,`warning`,(e,t)=>this.create({...t,message:e,type:`warning`})),e(this,`loading`,(e,t)=>this.create({...t,message:e,type:`loading`})),e(this,`custom`,(e,t)=>{let n=s(t?.id),r=t?.dismissible??!0;return this.resetDismissed(n),this.upsert({custom:e,dismissible:r,id:n,...t}),n}),e(this,`promise`,(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:`loading`,message:n.loading,description:typeof n.description==`function`?void 0:n.description}));let i=Promise.resolve(typeof e==`function`?e():e),a=r!==void 0,s,l=async(e,t,n,i)=>{a=!1;let{description:o,settings:s}=await c(t,n,i,r);this.create({id:r,type:e,description:o,...s})},u=i.then(async e=>{if(s=[`resolve`,e],t(e)){a=!1,this.create({id:r,type:`default`,message:e});return}if(o(e)&&!e.ok){await l(`error`,n.error,n.description,`HTTP error! status: ${e.status}`);return}if(e instanceof Error){await l(`error`,n.error,n.description,e);return}n.success!==void 0&&await l(`success`,n.success,n.description,e)}).catch(async e=>{s=[`reject`,e],n.error!==void 0&&await l(`error`,n.error,n.description,e)}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally?.()}),d=()=>new Promise((e,t)=>u.then(()=>s[0]===`reject`?t(s[1]):e(s[1])).catch(t));return typeof r!=`string`&&typeof r!=`number`?{unwrap:d}:Object.assign(r,{unwrap:d})}),e(this,`getActives`,()=>this.toasts.filter(e=>!this.dismissed.has(e.id))),this.subscribers=[],this.toasts=[],this.dismissed=new Set}},i=r.message,a=Object.assign(i,{success:r.success,info:r.info,warning:r.warning,error:r.error,custom:r.custom,message:r.message,promise:r.promise,dismiss:r.dismiss,loading:r.loading},{getHistory:()=>r.toasts,getToasts:()=>r.getActives()});function o(e){return typeof e==`object`&&!!e&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}function s(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:n++}async function c(e,t,n,r){let[i,a]=await Promise.all([l(e,n),l(t,n)]);return{description:a,settings:d(i,r)}}async function l(e,t){return typeof e==`function`?await e(t):e}function u(e){return typeof e==`object`&&!!e&&`message`in e}function d(e,t){return u(e)?e:{id:t??``,message:e??``}}export{r as ToastState,a as toast};
@@ -1 +1 @@
1
- import e from"../_icon/icon.js";import t from"../button/button.js";import n from"../_common/dynamic-render.js";import{getDefaultSwipeDirections as r,getSwipeAmount as i,resetSwipeAmount as a,setSwipeAmount as o,toastCssVars as s}from"./shared.js";import{useToastUi as ee,useToasterContext as te}from"./context.js";import{Fragment as ne,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createVNode as p,defineComponent as m,mergeProps as h,onWatcherCleanup as re,openBlock as g,resolveDynamicComponent as _,shallowRef as v,unref as y,useTemplateRef as b,watch as x,watchEffect as ie,withCtx as S}from"vue";import{useDocumentVisibility as ae,useElementSize as oe,useMounted as se}from"@vueuse/core";const ce=[`dir`,`data-rich-color`,`data-inverted`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],C=m({name:`Toast`,__name:`toast`,props:{index:{},toast:{},position:{}},emits:[`update:height`,`remove`],setup(m,{emit:C}){let w=m,T=C,{dir:le,allToasts:ue,allHeights:E,gap:de,duration:D,visibleCounts:fe,defaultExpanded:O,swipeDirections:pe,interactingPosition:me,expandedPosition:k,showIcon:he,showClose:ge,icons:A,toastProps:_e,wrapperProps:ve,contentProps:ye,titleProps:be,descriptionProps:xe,iconProps:Se,footerProps:Ce,actionProps:we,cancelProps:Te,closeProps:Ee}=te(`Toast`),j=ee(),M=b(`toast`),De=b(`wrapper`),N=se(),{height:Oe}=oe(De),ke=ae(),P=v(null),F=v(null),I=v(!1),L=v(!1),R=v(!1),z=v(!1),B=v(0),V=v(0),H=v(w.toast.duration??D.value),U=v(null),W=v(0),G=v(0),K=v(null),q=c(()=>w.toast.type),J=c(()=>{if(he.value){if(w.toast.icon)return w.toast.icon;if(q.value&&q.value!==`default`)return A.value[q.value];if(w.toast.promise)return A.value.loading}}),Ae=c(()=>w.index===0),je=c(()=>w.index+1<=fe.value),Y=c(()=>q.value===`loading`),X=c(()=>w.toast.dismissible!==!1),Z=c(()=>Math.max(E.value[w.position].findIndex(e=>e.toastId===w.toast.id),0)),Me=c(()=>(w.toast.showClose||ge.value)&&X.value&&q.value!==`loading`),Ne=c(()=>w.toast.duration??D.value),Pe=c(()=>{let[e,t]=w.position.split(`-`);return{x:t,y:e}}),Fe=c(()=>E.value[w.position].reduce((e,t,n)=>n>=Z.value?e:e+t.height,0)),Q=c(()=>Z.value*de.value+Fe.value),Ie=c(()=>k.value===w.position||O.value&&N.value),Le=c(()=>({[s.index]:w.index,[s.beforeIndex]:w.index,[s.zIndex]:ue.value[w.position].length-w.index,[s.offset]:`${I.value?B.value:Q.value}px`,[s.initialHeight]:O.value?`auto`:`${V.value}px`})),$=()=>{I.value=!0,B.value=Q.value,window.setTimeout(()=>{T(`remove`,w.toast)},200)},Re=()=>{Y.value||!X.value||($(),w.toast.onDismiss?.(w.toast))},ze=e=>{e.button!==2&&(Y.value||!X.value||(U.value=new Date,B.value=Q.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(L.value=!0,K.value={x:e.clientX,y:e.clientY})))},Be=()=>{if(R.value||!X.value)return;K.value=null;let{x:e,y:t}=i(M.value),n=Date.now()-(U.value?.getTime()??Date.now()),r=P.value===`x`?e:t,o=Math.abs(r)/Math.max(n,1);if(Math.abs(r)>=45||o>.11){B.value=Q.value,w.toast.onDismiss?.(w.toast),P.value===`x`?F.value=e>0?`right`:`left`:F.value=t>0?`down`:`up`,$(),R.value=!0;return}a(M.value),z.value=!1,L.value=!1,P.value=null},Ve=e=>{if(!K.value||!X.value||(typeof window<`u`?window.getSelection()?.toString().length??0:0)>0)return;let t=e.clientY-K.value.y,n=e.clientX-K.value.x,i=pe.value??r(w.position);!P.value&&(Math.abs(n)>1||Math.abs(t)>1)&&(P.value=Math.abs(n)>Math.abs(t)?`x`:`y`);let a={x:0,y:0},s=e=>1/(1.5+Math.abs(e)/20);if(P.value===`y`){if(i.includes(`up`)||i.includes(`down`))if(i.includes(`up`)&&t<0||i.includes(`down`)&&t>0)a.y=t;else{let e=t*s(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}else if(P.value===`x`&&(i.includes(`left`)||i.includes(`right`)))if(i.includes(`left`)&&n<0||i.includes(`right`)&&n>0)a.x=n;else{let e=n*s(n);a.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(z.value=!0),o(M.value,a)},He=()=>{L.value=!1,P.value=null,K.value=null},Ue=e=>{w.toast.onAction?.(e),!e.defaultPrevented&&$()},We=e=>{w.toast.onCancel?.(e),X.value&&$()};function Ge(e){V.value=e,T(`update:height`,{toastId:w.toast.id,height:e,position:w.toast.position??w.position})}function Ke(){let e=M.value;if(!e)return;let t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,Ge(n)}return x(Ne,e=>{H.value=e},{immediate:!0}),x(Oe,e=>{N.value&&e&&Ke()},{flush:`post`}),x(()=>w.toast.delete,e=>{e&&($(),w.toast.onDismiss?.(w.toast))}),ie(()=>{let e=w.toast;if(e.type===`loading`||e.promise||e.duration===1/0)return;let t;k.value===w.position||me.value===w.position||ke.value===`hidden`?(()=>{if(G.value<W.value){let e=Date.now()-W.value;H.value-=e}G.value=Date.now()})():H.value!==1/0&&(W.value=Date.now(),t=setTimeout(()=>{w.toast.onAutoClose?.(w.toast),$()},H.value)),re(()=>{t!==void 0&&clearTimeout(t)})}),(r,i)=>(g(),d(`li`,h(y(_e),{ref:`toast`,"data-soybean-toast":``,class:[y(j).toast,m.toast.ui?.toast],dir:y(le),tabindex:`0`,"data-rich-color":m.toast.richColor,"data-inverted":m.toast.inverted,"data-mounted":y(N),"data-promise":!!m.toast.promise,"data-swiped":z.value,"data-removed":I.value,"data-visible":je.value,"data-y-position":Pe.value.y,"data-x-position":Pe.value.x,"data-index":m.index,"data-front":Ae.value,"data-swiping":L.value,"data-dismissible":X.value,"data-type":q.value,"data-swipe-out":R.value,"data-swipe-direction":F.value,"data-expanded":Ie.value,"data-testid":m.toast.testId,style:Le.value,onDragend:He,onPointerdown:ze,onPointerup:Be,onPointermove:Ve}),[f(`div`,h({ref:`wrapper`},y(ve),{class:[y(j).wrapper,m.toast.ui?.wrapper],"data-soybean-toast-wrapper":``}),[m.toast.custom?(g(),l(_(m.toast.custom),{key:0})):(g(),d(ne,{key:1},[f(`h3`,h(y(be),{class:[y(j).title,m.toast.ui?.title],"data-soybean-toast-title":``}),[J.value?(g(),l(e,h({key:0},y(Se),{icon:J.value,class:[y(j).icon,m.toast.ui?.icon]}),null,16,[`icon`,`class`])):u(`v-if`,!0),p(n,{is:m.toast.title},null,8,[`is`])],16),m.toast.description?(g(),d(`p`,h({key:0},y(xe),{class:[y(j).description,m.toast.ui?.description],"data-soybean-toast-description":``}),[p(n,{is:m.toast.description},null,8,[`is`])],16)):u(`v-if`,!0),m.toast.content?(g(),l(_(m.toast.content),h({key:1},y(ye),{class:[y(j).content,m.toast.ui?.content],"data-soybean-toast-content":``}),null,16,[`class`])):u(`v-if`,!0),m.toast.action||m.toast.cancel?(g(),d(`div`,h({key:2},y(Ce),{class:[y(j).footer,m.toast.ui?.footer],"data-soybean-toast-footer":``}),[m.toast.cancel?(g(),l(t,h({key:0},y(Te),{class:[y(j).cancel,m.toast.ui?.cancel],"data-soybean-toast-cancel":``,onClick:We}),{default:S(()=>[p(n,{is:m.toast.cancel},null,8,[`is`])]),_:1},16,[`class`])):u(`v-if`,!0),m.toast.action?(g(),l(t,h({key:1},y(we),{class:[y(j).action,m.toast.ui?.action],"data-soybean-toast-action":``,onClick:Ue}),{default:S(()=>[p(n,{is:m.toast.action},null,8,[`is`])]),_:1},16,[`class`])):u(`v-if`,!0)],16)):u(`v-if`,!0)],64))],16),Me.value&&y(A)?.close?(g(),l(t,h({key:0},y(Ee),{class:[y(j).close,m.toast.ui?.close],"data-soybean-toast-close":``,onClick:Re}),{default:S(()=>[p(e,{icon:y(A)?.close},null,8,[`icon`])]),_:1},16,[`class`])):u(`v-if`,!0)],16,ce))}});export{C as default};
1
+ import e from"../_icon/icon.js";import t from"../button/button.js";import n from"../_common/dynamic-render.js";import{getDefaultSwipeDirections as r,getSwipeAmount as i,resetSwipeAmount as a,setSwipeAmount as o,toastCssVars as s}from"./shared.js";import{useToastUi as ee,useToasterContext as te}from"./context.js";import{Fragment as ne,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createVNode as p,defineComponent as m,mergeProps as h,onWatcherCleanup as re,openBlock as g,resolveDynamicComponent as _,shallowRef as v,unref as y,useTemplateRef as b,watch as x,watchEffect as ie,withCtx as S}from"vue";import{useDocumentVisibility as ae,useElementSize as oe,useMounted as se}from"@vueuse/core";const ce=[`dir`,`data-rich-color`,`data-inverted`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],C=m({name:`Toast`,__name:`toast`,props:{index:{},toast:{},position:{}},emits:[`update:height`,`remove`],setup(m,{emit:C}){let w=m,T=C,{dir:le,allToasts:ue,allHeights:E,gap:de,duration:D,visibleCounts:fe,defaultExpanded:O,swipeDirections:pe,interactingPosition:me,expandedPosition:k,showIcon:he,showClose:ge,icons:A,toastProps:_e,wrapperProps:ve,contentProps:ye,titleProps:be,descriptionProps:xe,iconProps:Se,footerProps:Ce,actionProps:we,cancelProps:Te,closeProps:Ee}=te(`Toast`),j=ee(),M=b(`toast`),De=b(`wrapper`),N=se(),{height:Oe}=oe(De),ke=ae(),P=v(null),F=v(null),I=v(!1),L=v(!1),R=v(!1),z=v(!1),B=v(0),V=v(0),H=v(w.toast.duration??D.value),U=v(null),W=v(0),G=v(0),K=v(null),q=c(()=>w.toast.type),J=c(()=>{if(he.value){if(w.toast.icon)return w.toast.icon;if(q.value&&q.value!=="default")return A.value[q.value];if(w.toast.promise)return A.value.loading}}),Ae=c(()=>w.index===0),je=c(()=>w.index+1<=fe.value),Y=c(()=>q.value===`loading`),X=c(()=>w.toast.dismissible!==!1),Z=c(()=>Math.max(E.value[w.position].findIndex(e=>e.toastId===w.toast.id),0)),Me=c(()=>(w.toast.showClose||ge.value)&&X.value&&q.value!==`loading`),Ne=c(()=>w.toast.duration??D.value),Pe=c(()=>{let[e,t]=w.position.split(`-`);return{x:t,y:e}}),Fe=c(()=>E.value[w.position].reduce((e,t,n)=>n>=Z.value?e:e+t.height,0)),Q=c(()=>Z.value*de.value+Fe.value),Ie=c(()=>k.value===w.position||O.value&&N.value),Le=c(()=>({[s.index]:w.index,[s.beforeIndex]:w.index,[s.zIndex]:ue.value[w.position].length-w.index,[s.offset]:`${I.value?B.value:Q.value}px`,[s.initialHeight]:O.value?`auto`:`${V.value}px`})),$=()=>{I.value=!0,B.value=Q.value,window.setTimeout(()=>{T(`remove`,w.toast)},200)},Re=()=>{Y.value||!X.value||($(),w.toast.onDismiss?.(w.toast))},ze=e=>{e.button!==2&&(Y.value||!X.value||(U.value=new Date,B.value=Q.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(L.value=!0,K.value={x:e.clientX,y:e.clientY})))},Be=()=>{if(R.value||!X.value)return;K.value=null;let{x:e,y:t}=i(M.value),n=Date.now()-(U.value?.getTime()??Date.now()),r=P.value===`x`?e:t,o=Math.abs(r)/Math.max(n,1);if(Math.abs(r)>=45||o>.11){B.value=Q.value,w.toast.onDismiss?.(w.toast),P.value===`x`?F.value=e>0?`right`:`left`:F.value=t>0?`down`:`up`,$(),R.value=!0;return}a(M.value),z.value=!1,L.value=!1,P.value=null},Ve=e=>{if(!K.value||!X.value||(typeof window<`u`?window.getSelection()?.toString().length??0:0)>0)return;let t=e.clientY-K.value.y,n=e.clientX-K.value.x,i=pe.value??r(w.position);!P.value&&(Math.abs(n)>1||Math.abs(t)>1)&&(P.value=Math.abs(n)>Math.abs(t)?`x`:`y`);let a={x:0,y:0},s=e=>1/(1.5+Math.abs(e)/20);if(P.value===`y`){if(i.includes(`up`)||i.includes(`down`))if(i.includes(`up`)&&t<0||i.includes(`down`)&&t>0)a.y=t;else{let e=t*s(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}else if(P.value===`x`&&(i.includes(`left`)||i.includes(`right`)))if(i.includes(`left`)&&n<0||i.includes(`right`)&&n>0)a.x=n;else{let e=n*s(n);a.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(z.value=!0),o(M.value,a)},He=()=>{L.value=!1,P.value=null,K.value=null},Ue=e=>{w.toast.onAction?.(e),!e.defaultPrevented&&$()},We=e=>{w.toast.onCancel?.(e),X.value&&$()};function Ge(e){V.value=e,T(`update:height`,{toastId:w.toast.id,height:e,position:w.toast.position??w.position})}function Ke(){let e=M.value;if(!e)return;let t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,Ge(n)}return x(Ne,e=>{H.value=e},{immediate:!0}),x(Oe,e=>{N.value&&e&&Ke()},{flush:`post`}),x(()=>w.toast.delete,e=>{e&&($(),w.toast.onDismiss?.(w.toast))}),ie(()=>{let e=w.toast;if(e.type===`loading`||e.promise||e.duration===1/0)return;let t;k.value===w.position||me.value===w.position||ke.value===`hidden`?(()=>{if(G.value<W.value){let e=Date.now()-W.value;H.value-=e}G.value=Date.now()})():H.value!==1/0&&(W.value=Date.now(),t=setTimeout(()=>{w.toast.onAutoClose?.(w.toast),$()},H.value)),re(()=>{t!==void 0&&clearTimeout(t)})}),(r,i)=>(g(),d(`li`,h(y(_e),{ref:`toast`,"data-soybean-toast":``,class:[y(j).toast,m.toast.ui?.toast],dir:y(le),tabindex:`0`,"data-rich-color":m.toast.richColor,"data-inverted":m.toast.inverted,"data-mounted":y(N),"data-promise":!!m.toast.promise,"data-swiped":z.value,"data-removed":I.value,"data-visible":je.value,"data-y-position":Pe.value.y,"data-x-position":Pe.value.x,"data-index":m.index,"data-front":Ae.value,"data-swiping":L.value,"data-dismissible":X.value,"data-type":q.value,"data-swipe-out":R.value,"data-swipe-direction":F.value,"data-expanded":Ie.value,"data-testid":m.toast.testId,style:Le.value,onDragend:He,onPointerdown:ze,onPointerup:Be,onPointermove:Ve}),[f(`div`,h({ref:`wrapper`},y(ve),{class:[y(j).wrapper,m.toast.ui?.wrapper],"data-soybean-toast-wrapper":``}),[m.toast.custom?(g(),l(_(m.toast.custom),{key:0})):(g(),d(ne,{key:1},[f(`h3`,h(y(be),{class:[y(j).title,m.toast.ui?.title],"data-soybean-toast-title":``}),[J.value?(g(),l(e,h({key:0},y(Se),{icon:J.value,class:[y(j).icon,m.toast.ui?.icon]}),null,16,[`icon`,`class`])):u(`v-if`,!0),p(n,{is:m.toast.title},null,8,[`is`])],16),m.toast.description?(g(),d(`p`,h({key:0},y(xe),{class:[y(j).description,m.toast.ui?.description],"data-soybean-toast-description":``}),[p(n,{is:m.toast.description},null,8,[`is`])],16)):u(`v-if`,!0),m.toast.content?(g(),l(_(m.toast.content),h({key:1},y(ye),{class:[y(j).content,m.toast.ui?.content],"data-soybean-toast-content":``}),null,16,[`class`])):u(`v-if`,!0),m.toast.action||m.toast.cancel?(g(),d(`div`,h({key:2},y(Ce),{class:[y(j).footer,m.toast.ui?.footer],"data-soybean-toast-footer":``}),[m.toast.cancel?(g(),l(t,h({key:0},y(Te),{class:[y(j).cancel,m.toast.ui?.cancel],"data-soybean-toast-cancel":``,onClick:We}),{default:S(()=>[p(n,{is:m.toast.cancel},null,8,[`is`])]),_:1},16,[`class`])):u(`v-if`,!0),m.toast.action?(g(),l(t,h({key:1},y(we),{class:[y(j).action,m.toast.ui?.action],"data-soybean-toast-action":``,onClick:Ue}),{default:S(()=>[p(n,{is:m.toast.action},null,8,[`is`])]),_:1},16,[`class`])):u(`v-if`,!0)],16)):u(`v-if`,!0)],64))],16),Me.value&&y(A)?.close?(g(),l(t,h({key:0},y(Ee),{class:[y(j).close,m.toast.ui?.close],"data-soybean-toast-close":``,onClick:Re}),{default:S(()=>[p(e,{icon:y(A)?.close},null,8,[`icon`])]),_:1},16,[`class`])):u(`v-if`,!0)],16,ce))}});export{C as default};
@@ -9,9 +9,9 @@ declare const __VLS_base: import("vue").DefineComponent<ToasterProps, {}, {}, {}
9
9
  offset: ToastOffset;
10
10
  duration: number;
11
11
  gap: number;
12
+ position: ToastPosition;
12
13
  hotkey: string[];
13
14
  containerAriaLabel: string;
14
- position: ToastPosition;
15
15
  visibleCounts: number;
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
17
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -15,8 +15,8 @@ declare const __VLS_base: import("vue").DefineComponent<ToggleProps, {}, {}, {},
15
15
  }, string, import("vue").PublicProps, Readonly<ToggleProps> & Readonly<{
16
16
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
17
  }>, {
18
- defaultValue: boolean;
19
18
  modelValue: boolean;
19
+ defaultValue: boolean;
20
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
22
  declare const _default: typeof __VLS_export;
@@ -2,8 +2,8 @@ import { VisuallyHiddenFeature, VisuallyHiddenInputProps } from "./types.js";
2
2
 
3
3
  //#region src/components/visually-hidden/visually-hidden-input.vue.d.ts
4
4
  declare const __VLS_export: import("vue").DefineComponent<VisuallyHiddenInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VisuallyHiddenInputProps> & Readonly<{}>, {
5
- checked: boolean;
6
5
  feature: VisuallyHiddenFeature;
6
+ checked: boolean;
7
7
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
8
  declare const _default: typeof __VLS_export;
9
9
  //#endregion
@@ -12,6 +12,7 @@ import { useFocusGuards } from "./use-focus-guards.js";
12
12
  import { UseFocusScopeOptions, useFocusScope } from "./use-focus-scope.js";
13
13
  import { useForwardElement } from "./use-forward-element.js";
14
14
  import { useForwardListeners } from "./use-forward-listeners.js";
15
+ import { FuseOptions, UseFuseOptions, UseFuseReturn, useFuse } from "./use-fuse.js";
15
16
  import { UseGraceAreaOptions, useGraceArea } from "./use-grace-area.js";
16
17
  import { useHideOthers } from "./use-hide-others.js";
17
18
  import { useImageLoadingStatus } from "./use-image-loading-status.js";
@@ -24,4 +25,4 @@ import { useSelection } from "./use-selection.js";
24
25
  import { useStateMachine } from "./use-state-machine.js";
25
26
  import { useTypeahead } from "./use-typeahead.js";
26
27
  import { UseUiConsumer, useUiContext } from "./use-ui-context.js";
27
- export { CollectionItemData, UseDismissableLayerOptions, UseFloatingOptions, UseFloatingReturn, UseFocusScopeOptions, UseGraceAreaOptions, UsePopupEventsOptions, UseUiConsumer, kbdMap, useArrowNavigation, useBodyScrollLock, useBoolProp, useCollection, useContext, useControllableState, useDismissableLayer, useDismissableLayerBranch, useEscapeKeyDown, useExposedElement, useFloating, useFocusGuards, useFocusOutside, useFocusScope, useForwardElement, useForwardListeners, useGraceArea, useHideOthers, useImageLoadingStatus, useIsUsingKeyboard, useKbd, useOmitProps, usePickProps, usePointerdownOutside, usePopupEvents, usePresence, useSelection, useStateMachine, useTypeahead, useUiContext };
28
+ export { CollectionItemData, FuseOptions, UseDismissableLayerOptions, UseFloatingOptions, UseFloatingReturn, UseFocusScopeOptions, UseFuseOptions, UseFuseReturn, UseGraceAreaOptions, UsePopupEventsOptions, UseUiConsumer, kbdMap, useArrowNavigation, useBodyScrollLock, useBoolProp, useCollection, useContext, useControllableState, useDismissableLayer, useDismissableLayerBranch, useEscapeKeyDown, useExposedElement, useFloating, useFocusGuards, useFocusOutside, useFocusScope, useForwardElement, useForwardListeners, useFuse, useGraceArea, useHideOthers, useImageLoadingStatus, useIsUsingKeyboard, useKbd, useOmitProps, usePickProps, usePointerdownOutside, usePopupEvents, usePresence, useSelection, useStateMachine, useTypeahead, useUiContext };
@@ -1 +1 @@
1
- import{useArrowNavigation as e}from"./use-arrow-navigation.js";import{useContext as t}from"./use-context.js";import{useBodyScrollLock as n}from"./use-body-scroll-lock.js";import{useBoolProp as r}from"./use-bool-prop.js";import{useCollection as i}from"./use-collection.js";import{useControllableState as a}from"./use-controllable-state.js";import{useEscapeKeyDown as o}from"./use-escape-key-down.js";import{useDismissableLayer as s,useDismissableLayerBranch as c,useFocusOutside as l,usePointerdownOutside as u}from"./use-dismissable-layer.js";import{useForwardElement as d}from"./use-forward-element.js";import{useExposedElement as f}from"./use-exposed-element.js";import{useFloating as p}from"./use-floating.js";import{useFocusGuards as m}from"./use-focus-guards.js";import{useFocusScope as h}from"./use-focus-scope.js";import{useForwardListeners as g}from"./use-forward-listeners.js";import{useGraceArea as _}from"./use-grace-area.js";import{useHideOthers as v}from"./use-hide-others.js";import{useImageLoadingStatus as y}from"./use-image-loading-status.js";import{useIsUsingKeyboard as b}from"./use-is-using-keyboard.js";import{kbdMap as x,useKbd as S}from"./use-kbd.js";import{usePopupEvents as C}from"./use-popup-events.js";import{useStateMachine as w}from"./use-state-machine.js";import{usePresence as T}from"./use-presence.js";import{useOmitProps as E,usePickProps as D}from"./use-props.js";import{useSelection as O}from"./use-selection.js";import{useTypeahead as k}from"./use-typeahead.js";import{useUiContext as A}from"./use-ui-context.js";export{x as kbdMap,e as useArrowNavigation,n as useBodyScrollLock,r as useBoolProp,i as useCollection,t as useContext,a as useControllableState,s as useDismissableLayer,c as useDismissableLayerBranch,o as useEscapeKeyDown,f as useExposedElement,p as useFloating,m as useFocusGuards,l as useFocusOutside,h as useFocusScope,d as useForwardElement,g as useForwardListeners,_ as useGraceArea,v as useHideOthers,y as useImageLoadingStatus,b as useIsUsingKeyboard,S as useKbd,E as useOmitProps,D as usePickProps,u as usePointerdownOutside,C as usePopupEvents,T as usePresence,O as useSelection,w as useStateMachine,k as useTypeahead,A as useUiContext};
1
+ import{useArrowNavigation as e}from"./use-arrow-navigation.js";import{useContext as t}from"./use-context.js";import{useBodyScrollLock as n}from"./use-body-scroll-lock.js";import{useBoolProp as r}from"./use-bool-prop.js";import{useCollection as i}from"./use-collection.js";import{useControllableState as a}from"./use-controllable-state.js";import{useEscapeKeyDown as o}from"./use-escape-key-down.js";import{useDismissableLayer as s,useDismissableLayerBranch as c,useFocusOutside as l,usePointerdownOutside as u}from"./use-dismissable-layer.js";import{useForwardElement as d}from"./use-forward-element.js";import{useExposedElement as f}from"./use-exposed-element.js";import{useFloating as p}from"./use-floating.js";import{useFocusGuards as m}from"./use-focus-guards.js";import{useFocusScope as h}from"./use-focus-scope.js";import{useForwardListeners as g}from"./use-forward-listeners.js";import{useFuse as _}from"./use-fuse.js";import{useGraceArea as v}from"./use-grace-area.js";import{useHideOthers as y}from"./use-hide-others.js";import{useImageLoadingStatus as b}from"./use-image-loading-status.js";import{useIsUsingKeyboard as x}from"./use-is-using-keyboard.js";import{kbdMap as S,useKbd as C}from"./use-kbd.js";import{usePopupEvents as w}from"./use-popup-events.js";import{useStateMachine as T}from"./use-state-machine.js";import{usePresence as E}from"./use-presence.js";import{useOmitProps as D,usePickProps as O}from"./use-props.js";import{useSelection as k}from"./use-selection.js";import{useTypeahead as A}from"./use-typeahead.js";import{useUiContext as j}from"./use-ui-context.js";export{S as kbdMap,e as useArrowNavigation,n as useBodyScrollLock,r as useBoolProp,i as useCollection,t as useContext,a as useControllableState,s as useDismissableLayer,c as useDismissableLayerBranch,o as useEscapeKeyDown,f as useExposedElement,p as useFloating,m as useFocusGuards,l as useFocusOutside,h as useFocusScope,d as useForwardElement,g as useForwardListeners,_ as useFuse,v as useGraceArea,y as useHideOthers,b as useImageLoadingStatus,x as useIsUsingKeyboard,C as useKbd,D as useOmitProps,O as usePickProps,u as usePointerdownOutside,w as usePopupEvents,E as usePresence,k as useSelection,T as useStateMachine,A as useTypeahead,j as useUiContext};
@@ -0,0 +1,17 @@
1
+ import { ComputedRef, MaybeRefOrGetter, Ref } from "vue";
2
+ import Fuse, { FuseResult, IFuseOptions } from "fuse.js";
3
+
4
+ //#region src/composables/use-fuse.d.ts
5
+ type FuseOptions<T> = IFuseOptions<T>;
6
+ interface UseFuseOptions<T> {
7
+ fuseOptions?: FuseOptions<T>;
8
+ resultLimit?: number;
9
+ matchAllWhenSearchEmpty?: boolean;
10
+ }
11
+ interface UseFuseReturn<DataItem> {
12
+ fuse: Ref<Fuse<DataItem>>;
13
+ results: ComputedRef<FuseResult<DataItem>[]>;
14
+ }
15
+ declare function useFuse<DataItem>(search: MaybeRefOrGetter<string>, data: MaybeRefOrGetter<DataItem[]>, options?: MaybeRefOrGetter<UseFuseOptions<DataItem>>): UseFuseReturn<DataItem>;
16
+ //#endregion
17
+ export { FuseOptions, UseFuseOptions, UseFuseReturn, useFuse };
@@ -0,0 +1 @@
1
+ import{computed as e,shallowRef as t,toValue as n,watch as r}from"vue";import i from"fuse.js";function a(a,o,s){let c=()=>new i(n(o)??[],n(s)?.fuseOptions),l=t(c());return r(()=>n(s)?.fuseOptions,()=>{l.value=c()},{deep:!0}),r(()=>n(o),e=>{l.value.setCollection(e)},{deep:!0}),{fuse:l,results:e(()=>{let e=n(s);if(e?.matchAllWhenSearchEmpty&&!n(a))return n(o).map((e,t)=>({item:e,refIndex:t}));let t=e?.resultLimit;return l.value.search(n(a),t?{limit:t}:void 0)})}}export{a as useFuse};
@@ -1 +1 @@
1
- import{Comment as e,Fragment as t,computed as n,getCurrentInstance as r,toValue as i}from"vue";import{PatchFlags as a}from"@vue/shared";function o(e){return e||r()}function s(n){let r=[],i=0;for(let o=0;o<n.length;o++){let c=n[o];c.type===t?((c.patchFlag??0)===a.KEYED_FRAGMENT&&i++,r=r.concat(s(c.children))):c.type!==e&&r.push(c)}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=a.BAIL;return r}function c(e){let t=e?.$el??e;return t&&t.nodeType!==1&&(t=void 0),t}function l(e,t){return(t??Object.keys(e)).reduce((t,r)=>(t[r]=n(()=>typeof e[r]==`function`?e[r]():e[r]),t),{})}function u(e){return e?`classList`in e&&e.classList.contains(`form`):!0}const d=e=>{let t={};for(let n in e)t[n]=i(e[n]);return t},f=e=>!!e||e===``;export{c as getElFromTemplateRef,o as getLifeCycleTarget,d as getMergedRefsValue,s as getRawChildren,f as getVueBooleanCasting,u as isFormControl,l as transformPropsToContext};
1
+ import{Comment as e,Fragment as t,computed as n,getCurrentInstance as r,toValue as i}from"vue";const a={KEYED_FRAGMENT:128,BAIL:-2};function o(e){return e||r()}function s(n){let r=[],i=0;for(let o=0;o<n.length;o++){let c=n[o];c.type===t?((c.patchFlag??0)===a.KEYED_FRAGMENT&&i++,r=r.concat(s(c.children))):c.type!==e&&r.push(c)}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=a.BAIL;return r}function c(e){let t=e?.$el??e;return t&&t.nodeType!==1&&(t=void 0),t}function l(e,t){return(t??Object.keys(e)).reduce((t,r)=>(t[r]=n(()=>typeof e[r]==`function`?e[r]():e[r]),t),{})}function u(e){return e?`classList`in e&&e.classList.contains(`form`):!0}const d=e=>{let t={};for(let n in e)t[n]=i(e[n]);return t},f=e=>!!e||e===``;export{c as getElFromTemplateRef,o as getLifeCycleTarget,d as getMergedRefsValue,s as getRawChildren,f as getVueBooleanCasting,u as isFormControl,l as transformPropsToContext};