@fluentui/react-toast 0.0.0-nightly-20250904-0406.1 → 0.0.0-nightly-20250909-0406.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,30 +1,49 @@
1
1
  # Change Log - @fluentui/react-toast
2
2
 
3
- This log was last generated on Thu, 04 Sep 2025 04:20:58 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 09 Sep 2025 04:21:59 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20250904-0406.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v0.0.0-nightly-20250904-0406.1)
7
+ ## [0.0.0-nightly-20250909-0406.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v0.0.0-nightly-20250909-0406.1)
8
8
 
9
- Thu, 04 Sep 2025 04:20:58 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.7.0..@fluentui/react-toast_v0.0.0-nightly-20250904-0406.1)
9
+ Tue, 09 Sep 2025 04:21:59 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.7.1..@fluentui/react-toast_v0.0.0-nightly-20250909-0406.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
16
- - Bump @fluentui/react-aria to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
17
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
18
- - Bump @fluentui/react-motion to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
19
- - Bump @fluentui/react-motion-components-preview to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
20
- - Bump @fluentui/react-portal to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
21
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
22
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
23
- - Bump @fluentui/react-theme to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
24
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
25
- - Bump @fluentui/react-provider to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
26
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
27
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250904-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b60e3a055982c03e92401325534a8b860a8bc5d2) by beachball)
15
+ - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
16
+ - Bump @fluentui/react-aria to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
18
+ - Bump @fluentui/react-motion to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
19
+ - Bump @fluentui/react-motion-components-preview to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
20
+ - Bump @fluentui/react-portal to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
21
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
22
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
23
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
24
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
25
+ - Bump @fluentui/react-provider to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
26
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
27
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250909-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/ef19c788fbd03f0a4fde7dac69aff4982e00d493) by beachball)
28
+
29
+ ## [9.7.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.7.1)
30
+
31
+ Mon, 08 Sep 2025 12:50:49 GMT
32
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.7.0..@fluentui/react-toast_v9.7.1)
33
+
34
+ ### Patches
35
+
36
+ - chore: enforce explicit module boundary types ([PR #35080](https://github.com/microsoft/fluentui/pull/35080) by dmytrokirpa@microsoft.com)
37
+ - chore: extend peer dependencies versions to support React 19 ([PR #35145](https://github.com/microsoft/fluentui/pull/35145) by dmytrokirpa@microsoft.com)
38
+ - fix: react 19 type issues ([PR #34864](https://github.com/microsoft/fluentui/pull/34864) by dmytrokirpa@microsoft.com)
39
+ - Bump @fluentui/react-aria to v9.17.0 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
40
+ - Bump @fluentui/react-jsx-runtime to v9.2.0 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
41
+ - Bump @fluentui/react-motion to v9.10.4 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
42
+ - Bump @fluentui/react-motion-components-preview to v0.10.0 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
43
+ - Bump @fluentui/react-portal to v9.8.2 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
44
+ - Bump @fluentui/react-shared-contexts to v9.25.1 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
45
+ - Bump @fluentui/react-tabster to v9.26.5 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
46
+ - Bump @fluentui/react-utilities to v9.24.1 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
28
47
 
29
48
  ## [9.7.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.7.0)
30
49
 
package/dist/index.d.ts CHANGED
@@ -104,7 +104,7 @@ declare interface Toast_2<TData = object> extends ToastOptions<TData> {
104
104
  * Simple counter of toasts dispatched.
105
105
  */
106
106
  order: number;
107
- imperativeRef: React_2.RefObject<ToastImperativeRef>;
107
+ imperativeRef: React_2.RefObject<ToastImperativeRef | null>;
108
108
  }
109
109
 
110
110
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/state/types.ts"],"sourcesContent":["import type { Slot } from '@fluentui/react-utilities';\nimport { EVENTS } from './constants';\nimport * as React from 'react';\n\nexport type ToastId = string;\nexport type ToasterId = string;\n\nexport type ToastPosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start' | 'top' | 'bottom';\nexport type ToastPoliteness = 'assertive' | 'polite';\nexport type ToastStatus = 'queued' | 'visible' | 'dismissed' | 'unmounted';\nexport type ToastIntent = 'info' | 'success' | 'error' | 'warning';\nexport type ToastChangeHandler = (event: null, data: ToastChangeData) => void;\n\nexport interface ToastChangeData extends ToastOptions, Pick<Toast, 'updateId'> {\n status: ToastStatus;\n}\n\nexport interface ToastOptions<TData = object> {\n /**\n * Uniquely identifies a toast, used for update and dismiss operations\n */\n toastId: ToastId;\n /**\n * The position the toast should render to\n */\n position: ToastPosition;\n /**\n * Toast content\n */\n content: unknown;\n /**\n * Auto dismiss timeout in milliseconds\n * @default 3000\n */\n timeout: number;\n /**\n * Toast timeout pauses while focus is on another window\n * @default false\n */\n pauseOnWindowBlur: boolean;\n /**\n * Toast timeout pauses while user cursor is on the toast\n * @default false\n */\n pauseOnHover: boolean;\n /**\n * Toast belongs to a specific toaster\n */\n toasterId: ToasterId | undefined;\n /**\n * Higher priority toasts will be rendered before lower priority toasts\n */\n priority: number;\n /**\n * Used to determine [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration\n * This will override the intent prop\n */\n politeness?: ToastPoliteness;\n\n /**\n * Default toast types that determine the urgency or [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration\n * The UI layer may use these intents to apply specific styling.\n * @default info\n */\n intent?: ToastIntent;\n /**\n * Additional data that needs to be passed to the toast\n */\n data: TData;\n\n /**\n * Reports changes to the Toast lifecycle\n */\n onStatusChange: ToastChangeHandler | undefined;\n}\n\nexport interface ToastOffsetObject {\n horizontal?: number;\n vertical?: number;\n}\n\nexport type ToastOffset = Partial<Record<ToastPosition, ToastOffsetObject>> | ToastOffsetObject;\n\nexport interface ToasterShortcuts {\n focus: (e: KeyboardEvent) => boolean;\n}\n\nexport interface ToasterOptions\n extends Pick<ToastOptions, 'position' | 'timeout' | 'pauseOnWindowBlur' | 'pauseOnHover' | 'priority'> {\n offset?: ToastOffset;\n toasterId?: ToasterId;\n limit?: number;\n shortcuts?: ToasterShortcuts;\n}\n\nexport interface Toast<TData = object> extends ToastOptions<TData> {\n /**\n * Determines the visiblity of a toast\n */\n close: () => void;\n /**\n * Removes a toast completely\n */\n remove: () => void;\n /**\n * A number used to track updates immutably\n */\n updateId: number;\n /**\n * Used to determine default priority when the user does not set one\n * Simple counter of toasts dispatched.\n */\n order: number;\n\n imperativeRef: React.RefObject<ToastImperativeRef>;\n}\n\nexport interface CommonToastDetail {\n toasterId?: ToasterId;\n}\n\nexport interface ShowToastEventDetail extends Partial<ToastOptions>, CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface UpdateToastEventDetail extends Partial<ToastOptions>, CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface DismissToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface PauseToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface PlayToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface DismissAllToastsEventDetail extends CommonToastDetail {}\n\ntype EventListener<TDetail> = (e: CustomEvent<TDetail>) => void;\n\nexport type ToastListenerMap = {\n [EVENTS.show]: EventListener<ShowToastEventDetail>;\n [EVENTS.dismiss]: EventListener<DismissToastEventDetail>;\n [EVENTS.dismissAll]: EventListener<DismissAllToastsEventDetail>;\n [EVENTS.update]: EventListener<UpdateToastEventDetail>;\n [EVENTS.play]: EventListener<PlayToastEventDetail>;\n [EVENTS.pause]: EventListener<PauseToastEventDetail>;\n};\n\ntype RootSlot = Slot<'div'>;\n\nexport interface DispatchToastOptions extends Partial<Omit<ToastOptions, 'toasterId'>> {\n root?: RootSlot;\n}\n\nexport interface UpdateToastOptions extends UpdateToastEventDetail {\n root?: RootSlot;\n}\n\nexport type ToastImperativeRef = {\n /**\n * Focuses the Toast.\n * If there are no focusable elements in the Toast, the Toast itself is focused.\n */\n focus: () => void;\n\n /**\n * Resumes the timeout of a paused toast\n */\n play: () => void;\n\n /**\n * Pauses the timeout of a toast\n */\n pause: () => void;\n};\n"],"names":["React"],"mappings":"AAEA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/state/types.ts"],"sourcesContent":["import type { Slot } from '@fluentui/react-utilities';\nimport { EVENTS } from './constants';\nimport * as React from 'react';\n\nexport type ToastId = string;\nexport type ToasterId = string;\n\nexport type ToastPosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start' | 'top' | 'bottom';\nexport type ToastPoliteness = 'assertive' | 'polite';\nexport type ToastStatus = 'queued' | 'visible' | 'dismissed' | 'unmounted';\nexport type ToastIntent = 'info' | 'success' | 'error' | 'warning';\nexport type ToastChangeHandler = (event: null, data: ToastChangeData) => void;\n\nexport interface ToastChangeData extends ToastOptions, Pick<Toast, 'updateId'> {\n status: ToastStatus;\n}\n\nexport interface ToastOptions<TData = object> {\n /**\n * Uniquely identifies a toast, used for update and dismiss operations\n */\n toastId: ToastId;\n /**\n * The position the toast should render to\n */\n position: ToastPosition;\n /**\n * Toast content\n */\n content: unknown;\n /**\n * Auto dismiss timeout in milliseconds\n * @default 3000\n */\n timeout: number;\n /**\n * Toast timeout pauses while focus is on another window\n * @default false\n */\n pauseOnWindowBlur: boolean;\n /**\n * Toast timeout pauses while user cursor is on the toast\n * @default false\n */\n pauseOnHover: boolean;\n /**\n * Toast belongs to a specific toaster\n */\n toasterId: ToasterId | undefined;\n /**\n * Higher priority toasts will be rendered before lower priority toasts\n */\n priority: number;\n /**\n * Used to determine [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration\n * This will override the intent prop\n */\n politeness?: ToastPoliteness;\n\n /**\n * Default toast types that determine the urgency or [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration\n * The UI layer may use these intents to apply specific styling.\n * @default info\n */\n intent?: ToastIntent;\n /**\n * Additional data that needs to be passed to the toast\n */\n data: TData;\n\n /**\n * Reports changes to the Toast lifecycle\n */\n onStatusChange: ToastChangeHandler | undefined;\n}\n\nexport interface ToastOffsetObject {\n horizontal?: number;\n vertical?: number;\n}\n\nexport type ToastOffset = Partial<Record<ToastPosition, ToastOffsetObject>> | ToastOffsetObject;\n\nexport interface ToasterShortcuts {\n focus: (e: KeyboardEvent) => boolean;\n}\n\nexport interface ToasterOptions\n extends Pick<ToastOptions, 'position' | 'timeout' | 'pauseOnWindowBlur' | 'pauseOnHover' | 'priority'> {\n offset?: ToastOffset;\n toasterId?: ToasterId;\n limit?: number;\n shortcuts?: ToasterShortcuts;\n}\n\nexport interface Toast<TData = object> extends ToastOptions<TData> {\n /**\n * Determines the visiblity of a toast\n */\n close: () => void;\n /**\n * Removes a toast completely\n */\n remove: () => void;\n /**\n * A number used to track updates immutably\n */\n updateId: number;\n /**\n * Used to determine default priority when the user does not set one\n * Simple counter of toasts dispatched.\n */\n order: number;\n\n imperativeRef: React.RefObject<ToastImperativeRef | null>;\n}\n\nexport interface CommonToastDetail {\n toasterId?: ToasterId;\n}\n\nexport interface ShowToastEventDetail extends Partial<ToastOptions>, CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface UpdateToastEventDetail extends Partial<ToastOptions>, CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface DismissToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface PauseToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface PlayToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface DismissAllToastsEventDetail extends CommonToastDetail {}\n\ntype EventListener<TDetail> = (e: CustomEvent<TDetail>) => void;\n\nexport type ToastListenerMap = {\n [EVENTS.show]: EventListener<ShowToastEventDetail>;\n [EVENTS.dismiss]: EventListener<DismissToastEventDetail>;\n [EVENTS.dismissAll]: EventListener<DismissAllToastsEventDetail>;\n [EVENTS.update]: EventListener<UpdateToastEventDetail>;\n [EVENTS.play]: EventListener<PlayToastEventDetail>;\n [EVENTS.pause]: EventListener<PauseToastEventDetail>;\n};\n\ntype RootSlot = Slot<'div'>;\n\nexport interface DispatchToastOptions extends Partial<Omit<ToastOptions, 'toasterId'>> {\n root?: RootSlot;\n}\n\nexport interface UpdateToastOptions extends UpdateToastEventDetail {\n root?: RootSlot;\n}\n\nexport type ToastImperativeRef = {\n /**\n * Focuses the Toast.\n * If there are no focusable elements in the Toast, the Toast itself is focused.\n */\n focus: () => void;\n\n /**\n * Resumes the timeout of a paused toast\n */\n play: () => void;\n\n /**\n * Pauses the timeout of a toast\n */\n pause: () => void;\n};\n"],"names":["React"],"mappings":"AAEA,YAAYA,WAAW,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/state/types.ts"],"sourcesContent":["import type { Slot } from '@fluentui/react-utilities';\nimport { EVENTS } from './constants';\nimport * as React from 'react';\n\nexport type ToastId = string;\nexport type ToasterId = string;\n\nexport type ToastPosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start' | 'top' | 'bottom';\nexport type ToastPoliteness = 'assertive' | 'polite';\nexport type ToastStatus = 'queued' | 'visible' | 'dismissed' | 'unmounted';\nexport type ToastIntent = 'info' | 'success' | 'error' | 'warning';\nexport type ToastChangeHandler = (event: null, data: ToastChangeData) => void;\n\nexport interface ToastChangeData extends ToastOptions, Pick<Toast, 'updateId'> {\n status: ToastStatus;\n}\n\nexport interface ToastOptions<TData = object> {\n /**\n * Uniquely identifies a toast, used for update and dismiss operations\n */\n toastId: ToastId;\n /**\n * The position the toast should render to\n */\n position: ToastPosition;\n /**\n * Toast content\n */\n content: unknown;\n /**\n * Auto dismiss timeout in milliseconds\n * @default 3000\n */\n timeout: number;\n /**\n * Toast timeout pauses while focus is on another window\n * @default false\n */\n pauseOnWindowBlur: boolean;\n /**\n * Toast timeout pauses while user cursor is on the toast\n * @default false\n */\n pauseOnHover: boolean;\n /**\n * Toast belongs to a specific toaster\n */\n toasterId: ToasterId | undefined;\n /**\n * Higher priority toasts will be rendered before lower priority toasts\n */\n priority: number;\n /**\n * Used to determine [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration\n * This will override the intent prop\n */\n politeness?: ToastPoliteness;\n\n /**\n * Default toast types that determine the urgency or [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration\n * The UI layer may use these intents to apply specific styling.\n * @default info\n */\n intent?: ToastIntent;\n /**\n * Additional data that needs to be passed to the toast\n */\n data: TData;\n\n /**\n * Reports changes to the Toast lifecycle\n */\n onStatusChange: ToastChangeHandler | undefined;\n}\n\nexport interface ToastOffsetObject {\n horizontal?: number;\n vertical?: number;\n}\n\nexport type ToastOffset = Partial<Record<ToastPosition, ToastOffsetObject>> | ToastOffsetObject;\n\nexport interface ToasterShortcuts {\n focus: (e: KeyboardEvent) => boolean;\n}\n\nexport interface ToasterOptions\n extends Pick<ToastOptions, 'position' | 'timeout' | 'pauseOnWindowBlur' | 'pauseOnHover' | 'priority'> {\n offset?: ToastOffset;\n toasterId?: ToasterId;\n limit?: number;\n shortcuts?: ToasterShortcuts;\n}\n\nexport interface Toast<TData = object> extends ToastOptions<TData> {\n /**\n * Determines the visiblity of a toast\n */\n close: () => void;\n /**\n * Removes a toast completely\n */\n remove: () => void;\n /**\n * A number used to track updates immutably\n */\n updateId: number;\n /**\n * Used to determine default priority when the user does not set one\n * Simple counter of toasts dispatched.\n */\n order: number;\n\n imperativeRef: React.RefObject<ToastImperativeRef>;\n}\n\nexport interface CommonToastDetail {\n toasterId?: ToasterId;\n}\n\nexport interface ShowToastEventDetail extends Partial<ToastOptions>, CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface UpdateToastEventDetail extends Partial<ToastOptions>, CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface DismissToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface PauseToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface PlayToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface DismissAllToastsEventDetail extends CommonToastDetail {}\n\ntype EventListener<TDetail> = (e: CustomEvent<TDetail>) => void;\n\nexport type ToastListenerMap = {\n [EVENTS.show]: EventListener<ShowToastEventDetail>;\n [EVENTS.dismiss]: EventListener<DismissToastEventDetail>;\n [EVENTS.dismissAll]: EventListener<DismissAllToastsEventDetail>;\n [EVENTS.update]: EventListener<UpdateToastEventDetail>;\n [EVENTS.play]: EventListener<PlayToastEventDetail>;\n [EVENTS.pause]: EventListener<PauseToastEventDetail>;\n};\n\ntype RootSlot = Slot<'div'>;\n\nexport interface DispatchToastOptions extends Partial<Omit<ToastOptions, 'toasterId'>> {\n root?: RootSlot;\n}\n\nexport interface UpdateToastOptions extends UpdateToastEventDetail {\n root?: RootSlot;\n}\n\nexport type ToastImperativeRef = {\n /**\n * Focuses the Toast.\n * If there are no focusable elements in the Toast, the Toast itself is focused.\n */\n focus: () => void;\n\n /**\n * Resumes the timeout of a paused toast\n */\n play: () => void;\n\n /**\n * Pauses the timeout of a toast\n */\n pause: () => void;\n};\n"],"names":["React"],"mappings":";;;;;iEAEuB,QAAQ"}
1
+ {"version":3,"sources":["../src/state/types.ts"],"sourcesContent":["import type { Slot } from '@fluentui/react-utilities';\nimport { EVENTS } from './constants';\nimport * as React from 'react';\n\nexport type ToastId = string;\nexport type ToasterId = string;\n\nexport type ToastPosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start' | 'top' | 'bottom';\nexport type ToastPoliteness = 'assertive' | 'polite';\nexport type ToastStatus = 'queued' | 'visible' | 'dismissed' | 'unmounted';\nexport type ToastIntent = 'info' | 'success' | 'error' | 'warning';\nexport type ToastChangeHandler = (event: null, data: ToastChangeData) => void;\n\nexport interface ToastChangeData extends ToastOptions, Pick<Toast, 'updateId'> {\n status: ToastStatus;\n}\n\nexport interface ToastOptions<TData = object> {\n /**\n * Uniquely identifies a toast, used for update and dismiss operations\n */\n toastId: ToastId;\n /**\n * The position the toast should render to\n */\n position: ToastPosition;\n /**\n * Toast content\n */\n content: unknown;\n /**\n * Auto dismiss timeout in milliseconds\n * @default 3000\n */\n timeout: number;\n /**\n * Toast timeout pauses while focus is on another window\n * @default false\n */\n pauseOnWindowBlur: boolean;\n /**\n * Toast timeout pauses while user cursor is on the toast\n * @default false\n */\n pauseOnHover: boolean;\n /**\n * Toast belongs to a specific toaster\n */\n toasterId: ToasterId | undefined;\n /**\n * Higher priority toasts will be rendered before lower priority toasts\n */\n priority: number;\n /**\n * Used to determine [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration\n * This will override the intent prop\n */\n politeness?: ToastPoliteness;\n\n /**\n * Default toast types that determine the urgency or [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration\n * The UI layer may use these intents to apply specific styling.\n * @default info\n */\n intent?: ToastIntent;\n /**\n * Additional data that needs to be passed to the toast\n */\n data: TData;\n\n /**\n * Reports changes to the Toast lifecycle\n */\n onStatusChange: ToastChangeHandler | undefined;\n}\n\nexport interface ToastOffsetObject {\n horizontal?: number;\n vertical?: number;\n}\n\nexport type ToastOffset = Partial<Record<ToastPosition, ToastOffsetObject>> | ToastOffsetObject;\n\nexport interface ToasterShortcuts {\n focus: (e: KeyboardEvent) => boolean;\n}\n\nexport interface ToasterOptions\n extends Pick<ToastOptions, 'position' | 'timeout' | 'pauseOnWindowBlur' | 'pauseOnHover' | 'priority'> {\n offset?: ToastOffset;\n toasterId?: ToasterId;\n limit?: number;\n shortcuts?: ToasterShortcuts;\n}\n\nexport interface Toast<TData = object> extends ToastOptions<TData> {\n /**\n * Determines the visiblity of a toast\n */\n close: () => void;\n /**\n * Removes a toast completely\n */\n remove: () => void;\n /**\n * A number used to track updates immutably\n */\n updateId: number;\n /**\n * Used to determine default priority when the user does not set one\n * Simple counter of toasts dispatched.\n */\n order: number;\n\n imperativeRef: React.RefObject<ToastImperativeRef | null>;\n}\n\nexport interface CommonToastDetail {\n toasterId?: ToasterId;\n}\n\nexport interface ShowToastEventDetail extends Partial<ToastOptions>, CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface UpdateToastEventDetail extends Partial<ToastOptions>, CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface DismissToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface PauseToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface PlayToastEventDetail extends CommonToastDetail {\n toastId: ToastId;\n}\n\nexport interface DismissAllToastsEventDetail extends CommonToastDetail {}\n\ntype EventListener<TDetail> = (e: CustomEvent<TDetail>) => void;\n\nexport type ToastListenerMap = {\n [EVENTS.show]: EventListener<ShowToastEventDetail>;\n [EVENTS.dismiss]: EventListener<DismissToastEventDetail>;\n [EVENTS.dismissAll]: EventListener<DismissAllToastsEventDetail>;\n [EVENTS.update]: EventListener<UpdateToastEventDetail>;\n [EVENTS.play]: EventListener<PlayToastEventDetail>;\n [EVENTS.pause]: EventListener<PauseToastEventDetail>;\n};\n\ntype RootSlot = Slot<'div'>;\n\nexport interface DispatchToastOptions extends Partial<Omit<ToastOptions, 'toasterId'>> {\n root?: RootSlot;\n}\n\nexport interface UpdateToastOptions extends UpdateToastEventDetail {\n root?: RootSlot;\n}\n\nexport type ToastImperativeRef = {\n /**\n * Focuses the Toast.\n * If there are no focusable elements in the Toast, the Toast itself is focused.\n */\n focus: () => void;\n\n /**\n * Resumes the timeout of a paused toast\n */\n play: () => void;\n\n /**\n * Pauses the timeout of a toast\n */\n pause: () => void;\n};\n"],"names":["React"],"mappings":";;;;;iEAEuB,QAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-toast",
3
- "version": "0.0.0-nightly-20250904-0406.1",
3
+ "version": "0.0.0-nightly-20250909-0406.1",
4
4
  "description": "Toast component for Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,33 +12,33 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "devDependencies": {
15
- "@fluentui/react-provider": "0.0.0-nightly-20250904-0406.1",
15
+ "@fluentui/react-provider": "0.0.0-nightly-20250909-0406.1",
16
16
  "@fluentui/eslint-plugin": "*",
17
- "@fluentui/react-conformance": "0.0.0-nightly-20250904-0406.1",
18
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20250904-0406.1",
17
+ "@fluentui/react-conformance": "0.0.0-nightly-20250909-0406.1",
18
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20250909-0406.1",
19
19
  "@fluentui/scripts-api-extractor": "*",
20
20
  "@fluentui/scripts-cypress": "*"
21
21
  },
22
22
  "dependencies": {
23
- "@fluentui/keyboard-keys": "0.0.0-nightly-20250904-0406.1",
24
- "@fluentui/react-aria": "0.0.0-nightly-20250904-0406.1",
23
+ "@fluentui/keyboard-keys": "0.0.0-nightly-20250909-0406.1",
24
+ "@fluentui/react-aria": "0.0.0-nightly-20250909-0406.1",
25
25
  "@fluentui/react-icons": "^2.0.245",
26
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20250904-0406.1",
27
- "@fluentui/react-motion": "0.0.0-nightly-20250904-0406.1",
28
- "@fluentui/react-motion-components-preview": "0.0.0-nightly-20250904-0406.1",
29
- "@fluentui/react-portal": "0.0.0-nightly-20250904-0406.1",
30
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20250904-0406.1",
31
- "@fluentui/react-tabster": "0.0.0-nightly-20250904-0406.1",
32
- "@fluentui/react-theme": "0.0.0-nightly-20250904-0406.1",
33
- "@fluentui/react-utilities": "0.0.0-nightly-20250904-0406.1",
26
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20250909-0406.1",
27
+ "@fluentui/react-motion": "0.0.0-nightly-20250909-0406.1",
28
+ "@fluentui/react-motion-components-preview": "0.0.0-nightly-20250909-0406.1",
29
+ "@fluentui/react-portal": "0.0.0-nightly-20250909-0406.1",
30
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20250909-0406.1",
31
+ "@fluentui/react-tabster": "0.0.0-nightly-20250909-0406.1",
32
+ "@fluentui/react-theme": "0.0.0-nightly-20250909-0406.1",
33
+ "@fluentui/react-utilities": "0.0.0-nightly-20250909-0406.1",
34
34
  "@griffel/react": "^1.5.22",
35
35
  "@swc/helpers": "^0.5.1"
36
36
  },
37
37
  "peerDependencies": {
38
- "@types/react": ">=16.14.0 <19.0.0",
39
- "@types/react-dom": ">=16.9.0 <19.0.0",
40
- "react": ">=16.14.0 <19.0.0",
41
- "react-dom": ">=16.14.0 <19.0.0"
38
+ "@types/react": ">=16.14.0 <20.0.0",
39
+ "@types/react-dom": ">=16.9.0 <20.0.0",
40
+ "react": ">=16.14.0 <20.0.0",
41
+ "react-dom": ">=16.14.0 <20.0.0"
42
42
  },
43
43
  "beachball": {},
44
44
  "exports": {