@ornikar/bumper 2.2.1-canary.431a0c996598cbee4e3c07f6b9886d37d2a76679.0 → 2.2.1-canary.807c44961b602a3d69cc09c68bd5036b2794e70a.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +2 -9
  2. package/dist/definitions/index.d.ts +0 -3
  3. package/dist/definitions/index.d.ts.map +1 -1
  4. package/dist/definitions/tamagui.config.d.ts +1 -20
  5. package/dist/definitions/tamagui.config.d.ts.map +1 -1
  6. package/dist/index-metro.es.android.js +5 -168
  7. package/dist/index-metro.es.android.js.map +1 -1
  8. package/dist/index-metro.es.ios.js +5 -168
  9. package/dist/index-metro.es.ios.js.map +1 -1
  10. package/dist/index-node-22.17.cjs.js +2 -167
  11. package/dist/index-node-22.17.cjs.js.map +1 -1
  12. package/dist/index-node-22.17.cjs.web.js +1 -166
  13. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  14. package/dist/index-node-22.17.es.mjs +4 -167
  15. package/dist/index-node-22.17.es.mjs.map +1 -1
  16. package/dist/index-node-22.17.es.web.mjs +4 -166
  17. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  18. package/dist/index.es.js +5 -177
  19. package/dist/index.es.js.map +1 -1
  20. package/dist/index.es.web.js +4 -175
  21. package/dist/index.es.web.js.map +1 -1
  22. package/dist/tsbuildinfo +1 -1
  23. package/package.json +3 -11
  24. package/src/index.ts +0 -5
  25. package/src/tamagui.config.ts +0 -3
  26. package/dist/definitions/animations.d.ts +0 -22
  27. package/dist/definitions/animations.d.ts.map +0 -1
  28. package/dist/definitions/components/toast/SafeToastViewport.d.ts +0 -9
  29. package/dist/definitions/components/toast/SafeToastViewport.d.ts.map +0 -1
  30. package/dist/definitions/components/toast/ToastProvider.d.ts +0 -10
  31. package/dist/definitions/components/toast/ToastProvider.d.ts.map +0 -1
  32. package/dist/definitions/components/toast/ToastRenderer.d.ts +0 -8
  33. package/dist/definitions/components/toast/ToastRenderer.d.ts.map +0 -1
  34. package/dist/definitions/components/toast/ToastStoreProvider.d.ts +0 -11
  35. package/dist/definitions/components/toast/ToastStoreProvider.d.ts.map +0 -1
  36. package/dist/definitions/components/toast/decorators/ToastProviderDecorator.d.ts +0 -2
  37. package/dist/definitions/components/toast/decorators/ToastProviderDecorator.d.ts.map +0 -1
  38. package/dist/definitions/components/toast/types.d.ts +0 -8
  39. package/dist/definitions/components/toast/types.d.ts.map +0 -1
  40. package/dist/definitions/components/toast/useToast.d.ts +0 -9
  41. package/dist/definitions/components/toast/useToast.d.ts.map +0 -1
  42. package/src/animations.ts +0 -25
  43. package/src/components/toast/SafeToastViewport.tsx +0 -26
  44. package/src/components/toast/Toast.stories.tsx +0 -75
  45. package/src/components/toast/ToastProvider.tsx +0 -33
  46. package/src/components/toast/ToastRenderer.tsx +0 -26
  47. package/src/components/toast/ToastStoreProvider.tsx +0 -41
  48. package/src/components/toast/__snapshots__/Toast.stories.tsx.snap +0 -146
  49. package/src/components/toast/__snapshots_web__/Toast.stories.tsx.snap +0 -81
  50. package/src/components/toast/decorators/ToastProviderDecorator.tsx +0 -23
  51. package/src/components/toast/types.ts +0 -9
  52. package/src/components/toast/useToast.tsx +0 -35
@@ -1,23 +0,0 @@
1
- import { makeDecorator } from '@storybook/addons';
2
- import type { ReactNode } from 'react';
3
- import { SafeAreaProvider } from 'react-native-safe-area-context';
4
- import { ToastProvider } from '../ToastProvider';
5
-
6
- export const ToastStoryDecorator = makeDecorator({
7
- name: 'ToastStoryDecorator',
8
- parameterName: 'toast',
9
- wrapper: (storyFn, context): ReactNode => {
10
- const story = storyFn(context) as unknown as ReactNode;
11
-
12
- return (
13
- <SafeAreaProvider>
14
- <ToastProvider
15
- ToastComponent={context.parameters.toast.component || null}
16
- position={context.parameters.toast?.position || 'top'}
17
- >
18
- {story}
19
- </ToastProvider>
20
- </SafeAreaProvider>
21
- );
22
- },
23
- });
@@ -1,9 +0,0 @@
1
- import type { CustomData } from '@tamagui/toast';
2
-
3
- export interface ToastOptions extends CustomData {
4
- title: string;
5
- }
6
-
7
- export interface ToastProps extends ToastOptions {
8
- hideToast: () => void;
9
- }
@@ -1,35 +0,0 @@
1
- import { useCallback } from 'react';
2
- import { useToastStore } from './ToastStoreProvider';
3
- import type { ToastOptions } from './types';
4
-
5
- interface UseToastReturn {
6
- toasts: ToastOptions[];
7
- showToast: (options: ToastOptions) => void;
8
- hideToast: (id: string) => void;
9
- }
10
-
11
- export function useToast(): UseToastReturn {
12
- const { toasts, addToast, removeToast } = useToastStore();
13
-
14
- const showToast = useCallback(
15
- (options: ToastOptions): void => {
16
- const { title, ...otherOptions } = options;
17
- const id = `${JSON.stringify(options)}${Math.random()}`;
18
- addToast({ id, title, ...otherOptions });
19
- },
20
- [addToast],
21
- );
22
-
23
- const hideToast = useCallback(
24
- (id: string): void => {
25
- removeToast(id);
26
- },
27
- [removeToast],
28
- );
29
-
30
- return {
31
- toasts,
32
- showToast,
33
- hideToast,
34
- };
35
- }