@omerdlw/base-framework 1.0.3 → 1.0.5

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 (204) hide show
  1. package/dist/index.js +5415 -5319
  2. package/dist/index.js.map +1 -1
  3. package/dist/kernel/compose.d.ts.map +1 -1
  4. package/dist/kernel/handlers.d.ts.map +1 -1
  5. package/dist/kernel/hooks.d.ts.map +1 -1
  6. package/dist/kernel/index.js.map +1 -1
  7. package/dist/kernel/operations.d.ts.map +1 -1
  8. package/dist/kernel/schema.d.ts +0 -2
  9. package/dist/kernel/schema.d.ts.map +1 -1
  10. package/dist/kernel/store.d.ts.map +1 -1
  11. package/dist/kernel/types.d.ts.map +1 -1
  12. package/dist/kernel/utils.d.ts +0 -2
  13. package/dist/kernel/utils.d.ts.map +1 -1
  14. package/dist/modules/ambient/color.d.ts +16 -0
  15. package/dist/modules/ambient/color.d.ts.map +1 -0
  16. package/dist/modules/ambient/constants.d.ts +0 -17
  17. package/dist/modules/ambient/constants.d.ts.map +1 -1
  18. package/dist/modules/ambient/context.d.ts +1 -7
  19. package/dist/modules/ambient/context.d.ts.map +1 -1
  20. package/dist/modules/ambient/dom.d.ts +19 -0
  21. package/dist/modules/ambient/dom.d.ts.map +1 -0
  22. package/dist/modules/ambient/extractor.d.ts +5 -0
  23. package/dist/modules/ambient/extractor.d.ts.map +1 -0
  24. package/dist/modules/ambient/hooks.d.ts +9 -0
  25. package/dist/modules/ambient/hooks.d.ts.map +1 -0
  26. package/dist/modules/ambient/index.d.ts +7 -4
  27. package/dist/modules/ambient/index.d.ts.map +1 -1
  28. package/dist/modules/ambient/index.js +66 -60
  29. package/dist/modules/ambient/index.js.map +1 -1
  30. package/dist/modules/ambient/module.d.ts +5 -1
  31. package/dist/modules/ambient/module.d.ts.map +1 -1
  32. package/dist/modules/background/constants.d.ts +1 -10
  33. package/dist/modules/background/constants.d.ts.map +1 -1
  34. package/dist/modules/background/context.d.ts +1 -13
  35. package/dist/modules/background/context.d.ts.map +1 -1
  36. package/dist/modules/background/hooks.d.ts +13 -118
  37. package/dist/modules/background/hooks.d.ts.map +1 -1
  38. package/dist/modules/background/index.d.ts +8 -3
  39. package/dist/modules/background/index.d.ts.map +1 -1
  40. package/dist/modules/background/index.js +975 -991
  41. package/dist/modules/background/index.js.map +1 -1
  42. package/dist/modules/background/module.d.ts +1 -0
  43. package/dist/modules/background/module.d.ts.map +1 -1
  44. package/dist/modules/background/overlay.d.ts +93 -2
  45. package/dist/modules/background/overlay.d.ts.map +1 -1
  46. package/dist/modules/background/playback.d.ts +10 -0
  47. package/dist/modules/background/playback.d.ts.map +1 -0
  48. package/dist/modules/background/state.d.ts +9 -0
  49. package/dist/modules/background/state.d.ts.map +1 -0
  50. package/dist/modules/background/{utils.d.ts → visual.d.ts} +6 -14
  51. package/dist/modules/background/visual.d.ts.map +1 -0
  52. package/dist/modules/background/youtube/player.d.ts +28 -0
  53. package/dist/modules/background/youtube/player.d.ts.map +1 -0
  54. package/dist/modules/context-menu/context.d.ts +1 -10
  55. package/dist/modules/context-menu/context.d.ts.map +1 -1
  56. package/dist/modules/context-menu/dom.d.ts +8 -0
  57. package/dist/modules/context-menu/dom.d.ts.map +1 -0
  58. package/dist/modules/context-menu/hooks.d.ts +11 -11
  59. package/dist/modules/context-menu/hooks.d.ts.map +1 -1
  60. package/dist/modules/context-menu/index.d.ts +8 -3
  61. package/dist/modules/context-menu/index.d.ts.map +1 -1
  62. package/dist/modules/context-menu/index.js +97 -101
  63. package/dist/modules/context-menu/index.js.map +1 -1
  64. package/dist/modules/context-menu/{utils.d.ts → items.d.ts} +2 -9
  65. package/dist/modules/context-menu/items.d.ts.map +1 -0
  66. package/dist/modules/context-menu/module.d.ts.map +1 -1
  67. package/dist/modules/context-menu/overlay.d.ts +13 -1
  68. package/dist/modules/context-menu/overlay.d.ts.map +1 -1
  69. package/dist/modules/context-menu/state.d.ts +1 -0
  70. package/dist/modules/context-menu/state.d.ts.map +1 -1
  71. package/dist/modules/controls/{utils.d.ts → entries.d.ts} +6 -5
  72. package/dist/modules/controls/entries.d.ts.map +1 -0
  73. package/dist/modules/controls/hooks.d.ts +0 -7
  74. package/dist/modules/controls/hooks.d.ts.map +1 -1
  75. package/dist/modules/controls/index.d.ts +5 -3
  76. package/dist/modules/controls/index.d.ts.map +1 -1
  77. package/dist/modules/controls/index.js +66 -61
  78. package/dist/modules/controls/index.js.map +1 -1
  79. package/dist/modules/controls/layout.d.ts +7 -0
  80. package/dist/modules/controls/layout.d.ts.map +1 -0
  81. package/dist/modules/controls/overlay.d.ts +9 -0
  82. package/dist/modules/controls/overlay.d.ts.map +1 -1
  83. package/dist/modules/dock/cards.d.ts.map +1 -1
  84. package/dist/modules/dock/dom.d.ts +24 -0
  85. package/dist/modules/dock/dom.d.ts.map +1 -0
  86. package/dist/modules/dock/helpers.d.ts +25 -0
  87. package/dist/modules/dock/helpers.d.ts.map +1 -0
  88. package/dist/modules/dock/hooks.d.ts +3 -918
  89. package/dist/modules/dock/hooks.d.ts.map +1 -1
  90. package/dist/modules/dock/index.d.ts +3 -2
  91. package/dist/modules/dock/index.d.ts.map +1 -1
  92. package/dist/modules/dock/index.js +2372 -2330
  93. package/dist/modules/dock/index.js.map +1 -1
  94. package/dist/modules/dock/layout.d.ts +26 -0
  95. package/dist/modules/dock/layout.d.ts.map +1 -0
  96. package/dist/modules/dock/module.d.ts.map +1 -1
  97. package/dist/modules/dock/overlay.d.ts.map +1 -1
  98. package/dist/modules/dock/paths.d.ts +10 -0
  99. package/dist/modules/dock/paths.d.ts.map +1 -0
  100. package/dist/modules/dock/provider.d.ts.map +1 -1
  101. package/dist/modules/dock/runtime/display.d.ts.map +1 -1
  102. package/dist/modules/dock/runtime/dock.d.ts.map +1 -1
  103. package/dist/modules/dock/runtime/pipeline.d.ts +32 -0
  104. package/dist/modules/dock/runtime/pipeline.d.ts.map +1 -0
  105. package/dist/modules/dock/status/events.d.ts.map +1 -1
  106. package/dist/modules/dock/styles.d.ts +900 -0
  107. package/dist/modules/dock/styles.d.ts.map +1 -0
  108. package/dist/modules/dock/surface/context.d.ts +1 -2
  109. package/dist/modules/dock/surface/context.d.ts.map +1 -1
  110. package/dist/modules/dock/surface/definition.d.ts.map +1 -1
  111. package/dist/modules/dock/surface/helpers.d.ts +7 -0
  112. package/dist/modules/dock/surface/helpers.d.ts.map +1 -0
  113. package/dist/modules/dock/surface/hooks.d.ts.map +1 -1
  114. package/dist/modules/dock/surface/machine.d.ts.map +1 -1
  115. package/dist/modules/dock/surface/stack.d.ts.map +1 -1
  116. package/dist/modules/dock/surface/view-model.d.ts.map +1 -1
  117. package/dist/modules/dock/types.d.ts.map +1 -1
  118. package/dist/modules/index.js +5010 -4916
  119. package/dist/modules/index.js.map +1 -1
  120. package/dist/modules/loading/context.d.ts +2 -13
  121. package/dist/modules/loading/context.d.ts.map +1 -1
  122. package/dist/modules/loading/hooks.d.ts +15 -2
  123. package/dist/modules/loading/hooks.d.ts.map +1 -1
  124. package/dist/modules/loading/index.d.ts +3 -2
  125. package/dist/modules/loading/index.d.ts.map +1 -1
  126. package/dist/modules/loading/index.js +38 -34
  127. package/dist/modules/loading/index.js.map +1 -1
  128. package/dist/modules/loading/module.d.ts.map +1 -1
  129. package/dist/modules/loading/state.d.ts +6 -0
  130. package/dist/modules/loading/state.d.ts.map +1 -0
  131. package/dist/modules/media/constants.d.ts +0 -1
  132. package/dist/modules/media/constants.d.ts.map +1 -1
  133. package/dist/modules/media/context.d.ts +2 -6
  134. package/dist/modules/media/context.d.ts.map +1 -1
  135. package/dist/modules/media/hooks.d.ts +6 -1
  136. package/dist/modules/media/hooks.d.ts.map +1 -1
  137. package/dist/modules/media/index.d.ts +4 -3
  138. package/dist/modules/media/index.d.ts.map +1 -1
  139. package/dist/modules/media/index.js +100 -98
  140. package/dist/modules/media/index.js.map +1 -1
  141. package/dist/modules/media/module.d.ts.map +1 -1
  142. package/dist/modules/media/overlay.d.ts +0 -5
  143. package/dist/modules/media/overlay.d.ts.map +1 -1
  144. package/dist/modules/media/playback.d.ts +5 -0
  145. package/dist/modules/media/playback.d.ts.map +1 -0
  146. package/dist/modules/media/session.d.ts +8 -0
  147. package/dist/modules/media/session.d.ts.map +1 -0
  148. package/dist/modules/media/types.d.ts +0 -1
  149. package/dist/modules/media/types.d.ts.map +1 -1
  150. package/dist/modules/modal/context.d.ts +1 -12
  151. package/dist/modules/modal/context.d.ts.map +1 -1
  152. package/dist/modules/modal/dom.d.ts +4 -0
  153. package/dist/modules/modal/dom.d.ts.map +1 -0
  154. package/dist/modules/modal/header.d.ts +7 -0
  155. package/dist/modules/modal/header.d.ts.map +1 -0
  156. package/dist/modules/modal/hooks.d.ts +12 -1
  157. package/dist/modules/modal/hooks.d.ts.map +1 -1
  158. package/dist/modules/modal/identity.d.ts +7 -0
  159. package/dist/modules/modal/identity.d.ts.map +1 -0
  160. package/dist/modules/modal/index.d.ts +9 -4
  161. package/dist/modules/modal/index.d.ts.map +1 -1
  162. package/dist/modules/modal/index.js +118 -86
  163. package/dist/modules/modal/index.js.map +1 -1
  164. package/dist/modules/modal/layout.d.ts +13 -0
  165. package/dist/modules/modal/layout.d.ts.map +1 -0
  166. package/dist/modules/modal/module.d.ts.map +1 -1
  167. package/dist/modules/modal/overlay.d.ts.map +1 -1
  168. package/dist/modules/modal/types.d.ts.map +1 -1
  169. package/dist/modules/notification/context.d.ts +2 -8
  170. package/dist/modules/notification/context.d.ts.map +1 -1
  171. package/dist/modules/notification/hooks.d.ts +8 -1
  172. package/dist/modules/notification/hooks.d.ts.map +1 -1
  173. package/dist/modules/notification/index.d.ts +4 -3
  174. package/dist/modules/notification/index.d.ts.map +1 -1
  175. package/dist/modules/notification/index.js +56 -46
  176. package/dist/modules/notification/index.js.map +1 -1
  177. package/dist/modules/notification/state.d.ts +17 -0
  178. package/dist/modules/notification/state.d.ts.map +1 -0
  179. package/dist/provider.js.map +1 -1
  180. package/docs/modules/ambient.md +12 -8
  181. package/docs/modules/background.md +15 -13
  182. package/docs/modules/context-menu.md +13 -13
  183. package/docs/modules/controls.md +4 -3
  184. package/docs/modules/dock.md +8 -2
  185. package/docs/modules/loading.md +11 -11
  186. package/docs/modules/media.md +8 -7
  187. package/docs/modules/modal.md +4 -1
  188. package/docs/modules/notification.md +4 -4
  189. package/package.json +4 -4
  190. package/dist/modules/ambient/utils.d.ts +0 -18
  191. package/dist/modules/ambient/utils.d.ts.map +0 -1
  192. package/dist/modules/background/utils.d.ts.map +0 -1
  193. package/dist/modules/context-menu/utils.d.ts.map +0 -1
  194. package/dist/modules/controls/utils.d.ts.map +0 -1
  195. package/dist/modules/dock/utils.d.ts +0 -93
  196. package/dist/modules/dock/utils.d.ts.map +0 -1
  197. package/dist/modules/loading/utils.d.ts +0 -4
  198. package/dist/modules/loading/utils.d.ts.map +0 -1
  199. package/dist/modules/media/utils.d.ts +0 -17
  200. package/dist/modules/media/utils.d.ts.map +0 -1
  201. package/dist/modules/modal/utils.d.ts +0 -31
  202. package/dist/modules/modal/utils.d.ts.map +0 -1
  203. package/dist/modules/notification/utils.d.ts +0 -9
  204. package/dist/modules/notification/utils.d.ts.map +0 -1
@@ -0,0 +1,13 @@
1
+ import { type ModalLayout, type ModalPosition, type ResponsiveModalPosition } from "./types";
2
+ export declare function hasHeightConstraint(className?: string): boolean;
3
+ export declare function isSidePosition(position: ModalPosition | null | undefined): boolean;
4
+ export declare function isVerticalEdgePosition(position: ModalPosition | null | undefined): boolean;
5
+ export declare function getModalPosition(position: ModalPosition): ModalPosition;
6
+ export declare function getModalLayout(position: ModalPosition, isMobile: boolean): ModalLayout;
7
+ export declare function getViewportIsMobile(): boolean;
8
+ export declare function resolveActivePosition(position: ModalPosition, responsivePosition: ResponsiveModalPosition | null | undefined, isMobileViewport: boolean): ModalPosition;
9
+ export declare function normalizePosition(input: ModalPosition | ResponsiveModalPosition | undefined): {
10
+ position: ModalPosition;
11
+ responsivePosition: ResponsiveModalPosition | null;
12
+ };
13
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/modules/modal/layout.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC7B,MAAM,SAAS,CAAC;AAEjB,wBAAgB,mBAAmB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAI/D;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GACzC,OAAO,CAIT;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GACzC,OAAO,CAIT;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa,CAOvE;AACD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,OAAO,GAChB,WAAW,CAQb;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAU7C;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,aAAa,EACvB,kBAAkB,EAAE,uBAAuB,GAAG,IAAI,GAAG,SAAS,EAC9D,gBAAgB,EAAE,OAAO,GACxB,aAAa,CAMf;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,aAAa,GAAG,uBAAuB,GAAG,SAAS,GACzD;IACD,QAAQ,EAAE,aAAa,CAAC;IACxB,kBAAkB,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACpD,CAeA"}
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/modules/modal/module.tsx"],"names":[],"mappings":"AAeA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAEpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;AAwCjB,eAAO,MAAM,WAAW,oIAiBtB,CAAC;AAEH,OAAO,QAAQ,gCAAgC,CAAC;IAC9C,UAAU,WAAW;QACnB,KAAK,EAAE,OAAO,WAAW,CAAC;KAC3B;IACD,UAAU,UAAU;QAClB,KAAK,CAAC,EAAE,eAAe,CAAC;KACzB;CACF;AAED,wBAAgB,WAAW,CACzB,UAAU,GAAE,kBAAuB,GAClC,eAAe,CAajB"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/modules/modal/module.tsx"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAEpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;AAwCjB,eAAO,MAAM,WAAW,oIAiBtB,CAAC;AAEH,OAAO,QAAQ,gCAAgC,CAAC;IAC9C,UAAU,WAAW;QACnB,KAAK,EAAE,OAAO,WAAW,CAAC;KAC3B;IACD,UAAU,UAAU;QAClB,KAAK,CAAC,EAAE,eAAe,CAAC;KACzB;CACF;AAED,wBAAgB,WAAW,CACzB,UAAU,GAAE,kBAAuB,GAClC,eAAe,CAajB"}
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/modules/modal/overlay.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAGL,KAAK,mBAAmB,EAIzB,MAAM,SAAS,CAAC;AAiHjB,wBAAgB,cAAc,CAAC,EAC7B,aAAa,EACb,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAW,EACX,QAAe,GAChB,EAAE,mBAAmB,+BAoErB;AAuJD,wBAAgB,KAAK,uCAsDpB"}
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/modules/modal/overlay.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAGL,KAAK,mBAAmB,EAIzB,MAAM,SAAS,CAAC;AAmHjB,wBAAgB,cAAc,CAAC,EAC7B,aAAa,EACb,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAW,EACX,QAAe,GAChB,EAAE,mBAA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M,MAAM,cAAc,GACtB,UAAU,GACV,MAAM,GACN,aAAa,GACb,SAAS,GACT,KAAK,GACL,OAAO,GACP,OAAO,GACP,OAAO,GACP,WAAW,GACX,aAAa,GACb,KAAK,GACL,WAAW,GACX,QAAQ,GACR,UAAU,GACV,UAAU,GACV,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,OAAO,CAAC;AAEZ,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,YAAY,GACZ,eAAe,GACf,aAAa,CAAC"}
@@ -1,11 +1,5 @@
1
- import { type NotificationActions, type NotificationContextValue, type NotificationProviderProps, type NotificationState } from "./types";
1
+ import { type NotificationContextValue, type NotificationProviderProps, type NotificationState } from "./types";
2
2
  export declare const NotificationContext: import("react").Context<NotificationContextValue | null>;
3
+ export declare const NOOP_NOTIFICATION_STORE: import("@/utils").ExternalStore<NotificationState>;
3
4
  export declare const NotificationProvider: ({ children, }: NotificationProviderProps) => import("react").JSX.Element;
4
- export declare function useNotificationActions(): NotificationActions;
5
- export declare function useNotificationState(): NotificationState;
6
- export declare function useNotification(): NotificationState & NotificationActions;
7
- export declare function useOptionalNotificationState(): NotificationState;
8
- export declare function useOptionalNotificationState<T>(selector: (state: NotificationState) => T, isEqual?: (a: T, b: T) => boolean): T;
9
- export declare function useOptionalNotificationActions(): NotificationActions;
10
- export declare function useNotificationVisible(): boolean;
11
5
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/context.tsx"],"names":[],"mappings":"AAoBA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAG7B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EAEvB,MAAM,SAAS,CAAC;AAOjB,eAAO,MAAM,mBAAmB,0DAK7B,CAAC;AAWJ,eAAO,MAAM,oBAAoB,GAAI,eAElC,yBAAyB,gCA2G3B,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,mBAAmB,CAM5D;AAED,wBAAgB,oBAAoB,IAAI,iBAAiB,CAOxD;AAED,wBAAgB,eAAe,IAAI,iBAAiB,GAAG,mBAAmB,CAIzE;AAMD,wBAAgB,4BAA4B,IAAI,iBAAiB,CAAC;AAClE,wBAAgB,4BAA4B,CAAC,CAAC,EAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,CAAC,EACzC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAChC,CAAC,CAAC;AAaL,wBAAgB,8BAA8B,IAAI,mBAAmB,CAGpE;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CAIhD"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/context.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EAEvB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,mBAAmB,0DAI7B,CAAC;AAEJ,eAAO,MAAM,uBAAuB,oDAEnC,CAAC;AAIF,eAAO,MAAM,oBAAoB,GAAI,eAElC,yBAAyB,gCAuF3B,CAAC"}
@@ -1,4 +1,11 @@
1
- import { type ToastController } from "./types";
1
+ import { type NotificationActions, type NotificationState, type ToastController } from "./types";
2
+ export declare function useNotificationActions(): NotificationActions;
3
+ export declare function useNotificationState(): NotificationState;
4
+ export declare function useNotification(): NotificationState & NotificationActions;
5
+ export declare function useOptionalNotificationState(): NotificationState;
6
+ export declare function useOptionalNotificationState<T>(selector: (state: NotificationState) => T, isEqual?: (a: T, b: T) => boolean): T;
7
+ export declare function useOptionalNotificationActions(): NotificationActions;
8
+ export declare function useNotificationVisible(): boolean;
2
9
  export declare function useToast(defaultDuration?: number | null): ToastController;
3
10
  export declare function NotificationListener(): null;
4
11
  export declare function useNotificationContainerModel(): {
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/hooks.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,SAAS,CAAC;AA2BjB,wBAAgB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,eAAe,CAsFzE;AAID,wBAAgB,oBAAoB,IAAI,IAAI,CAyB3C;AAED,wBAAgB,6BAA6B;;;;;EAgB5C"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/hooks.ts"],"names":[],"mappings":"AA8BA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAGrB,MAAM,SAAS,CAAC;AAIjB,wBAAgB,sBAAsB,IAAI,mBAAmB,CAM5D;AAED,wBAAgB,oBAAoB,IAAI,iBAAiB,CAOxD;AAED,wBAAgB,eAAe,IAAI,iBAAiB,GAAG,mBAAmB,CAIzE;AAED,wBAAgB,4BAA4B,IAAI,iBAAiB,CAAC;AAClE,wBAAgB,4BAA4B,CAAC,CAAC,EAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,CAAC,EACzC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAChC,CAAC,CAAC;AAaL,wBAAgB,8BAA8B,IAAI,mBAAmB,CAGpE;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CAIhD;AAED,wBAAgB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,eAAe,CAoFzE;AAID,wBAAgB,oBAAoB,IAAI,IAAI,CAyB3C;AAED,wBAAgB,6BAA6B;;;;;EAgB5C"}
@@ -1,6 +1,7 @@
1
1
  export { DOCK_STACK_ELEMENT_ID, INITIAL_NOTIFICATION_STATE, INERT_NOTIFICATION_ACTIONS, SESSION_EXPIRED_MESSAGE, TOAST_DURATIONS, notificationTheme, } from "./constants";
2
- export { NotificationContext, NotificationProvider, useNotification, useNotificationActions, useNotificationState, useNotificationVisible, useOptionalNotificationActions, useOptionalNotificationState, } from "./context";
3
- export { useToast } from "./hooks";
2
+ export { NotificationContext, NotificationProvider, NOOP_NOTIFICATION_STORE, } from "./context";
3
+ export { NotificationListener, useNotification, useNotificationActions, useNotificationContainerModel, useNotificationState, useNotificationVisible, useOptionalNotificationActions, useOptionalNotificationState, useToast, } from "./hooks";
4
4
  export { notificationModule } from "./module";
5
- export * from "./types";
5
+ export { createNotificationEntry, getActiveNotification, getOutcomeMessage, isNotificationDataObject, normalizeDuration, normalizeFeedbackText, normalizeToastOptions, withDefaultDuration, } from "./state";
6
+ export type * from "./types";
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,EACf,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,EACf,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,6BAA6B,EAC7B,oBAAoB,EACpB,sBAAsB,EACtB,8BAA8B,EAC9B,4BAA4B,EAC5B,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AACjB,mBAAmB,SAAS,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { clsx } from 'clsx';
3
3
  import { twMerge } from 'tailwind-merge';
4
- import { createContext, useState, useRef, useCallback, useEffect, useMemo, useContext, use, useSyncExternalStore, useLayoutEffect } from 'react';
4
+ import { createContext, useState, useRef, useCallback, useEffect, useMemo, useContext, useSyncExternalStore, use, useLayoutEffect } from 'react';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import { createPortal } from 'react-dom';
7
7
  import { AnimatePresence, motion } from 'motion/react';
@@ -347,7 +347,12 @@ var INERT_NOTIFICATION_ACTIONS = Object.freeze({
347
347
  showNotification: () => null
348
348
  });
349
349
 
350
- // src/modules/notification/utils.ts
350
+ // src/result.ts
351
+ function isResult(value) {
352
+ return typeof value === "object" && value !== null && "success" in value && typeof value.success === "boolean" && ("data" in value && value.success === true || "error" in value && value.success === false);
353
+ }
354
+
355
+ // src/modules/notification/state.ts
351
356
  function normalizeFeedbackText(value) {
352
357
  if (typeof value !== "string") return value;
353
358
  return value.trim().replace(/[.\s]+$/, "");
@@ -362,6 +367,12 @@ function getActiveNotification(notifications) {
362
367
  function normalizeToastOptions(options) {
363
368
  return typeof options === "number" ? { duration: options } : options || {};
364
369
  }
370
+ function normalizeDuration(value) {
371
+ if (value === null) return null;
372
+ if (value === void 0) return TOAST_DURATIONS.DEFAULT;
373
+ const duration = Number(value);
374
+ return Number.isFinite(duration) && duration > 0 ? duration : null;
375
+ }
365
376
  function withDefaultDuration(duration, options) {
366
377
  const normalized = normalizeToastOptions(options);
367
378
  return {
@@ -372,17 +383,41 @@ function withDefaultDuration(duration, options) {
372
383
  function isNotificationDataObject(value) {
373
384
  return isObject(value) && "message" in value;
374
385
  }
386
+ function resolveMessage(message, arg) {
387
+ return typeof message === "function" ? message(arg) : message;
388
+ }
389
+ function getOutcomeMessage(value, messages) {
390
+ if (!isResult(value)) return resolveMessage(messages.success, value);
391
+ return value.success ? resolveMessage(messages.success, value.data) : resolveMessage(messages.error, value.error) || toUserMessage(value.error);
392
+ }
393
+ function createNotificationEntry(messageOrData, options, fallbackId) {
394
+ const normalizedOptions = normalizeToastOptions(options);
395
+ const payload = isNotificationDataObject(messageOrData) ? { ...normalizedOptions, ...messageOrData } : { ...normalizedOptions, message: messageOrData };
396
+ const normalizedMessage = normalizeFeedbackText(payload.message);
397
+ if (normalizedMessage === null || normalizedMessage === void 0 || normalizedMessage === "") {
398
+ return null;
399
+ }
400
+ const id = payload.dedupeKey || payload.id || (typeof normalizedMessage === "string" ? normalizedMessage.slice(0, 64) : fallbackId || `notification-${Date.now()}`);
401
+ const entry = {
402
+ dedupeKey: payload.dedupeKey,
403
+ duration: payload.duration,
404
+ id,
405
+ message: normalizedMessage,
406
+ timestamp: Date.now()
407
+ };
408
+ return {
409
+ duration: normalizeDuration(payload.duration),
410
+ entry
411
+ };
412
+ }
375
413
  var NotificationContext = getOrCreateGlobalContext(
376
414
  "NotificationContext",
377
415
  null
378
416
  );
417
+ var NOOP_NOTIFICATION_STORE = createStore(
418
+ INITIAL_NOTIFICATION_STATE
419
+ );
379
420
  var notificationIdCounter = 0;
380
- function normalizeDuration(value) {
381
- if (value === null) return null;
382
- if (value === void 0) return TOAST_DURATIONS.DEFAULT;
383
- const duration = Number(value);
384
- return Number.isFinite(duration) && duration > 0 ? duration : null;
385
- }
386
421
  var NotificationProvider = ({
387
422
  children
388
423
  }) => {
@@ -420,23 +455,17 @@ var NotificationProvider = ({
420
455
  }, [clearTimers, store]);
421
456
  const showNotification = useCallback(
422
457
  (messageOrData, options) => {
423
- const normalizedOptions = normalizeToastOptions(options);
424
- const payload = isNotificationDataObject(messageOrData) ? { ...normalizedOptions, ...messageOrData } : { ...normalizedOptions, message: messageOrData };
425
- const normalizedMessage = normalizeFeedbackText(payload.message);
426
- if (normalizedMessage === null || normalizedMessage === void 0 || normalizedMessage === "") {
427
- return null;
428
- }
429
- const id = payload.dedupeKey || payload.id || (typeof normalizedMessage === "string" ? normalizedMessage.slice(0, 64) : `notification-${++notificationIdCounter}`);
458
+ const fallbackId = `notification-${++notificationIdCounter}`;
459
+ const result = createNotificationEntry(
460
+ messageOrData,
461
+ options,
462
+ fallbackId
463
+ );
464
+ if (!result) return null;
465
+ const { entry, duration } = result;
466
+ const { id } = entry;
430
467
  clearTimers();
431
- const entry = {
432
- dedupeKey: payload.dedupeKey,
433
- duration: payload.duration,
434
- id,
435
- message: normalizedMessage,
436
- timestamp: Date.now()
437
- };
438
468
  store.publish({ notifications: { [id]: entry } });
439
- const duration = normalizeDuration(payload.duration);
440
469
  if (duration) {
441
470
  timersRef.current.set(
442
471
  id,
@@ -461,6 +490,7 @@ var NotificationProvider = ({
461
490
  );
462
491
  return /* @__PURE__ */ jsx(NotificationContext, { value, children });
463
492
  };
493
+ var toastPromiseIdCounter = 0;
464
494
  function useNotificationActions() {
465
495
  return useRequiredContext(
466
496
  NotificationContext,
@@ -481,9 +511,6 @@ function useNotification() {
481
511
  const state = useNotificationState();
482
512
  return useMemo(() => ({ ...actions, ...state }), [actions, state]);
483
513
  }
484
- var NOOP_NOTIFICATION_STORE = createStore(
485
- INITIAL_NOTIFICATION_STATE
486
- );
487
514
  function useOptionalNotificationState(selector, isEqual) {
488
515
  const ctx = useContext(NotificationContext);
489
516
  return useStore(
@@ -501,21 +528,6 @@ function useNotificationVisible() {
501
528
  ({ notifications }) => Object.keys(notifications).length > 0
502
529
  );
503
530
  }
504
-
505
- // src/result.ts
506
- function isResult(value) {
507
- return typeof value === "object" && value !== null && "success" in value && typeof value.success === "boolean" && ("data" in value && value.success === true || "error" in value && value.success === false);
508
- }
509
-
510
- // src/modules/notification/hooks.ts
511
- var toastPromiseIdCounter = 0;
512
- function resolveMessage(message, arg) {
513
- return typeof message === "function" ? message(arg) : message;
514
- }
515
- function getOutcomeMessage(value, messages) {
516
- if (!isResult(value)) return resolveMessage(messages.success, value);
517
- return value.success ? resolveMessage(messages.success, value.data) : resolveMessage(messages.error, value.error) || toUserMessage(value.error);
518
- }
519
531
  function useToast(defaultDuration) {
520
532
  const { dismissAllNotifications, dismissNotification, showNotification } = useNotificationActions();
521
533
  const resolvedDefaultDuration = defaultDuration ?? TOAST_DURATIONS.DEFAULT;
@@ -535,10 +547,8 @@ function useToast(defaultDuration) {
535
547
  );
536
548
  const fromResult = useCallback(
537
549
  (result, messages = {}, options) => {
538
- if (isResult(result)) {
539
- const message = getOutcomeMessage(result, messages);
540
- if (message) triggerToast(message, options);
541
- }
550
+ const message = getOutcomeMessage(result, messages);
551
+ if (message) triggerToast(message, options);
542
552
  return result;
543
553
  },
544
554
  [triggerToast]
@@ -816,6 +826,6 @@ var notificationModule = defineModule({
816
826
  }
817
827
  });
818
828
 
819
- export { DOCK_STACK_ELEMENT_ID, INERT_NOTIFICATION_ACTIONS, INITIAL_NOTIFICATION_STATE, NotificationContext, NotificationProvider, SESSION_EXPIRED_MESSAGE, TOAST_DURATIONS, notificationModule, notificationTheme, useNotification, useNotificationActions, useNotificationState, useNotificationVisible, useOptionalNotificationActions, useOptionalNotificationState, useToast };
829
+ export { DOCK_STACK_ELEMENT_ID, INERT_NOTIFICATION_ACTIONS, INITIAL_NOTIFICATION_STATE, NOOP_NOTIFICATION_STORE, NotificationContext, NotificationListener, NotificationProvider, SESSION_EXPIRED_MESSAGE, TOAST_DURATIONS, createNotificationEntry, getActiveNotification, getOutcomeMessage, isNotificationDataObject, normalizeDuration, normalizeFeedbackText, normalizeToastOptions, notificationModule, notificationTheme, useNotification, useNotificationActions, useNotificationContainerModel, useNotificationState, useNotificationVisible, useOptionalNotificationActions, useOptionalNotificationState, useToast, withDefaultDuration };
820
830
  //# sourceMappingURL=index.js.map
821
831
  //# sourceMappingURL=index.js.map