@omerdlw/base-framework 1.0.1 → 1.0.2

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 (141) hide show
  1. package/dist/atoms/index.d.ts +0 -1
  2. package/dist/atoms/index.d.ts.map +1 -1
  3. package/dist/atoms/index.js +1 -64
  4. package/dist/atoms/index.js.map +1 -1
  5. package/dist/error/index.js +22 -25
  6. package/dist/error/index.js.map +1 -1
  7. package/dist/hooks/index.d.ts +2 -0
  8. package/dist/hooks/index.d.ts.map +1 -1
  9. package/dist/hooks/index.js +97 -4
  10. package/dist/hooks/index.js.map +1 -1
  11. package/dist/hooks/types.d.ts +11 -0
  12. package/dist/hooks/types.d.ts.map +1 -1
  13. package/dist/hooks/use-controllable-state.d.ts +1 -1
  14. package/dist/hooks/use-controllable-state.d.ts.map +1 -1
  15. package/dist/hooks/use-hotkey.d.ts +1 -1
  16. package/dist/hooks/use-hotkey.d.ts.map +1 -1
  17. package/dist/index.js +10811 -10696
  18. package/dist/index.js.map +1 -1
  19. package/dist/kernel/adapters.d.ts.map +1 -1
  20. package/dist/kernel/index.d.ts +1 -0
  21. package/dist/kernel/index.d.ts.map +1 -1
  22. package/dist/kernel/index.js +13 -84
  23. package/dist/kernel/index.js.map +1 -1
  24. package/dist/kernel/installed.d.ts.map +1 -1
  25. package/dist/kernel/page-controller.d.ts.map +1 -1
  26. package/dist/kernel/provider.d.ts.map +1 -1
  27. package/dist/modules/ambient/constants.d.ts +1 -1
  28. package/dist/modules/ambient/constants.d.ts.map +1 -1
  29. package/dist/modules/ambient/index.js +180 -326
  30. package/dist/modules/ambient/index.js.map +1 -1
  31. package/dist/modules/ambient/module.d.ts.map +1 -1
  32. package/dist/modules/background/constants.d.ts +4 -2
  33. package/dist/modules/background/constants.d.ts.map +1 -1
  34. package/dist/modules/background/context.d.ts +3 -0
  35. package/dist/modules/background/context.d.ts.map +1 -1
  36. package/dist/modules/background/hooks.d.ts +1 -1
  37. package/dist/modules/background/index.d.ts +2 -2
  38. package/dist/modules/background/index.d.ts.map +1 -1
  39. package/dist/modules/background/index.js +1172 -1270
  40. package/dist/modules/background/index.js.map +1 -1
  41. package/dist/modules/background/overlay.d.ts +1 -1
  42. package/dist/modules/background/overlay.d.ts.map +1 -1
  43. package/dist/modules/background/types.d.ts +1 -1
  44. package/dist/modules/background/types.d.ts.map +1 -1
  45. package/dist/modules/context-menu/constants.d.ts +1 -1
  46. package/dist/modules/context-menu/constants.d.ts.map +1 -1
  47. package/dist/modules/context-menu/context.d.ts.map +1 -1
  48. package/dist/modules/context-menu/hooks.d.ts.map +1 -1
  49. package/dist/modules/context-menu/index.js +135 -240
  50. package/dist/modules/context-menu/index.js.map +1 -1
  51. package/dist/modules/controls/constants.d.ts +1 -1
  52. package/dist/modules/controls/constants.d.ts.map +1 -1
  53. package/dist/modules/controls/hooks.d.ts +1 -1
  54. package/dist/modules/controls/index.js +31 -165
  55. package/dist/modules/controls/index.js.map +1 -1
  56. package/dist/modules/controls/types.d.ts +1 -1
  57. package/dist/modules/controls/types.d.ts.map +1 -1
  58. package/dist/modules/dock/cards.d.ts +1 -1
  59. package/dist/modules/dock/constants.d.ts +1 -1
  60. package/dist/modules/dock/constants.d.ts.map +1 -1
  61. package/dist/modules/dock/context.d.ts +10 -6
  62. package/dist/modules/dock/context.d.ts.map +1 -1
  63. package/dist/modules/dock/hooks.d.ts +4 -4
  64. package/dist/modules/dock/hooks.d.ts.map +1 -1
  65. package/dist/modules/dock/index.d.ts +1 -1
  66. package/dist/modules/dock/index.d.ts.map +1 -1
  67. package/dist/modules/dock/index.js +2063 -2083
  68. package/dist/modules/dock/index.js.map +1 -1
  69. package/dist/modules/dock/runtime/dock.d.ts.map +1 -1
  70. package/dist/modules/dock/types.d.ts +1 -1
  71. package/dist/modules/dock/types.d.ts.map +1 -1
  72. package/dist/modules/index.js +10193 -10350
  73. package/dist/modules/index.js.map +1 -1
  74. package/dist/modules/loading/constants.d.ts +4 -2
  75. package/dist/modules/loading/constants.d.ts.map +1 -1
  76. package/dist/modules/loading/context.d.ts +3 -0
  77. package/dist/modules/loading/context.d.ts.map +1 -1
  78. package/dist/modules/loading/hooks.d.ts +1 -1
  79. package/dist/modules/loading/hooks.d.ts.map +1 -1
  80. package/dist/modules/loading/index.d.ts +2 -2
  81. package/dist/modules/loading/index.d.ts.map +1 -1
  82. package/dist/modules/loading/index.js +121 -225
  83. package/dist/modules/loading/index.js.map +1 -1
  84. package/dist/modules/loading/types.d.ts +1 -1
  85. package/dist/modules/loading/types.d.ts.map +1 -1
  86. package/dist/modules/media/constants.d.ts +2 -1
  87. package/dist/modules/media/constants.d.ts.map +1 -1
  88. package/dist/modules/media/context.d.ts +3 -0
  89. package/dist/modules/media/context.d.ts.map +1 -1
  90. package/dist/modules/media/index.d.ts +2 -2
  91. package/dist/modules/media/index.d.ts.map +1 -1
  92. package/dist/modules/media/index.js +61 -218
  93. package/dist/modules/media/index.js.map +1 -1
  94. package/dist/modules/modal/constants.d.ts +1 -1
  95. package/dist/modules/modal/constants.d.ts.map +1 -1
  96. package/dist/modules/modal/context.d.ts.map +1 -1
  97. package/dist/modules/modal/hooks.d.ts +2 -2
  98. package/dist/modules/modal/index.js +31 -293
  99. package/dist/modules/modal/index.js.map +1 -1
  100. package/dist/modules/notification/constants.d.ts +4 -2
  101. package/dist/modules/notification/constants.d.ts.map +1 -1
  102. package/dist/modules/notification/context.d.ts +4 -0
  103. package/dist/modules/notification/context.d.ts.map +1 -1
  104. package/dist/modules/notification/hooks.d.ts +1 -1
  105. package/dist/modules/notification/index.d.ts +2 -3
  106. package/dist/modules/notification/index.d.ts.map +1 -1
  107. package/dist/modules/notification/index.js +65 -151
  108. package/dist/modules/notification/index.js.map +1 -1
  109. package/dist/modules/notification/module.d.ts.map +1 -1
  110. package/dist/provider.js +255 -257
  111. package/dist/provider.js.map +1 -1
  112. package/dist/theme.d.ts +1 -0
  113. package/dist/theme.d.ts.map +1 -1
  114. package/dist/theme.js +2 -2
  115. package/dist/theme.js.map +1 -1
  116. package/dist/utils/dom.d.ts +2 -0
  117. package/dist/utils/dom.d.ts.map +1 -1
  118. package/dist/utils/index.d.ts +1 -1
  119. package/dist/utils/index.d.ts.map +1 -1
  120. package/dist/utils/index.js +28 -19
  121. package/dist/utils/index.js.map +1 -1
  122. package/docs/modules/loading.md +1 -1
  123. package/package.json +48 -2
  124. package/dist/hooks/use-async-action.d.ts +0 -3
  125. package/dist/hooks/use-async-action.d.ts.map +0 -1
  126. package/dist/hooks/use-debounce.d.ts +0 -2
  127. package/dist/hooks/use-debounce.d.ts.map +0 -1
  128. package/dist/hooks/use-intersection-observer.d.ts +0 -4
  129. package/dist/hooks/use-intersection-observer.d.ts.map +0 -1
  130. package/dist/hooks/use-media-query.d.ts +0 -2
  131. package/dist/hooks/use-media-query.d.ts.map +0 -1
  132. package/dist/hooks/use-mounted.d.ts +0 -2
  133. package/dist/hooks/use-mounted.d.ts.map +0 -1
  134. package/dist/hooks/use-server-action.d.ts +0 -4
  135. package/dist/hooks/use-server-action.d.ts.map +0 -1
  136. package/dist/hooks/use-storage-state.d.ts +0 -5
  137. package/dist/hooks/use-storage-state.d.ts.map +0 -1
  138. package/dist/modules/theme.d.ts +0 -3
  139. package/dist/modules/theme.d.ts.map +0 -1
  140. package/dist/utils/json.d.ts +0 -3
  141. package/dist/utils/json.d.ts.map +0 -1
@@ -1,9 +1,11 @@
1
- import { type NotificationThemeSlot } from "./types";
1
+ import { type NotificationActions, type NotificationState, type NotificationThemeSlot } from "./types";
2
2
  export declare const TOAST_DURATIONS: Readonly<{
3
3
  readonly DEFAULT: 2000;
4
4
  readonly SHORT: 1500;
5
5
  }>;
6
6
  export declare const SESSION_EXPIRED_MESSAGE: "Your session has expired. Please sign in again";
7
7
  export declare const DOCK_STACK_ELEMENT_ID = "dock-card-stack";
8
- export declare const notificationTheme: import("../theme").ThemeSpec<NotificationThemeSlot>;
8
+ export declare const notificationTheme: import("@/theme").ThemeSpec<NotificationThemeSlot>;
9
+ export declare const INITIAL_NOTIFICATION_STATE: NotificationState;
10
+ export declare const INERT_NOTIFICATION_ACTIONS: NotificationActions;
9
11
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,eAAe;;;EAGjB,CAAC;AAEZ,eAAO,MAAM,uBAAuB,kDAA6B,CAAC;AAElE,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,eAAO,MAAM,iBAAiB,qDAC0B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC3B,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,eAAe;;;EAGjB,CAAC;AAEZ,eAAO,MAAM,uBAAuB,kDAA6B,CAAC;AAElE,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,eAAO,MAAM,iBAAiB,oDAC0B,CAAC;AAEzD,eAAO,MAAM,0BAA0B,EAAE,iBAEvC,CAAC;AAEH,eAAO,MAAM,0BAA0B,EAAE,mBAIvC,CAAC"}
@@ -4,4 +4,8 @@ export declare const NotificationProvider: ({ children, }: NotificationProviderP
4
4
  export declare function useNotificationActions(): NotificationActions;
5
5
  export declare function useNotificationState(): NotificationState;
6
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;
7
11
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/modules/notification/context.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAG7B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EAEvB,MAAM,SAAS,CAAC;AASjB,eAAO,MAAM,mBAAmB,0DAI7B,CAAC;AAaJ,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"}
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"}
@@ -5,6 +5,6 @@ export declare function useNotificationContainerModel(): {
5
5
  dismissNotification: (id: string) => void;
6
6
  isHydrated: boolean;
7
7
  activeEntry: import("./types").NotificationEntry | null;
8
- theme: import("../theme").ResolvedTheme<import("./types").NotificationThemeSlot>;
8
+ theme: import("@/theme").ResolvedTheme<import("./types").NotificationThemeSlot>;
9
9
  };
10
10
  //# sourceMappingURL=hooks.d.ts.map
@@ -1,7 +1,6 @@
1
- export { TOAST_DURATIONS } from "./constants";
2
- export { NotificationContext, NotificationProvider, useNotification, useNotificationActions, useNotificationState, } from "./context";
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
3
  export { useToast } from "./hooks";
4
4
  export { notificationModule } from "./module";
5
- export { notificationTheme } from "./constants";
6
5
  export * from "./types";
7
6
  //# 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,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,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,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,9 +1,8 @@
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, use, useSyncExternalStore, useLayoutEffect, useContext } from 'react';
4
+ import { createContext, useState, useRef, useCallback, useEffect, useMemo, useContext, use, useSyncExternalStore, useLayoutEffect } from 'react';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
- import 'next/navigation';
7
6
  import { createPortal } from 'react-dom';
8
7
  import { AnimatePresence, motion } from 'motion/react';
9
8
 
@@ -154,34 +153,6 @@ function getOrCreateGlobalContext(name, defaultValue) {
154
153
  }
155
154
  return store[sym];
156
155
  }
157
-
158
- // src/theme.tsx
159
- function defineThemeSpec(id) {
160
- return Object.freeze({ id });
161
- }
162
- var EMPTY = /* @__PURE__ */ new Map();
163
- var ThemeContext = getOrCreateGlobalContext("ThemeContext", EMPTY);
164
- function useTheme(spec) {
165
- const config = useContext(ThemeContext).get(spec.id);
166
- if (!config) {
167
- throw new Error(
168
- `Theme "${spec.id}" is missing. Add its theme file to src/config/ and list it in src/config/index.ts.`
169
- );
170
- }
171
- return {
172
- slots: config.slots,
173
- styles: config.styles ?? {}
174
- };
175
- }
176
-
177
- // src/modules/notification/constants.ts
178
- var TOAST_DURATIONS = Object.freeze({
179
- DEFAULT: 2e3,
180
- SHORT: 1500
181
- });
182
- var SESSION_EXPIRED_MESSAGE = USER_MESSAGES.unauthorized;
183
- var DOCK_STACK_ELEMENT_ID = "dock-card-stack";
184
- var notificationTheme = defineThemeSpec("notification");
185
156
  function useRequiredContext(context, hookName, providerName) {
186
157
  const value = use(context);
187
158
  if (value === null) {
@@ -333,6 +304,48 @@ function useGlobalEvent(event, callback, options) {
333
304
  };
334
305
  }, [event, debounceMs, throttleMs]);
335
306
  }
307
+ function defineModule(coreModule) {
308
+ return Object.freeze({ ...coreModule });
309
+ }
310
+ createStore(void 0);
311
+
312
+ // src/theme.tsx
313
+ function defineThemeSpec(id) {
314
+ return Object.freeze({ id });
315
+ }
316
+ var EMPTY = /* @__PURE__ */ new Map();
317
+ var ThemeContext = getOrCreateGlobalContext("ThemeContext", EMPTY);
318
+ function useTheme(spec) {
319
+ const config = useContext(ThemeContext).get(spec.id);
320
+ if (!config) {
321
+ throw new Error(
322
+ `Theme "${spec.id}" is missing. Ensure its theme configuration is provided to <ThemeProvider themes={[...]}> (e.g. in src/config/ or your theme setup).`
323
+ );
324
+ }
325
+ return {
326
+ slots: config.slots,
327
+ styles: config.styles ?? {}
328
+ };
329
+ }
330
+
331
+ // src/modules/notification/constants.ts
332
+ var TOAST_DURATIONS = Object.freeze({
333
+ DEFAULT: 2e3,
334
+ SHORT: 1500
335
+ });
336
+ var SESSION_EXPIRED_MESSAGE = USER_MESSAGES.unauthorized;
337
+ var DOCK_STACK_ELEMENT_ID = "dock-card-stack";
338
+ var notificationTheme = defineThemeSpec("notification");
339
+ var INITIAL_NOTIFICATION_STATE = Object.freeze({
340
+ notifications: {}
341
+ });
342
+ var INERT_NOTIFICATION_ACTIONS = Object.freeze({
343
+ dismissAllNotifications: () => {
344
+ },
345
+ dismissNotification: () => {
346
+ },
347
+ showNotification: () => null
348
+ });
336
349
 
337
350
  // src/modules/notification/utils.ts
338
351
  function normalizeFeedbackText(value) {
@@ -364,7 +377,6 @@ var NotificationContext = getOrCreateGlobalContext(
364
377
  null
365
378
  );
366
379
  var notificationIdCounter = 0;
367
- var INITIAL_NOTIFICATION_STATE = { notifications: {} };
368
380
  function normalizeDuration(value) {
369
381
  if (value === null) return null;
370
382
  if (value === void 0) return TOAST_DURATIONS.DEFAULT;
@@ -469,6 +481,26 @@ function useNotification() {
469
481
  const state = useNotificationState();
470
482
  return useMemo(() => ({ ...actions, ...state }), [actions, state]);
471
483
  }
484
+ var NOOP_NOTIFICATION_STORE = createStore(
485
+ INITIAL_NOTIFICATION_STATE
486
+ );
487
+ function useOptionalNotificationState(selector, isEqual) {
488
+ const ctx = useContext(NotificationContext);
489
+ return useStore(
490
+ ctx?.store ?? NOOP_NOTIFICATION_STORE,
491
+ selector,
492
+ isEqual
493
+ );
494
+ }
495
+ function useOptionalNotificationActions() {
496
+ const ctx = useContext(NotificationContext);
497
+ return ctx?.actions ?? INERT_NOTIFICATION_ACTIONS;
498
+ }
499
+ function useNotificationVisible() {
500
+ return useOptionalNotificationState(
501
+ ({ notifications }) => Object.keys(notifications).length > 0
502
+ );
503
+ }
472
504
 
473
505
  // src/result.ts
474
506
  function isResult(value) {
@@ -586,124 +618,6 @@ function useNotificationContainerModel() {
586
618
  return { dismissNotification, isHydrated, activeEntry, theme };
587
619
  }
588
620
 
589
- // src/kernel/constants.ts
590
- var REGISTRY_SOURCES = Object.freeze({
591
- STATIC: "static",
592
- DYNAMIC: "dynamic",
593
- USER: "user"
594
- });
595
- var REGISTRY_LIFECYCLES = Object.freeze({
596
- IMMEDIATE: "immediate",
597
- GRACEFUL: "graceful",
598
- PERSISTENT: "persistent",
599
- ROUTE: "route"
600
- });
601
- var REGISTRY_METADATA_KEYS = Object.freeze([
602
- "cleanup",
603
- "cleanupDelayMs",
604
- "instanceId",
605
- "lifecycle",
606
- "priority",
607
- "source",
608
- "scope",
609
- "validation"
610
- ]);
611
- Object.freeze({
612
- [REGISTRY_SOURCES.STATIC]: 100,
613
- [REGISTRY_SOURCES.DYNAMIC]: 200,
614
- [REGISTRY_SOURCES.USER]: 300
615
- });
616
- Object.freeze({
617
- [REGISTRY_SOURCES.STATIC]: 10,
618
- [REGISTRY_SOURCES.DYNAMIC]: 20,
619
- [REGISTRY_SOURCES.USER]: 30
620
- });
621
- new Set(
622
- Object.values(REGISTRY_LIFECYCLES)
623
- );
624
- new Set(
625
- REGISTRY_METADATA_KEYS
626
- );
627
- var REGISTRY_SCOPE_KINDS = Object.freeze({
628
- APP: "app",
629
- SESSION: "session",
630
- ROUTE: "route",
631
- INSTANCE: "instance",
632
- WORKSPACE: "workspace"
633
- });
634
- REGISTRY_SCOPE_KINDS.APP;
635
- function createNoopHandle(status = "rejected", reason = "unknown") {
636
- const handle = Object.assign(() => false, {
637
- active: false,
638
- dispose: () => false,
639
- instanceId: null,
640
- key: "",
641
- priority: 0,
642
- reason,
643
- source: "",
644
- status,
645
- type: "",
646
- update: () => handle,
647
- updatedAt: 0,
648
- validation: "warn"
649
- });
650
- return handle;
651
- }
652
- createNoopHandle();
653
- getOrCreateGlobalContext(
654
- "RegistryContext",
655
- null
656
- );
657
- getOrCreateGlobalContext("ModuleHostContext", null);
658
- function createPageControllerStore() {
659
- const listeners = /* @__PURE__ */ new Set();
660
- let stack = [];
661
- const notify = () => {
662
- listeners.forEach((listener) => {
663
- try {
664
- listener();
665
- } catch (error) {
666
- report("Page controller listener", error);
667
- }
668
- });
669
- };
670
- return {
671
- getSnapshot() {
672
- const top = stack[stack.length - 1];
673
- return top?.controllerRef?.current || null;
674
- },
675
- notify,
676
- register(id, controllerRef) {
677
- stack = stack.filter((item) => item.id !== id);
678
- stack.push({ controllerRef, id });
679
- notify();
680
- },
681
- subscribe(listener) {
682
- listeners.add(listener);
683
- return () => {
684
- listeners.delete(listener);
685
- };
686
- },
687
- unregister(id) {
688
- stack = stack.filter((item) => item.id !== id);
689
- notify();
690
- }
691
- };
692
- }
693
- var fallbackStandaloneStore = createPageControllerStore();
694
- getOrCreateGlobalContext(
695
- "PageControllerContext",
696
- null
697
- );
698
- getOrCreateGlobalContext(
699
- "PageControllerStoreContext",
700
- fallbackStandaloneStore
701
- );
702
- function defineModule(coreModule) {
703
- return Object.freeze({ ...coreModule });
704
- }
705
- createStore(void 0);
706
-
707
621
  // src/tokens/motion.ts
708
622
  var DURATION_TOKENS = Object.freeze({
709
623
  INSTANT: 0.08,
@@ -875,7 +789,7 @@ function NotificationLayer() {
875
789
  ] });
876
790
  }
877
791
 
878
- // src/modules/notification/module.ts
792
+ // src/modules/notification/module.tsx
879
793
  function selectToastDuration(config) {
880
794
  const notification = config.notification;
881
795
  if (typeof notification === "number") return notification;
@@ -902,6 +816,6 @@ var notificationModule = defineModule({
902
816
  }
903
817
  });
904
818
 
905
- export { NotificationContext, NotificationProvider, TOAST_DURATIONS, notificationModule, notificationTheme, useNotification, useNotificationActions, useNotificationState, useToast };
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 };
906
820
  //# sourceMappingURL=index.js.map
907
821
  //# sourceMappingURL=index.js.map