@hanzogui/toast 8.0.1 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/Toast.native.js.map +1 -1
  2. package/dist/cjs/ToastAnnounce.native.js.map +1 -1
  3. package/dist/cjs/ToastComposable.cjs +1 -0
  4. package/dist/cjs/ToastComposable.native.js +17 -0
  5. package/dist/cjs/ToastComposable.native.js.map +1 -1
  6. package/dist/cjs/ToastImperative.native.js.map +1 -1
  7. package/dist/cjs/ToastImpl.native.js.map +1 -1
  8. package/dist/cjs/ToastItemFrame.native.js.map +1 -1
  9. package/dist/cjs/ToastPortal.native.js.map +1 -1
  10. package/dist/cjs/ToastProvider.native.js.map +1 -1
  11. package/dist/cjs/ToastState.native.js.map +1 -1
  12. package/dist/cjs/ToastViewport.native.js.map +1 -1
  13. package/dist/cjs/Toaster.native.js.map +1 -1
  14. package/dist/cjs/constants.native.js.map +1 -1
  15. package/dist/cjs/dispatchNativeToast.native.js.map +1 -1
  16. package/dist/cjs/index.native.js.map +1 -1
  17. package/dist/cjs/types.native.js.map +1 -1
  18. package/dist/cjs/useReducedMotion.native.js.map +1 -1
  19. package/dist/cjs/useToastAnimations.native.js.map +1 -1
  20. package/dist/cjs/v2.native.js.map +1 -1
  21. package/dist/esm/ToastComposable.mjs +1 -0
  22. package/dist/esm/ToastComposable.mjs.map +1 -1
  23. package/dist/esm/ToastComposable.native.js +17 -0
  24. package/dist/esm/ToastComposable.native.js.map +1 -1
  25. package/dist/jsx/ToastComposable.mjs +1 -0
  26. package/dist/jsx/ToastComposable.mjs.map +1 -1
  27. package/dist/jsx/ToastComposable.native.js +17 -0
  28. package/dist/jsx/ToastComposable.native.js.map +1 -1
  29. package/dist/jsx/ToastImpl.native.js.map +1 -1
  30. package/package.json +24 -18
  31. package/src/ToastComposable.tsx +17 -0
  32. package/src/ToastImpl.tsx +231 -234
  33. package/types/Toast.d.ts +33 -33
  34. package/types/Toast.d.ts.map +1 -1
  35. package/types/ToastAnnounce.d.ts +2 -2
  36. package/types/ToastAnnounce.d.ts.map +1 -1
  37. package/types/ToastComposable.d.ts +26 -26
  38. package/types/ToastComposable.d.ts.map +1 -1
  39. package/types/ToastImpl.d.ts +9 -9
  40. package/types/ToastImpl.d.ts.map +1 -1
  41. package/types/ToastItemFrame.d.ts +12 -12
  42. package/types/ToastItemFrame.d.ts.map +1 -1
  43. package/types/ToastViewport.d.ts +9 -9
  44. package/types/ToastViewport.d.ts.map +1 -1
package/src/ToastImpl.tsx CHANGED
@@ -161,254 +161,251 @@ type ToastImplProps = ScopedProps<
161
161
  ToastImplPrivateProps & ToastImplFrameProps & ToastExtraProps
162
162
  >
163
163
 
164
- const ToastImpl = React.forwardRef<GuiElement, ToastImplProps>(
165
- (props, forwardedRef) => {
166
- const {
167
- scope,
168
- type = 'foreground',
169
- duration: durationProp,
170
- open,
171
- onClose,
172
- onEscapeKeyDown,
173
- onPause,
174
- onResume,
175
- onSwipeStart,
176
- onSwipeMove,
177
- onSwipeCancel,
178
- onSwipeEnd,
179
- viewportName = 'default',
180
- ...toastProps
181
- } = props
182
- const isPresent = useIsPresent()
183
- const context = useToastProviderContext(scope)
184
- const [node, setNode] = React.useState<GuiElement | null>(null)
185
- const composedRefs = useComposedRefs(forwardedRef, setNode)
186
- const duration = durationProp || context.duration
187
- const closeTimerStartTimeRef = React.useRef(0)
188
- const closeTimerRemainingTimeRef = React.useRef(duration)
189
- const closeTimerRef = React.useRef(0)
190
- const { onToastAdd, onToastRemove } = context
191
-
192
- const viewport = React.useMemo(() => {
193
- return context.viewports[viewportName] as HTMLElement | null | undefined
194
- }, [context.viewports, viewportName])
195
-
196
- const handleClose = useEvent(() => {
197
- if (!isPresent) {
198
- // already removed from the react tree
199
- return
200
- }
201
- // focus viewport if focus is within toast to read the remaining toast
202
- // count to SR users and ensure focus isn't lost
203
- if (isWeb) {
204
- const isFocusInToast = (node as unknown as HTMLDivElement)?.contains(
205
- document.activeElement
206
- )
207
- if (isFocusInToast) viewport?.focus()
208
- }
209
- onClose()
210
- })
164
+ const ToastImpl = React.forwardRef<GuiElement, ToastImplProps>((props, forwardedRef) => {
165
+ const {
166
+ scope,
167
+ type = 'foreground',
168
+ duration: durationProp,
169
+ open,
170
+ onClose,
171
+ onEscapeKeyDown,
172
+ onPause,
173
+ onResume,
174
+ onSwipeStart,
175
+ onSwipeMove,
176
+ onSwipeCancel,
177
+ onSwipeEnd,
178
+ viewportName = 'default',
179
+ ...toastProps
180
+ } = props
181
+ const isPresent = useIsPresent()
182
+ const context = useToastProviderContext(scope)
183
+ const [node, setNode] = React.useState<GuiElement | null>(null)
184
+ const composedRefs = useComposedRefs(forwardedRef, setNode)
185
+ const duration = durationProp || context.duration
186
+ const closeTimerStartTimeRef = React.useRef(0)
187
+ const closeTimerRemainingTimeRef = React.useRef(duration)
188
+ const closeTimerRef = React.useRef(0)
189
+ const { onToastAdd, onToastRemove } = context
190
+
191
+ const viewport = React.useMemo(() => {
192
+ return context.viewports[viewportName] as HTMLElement | null | undefined
193
+ }, [context.viewports, viewportName])
194
+
195
+ const handleClose = useEvent(() => {
196
+ if (!isPresent) {
197
+ // already removed from the react tree
198
+ return
199
+ }
200
+ // focus viewport if focus is within toast to read the remaining toast
201
+ // count to SR users and ensure focus isn't lost
202
+ if (isWeb) {
203
+ const isFocusInToast = (node as unknown as HTMLDivElement)?.contains(
204
+ document.activeElement
205
+ )
206
+ if (isFocusInToast) viewport?.focus()
207
+ }
208
+ onClose()
209
+ })
211
210
 
212
- const startTimer = React.useCallback(
213
- (duration: number) => {
214
- if (!duration || duration === Number.POSITIVE_INFINITY) return
215
- clearTimeout(closeTimerRef.current)
216
- closeTimerStartTimeRef.current = new Date().getTime()
217
- closeTimerRef.current = setTimeout(handleClose, duration) as unknown as number
218
- },
219
- [handleClose]
220
- )
221
-
222
- const handleResume = React.useCallback(() => {
223
- startTimer(closeTimerRemainingTimeRef.current)
224
- onResume?.()
225
- }, [onResume, startTimer])
226
-
227
- const handlePause = React.useCallback(() => {
228
- const elapsedTime = new Date().getTime() - closeTimerStartTimeRef.current
229
- closeTimerRemainingTimeRef.current =
230
- closeTimerRemainingTimeRef.current - elapsedTime
231
- window.clearTimeout(closeTimerRef.current)
232
- onPause?.()
233
- }, [onPause])
234
-
235
- React.useEffect(() => {
236
- if (!isWeb) return
237
-
238
- if (viewport) {
239
- viewport.addEventListener(VIEWPORT_PAUSE, handlePause)
240
- viewport.addEventListener(VIEWPORT_RESUME, handleResume)
241
- return () => {
242
- viewport.removeEventListener(VIEWPORT_PAUSE, handlePause)
243
- viewport.removeEventListener(VIEWPORT_RESUME, handleResume)
244
- }
245
- }
246
- }, [viewport, duration, onPause, onResume, startTimer])
247
-
248
- // start timer when toast opens or duration changes.
249
- // we include `open` in deps because closed !== unmounted when animating
250
- // so it could reopen before being completely unmounted
251
- React.useEffect(() => {
252
- if (open && !context.isClosePausedRef.current) {
253
- startTimer(duration)
211
+ const startTimer = React.useCallback(
212
+ (duration: number) => {
213
+ if (!duration || duration === Number.POSITIVE_INFINITY) return
214
+ clearTimeout(closeTimerRef.current)
215
+ closeTimerStartTimeRef.current = new Date().getTime()
216
+ closeTimerRef.current = setTimeout(handleClose, duration) as unknown as number
217
+ },
218
+ [handleClose]
219
+ )
220
+
221
+ const handleResume = React.useCallback(() => {
222
+ startTimer(closeTimerRemainingTimeRef.current)
223
+ onResume?.()
224
+ }, [onResume, startTimer])
225
+
226
+ const handlePause = React.useCallback(() => {
227
+ const elapsedTime = new Date().getTime() - closeTimerStartTimeRef.current
228
+ closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime
229
+ window.clearTimeout(closeTimerRef.current)
230
+ onPause?.()
231
+ }, [onPause])
232
+
233
+ React.useEffect(() => {
234
+ if (!isWeb) return
235
+
236
+ if (viewport) {
237
+ viewport.addEventListener(VIEWPORT_PAUSE, handlePause)
238
+ viewport.addEventListener(VIEWPORT_RESUME, handleResume)
239
+ return () => {
240
+ viewport.removeEventListener(VIEWPORT_PAUSE, handlePause)
241
+ viewport.removeEventListener(VIEWPORT_RESUME, handleResume)
254
242
  }
255
- }, [open, duration, context.isClosePausedRef, startTimer])
243
+ }
244
+ }, [viewport, duration, onPause, onResume, startTimer])
245
+
246
+ // start timer when toast opens or duration changes.
247
+ // we include `open` in deps because closed !== unmounted when animating
248
+ // so it could reopen before being completely unmounted
249
+ React.useEffect(() => {
250
+ if (open && !context.isClosePausedRef.current) {
251
+ startTimer(duration)
252
+ }
253
+ }, [open, duration, context.isClosePausedRef, startTimer])
256
254
 
257
- React.useEffect(() => {
258
- onToastAdd()
259
- return () => onToastRemove()
260
- }, [onToastAdd, onToastRemove])
255
+ React.useEffect(() => {
256
+ onToastAdd()
257
+ return () => onToastRemove()
258
+ }, [onToastAdd, onToastRemove])
261
259
 
262
- const announceTextContent = React.useMemo(() => {
263
- if (!isWeb) return null
264
- return node ? getAnnounceTextContent(node as unknown as HTMLDivElement) : null
265
- }, [node])
260
+ const announceTextContent = React.useMemo(() => {
261
+ if (!isWeb) return null
262
+ return node ? getAnnounceTextContent(node as unknown as HTMLDivElement) : null
263
+ }, [node])
266
264
 
267
- const isHorizontalSwipe = ['left', 'right', 'horizontal'].includes(
268
- context.swipeDirection
269
- )
265
+ const isHorizontalSwipe = ['left', 'right', 'horizontal'].includes(
266
+ context.swipeDirection
267
+ )
270
268
 
271
- const { animationDriver } = useConfiguration()
272
- if (!animationDriver) {
273
- throw new Error('Must set animations in hanzogui.config.ts')
274
- }
269
+ const { animationDriver } = useConfiguration()
270
+ if (!animationDriver) {
271
+ throw new Error('Must set animations in hanzogui.config.ts')
272
+ }
275
273
 
276
- const { useAnimatedNumber, useAnimatedNumberStyle } = animationDriver
274
+ const { useAnimatedNumber, useAnimatedNumberStyle } = animationDriver
277
275
 
278
- const animatedNumber = useAnimatedNumber(0)
276
+ const animatedNumber = useAnimatedNumber(0)
279
277
 
280
- // temp until reanimated useAnimatedNumber fix
281
- const AnimatedView = (animationDriver['NumberView'] ??
282
- animationDriver.View ??
283
- View) as typeof Animated.View
278
+ // temp until reanimated useAnimatedNumber fix
279
+ const AnimatedView = (animationDriver['NumberView'] ??
280
+ animationDriver.View ??
281
+ View) as typeof Animated.View
284
282
 
285
- const animatedStyles = useAnimatedNumberStyle(animatedNumber, (val) => {
286
- 'worklet'
287
- return {
288
- transform: [isHorizontalSwipe ? { translateX: val } : { translateY: val }],
289
- }
290
- })
283
+ const animatedStyles = useAnimatedNumberStyle(animatedNumber, (val) => {
284
+ 'worklet'
285
+ return {
286
+ transform: [isHorizontalSwipe ? { translateX: val } : { translateY: val }],
287
+ }
288
+ })
291
289
 
292
- const panResponder = React.useMemo(() => {
293
- const PanResponder = getPanResponder()
294
- if (!PanResponder) return null
295
- return PanResponder.create({
296
- onMoveShouldSetPanResponder: (e, gesture) => {
297
- const shouldMove = shouldGrantGestureMove(context.swipeDirection, gesture)
298
- if (shouldMove) {
299
- onSwipeStart?.(e)
300
- return true
301
- }
302
- return false
303
- },
304
- onPanResponderGrant: (e) => {
290
+ const panResponder = React.useMemo(() => {
291
+ const PanResponder = getPanResponder()
292
+ if (!PanResponder) return null
293
+ return PanResponder.create({
294
+ onMoveShouldSetPanResponder: (e, gesture) => {
295
+ const shouldMove = shouldGrantGestureMove(context.swipeDirection, gesture)
296
+ if (shouldMove) {
297
+ onSwipeStart?.(e)
298
+ return true
299
+ }
300
+ return false
301
+ },
302
+ onPanResponderGrant: (e) => {
303
+ if (!isWeb) {
304
+ handlePause?.()
305
+ }
306
+ },
307
+ onPanResponderMove: (e, gesture) => {
308
+ const { x, y } = getGestureDistance(context.swipeDirection, gesture)
309
+ const delta = { x, y }
310
+ animatedNumber.setValue(isHorizontalSwipe ? x : y, { type: 'direct' })
311
+ if (isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) {
312
+ onSwipeEnd?.(e)
313
+ }
314
+ onSwipeMove?.(e)
315
+ },
316
+ onPanResponderEnd: (e, { dx, dy }) => {
317
+ if (
318
+ !isDeltaInDirection(
319
+ { x: dx, y: dy },
320
+ context.swipeDirection,
321
+ context.swipeThreshold
322
+ )
323
+ ) {
305
324
  if (!isWeb) {
306
- handlePause?.()
307
- }
308
- },
309
- onPanResponderMove: (e, gesture) => {
310
- const { x, y } = getGestureDistance(context.swipeDirection, gesture)
311
- const delta = { x, y }
312
- animatedNumber.setValue(isHorizontalSwipe ? x : y, { type: 'direct' })
313
- if (isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) {
314
- onSwipeEnd?.(e)
325
+ handleResume?.()
315
326
  }
316
- onSwipeMove?.(e)
317
- },
318
- onPanResponderEnd: (e, { dx, dy }) => {
319
- if (
320
- !isDeltaInDirection(
321
- { x: dx, y: dy },
322
- context.swipeDirection,
323
- context.swipeThreshold
324
- )
325
- ) {
326
- if (!isWeb) {
327
- handleResume?.()
328
- }
329
- onSwipeCancel?.(e)
330
- animatedNumber.setValue(0, { type: 'spring' })
331
- }
332
- },
333
- })
334
- }, [handlePause, handleResume])
335
-
336
- // need to get the theme name from context and apply it again since portals don't retain the theme
337
- const themeName = useThemeName()
338
-
339
- return (
340
- <>
341
- {announceTextContent && (
342
- <ToastAnnounce
343
- scope={scope}
344
- // Toasts are always role=status to avoid stuttering issues with role=alert in SRs.
345
- // biome-ignore lint/a11y/useSemanticElements: <explanation>
346
- role="status"
347
- aria-live={type === 'foreground' ? 'assertive' : 'polite'}
348
- aria-atomic
349
- >
350
- {announceTextContent}
351
- </ToastAnnounce>
352
- )}
353
-
354
- <PortalItem hostName={viewportName ?? 'default'}>
355
- <ToastInteractiveProvider
356
- key={props.id}
357
- scope={scope}
358
- onClose={() => {
359
- handleClose()
360
- }}
327
+ onSwipeCancel?.(e)
328
+ animatedNumber.setValue(0, { type: 'spring' })
329
+ }
330
+ },
331
+ })
332
+ }, [handlePause, handleResume])
333
+
334
+ // need to get the theme name from context and apply it again since portals don't retain the theme
335
+ const themeName = useThemeName()
336
+
337
+ return (
338
+ <>
339
+ {announceTextContent && (
340
+ <ToastAnnounce
341
+ scope={scope}
342
+ // Toasts are always role=status to avoid stuttering issues with role=alert in SRs.
343
+ // biome-ignore lint/a11y/useSemanticElements: <explanation>
344
+ role="status"
345
+ aria-live={type === 'foreground' ? 'assertive' : 'polite'}
346
+ aria-atomic
347
+ >
348
+ {announceTextContent}
349
+ </ToastAnnounce>
350
+ )}
351
+
352
+ <PortalItem hostName={viewportName ?? 'default'}>
353
+ <ToastInteractiveProvider
354
+ key={props.id}
355
+ scope={scope}
356
+ onClose={() => {
357
+ handleClose()
358
+ }}
359
+ >
360
+ <Dismissable
361
+ // asChild
362
+ onEscapeKeyDown={composeEventHandlers(onEscapeKeyDown, () => {
363
+ if (!context.isFocusedToastEscapeKeyDownRef.current) {
364
+ handleClose()
365
+ }
366
+ context.isFocusedToastEscapeKeyDownRef.current = false
367
+ })}
361
368
  >
362
- <Dismissable
363
- // asChild
364
- onEscapeKeyDown={composeEventHandlers(onEscapeKeyDown, () => {
365
- if (!context.isFocusedToastEscapeKeyDownRef.current) {
366
- handleClose()
367
- }
368
- context.isFocusedToastEscapeKeyDownRef.current = false
369
- })}
370
- >
371
- <Theme contain forceClassName name={themeName}>
372
- <AnimatedView
373
- {...panResponder?.panHandlers}
374
- style={[{ margin: 'auto' }, animatedStyles]}
375
- >
376
- <Collection.ItemSlot scope={context.toastScope}>
377
- <ToastImplFrame
378
- // Ensure toasts are announced as status list or status when focused
379
- role="status"
380
- aria-live="off"
381
- aria-atomic
382
- data-state={open ? 'open' : 'closed'}
383
- data-swipe-direction={context.swipeDirection}
384
- pointerEvents="auto"
385
- $platform-web={{
386
- touchAction: 'none',
387
- userSelect: 'none',
388
- }}
389
- {...toastProps}
390
- ref={composedRefs}
391
- {...(isWeb && {
392
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
393
- if (event.key !== 'Escape') return
394
- onEscapeKeyDown?.(event)
395
- if (!event.defaultPrevented) {
396
- context.isFocusedToastEscapeKeyDownRef.current = true
397
- handleClose()
398
- }
399
- }),
400
- })}
401
- />
402
- </Collection.ItemSlot>
403
- </AnimatedView>
404
- </Theme>
405
- </Dismissable>
406
- </ToastInteractiveProvider>
407
- </PortalItem>
408
- </>
409
- )
410
- }
411
- )
369
+ <Theme contain forceClassName name={themeName}>
370
+ <AnimatedView
371
+ {...panResponder?.panHandlers}
372
+ style={[{ margin: 'auto' }, animatedStyles]}
373
+ >
374
+ <Collection.ItemSlot scope={context.toastScope}>
375
+ <ToastImplFrame
376
+ // Ensure toasts are announced as status list or status when focused
377
+ role="status"
378
+ aria-live="off"
379
+ aria-atomic
380
+ data-state={open ? 'open' : 'closed'}
381
+ data-swipe-direction={context.swipeDirection}
382
+ pointerEvents="auto"
383
+ $platform-web={{
384
+ touchAction: 'none',
385
+ userSelect: 'none',
386
+ }}
387
+ {...toastProps}
388
+ ref={composedRefs}
389
+ {...(isWeb && {
390
+ onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
391
+ if (event.key !== 'Escape') return
392
+ onEscapeKeyDown?.(event)
393
+ if (!event.defaultPrevented) {
394
+ context.isFocusedToastEscapeKeyDownRef.current = true
395
+ handleClose()
396
+ }
397
+ }),
398
+ })}
399
+ />
400
+ </Collection.ItemSlot>
401
+ </AnimatedView>
402
+ </Theme>
403
+ </Dismissable>
404
+ </ToastInteractiveProvider>
405
+ </PortalItem>
406
+ </>
407
+ )
408
+ })
412
409
 
413
410
  ToastImpl.propTypes = {
414
411
  type(props) {
package/types/Toast.d.ts CHANGED
@@ -7,15 +7,15 @@ import type { ScopedProps, ToastProviderProps } from './ToastProvider';
7
7
  import { ToastProvider } from './ToastProvider';
8
8
  import type { ToastViewportProps } from './ToastViewport';
9
9
  import { ToastViewport } from './ToastViewport';
10
- declare const ToastTitle: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiTextElement, import("@hanzogui/core").TextNonStyleProps, import("@hanzogui/core").TextStylePropsBase, {
10
+ declare const ToastTitle: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
11
11
  unstyled?: boolean | undefined;
12
- size?: import("@hanzogui/core").FontSizeTokens | undefined;
13
- }, import("@hanzogui/core").StaticConfigPublic>;
12
+ size?: import("@hanzogui/web").FontSizeTokens | undefined;
13
+ }, import("@hanzogui/web").StaticConfigPublic>;
14
14
  type ToastTitleProps = GetProps<typeof ToastTitle>;
15
- declare const ToastDescription: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiTextElement, import("@hanzogui/core").TextNonStyleProps, import("@hanzogui/core").TextStylePropsBase, {
15
+ declare const ToastDescription: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
16
16
  unstyled?: boolean | undefined;
17
- size?: import("@hanzogui/core").FontSizeTokens | undefined;
18
- }, import("@hanzogui/core").StaticConfigPublic>;
17
+ size?: import("@hanzogui/web").FontSizeTokens | undefined;
18
+ }, import("@hanzogui/web").StaticConfigPublic>;
19
19
  type ToastDescriptionProps = GetProps<typeof ToastDescription>;
20
20
  type ToastActionProps = ScopedProps<ToastCloseProps & {
21
21
  /**
@@ -26,54 +26,54 @@ type ToastActionProps = ScopedProps<ToastCloseProps & {
26
26
  */
27
27
  altText: string;
28
28
  }>;
29
- declare const ToastCloseFrame: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
30
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
29
+ declare const ToastCloseFrame: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/web").StackStyleBase, {
30
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
31
31
  fullscreen?: boolean | undefined;
32
- }, import("@hanzogui/core").StaticConfigPublic>;
32
+ }, import("@hanzogui/web").StaticConfigPublic>;
33
33
  type ToastCloseFrameProps = GetProps<typeof ToastCloseFrame>;
34
34
  type ToastCloseProps = ScopedProps<ToastCloseFrameProps & {}>;
35
- declare const Toast: React.ForwardRefExoticComponent<Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
35
+ declare const Toast: React.ForwardRefExoticComponent<Omit<import("@hanzogui/web").GetFinalProps<import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/web").StackStyleBase, {
36
36
  unstyled?: boolean | undefined;
37
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
37
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
38
38
  fullscreen?: boolean | undefined;
39
- }>, keyof ToastExtraProps> & ToastExtraProps & React.RefAttributes<GuiElement>> & import("@hanzogui/core").StaticComponentObject<Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
39
+ }>, keyof ToastExtraProps> & ToastExtraProps & React.RefAttributes<GuiElement>> & import("@hanzogui/web").StaticComponentObject<Omit<import("@hanzogui/web").GetFinalProps<import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/web").StackStyleBase, {
40
40
  unstyled?: boolean | undefined;
41
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
41
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
42
42
  fullscreen?: boolean | undefined;
43
- }>, keyof ToastExtraProps> & ToastExtraProps, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps & ToastExtraProps, import("@hanzogui/core").StackStyleBase, {
43
+ }>, keyof ToastExtraProps> & ToastExtraProps, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps & ToastExtraProps, import("@hanzogui/web").StackStyleBase, {
44
44
  unstyled?: boolean | undefined;
45
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
45
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
46
46
  fullscreen?: boolean | undefined;
47
- }, import("@hanzogui/core").StaticConfigPublic> & Omit<import("@hanzogui/core").StaticConfigPublic, "staticConfig" | "styleable"> & {
48
- __tama: [Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
47
+ }, import("@hanzogui/web").StaticConfigPublic> & Omit<import("@hanzogui/web").StaticConfigPublic, "staticConfig" | "styleable"> & {
48
+ __tama: [Omit<import("@hanzogui/web").GetFinalProps<import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/web").StackStyleBase, {
49
49
  unstyled?: boolean | undefined;
50
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
50
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
51
51
  fullscreen?: boolean | undefined;
52
- }>, keyof ToastExtraProps> & ToastExtraProps, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps & ToastExtraProps, import("@hanzogui/core").StackStyleBase, {
52
+ }>, keyof ToastExtraProps> & ToastExtraProps, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps & ToastExtraProps, import("@hanzogui/web").StackStyleBase, {
53
53
  unstyled?: boolean | undefined;
54
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
54
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
55
55
  fullscreen?: boolean | undefined;
56
- }, import("@hanzogui/core").StaticConfigPublic];
56
+ }, import("@hanzogui/web").StaticConfigPublic];
57
57
  } & {
58
- Title: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiTextElement, import("@hanzogui/core").TextNonStyleProps, import("@hanzogui/core").TextStylePropsBase, {
58
+ Title: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
59
59
  unstyled?: boolean | undefined;
60
- size?: import("@hanzogui/core").FontSizeTokens | undefined;
61
- }, import("@hanzogui/core").StaticConfigPublic>;
62
- Description: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiTextElement, import("@hanzogui/core").TextNonStyleProps, import("@hanzogui/core").TextStylePropsBase, {
60
+ size?: import("@hanzogui/web").FontSizeTokens | undefined;
61
+ }, import("@hanzogui/web").StaticConfigPublic>;
62
+ Description: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
63
63
  unstyled?: boolean | undefined;
64
- size?: import("@hanzogui/core").FontSizeTokens | undefined;
65
- }, import("@hanzogui/core").StaticConfigPublic>;
64
+ size?: import("@hanzogui/web").FontSizeTokens | undefined;
65
+ }, import("@hanzogui/web").StaticConfigPublic>;
66
66
  Action: React.ForwardRefExoticComponent<Omit<ToastActionProps, "scope"> & {
67
67
  scope?: import("./ToastProvider").ToastScopes;
68
68
  } & React.RefAttributes<GuiElement>>;
69
- Close: React.ForwardRefExoticComponent<Omit<Omit<import("@hanzogui/core").RNGuiViewNonStyleProps, "elevation" | keyof import("@hanzogui/core").StackStyleBase | "fullscreen"> & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & {
70
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
69
+ Close: React.ForwardRefExoticComponent<Omit<Omit<import("@hanzogui/core").RNGuiViewNonStyleProps, "elevation" | keyof import("@hanzogui/web").StackStyleBase | "fullscreen"> & import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & {
70
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
71
71
  fullscreen?: boolean | undefined;
72
- } & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>> & import("@hanzogui/core").WithPseudoProps<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & {
73
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
72
+ } & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>> & import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & {
73
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
74
74
  fullscreen?: boolean | undefined;
75
- } & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>>> & import("@hanzogui/core").WithMediaProps<import("@hanzogui/core").WithThemeShorthandsAndPseudos<import("@hanzogui/core").StackStyleBase, {
76
- elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
75
+ } & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> & import("@hanzogui/web").WithMediaProps<import("@hanzogui/web").WithThemeShorthandsAndPseudos<import("@hanzogui/web").StackStyleBase, {
76
+ elevation?: number | import("@hanzogui/web").SizeTokens | undefined;
77
77
  fullscreen?: boolean | undefined;
78
78
  }>>, "scope"> & {
79
79
  scope?: import("./ToastProvider").ToastScopes;
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../src/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAMvF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC/E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R,kBAAkB,EAClB,aAAa,GACd,CAAA;AACD,YAAY,EAEV,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,cAAc,IAAI,mBAAmB,EAErC,WAAW,IAAI,gBAAgB,EAC/B,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,kBAAkB,GACnB,CAAA"}
@@ -2,13 +2,13 @@ import type { GetProps, GuiElement } from '@hanzogui/core';
2
2
  import { VisuallyHidden } from '@hanzogui/visually-hidden';
3
3
  import * as React from 'react';
4
4
  import type { ScopedProps } from './ToastProvider';
5
- declare const ToastAnnounceExcludeFrame: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {}, import("@hanzogui/core").StaticConfigPublic>;
5
+ declare const ToastAnnounceExcludeFrame: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/web").StackStyleBase, {}, import("@hanzogui/web").StaticConfigPublic>;
6
6
  type ToastAnnounceExcludeFrameProps = GetProps<typeof ToastAnnounceExcludeFrame>;
7
7
  type ToastAnnounceExcludeExtraProps = {
8
8
  altText?: string;
9
9
  };
10
10
  type ToastAnnounceExcludeProps = ToastAnnounceExcludeFrameProps & ToastAnnounceExcludeExtraProps;
11
- declare const ToastAnnounceExclude: React.ForwardRefExoticComponent<Omit<import("@hanzogui/core").RNGuiViewNonStyleProps, keyof import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>> & import("@hanzogui/core").WithPseudoProps<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>>> & import("@hanzogui/core").WithMediaProps<import("@hanzogui/core").WithThemeShorthandsAndPseudos<import("@hanzogui/core").StackStyleBase, {}>> & ToastAnnounceExcludeExtraProps & React.RefAttributes<GuiElement>>;
11
+ declare const ToastAnnounceExclude: React.ForwardRefExoticComponent<Omit<import("@hanzogui/core").RNGuiViewNonStyleProps, keyof import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>> & import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> & import("@hanzogui/web").WithMediaProps<import("@hanzogui/web").WithThemeShorthandsAndPseudos<import("@hanzogui/web").StackStyleBase, {}>> & ToastAnnounceExcludeExtraProps & React.RefAttributes<GuiElement>>;
12
12
  interface ToastAnnounceProps extends Omit<GetProps<typeof VisuallyHidden>, 'children'>, ScopedProps<{
13
13
  children: string[];
14
14
  }> {