@enigmax/primitives 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
- import { c as SearchOptions, F as FuseConstructor, b as SearchMatch } from './search-DXxY8SEH.js';
2
+ import { c as SearchOptions, F as FuseConstructor, b as SearchMatch } from './search-BD9-5O5U.js';
3
3
  import { G as GeneratePasswordOptions, E as EstimateOptions, b as PasswordStrengthReport } from './password-C8lG4Zm9.js';
4
4
 
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { M as MarqueeHover, a as MarqueeInstance, b as MarqueeOptions, c as createMarquee } from './marquee-CJ3Uwy3E.js';
2
2
  export { I as InputAction, a as InputActionState, b as InputIcon, c as InputInstance, d as InputOptions, e as createInput } from './input-BwXjFenq.js';
3
- export { F as FuseConstructor, a as FuseLike, S as SearchInstance, b as SearchMatch, c as SearchOptions, d as createSearch, s as subsequenceMatcher } from './search-DXxY8SEH.js';
3
+ export { F as FuseConstructor, a as FuseLike, S as SearchInstance, b as SearchMatch, c as SearchOptions, d as createSearch, s as subsequenceMatcher } from './search-BD9-5O5U.js';
4
4
  export { B as ButtonCooldown, a as ButtonElement, b as ButtonInstance, c as ButtonOptions, d as ButtonState, e as createButton } from './button-CaXaqG_K.js';
5
5
  export { E as EstimateOptions, G as GeneratePasswordOptions, P as PasswordAlphabet, a as PasswordScore, b as PasswordStrengthReport, e as estimatePasswordStrength, g as generatePassword } from './password-C8lG4Zm9.js';
6
6
  export { N as Notification, a as NotificationAction, b as NotificationInput, c as NotificationTone, d as Notifications, e as NotificationsOptions, P as PromiseMessages, f as createNotifications } from './notifications-BpVV6sel.js';
@@ -1,17 +1,17 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ButtonProps } from '../react/button.js';
3
3
  export { UseMarqueeResult, useMarquee } from '../react/marquee.js';
4
4
  export { M as MarqueeHover, a as MarqueeInstance, b as MarqueeOptions } from '../marquee-CJ3Uwy3E.js';
5
5
  export { PasswordStrength, PasswordStrengthProps, UseButtonResult, UseInputResult, getLinkComponent, setLinkComponent, useButton, useInput } from '../react/index.js';
6
6
  export { UseSearchResult, useSearch } from '../react/search.js';
7
7
  export { I as InputAction, b as InputIcon, d as InputOptions } from '../input-BwXjFenq.js';
8
- export { F as FuseConstructor, a as FuseLike, S as SearchInstance, b as SearchMatch, c as SearchOptions } from '../search-DXxY8SEH.js';
8
+ export { F as FuseConstructor, a as FuseLike, S as SearchInstance, b as SearchMatch, c as SearchOptions } from '../search-BD9-5O5U.js';
9
9
  export { c as ButtonOptions, d as ButtonState } from '../button-CaXaqG_K.js';
10
- export { B as BreachChecker, a as BreachState, b as BreachStatus, F as FieldAction, I as Input, c as InputBaseProps, d as InputProps, e as InputType, P as PasswordOnlyProps, g as PlainOnlyProps, S as SearchOnlyProps } from '../index-dTdAbOWl.js';
10
+ export { B as BreachChecker, a as BreachState, b as BreachStatus, F as FieldAction, I as Input, c as InputBaseProps, d as InputProps, e as InputType, P as PasswordOnlyProps, g as PlainOnlyProps, S as SearchOnlyProps } from '../index-BHpOZncw.js';
11
11
  export { Slot, SlotProps, mergeSlotProps } from '../react/slot.js';
12
12
  export { E as EstimateOptions, G as GeneratePasswordOptions, a as PasswordScore, b as PasswordStrengthReport, e as estimatePasswordStrength, g as generatePassword } from '../password-C8lG4Zm9.js';
13
13
  export { UseNotificationsResult, createNotificationQueue, defaultQueue, useNotifications } from '../react/notifications.js';
14
- export { ToastControls, ToastPosition, Toaster, ToasterProps } from '../react/toast.js';
14
+ export { Action, ExternalToast, ToastClassnames, ToastT, Toaster, ToasterProps, toast, useSonner } from '../react/toast.js';
15
15
  export { useNetworkState } from '../react/network.js';
16
16
  export { a as NetworkState } from '../network-D2LsBG_k.js';
17
17
  export { RelativeTime, RelativeTimeProps } from '../react/relative-time.js';
@@ -39,6 +39,6 @@ export { R as RecentEntry, b as RecentStore, e as createRecentStore, g as groupR
39
39
  * Everything else is re-exported unchanged, so this can be the only import path in a Next
40
40
  * app rather than a second one to remember.
41
41
  */
42
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
42
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
43
43
 
44
44
  export { Button, ButtonProps };
@@ -2,7 +2,7 @@
2
2
  export { useInput } from '../chunk-U3V4EHOB.js';
3
3
  export { PasswordStrength } from '../chunk-XQHCZAPJ.js';
4
4
  export { Flag } from '../chunk-NPHRS2Q7.js';
5
- export { Toaster } from '../chunk-JCCL7XKC.js';
5
+ export { Toaster, toast, useSonner } from '../chunk-WPTBURIC.js';
6
6
  export { useMarquee } from '../chunk-ZWR2EXHQ.js';
7
7
  export { useSearch } from '../chunk-QQFNAKMY.js';
8
8
  export { useNetworkState } from '../chunk-S653GLSF.js';
@@ -1,4 +1,4 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
3
3
  import { c as ButtonOptions, d as ButtonState } from '../button-CaXaqG_K.js';
4
4
 
@@ -70,6 +70,6 @@ interface ButtonProps extends ButtonOptions, Omit<ComponentPropsWithoutRef<"butt
70
70
  */
71
71
  asChild?: boolean;
72
72
  }
73
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
73
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
74
74
 
75
75
  export { Button, type ButtonProps };
@@ -4,16 +4,16 @@ import { d as InputOptions } from '../input-BwXjFenq.js';
4
4
  export { I as InputAction, b as InputIcon } from '../input-BwXjFenq.js';
5
5
  import { RefObject, ElementType, ComponentPropsWithoutRef, ReactNode } from 'react';
6
6
  export { UseSearchResult, useSearch } from './search.js';
7
- export { F as FuseConstructor, a as FuseLike, S as SearchInstance, b as SearchMatch, c as SearchOptions } from '../search-DXxY8SEH.js';
7
+ export { F as FuseConstructor, a as FuseLike, S as SearchInstance, b as SearchMatch, c as SearchOptions } from '../search-BD9-5O5U.js';
8
8
  import { d as ButtonState, c as ButtonOptions } from '../button-CaXaqG_K.js';
9
9
  export { Button, ButtonProps } from './button.js';
10
- import { f as PasswordStrengthClassNames } from '../index-dTdAbOWl.js';
11
- export { B as BreachChecker, a as BreachState, b as BreachStatus, F as FieldAction, I as Input, c as InputBaseProps, d as InputProps, e as InputType, P as PasswordOnlyProps, g as PlainOnlyProps, S as SearchOnlyProps } from '../index-dTdAbOWl.js';
10
+ import { f as PasswordStrengthClassNames } from '../index-BHpOZncw.js';
11
+ export { B as BreachChecker, a as BreachState, b as BreachStatus, F as FieldAction, I as Input, c as InputBaseProps, d as InputProps, e as InputType, P as PasswordOnlyProps, g as PlainOnlyProps, S as SearchOnlyProps } from '../index-BHpOZncw.js';
12
12
  import { b as PasswordStrengthReport } from '../password-C8lG4Zm9.js';
13
13
  export { E as EstimateOptions, G as GeneratePasswordOptions, a as PasswordScore, e as estimatePasswordStrength, g as generatePassword } from '../password-C8lG4Zm9.js';
14
14
  export { Slot, SlotProps, mergeSlotProps } from './slot.js';
15
15
  export { UseNotificationsResult, createNotificationQueue, defaultQueue, useNotifications } from './notifications.js';
16
- export { ToastControls, ToastPosition, Toaster, ToasterProps } from './toast.js';
16
+ export { Action, ExternalToast, ToastClassnames, ToastT, Toaster, ToasterProps, toast, useSonner } from './toast.js';
17
17
  export { useNetworkState } from './network.js';
18
18
  export { a as NetworkState } from '../network-D2LsBG_k.js';
19
19
  export { RelativeTime, RelativeTimeProps } from './relative-time.js';
@@ -2,7 +2,7 @@
2
2
  export { useInput } from '../chunk-U3V4EHOB.js';
3
3
  export { PasswordStrength } from '../chunk-XQHCZAPJ.js';
4
4
  export { Flag } from '../chunk-NPHRS2Q7.js';
5
- export { Toaster } from '../chunk-JCCL7XKC.js';
5
+ export { Toaster, toast, useSonner } from '../chunk-WPTBURIC.js';
6
6
  export { useMarquee } from '../chunk-ZWR2EXHQ.js';
7
7
  export { useSearch } from '../chunk-QQFNAKMY.js';
8
8
  export { useNetworkState } from '../chunk-S653GLSF.js';
@@ -1,4 +1,4 @@
1
- export { B as BreachChecker, a as BreachState, b as BreachStatus, F as FieldAction, I as Input, c as InputBaseProps, d as InputProps, e as InputType, P as PasswordOnlyProps, g as PlainOnlyProps, S as SearchOnlyProps } from '../index-dTdAbOWl.js';
1
+ export { B as BreachChecker, a as BreachState, b as BreachStatus, F as FieldAction, I as Input, c as InputBaseProps, d as InputProps, e as InputType, P as PasswordOnlyProps, g as PlainOnlyProps, S as SearchOnlyProps } from '../index-BHpOZncw.js';
2
2
  import 'react';
3
- import '../search-DXxY8SEH.js';
3
+ import '../search-BD9-5O5U.js';
4
4
  import '../password-C8lG4Zm9.js';
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { b as SearchMatch, c as SearchOptions } from '../search-DXxY8SEH.js';
2
+ import { b as SearchMatch, c as SearchOptions } from '../search-BD9-5O5U.js';
3
3
  import { R as RecentEntry } from '../palette-D7iuQh_T.js';
4
4
 
5
5
  /** One line in the palette, whatever it came from. */
@@ -1,5 +1,5 @@
1
1
  import { RefObject } from 'react';
2
- import { b as SearchMatch, c as SearchOptions } from '../search-DXxY8SEH.js';
2
+ import { b as SearchMatch, c as SearchOptions } from '../search-BD9-5O5U.js';
3
3
 
4
4
  interface UseSearchResult<T> {
5
5
  /** Attach to the search field, or drive it yourself with `search`. */
@@ -1,4 +1,4 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
3
 
4
4
  /**
@@ -42,6 +42,6 @@ interface SlotProps extends Props {
42
42
  * papering over: `asChild` with two children has no answer to "which one gets the
43
43
  * behaviour", and rendering nothing would be a blank space nobody can debug.
44
44
  */
45
- declare const Slot: react.ForwardRefExoticComponent<Omit<SlotProps, "ref"> & react.RefAttributes<HTMLElement>>;
45
+ declare const Slot: React.ForwardRefExoticComponent<Omit<SlotProps, "ref"> & React.RefAttributes<HTMLElement>>;
46
46
 
47
47
  export { Slot, type SlotProps, mergeSlotProps };
@@ -1,41 +1,174 @@
1
- import { d as Notifications, N as Notification } from '../notifications-BpVV6sel.js';
2
- export { a as NotificationAction, b as NotificationInput, c as NotificationTone } from '../notifications-BpVV6sel.js';
3
- import { ReactNode, CSSProperties } from 'react';
1
+ import { d as Notifications } from '../notifications-BpVV6sel.js';
2
+ export { N as Notification, a as NotificationAction, b as NotificationInput, c as NotificationTone } from '../notifications-BpVV6sel.js';
3
+ import React__default, { ReactNode } from 'react';
4
4
  export { createNotificationQueue, defaultQueue, useNotifications } from './notifications.js';
5
5
 
6
- type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
7
- interface ToasterProps {
8
- /** Which queue to render. The shared one by default. */
9
- queue?: Notifications;
10
- position?: ToastPosition;
6
+ type ToastTypes = "normal" | "action" | "success" | "info" | "warning" | "error" | "loading" | "default";
7
+ type PromiseT<Data = any> = Promise<Data> | (() => Promise<Data>);
8
+ type PromiseTResult<Data = any> = string | React__default.ReactNode | ((data: Data) => React__default.ReactNode | string | Promise<React__default.ReactNode | string>);
9
+ type PromiseExternalToast = Omit<ExternalToast, "description">;
10
+ type PromiseData<ToastData = any> = PromiseExternalToast & {
11
+ loading?: string | React__default.ReactNode;
12
+ success?: PromiseTResult<ToastData>;
13
+ error?: PromiseTResult;
14
+ description?: PromiseTResult;
15
+ finally?: () => void | Promise<void>;
16
+ };
17
+ interface ToastClassnames {
18
+ toast?: string;
19
+ title?: string;
20
+ description?: string;
21
+ loader?: string;
22
+ closeButton?: string;
23
+ cancelButton?: string;
24
+ actionButton?: string;
25
+ success?: string;
26
+ error?: string;
27
+ info?: string;
28
+ warning?: string;
29
+ loading?: string;
30
+ default?: string;
31
+ content?: string;
32
+ icon?: string;
33
+ }
34
+ interface ToastIcons {
35
+ success?: React__default.ReactNode;
36
+ info?: React__default.ReactNode;
37
+ warning?: React__default.ReactNode;
38
+ error?: React__default.ReactNode;
39
+ loading?: React__default.ReactNode;
40
+ close?: React__default.ReactNode;
41
+ }
42
+ interface Action {
43
+ label: React__default.ReactNode;
44
+ onClick: (event: React__default.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
45
+ actionButtonStyle?: React__default.CSSProperties;
46
+ }
47
+ interface ToastT {
48
+ id: number | string;
49
+ title?: (() => React__default.ReactNode) | React__default.ReactNode;
50
+ type?: ToastTypes;
51
+ icon?: React__default.ReactNode;
52
+ jsx?: React__default.ReactNode;
53
+ richColors?: boolean;
54
+ invert?: boolean;
55
+ closeButton?: boolean;
56
+ dismissible?: boolean;
57
+ description?: (() => React__default.ReactNode) | React__default.ReactNode;
58
+ duration?: number;
59
+ delete?: boolean;
60
+ action?: Action | React__default.ReactNode;
61
+ cancel?: Action | React__default.ReactNode;
62
+ onDismiss?: (toast: ToastT) => void;
63
+ onAutoClose?: (toast: ToastT) => void;
64
+ promise?: PromiseT;
65
+ cancelButtonStyle?: React__default.CSSProperties;
66
+ actionButtonStyle?: React__default.CSSProperties;
67
+ style?: React__default.CSSProperties;
68
+ unstyled?: boolean;
69
+ className?: string;
70
+ classNames?: ToastClassnames;
71
+ descriptionClassName?: string;
72
+ position?: Position;
73
+ }
74
+ type Position = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center";
75
+ interface ToastOptions {
76
+ className?: string;
77
+ closeButton?: boolean;
78
+ descriptionClassName?: string;
79
+ style?: React__default.CSSProperties;
80
+ cancelButtonStyle?: React__default.CSSProperties;
81
+ actionButtonStyle?: React__default.CSSProperties;
82
+ duration?: number;
83
+ unstyled?: boolean;
84
+ classNames?: ToastClassnames;
85
+ }
86
+ type Offset = {
87
+ top?: string | number;
88
+ right?: string | number;
89
+ bottom?: string | number;
90
+ left?: string | number;
91
+ } | string | number;
92
+ interface ToasterProps$1 {
93
+ invert?: boolean;
94
+ theme?: "light" | "dark" | "system";
95
+ position?: Position;
96
+ hotkey?: string[];
97
+ richColors?: boolean;
98
+ expand?: boolean;
99
+ duration?: number;
100
+ gap?: number;
101
+ visibleToasts?: number;
102
+ closeButton?: boolean;
103
+ toastOptions?: ToastOptions;
104
+ className?: string;
105
+ style?: React__default.CSSProperties;
106
+ offset?: Offset;
107
+ mobileOffset?: Offset;
108
+ dir?: "rtl" | "ltr" | "auto";
109
+ swipeDirections?: SwipeDirection[];
11
110
  /**
12
- * How long the exit animation lasts, in ms. The node stays mounted for exactly this
13
- * long after it leaves the queue - a toast that vanishes the instant it is dismissed
14
- * cannot animate out, and that is the only reason this component keeps its own list.
111
+ * @deprecated Please use the `icons` prop instead:
112
+ * ```jsx
113
+ * <Toaster
114
+ * icons={{ loading: <LoadingIcon /> }}
115
+ * />
116
+ * ```
15
117
  */
16
- exitDuration?: number;
17
- /** Px a toast must travel before the release dismisses it. */
18
- swipeThreshold?: number;
19
- /** Render a toast yourself. The default renders title, body and the action. */
20
- children?: (notification: Notification, controls: ToastControls) => ReactNode;
21
- /** How many toasts are drawn at once. The rest wait behind them. Default 3. */
22
- visibleCount?: number;
23
- /** Fan the stack out permanently, instead of only while the pointer is on it. */
24
- expand?: boolean;
118
+ loadingIcon?: React__default.ReactNode;
119
+ icons?: ToastIcons;
120
+ containerAriaLabel?: string;
121
+ pauseWhenPageIsHidden?: boolean;
122
+ }
123
+ type SwipeDirection = "top" | "right" | "bottom" | "left";
124
+ interface ToastToDismiss {
125
+ id: number | string;
126
+ dismiss: boolean;
127
+ }
128
+ type ExternalToast = Omit<ToastT, "id" | "type" | "title" | "jsx" | "delete" | "promise"> & {
129
+ id?: number | string;
130
+ };
131
+
132
+ type titleT = (() => React__default.ReactNode) | React__default.ReactNode;
133
+ declare const toast: ((message: titleT, data?: ExternalToast) => string | number) & {
134
+ success: (message: titleT | React__default.ReactNode, data?: ExternalToast) => string | number;
135
+ info: (message: titleT | React__default.ReactNode, data?: ExternalToast) => string | number;
136
+ warning: (message: titleT | React__default.ReactNode, data?: ExternalToast) => string | number;
137
+ error: (message: titleT | React__default.ReactNode, data?: ExternalToast) => string | number;
138
+ custom: (jsx: (id: number | string) => React__default.ReactElement, data?: ExternalToast) => string | number;
139
+ message: (message: titleT | React__default.ReactNode, data?: ExternalToast) => string | number;
140
+ promise: <ToastData>(promise: PromiseT<ToastData>, data?: PromiseData<ToastData> | undefined) => (string & {
141
+ unwrap: () => Promise<ToastData>;
142
+ }) | (number & {
143
+ unwrap: () => Promise<ToastData>;
144
+ }) | {
145
+ unwrap: () => Promise<ToastData>;
146
+ } | undefined;
147
+ dismiss: (id?: number | string) => string | number | undefined;
148
+ loading: (message: titleT | React__default.ReactNode, data?: ExternalToast) => string | number;
149
+ } & {
150
+ getHistory: () => (ToastT | ToastToDismiss)[];
151
+ };
152
+
153
+ declare function useSonner(): {
154
+ toasts: ToastT[];
155
+ };
156
+
157
+ interface ToasterProps extends ToasterProps$1 {
25
158
  /**
26
- * Inject the theme. On by default - see the note above; `false` leaves the markup
27
- * unstyled for your own stylesheet, and `@enigmax/primitives/toast.css` is the same
28
- * sheet if you would rather import it.
159
+ * Inject the stylesheet. On by default - see the note above. `false` leaves the markup
160
+ * bare for a theme of your own.
29
161
  */
30
162
  styles?: boolean;
31
- /** Accessible name for the region. */
32
- label?: string;
33
- className?: string;
34
- style?: CSSProperties;
35
- }
36
- interface ToastControls {
37
- dismiss: () => void;
163
+ /**
164
+ * A notification QUEUE to render, alongside anything raised with `toast()`.
165
+ *
166
+ * This is the bridge for `useNotifications().notify()`, which predates the vendored
167
+ * component: everything already written against the queue keeps working, and both APIs
168
+ * end up in one stack rather than in two competing ones. `null` unsubscribes.
169
+ */
170
+ queue?: Notifications | null;
38
171
  }
39
- declare function Toaster({ queue, position, exitDuration, swipeThreshold, visibleCount, expand, styles: withStyles, children, label, className, style }: ToasterProps): ReactNode;
172
+ declare function Toaster({ styles, queue, ...props }: ToasterProps): ReactNode;
40
173
 
41
- export { Notification, Notifications, type ToastControls, type ToastPosition, Toaster, type ToasterProps };
174
+ export { type Action, type ExternalToast, Notifications, type ToastClassnames, type ToastT, Toaster, type ToasterProps, toast, useSonner };
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- export { Toaster } from '../chunk-JCCL7XKC.js';
2
+ export { Toaster, toast, useSonner } from '../chunk-WPTBURIC.js';
3
3
  export { createNotificationQueue, defaultQueue, useNotifications } from '../chunk-QYMUIW5I.js';
4
4
  import '../chunk-SNYUBXWQ.js';
@@ -1,17 +1,17 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ButtonProps } from '../react/button.js';
3
3
  export { UseMarqueeResult, useMarquee } from '../react/marquee.js';
4
4
  export { M as MarqueeHover, a as MarqueeInstance, b as MarqueeOptions } from '../marquee-CJ3Uwy3E.js';
5
5
  export { PasswordStrength, PasswordStrengthProps, UseButtonResult, UseInputResult, getLinkComponent, setLinkComponent, useButton, useInput } from '../react/index.js';
6
6
  export { UseSearchResult, useSearch } from '../react/search.js';
7
7
  export { I as InputAction, b as InputIcon, d as InputOptions } from '../input-BwXjFenq.js';
8
- export { F as FuseConstructor, a as FuseLike, S as SearchInstance, b as SearchMatch, c as SearchOptions } from '../search-DXxY8SEH.js';
8
+ export { F as FuseConstructor, a as FuseLike, S as SearchInstance, b as SearchMatch, c as SearchOptions } from '../search-BD9-5O5U.js';
9
9
  export { c as ButtonOptions, d as ButtonState } from '../button-CaXaqG_K.js';
10
- export { B as BreachChecker, a as BreachState, b as BreachStatus, F as FieldAction, I as Input, c as InputBaseProps, d as InputProps, e as InputType, P as PasswordOnlyProps, g as PlainOnlyProps, S as SearchOnlyProps } from '../index-dTdAbOWl.js';
10
+ export { B as BreachChecker, a as BreachState, b as BreachStatus, F as FieldAction, I as Input, c as InputBaseProps, d as InputProps, e as InputType, P as PasswordOnlyProps, g as PlainOnlyProps, S as SearchOnlyProps } from '../index-BHpOZncw.js';
11
11
  export { Slot, SlotProps, mergeSlotProps } from '../react/slot.js';
12
12
  export { E as EstimateOptions, G as GeneratePasswordOptions, a as PasswordScore, b as PasswordStrengthReport, e as estimatePasswordStrength, g as generatePassword } from '../password-C8lG4Zm9.js';
13
13
  export { UseNotificationsResult, createNotificationQueue, defaultQueue, useNotifications } from '../react/notifications.js';
14
- export { ToastControls, ToastPosition, Toaster, ToasterProps } from '../react/toast.js';
14
+ export { Action, ExternalToast, ToastClassnames, ToastT, Toaster, ToasterProps, toast, useSonner } from '../react/toast.js';
15
15
  export { useNetworkState } from '../react/network.js';
16
16
  export { a as NetworkState } from '../network-D2LsBG_k.js';
17
17
  export { RelativeTime, RelativeTimeProps } from '../react/relative-time.js';
@@ -22,6 +22,6 @@ export { c as FlagFormat, d as FlagOptions, e as FlagShape, f as FlagSource, h a
22
22
  export { PaletteContent, PaletteContextValue, PaletteField, PaletteFooter, PaletteItem, PaletteList, PaletteListProps, PaletteRoot, PaletteRootProps, PaletteRow, PaletteSection, PaletteTrigger, SearchPalette, SearchPaletteProps, usePaletteContext } from '../react/palette.js';
23
23
  export { R as RecentEntry, b as RecentStore, e as createRecentStore, g as groupRows, i as isPaletteShortcut, m as moveActive, r as recentKey, s as shortcutLabel } from '../palette-D7iuQh_T.js';
24
24
 
25
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLElement>>;
25
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
26
26
 
27
27
  export { Button, ButtonProps };
@@ -2,7 +2,7 @@
2
2
  export { useInput } from '../chunk-U3V4EHOB.js';
3
3
  export { PasswordStrength } from '../chunk-XQHCZAPJ.js';
4
4
  export { Flag } from '../chunk-NPHRS2Q7.js';
5
- export { Toaster } from '../chunk-JCCL7XKC.js';
5
+ export { Toaster, toast, useSonner } from '../chunk-WPTBURIC.js';
6
6
  export { useMarquee } from '../chunk-ZWR2EXHQ.js';
7
7
  export { useSearch } from '../chunk-QQFNAKMY.js';
8
8
  export { useNetworkState } from '../chunk-S653GLSF.js';
@@ -1,5 +1,5 @@
1
- import { c as SearchOptions, S as SearchInstance } from '../search-DXxY8SEH.js';
2
- export { b as SearchMatch } from '../search-DXxY8SEH.js';
1
+ import { c as SearchOptions, S as SearchInstance } from '../search-BD9-5O5U.js';
2
+ export { b as SearchMatch } from '../search-BD9-5O5U.js';
3
3
 
4
4
  /**
5
5
  * Search with Fuse.js already wired: the batteries-included entry point.
@@ -17,10 +17,15 @@ interface SearchMatch<T> {
17
17
  }
18
18
  /** The shape of Fuse's constructor, declared here so the package need not depend on it. */
19
19
  interface FuseLike<T> {
20
- search(query: string): {
20
+ /**
21
+ * Readonly arrays, because Fuse's own signature returns them - and a mutable array is
22
+ * not assignable to one, so the stricter shape made `fuse={Fuse}` a type error at the
23
+ * call site while working perfectly at runtime.
24
+ */
25
+ search(query: string): readonly {
21
26
  item: T;
22
27
  score?: number;
23
- matches?: {
28
+ matches?: readonly {
24
29
  key?: string;
25
30
  }[];
26
31
  }[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/primitives",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Headless components: the behaviour, the timing and the accessibility, with no styles of their own. Framework-agnostic core plus thin adapters.",
5
5
  "type": "module",
6
6
  "sideEffects": [