mates-devtools 0.1.0-beta.6 → 0.1.0-beta.7

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 (161) hide show
  1. package/dist/mates-devtools.es.js +912 -734
  2. package/dist/mates-devtools.umd.js +132 -87
  3. package/dist/types/Mates-DevTools/src/MatesDevTools.d.ts.map +1 -1
  4. package/dist/types/Mates-DevTools/src/MatesDevToolsComponent.d.ts.map +1 -1
  5. package/dist/types/Mates-DevTools/src/components/Header.d.ts +3 -2
  6. package/dist/types/Mates-DevTools/src/components/Header.d.ts.map +1 -1
  7. package/dist/types/Mates-DevTools/src/components/UserLogsViewer.d.ts +6 -0
  8. package/dist/types/Mates-DevTools/src/components/UserLogsViewer.d.ts.map +1 -0
  9. package/dist/types/Mates-DevTools/src/userLogStore.d.ts +26 -0
  10. package/dist/types/Mates-DevTools/src/userLogStore.d.ts.map +1 -0
  11. package/dist/types/lib/Directives/animationClasses.d.ts +1 -1
  12. package/dist/types/lib/Directives/customEvent.d.ts +74 -0
  13. package/dist/types/lib/Directives/customEvent.d.ts.map +1 -0
  14. package/dist/types/lib/Directives/disappear.d.ts +23 -0
  15. package/dist/types/lib/Directives/disappear.d.ts.map +1 -0
  16. package/dist/types/lib/Directives/eleHook.d.ts.map +1 -1
  17. package/dist/types/lib/Directives/htmlHook.d.ts.map +1 -1
  18. package/dist/types/lib/Directives/index.d.ts +5 -3
  19. package/dist/types/lib/Directives/index.d.ts.map +1 -1
  20. package/dist/types/lib/Directives/onDirective.d.ts.map +1 -1
  21. package/dist/types/lib/Directives/onParentDirective.d.ts +1 -1
  22. package/dist/types/lib/Directives/timerDirective.d.ts +6 -6
  23. package/dist/types/lib/Directives/timerDirective.d.ts.map +1 -1
  24. package/dist/types/lib/Directives/virtualHelpers.d.ts +8 -6
  25. package/dist/types/lib/Directives/virtualHelpers.d.ts.map +1 -1
  26. package/dist/types/lib/Fetch/Fetch.d.ts +59 -13
  27. package/dist/types/lib/Fetch/Fetch.d.ts.map +1 -1
  28. package/dist/types/lib/MatesUtils/FetchUtils.d.ts +23 -0
  29. package/dist/types/lib/MatesUtils/FetchUtils.d.ts.map +1 -0
  30. package/dist/types/lib/MatesUtils/MatesUtils.d.ts +47 -0
  31. package/dist/types/lib/MatesUtils/MatesUtils.d.ts.map +1 -0
  32. package/dist/types/lib/MatesUtils/RouterUtils.d.ts +39 -0
  33. package/dist/types/lib/MatesUtils/RouterUtils.d.ts.map +1 -0
  34. package/dist/types/lib/MatesUtils/StorageUtils.d.ts +16 -0
  35. package/dist/types/lib/MatesUtils/StorageUtils.d.ts.map +1 -0
  36. package/dist/types/lib/MatesUtils/ThemeUtils.d.ts +18 -0
  37. package/dist/types/lib/MatesUtils/ThemeUtils.d.ts.map +1 -0
  38. package/dist/types/lib/MatesUtils/index.d.ts +6 -0
  39. package/dist/types/lib/MatesUtils/index.d.ts.map +1 -0
  40. package/dist/types/lib/Mutables/Extended Atoms/changeFlagAtom.d.ts +56 -0
  41. package/dist/types/lib/Mutables/Extended Atoms/changeFlagAtom.d.ts.map +1 -0
  42. package/dist/types/lib/Mutables/Extended Atoms/index.d.ts +1 -0
  43. package/dist/types/lib/Mutables/Extended Atoms/index.d.ts.map +1 -1
  44. package/dist/types/lib/Mutables/Extended Atoms/themeAtom.d.ts +3 -15
  45. package/dist/types/lib/Mutables/Extended Atoms/themeAtom.d.ts.map +1 -1
  46. package/dist/types/lib/Mutables/atom/atom.d.ts.map +1 -1
  47. package/dist/types/lib/Mutables/atom/delayAtom.d.ts +40 -0
  48. package/dist/types/lib/Mutables/atom/delayAtom.d.ts.map +1 -0
  49. package/dist/types/lib/Mutables/atom/index.d.ts +2 -1
  50. package/dist/types/lib/Mutables/atom/index.d.ts.map +1 -1
  51. package/dist/types/lib/Mutables/atom/storageAtom.d.ts +9 -31
  52. package/dist/types/lib/Mutables/atom/storageAtom.d.ts.map +1 -1
  53. package/dist/types/lib/Mutables/atom/titleAtom.d.ts +3 -9
  54. package/dist/types/lib/Mutables/atom/titleAtom.d.ts.map +1 -1
  55. package/dist/types/lib/Mutables/form/formAtom.d.ts +7 -5
  56. package/dist/types/lib/Mutables/form/formAtom.d.ts.map +1 -1
  57. package/dist/types/lib/Mutables/scope/scope.d.ts +32 -1
  58. package/dist/types/lib/Mutables/scope/scope.d.ts.map +1 -1
  59. package/dist/types/lib/Mutables/useStore/hostContext.d.ts.map +1 -1
  60. package/dist/types/lib/Mutables/useStore/subscription.d.ts +1 -1
  61. package/dist/types/lib/Mutables/useStore/subscription.d.ts.map +1 -1
  62. package/dist/types/lib/Router/Router.d.ts +2 -2
  63. package/dist/types/lib/Router/Router.d.ts.map +1 -1
  64. package/dist/types/lib/Router/animatedRouter.d.ts.map +1 -1
  65. package/dist/types/lib/Router/hashAtom.d.ts +7 -3
  66. package/dist/types/lib/Router/hashAtom.d.ts.map +1 -1
  67. package/dist/types/lib/Router/historyStateAtom.d.ts +8 -0
  68. package/dist/types/lib/Router/historyStateAtom.d.ts.map +1 -0
  69. package/dist/types/lib/Router/historyUtils.d.ts +14 -0
  70. package/dist/types/lib/Router/historyUtils.d.ts.map +1 -0
  71. package/dist/types/lib/Router/index.d.ts +2 -6
  72. package/dist/types/lib/Router/index.d.ts.map +1 -1
  73. package/dist/types/lib/Router/isPathMatching.d.ts +5 -1
  74. package/dist/types/lib/Router/isPathMatching.d.ts.map +1 -1
  75. package/dist/types/lib/Router/location.d.ts +4 -63
  76. package/dist/types/lib/Router/location.d.ts.map +1 -1
  77. package/dist/types/lib/Router/navigateTo.d.ts +8 -27
  78. package/dist/types/lib/Router/navigateTo.d.ts.map +1 -1
  79. package/dist/types/lib/Router/navigationLock.d.ts +5 -46
  80. package/dist/types/lib/Router/navigationLock.d.ts.map +1 -1
  81. package/dist/types/lib/Router/navigationRequest.d.ts +26 -0
  82. package/dist/types/lib/Router/navigationRequest.d.ts.map +1 -0
  83. package/dist/types/lib/Router/pathAtom.d.ts +16 -36
  84. package/dist/types/lib/Router/pathAtom.d.ts.map +1 -1
  85. package/dist/types/lib/Router/qsAtom.d.ts +7 -3
  86. package/dist/types/lib/Router/qsAtom.d.ts.map +1 -1
  87. package/dist/types/lib/Template/hmr.d.ts +6 -0
  88. package/dist/types/lib/Template/hmr.d.ts.map +1 -0
  89. package/dist/types/lib/Template/x-x.d.ts +1 -0
  90. package/dist/types/lib/Template/x-x.d.ts.map +1 -1
  91. package/dist/types/lib/Template/x-x.types.d.ts +0 -22
  92. package/dist/types/lib/Template/x-x.types.d.ts.map +1 -1
  93. package/dist/types/lib/Template/x.d.ts +19 -2
  94. package/dist/types/lib/Template/x.d.ts.map +1 -1
  95. package/dist/types/lib/TrackState/componentStatus.d.ts +0 -5
  96. package/dist/types/lib/TrackState/componentStatus.d.ts.map +1 -1
  97. package/dist/types/lib/TrackState/readTracking.d.ts.map +1 -1
  98. package/dist/types/lib/Utils/cookie.d.ts +2 -0
  99. package/dist/types/lib/Utils/cookie.d.ts.map +1 -0
  100. package/dist/types/lib/Utils/countdown.d.ts +48 -0
  101. package/dist/types/lib/Utils/countdown.d.ts.map +1 -0
  102. package/dist/types/lib/Utils/index.d.ts +3 -0
  103. package/dist/types/lib/Utils/index.d.ts.map +1 -1
  104. package/dist/types/lib/Utils/logEvent.d.ts +24 -0
  105. package/dist/types/lib/Utils/logEvent.d.ts.map +1 -0
  106. package/dist/types/lib/Utils/logger.d.ts +24 -13
  107. package/dist/types/lib/Utils/logger.d.ts.map +1 -1
  108. package/dist/types/lib/Utils/onceIdle.d.ts +28 -0
  109. package/dist/types/lib/Utils/onceIdle.d.ts.map +1 -0
  110. package/dist/types/lib/Utils/svgIcon.d.ts +2 -4
  111. package/dist/types/lib/Utils/svgIcon.d.ts.map +1 -1
  112. package/dist/types/lib/actions/asyncAction.d.ts.map +1 -1
  113. package/dist/types/lib/css-in-js/index.d.ts +1 -1
  114. package/dist/types/lib/css-in-js/index.d.ts.map +1 -1
  115. package/dist/types/lib/css-in-js/stylesheet.d.ts +15 -0
  116. package/dist/types/lib/css-in-js/stylesheet.d.ts.map +1 -1
  117. package/dist/types/lib/css-in-js/theme.d.ts +0 -8
  118. package/dist/types/lib/css-in-js/theme.d.ts.map +1 -1
  119. package/dist/types/lib/index.d.ts +25 -18
  120. package/dist/types/lib/index.d.ts.map +1 -1
  121. package/dist/types/lib/indexdb/index.d.ts +3 -0
  122. package/dist/types/lib/indexdb/index.d.ts.map +1 -0
  123. package/dist/types/lib/indexdb/indexdb.d.ts +86 -0
  124. package/dist/types/lib/indexdb/indexdb.d.ts.map +1 -0
  125. package/dist/types/lib/indexdb/types.d.ts +249 -0
  126. package/dist/types/lib/indexdb/types.d.ts.map +1 -0
  127. package/dist/types/lib/minidb/index.d.ts +3 -0
  128. package/dist/types/lib/minidb/index.d.ts.map +1 -0
  129. package/dist/types/lib/minidb/minidb.d.ts +105 -0
  130. package/dist/types/lib/minidb/minidb.d.ts.map +1 -0
  131. package/dist/types/lib/on/hooks.d.ts.map +1 -1
  132. package/dist/types/lib/portals/floating-container.d.ts +129 -0
  133. package/dist/types/lib/portals/floating-container.d.ts.map +1 -0
  134. package/dist/types/lib/portals/index.d.ts +5 -3
  135. package/dist/types/lib/portals/index.d.ts.map +1 -1
  136. package/dist/types/lib/portals/popup.d.ts +75 -11
  137. package/dist/types/lib/portals/popup.d.ts.map +1 -1
  138. package/dist/types/lib/portals/popupPlacement.d.ts +52 -0
  139. package/dist/types/lib/portals/popupPlacement.d.ts.map +1 -0
  140. package/dist/types/lib/portals/portal.d.ts +40 -16
  141. package/dist/types/lib/portals/portal.d.ts.map +1 -1
  142. package/dist/types/lib/socket/ws.d.ts +2 -2
  143. package/dist/types/lib/ssr/index.d.ts +1 -0
  144. package/dist/types/lib/ssr/index.d.ts.map +1 -1
  145. package/dist/types/lib/ssr/ssrFlag.d.ts +56 -21
  146. package/dist/types/lib/ssr/ssrFlag.d.ts.map +1 -1
  147. package/dist/types/lib/ssr/useCtx.d.ts +63 -0
  148. package/dist/types/lib/ssr/useCtx.d.ts.map +1 -0
  149. package/dist/types/lib/virtualizer/Virtualizer.d.ts +3 -2
  150. package/dist/types/lib/virtualizer/Virtualizer.d.ts.map +1 -1
  151. package/dist/types/lib/virtualizer/layouts/shared/BaseLayout.d.ts +8 -0
  152. package/dist/types/lib/virtualizer/layouts/shared/BaseLayout.d.ts.map +1 -1
  153. package/dist/types/lib/virtualizer/mates-adapter.d.ts +36 -88
  154. package/dist/types/lib/virtualizer/mates-adapter.d.ts.map +1 -1
  155. package/package.json +1 -1
  156. package/dist/types/lib/Router/pathResolver.d.ts +0 -9
  157. package/dist/types/lib/Router/pathResolver.d.ts.map +0 -1
  158. package/dist/types/lib/portals/tip.d.ts +0 -38
  159. package/dist/types/lib/portals/tip.d.ts.map +0 -1
  160. package/dist/types/lib/virtualizer/layouts/grid.d.ts +0 -25
  161. package/dist/types/lib/virtualizer/layouts/grid.d.ts.map +0 -1
@@ -1,74 +1,15 @@
1
- export { lockNavigation, navigationLocked, unlockNavigation, } from "./navigationLock";
1
+ import type { AtomType } from "../Mutables/atom/atom";
2
+ import type { SuperAtomType } from "../Mutables/atom/atom";
2
3
  /**
3
- * Read-only facade over the three URL-state atoms: `pathAtom`, `hashAtom`,
4
- * and `qsAtom`.
4
+ * Creates a read-only location facade bound to the given scope atoms.
5
5
  *
6
6
  * Every getter performs a **tracked read**, so any reactive context (effect,
7
7
  * component render function) that accesses one of these properties will
8
8
  * automatically re-run when that part of the URL changes.
9
- *
10
- * This module also re-exports `navigationLocked`, `lockNavigation`, and
11
- * `unlockNavigation` from `navigationLock.ts` as a single convenient import
12
- * point for consumers that need both location data and navigation control.
13
- *
14
- * **Intentionally read-only.** To navigate, use `navigateTo()`. To update
15
- * the query string or hash state, use `qsAtom.set()` / `hashAtom.set()`.
16
- *
17
- * @example
18
- * import { location } from "mates";
19
- *
20
- * location.path; // "/about" — current pathname
21
- * location.hash; // { tab: "overview" } — parsed hash fragment
22
- * location.qsObj; // { q: "react", page: 1 } — parsed query string
23
- *
24
- * @example
25
- * import { location, lockNavigation, unlockNavigation } from "mates";
26
- *
27
- * lockNavigation();
28
- * navigateTo("/somewhere"); // no-op while locked
29
- * unlockNavigation();
30
- * navigateTo("/somewhere"); // works
31
9
  */
32
- export declare const location: {
33
- /**
34
- * The current URL pathname (e.g. `"/about"`), sourced from `pathAtom`.
35
- *
36
- * Reading this property inside a reactive context registers a dependency on
37
- * `pathAtom`, so the context re-runs whenever the path changes.
38
- *
39
- * @example
40
- * location.path; // "/about"
41
- */
10
+ export declare function createLocation(pathAtom: SuperAtomType<string>, hashAtom: AtomType<Record<string, any>>, qsAtom: AtomType<Record<string, any>>): {
42
11
  readonly path: string;
43
- /**
44
- * The current URL hash fragment as a parsed plain object, sourced from
45
- * `hashAtom`.
46
- *
47
- * The hash is parsed as `URLSearchParams` — primitive values are strings,
48
- * JSON-encoded objects/arrays are automatically deserialised.
49
- *
50
- * Reading this property inside a reactive context registers a dependency on
51
- * `hashAtom`, so the context re-runs whenever the hash state changes.
52
- *
53
- * @example
54
- * // URL: #tab=overview&page=2
55
- * location.hash; // { tab: "overview", page: "2" }
56
- */
57
12
  readonly hash: Record<string, any>;
58
- /**
59
- * The current URL query string as a parsed plain object, sourced from
60
- * `qsAtom`.
61
- *
62
- * The query string is parsed via `URLSearchParams` — primitive values are
63
- * strings, JSON-encoded objects/arrays are automatically deserialised.
64
- *
65
- * Reading this property inside a reactive context registers a dependency on
66
- * `qsAtom`, so the context re-runs whenever the query string changes.
67
- *
68
- * @example
69
- * // URL: ?q=react&page=1
70
- * location.qsObj; // { q: "react", page: "1" }
71
- */
72
13
  readonly qsObj: Record<string, any>;
73
14
  };
74
15
  //# sourceMappingURL=location.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/location.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;;;;;OAQG;mBACS,MAAM;IAIlB;;;;;;;;;;;;;OAaG;mBACS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI/B;;;;;;;;;;;;;OAaG;oBACU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAGjC,CAAC"}
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/location.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,EAC/B,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EACvC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;mBAGvB,MAAM;mBAGN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;oBAGlB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;EAInC"}
@@ -1,31 +1,12 @@
1
+ import type { AtomType } from "../Mutables/atom/atom";
2
+ import type { SuperAtomType } from "../Mutables/atom/atom";
3
+ import type { EventType } from "../Mutables/events/events";
4
+ import type { NavigationEventPayload } from "./navigationRequest";
1
5
  /**
2
- * Navigates to `path` by updating both `window.history` and `pathAtom` in
3
- * sync, so the Router re-renders reactively.
6
+ * Creates a `navigateTo` function bound to the given scope atoms.
4
7
  *
5
- * - By default uses `pushState`, creating a new browser history entry.
6
- * - Pass `replace = true` to use `replaceState` instead — the current entry
7
- * is overwritten, so the user cannot navigate back to the previous URL.
8
- * - Silently no-ops if navigation is currently locked (`navigationLocked()`
9
- * returns `true`). Nothing is pushed/replaced and `pathAtom` is not updated.
10
- * - `data` is forwarded as the state argument to the history API and can be
11
- * retrieved later via `history.state`.
12
- *
13
- * Scroll-to-top is intentionally **not** handled here. It belongs in the
14
- * router layer (`animatedRouter`'s `scrollToTop` option) so that:
15
- * 1. The scroll fires at the right moment (after exit animation, before
16
- * enter animation) rather than prematurely before the old page exits.
17
- * 2. Nested / child routers can opt out with `scrollToTop: false` without
18
- * affecting the parent.
19
- *
20
- * @param path - The pathname to navigate to (e.g. `"/about"`).
21
- * @param replace - When `true`, calls `replaceState` instead of `pushState`.
22
- * Defaults to `false`.
23
- * @param data - Optional state object passed to the history API.
24
- *
25
- * @example
26
- * navigateTo("/about"); // pushState
27
- * navigateTo("/login", true); // replaceState (no new history entry)
28
- * navigateTo("/profile", false, { userId: 42 }); // pushState with state data
8
+ * Use this factory when working with a `MatesUtils` scope to ensure
9
+ * SSR-safe, request-isolated navigation.
29
10
  */
30
- export declare function navigateTo(path: string, replace?: boolean, data?: any): void;
11
+ export declare function createNavigateTo(pathAtom: SuperAtomType<string>, navigationLocked: AtomType<boolean>, historyStateAtom: AtomType<unknown>, navigationRequestEvent: EventType<NavigationEventPayload>): (path: string, replace?: boolean, data?: any) => void;
31
12
  //# sourceMappingURL=navigateTo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigateTo.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/navigateTo.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAU5E"}
1
+ {"version":3,"file":"navigateTo.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/navigateTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIlE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,EAC/B,gBAAgB,EAAE,QAAQ,CAAC,OAAO,CAAC,EACnC,gBAAgB,EAAE,QAAQ,CAAC,OAAO,CAAC,EACnC,sBAAsB,EAAE,SAAS,CAAC,sBAAsB,CAAC,GACxD,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAsCvD"}
@@ -1,50 +1,9 @@
1
+ import { type AtomType } from "../Mutables/atom/atom";
1
2
  /**
2
- * Reactive atom holding the current navigation lock state.
3
+ * Creates a reactive atom holding the navigation lock state.
3
4
  *
4
- * When `true`, all navigation is suspended:
5
- * - `navigateTo()` becomes a no-op.
6
- * - `pathAtom` is hard-locked via `superAtom.lock()`, so `.set()` calls are
7
- * silently ignored.
8
- * - The `qsAtom → URL` effect and the `popstate` handler both bail out early.
9
- * - The `hashAtom → URL` effect and the `hashchange` handler both bail out early.
10
- *
11
- * When `false` (the default), all navigation works normally.
12
- *
13
- * Prefer using the `lockNavigation()` / `unlockNavigation()` helpers over
14
- * calling `navigationLocked.set()` directly.
15
- *
16
- * @example
17
- * import { navigationLocked } from "mates";
18
- *
19
- * navigationLocked(); // false — unlocked by default
20
- */
21
- export declare const navigationLocked: import("..").AtomType<boolean>;
22
- /**
23
- * Locks navigation across the entire Router module.
24
- *
25
- * After calling this, the following all become no-ops until
26
- * `unlockNavigation()` is called:
27
- * - `navigateTo()`
28
- * - `pathAtom.set()` (hard-locked via `superAtom`)
29
- * - `qsAtom` → URL writes
30
- * - `hashAtom` → URL writes
31
- * - `popstate` / `hashchange` → atom updates
32
- *
33
- * @example
34
- * lockNavigation();
35
- * navigateTo("/somewhere"); // no-op
36
- */
37
- export declare const lockNavigation: () => void;
38
- /**
39
- * Unlocks navigation, re-enabling all navigation operations that were
40
- * suppressed by `lockNavigation()`.
41
- *
42
- * @example
43
- * lockNavigation();
44
- * navigateTo("/somewhere"); // no-op
45
- *
46
- * unlockNavigation();
47
- * navigateTo("/somewhere"); // works — pushState + pathAtom.set()
5
+ * When `true`, all navigation is suspended. When `false` (default),
6
+ * navigation works normally.
48
7
  */
49
- export declare const unlockNavigation: () => void;
8
+ export declare function createNavigationLocked(): AtomType<boolean>;
50
9
  //# sourceMappingURL=navigationLock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigationLock.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/navigationLock.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,gBAAgB,gCAAc,CAAC;AAE5C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,YAAmC,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,YAAoC,CAAC"}
1
+ {"version":3,"file":"navigationLock.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/navigationLock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,OAAO,CAAC,CAE1D"}
@@ -0,0 +1,26 @@
1
+ import type { EventType } from "../Mutables/events/events";
2
+ /** Internal event payload — what navigateTo() / pathAtom fire (no `next`). */
3
+ export interface NavigationEventPayload {
4
+ to: string;
5
+ from: string;
6
+ }
7
+ /**
8
+ * Detail object passed to every `onNavigationRequest` callback.
9
+ *
10
+ * - `to` — the path the user is navigating to.
11
+ * - `from` — the path the user is currently on.
12
+ * - `next` — call this to **allow** the navigation to proceed.
13
+ * If `next()` is never called, the navigation is silently cancelled.
14
+ */
15
+ export interface NavigationRequestDetail {
16
+ to: string;
17
+ from: string;
18
+ /** Proceed with the navigation. If not called before the callback settles, navigation is cancelled. */
19
+ next: () => void;
20
+ }
21
+ /**
22
+ * Creates a low-level event bus fired by `navigateTo()` / `popstate`
23
+ * immediately before navigation is committed.
24
+ */
25
+ export declare function createNavigationRequestEvent(): EventType<NavigationEventPayload>;
26
+ //# sourceMappingURL=navigationRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigationRequest.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/navigationRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI3D,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAID;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAEhF"}
@@ -1,42 +1,22 @@
1
+ import { type SuperAtomType } from "../Mutables/atom/atom";
2
+ import type { AtomType } from "../Mutables/atom/atom";
3
+ import type { EventType } from "../Mutables/events/events";
4
+ import type { NavigationEventPayload } from "./navigationRequest";
1
5
  /**
2
- * @file pathAtom.ts
3
- *
4
- * Provides `pathAtom` — the single source of truth for the current URL
5
- * pathname inside the Router module.
6
- *
7
- * `pathAtom` is a `superAtom` (a lockable reactive atom) initialised with
8
- * `window.location.pathname` at module load time. Because it is a
9
- * `superAtom`, it can be hard-locked and hard-unlocked in response to the
10
- * navigation lock state, which causes every subscriber (including the Router
11
- * itself) to ignore updates while navigation is locked.
12
- *
13
- * Three browser events keep `pathAtom` in sync with navigation that happens
14
- * outside of `navigateTo`:
15
- * - `popstate` — browser back / forward buttons
16
- * - `hashchange` — hash-only navigations that also change the pathname
17
- * - `navigate` — Navigation API (supported in modern browsers)
18
- *
19
- * Any component or effect that reads `pathAtom()` will automatically re-run
20
- * whenever the path changes.
21
- *
22
- * **Do NOT set `pathAtom` directly.** Use `navigateTo()` instead so that
23
- * `window.history` and the atom are always updated together.
24
- *
25
- * @example
26
- * pathAtom.get(); // "/current/path"
27
- * pathAtom(); // same — tracked read (registers a reactive dependency)
28
- *
29
- * // Do NOT do this:
30
- * // pathAtom.set("/somewhere"); // bypasses history API
31
- * // Use instead:
32
- * // navigateTo("/somewhere");
33
- */
34
- /**
35
- * Reactive atom holding the current `window.location.pathname`.
6
+ * Creates a reactive superAtom holding the current `window.location.pathname`.
36
7
  *
37
8
  * Implemented as a `superAtom` so it can be locked/unlocked in step with
38
- * `navigationLocked()`. Prefer reading via the call syntax (`pathAtom()`)
9
+ * `navigationLocked()`. Prefer reading via the call syntax (`pathAtom()`)
39
10
  * inside reactive contexts so that the caller re-renders on path changes.
11
+ *
12
+ * **Do NOT set `pathAtom` directly.** Use `navigateTo()` instead.
13
+ *
14
+ * @param navigationLocked - Reactive atom; when true, popstate/hashchange/navigate
15
+ * events are suppressed and beforeunload guard is active.
16
+ * @param historyStateAtom - Reactive atom; kept in sync with `window.history.state`
17
+ * during popstate events.
18
+ * @param navigationRequestEvent - Event bus; fired before navigation is committed
19
+ * so subscribers can cancel via lockNavigation().
40
20
  */
41
- export declare const pathAtom: import("..").SuperAtomType<string>;
21
+ export declare function createPathAtom(navigationLocked: AtomType<boolean>, historyStateAtom: AtomType<unknown>, navigationRequestEvent: EventType<NavigationEventPayload>): SuperAtomType<string>;
42
22
  //# sourceMappingURL=pathAtom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pathAtom.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/pathAtom.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,oCAEpB,CAAC"}
1
+ {"version":3,"file":"pathAtom.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/pathAtom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,QAAQ,CAAC,OAAO,CAAC,EACnC,gBAAgB,EAAE,QAAQ,CAAC,OAAO,CAAC,EACnC,sBAAsB,EAAE,SAAS,CAAC,sBAAsB,CAAC,GACxD,aAAa,CAAC,MAAM,CAAC,CAsEvB"}
@@ -1,12 +1,16 @@
1
+ import { type AtomType } from "../Mutables/atom/atom";
1
2
  /**
2
- * Singleton atom holding the current URL query string as a parsed object.
3
+ * Creates a reactive atom holding the current URL query string as a parsed object.
3
4
  *
4
- * Hydrated from `window.location.search` at module load time. All reads are
5
+ * Hydrated from `window.location.search` at creation time. All reads are
5
6
  * reactive — any effect or component that calls `qsAtom()` will re-run
6
7
  * whenever the query string state changes.
7
8
  *
8
9
  * Setting the atom via `qsAtom.set(obj)` automatically serialises the new
9
10
  * value back to the URL query string using `history.replaceState`.
11
+ *
12
+ * @param navigationLocked - A reactive atom; when `true`, URL writes and
13
+ * popstate→atom updates are suppressed.
10
14
  */
11
- export declare const qsAtom: import("..").AtomType<Record<string, any>>;
15
+ export declare function createQsAtom(navigationLocked: AtomType<boolean>): AtomType<Record<string, any>>;
12
16
  //# sourceMappingURL=qsAtom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"qsAtom.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/qsAtom.ts"],"names":[],"mappings":"AAmFA;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,4CAAqC,CAAC"}
1
+ {"version":3,"file":"qsAtom.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/qsAtom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AAmC5D;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAC1B,gBAAgB,EAAE,QAAQ,CAAC,OAAO,CAAC,GAClC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAuB/B"}
@@ -0,0 +1,6 @@
1
+ export declare function isHmrEnabled(): boolean;
2
+ export declare function getHotComponentImpl<T extends Function>(component: T): T;
3
+ export declare function getHotComponentId(component: unknown): string | null;
4
+ export declare function getHotComponentFile(component: unknown): string | null;
5
+ export declare function getHotComponentExport(component: unknown): string | null;
6
+ //# sourceMappingURL=hmr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmr.d.ts","sourceRoot":"","sources":["../../../../../lib/Template/hmr.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,QAAQ,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CAMvE;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAInE;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAIrE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAIvE"}
@@ -55,6 +55,7 @@ export declare class Component extends HTMLElement {
55
55
  addToCleanUps(key: any, cleanup: Function): void;
56
56
  _render(): void;
57
57
  private _mountComponent;
58
+ _hotRefresh(): void;
58
59
  private _handleRenderError;
59
60
  }
60
61
  //# sourceMappingURL=x-x.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"x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E,CAAM;IAEpD,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,EAAE,KAAK,EAAE,GAAG;IAIvC,WAAW,SAAM;IAExB,iGAAiG;IAC1F,MAAM,SAAK;IAClB,sEAAsE;IAC/D,gBAAgB,EAAE,SAAS,GAAG,IAAI,CAAQ;IACjD,kFAAkF;IAC3E,cAAc,SAAK;IAE1B,+CAA+C;IACxC,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC,EAAE,CAAM;IACzD,2EAA2E;IACpE,WAAW,EAAE,OAAO,CAAQ;IAG5B,qBAAqB,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAa;IACnD,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAKjC,aAAa,EAAE,IAAI,GAAG,gBAAgB,CAAQ;IAC9C,UAAU,EAAE,IAAI,GAAG,gBAAgB,CAAQ;;IAwBlD,IAAI,KAAK,CAAC,GAAG,qBAAA,EAGZ;IAED,IAAI,KAAK,wBAER;IAEM,OAAO,EAAE,GAAG,CAAC;IAEpB,OAAO,CAAC,cAAc,CAAS;IAM/B;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IAmBxB,IAAI,IAAI,CAAC,GAAG,KAAA,EAyBX;IAED,IAAI,IAAI,QAEP;IAMD,gBAAgB;IAIhB,iBAAiB;IAgCjB,oBAAoB;IAqBpB,OAAO,CAAC,qBAAqB,CAa3B;IAEF,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ;IAazC,OAAO;IA6CP,OAAO,CAAC,eAAe;IAsFhB,WAAW;IAKlB,OAAO,CAAC,kBAAkB;CAiF3B"}
@@ -66,26 +66,4 @@ export type ComponentType<T extends Record<string, any> = Record<string, any>> =
66
66
  * current host component.
67
67
  */
68
68
  export type Setter = <T extends (...args: any[]) => any>(fn: T) => T;
69
- /** @deprecated Use Component instead */
70
- export type ComponentFn<T extends Record<string, any> = Record<string, any>> = Component<T>;
71
- /** @deprecated Use Component instead */
72
- export type View<T extends Record<string, any> = Record<string, any>> = Component<T>;
73
- /** @deprecated Use Component instead */
74
- export type ClosureComponent<T extends Record<string, any> = Record<string, any>> = Component<T>;
75
- /** @deprecated Use Component instead */
76
- export type ViewComponent<T extends Record<string, any> = Record<string, any>> = Component<T>;
77
- /** @deprecated Use Component instead */
78
- export type C<T extends Record<string, any> = Record<string, any>> = Component<T>;
79
- /** @deprecated Use Component instead */
80
- export type OuterFn<T extends Record<string, any> = Record<string, any>> = Component<T>;
81
- /** @deprecated Use Props instead */
82
- export type PropsType<T extends Record<string, any> = Record<string, any>> = Props<T>;
83
- /** @deprecated Use TemplateFn instead */
84
- export type RenderFn = TemplateFn;
85
- /** @deprecated Use TemplateFn instead */
86
- export type InnerFn = TemplateFn;
87
- /** @deprecated Use TemplateFn instead */
88
- export type TemplateComponent = TemplateFn;
89
- /** @deprecated Use TemplateFn instead */
90
- export type X = TemplateFn;
91
69
  //# sourceMappingURL=x-x.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-x.types.d.ts","sourceRoot":"","sources":["../../../../../lib/Template/x-x.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE3D,YAAY,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACnD,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,cAAc,GAAG,IAAI,GAAG,OAAO,OAAO,CAAC;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C,MAAM,EAAE,GAAG,CAAC,IACzE,SAAS,CAAC,CAAC,CAAC,GACZ,aAAa,CAAC,CAAC,CAAC,CAAC;AAErB;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC"}
@@ -1,5 +1,22 @@
1
- import type { ComponentType } from "./x-x.types";
1
+ import type { ComponentType, Props } from "./x-x.types";
2
2
  export declare const x: <T extends Record<string, any>>(viewFn: ComponentType<T>, props?: T) => import("lit-html").TemplateResult<1>;
3
3
  export declare const view: <T extends Record<string, any>>(viewFn: ComponentType<T>, props?: T) => import("lit-html").TemplateResult<1>;
4
- export declare const renderX: <T extends Record<string, any>>(viewFn: ComponentType<T>, element: HTMLElement, props?: T) => import("lit-html").RootPart;
4
+ /** @alias x */
5
+ export declare const template: <T extends Record<string, any>>(viewFn: ComponentType<T>, props?: T) => import("lit-html").TemplateResult<1>;
6
+ export declare const renderX: <T extends Record<string, any>>(viewFn: ComponentType<T>, element: HTMLElement) => import("lit-html").RootPart;
7
+ /**
8
+ * Wraps a component in a scope provider that initializes all framework
9
+ * utilities (RouterUtils, FetchUtils, StorageUtils, ThemeUtils).
10
+ *
11
+ * The returned component creates scopes in its outer function, so
12
+ * `scope()` has a valid host context. Child components can then access
13
+ * them via `useRouter()` / `useFetch()` / etc.
14
+ *
15
+ * @example
16
+ * const App = WithScope(AppShell, () => ({}));
17
+ * render(App, document.getElementById("app")!);
18
+ */
19
+ export declare const WithScope: <T extends Record<string, any>>(propsFn: Props<T>) => () => import("lit-html").TemplateResult<1>;
20
+ /** @alias renderX */
21
+ export declare const renderTemplate: <T extends Record<string, any>>(viewFn: ComponentType<T>, element: HTMLElement) => import("lit-html").RootPart;
5
22
  //# sourceMappingURL=x.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"x.d.ts","sourceRoot":"","sources":["../../../../../lib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gCAGrB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,+CAkBzE,CAAC;AAEF,qBAAqB;AACrB,eAAO,MAAM,cAAc,GAxCH,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UAC3C,aAAa,CAAC,CAAC,CAAC,WACf,WAAW,gCAsCe,CAAC"}
@@ -1,8 +1,3 @@
1
- /**
2
- * Global component running status tracker.
3
- * Used to enforce safety checks and prevent certain operations during specific
4
- * execution contexts.
5
- */
6
1
  export declare const componentRunningStatus: {
7
2
  /**
8
3
  * Set to true while a scope's setup() method is running.
@@ -1 +1 @@
1
- {"version":3,"file":"componentStatus.d.ts","sourceRoot":"","sources":["../../../../../lib/TrackState/componentStatus.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;IACjC;;;;;;;;;;;OAWG;;IAGH;;;;;;;OAOG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;CAEJ,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAG/C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAiBxE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAsBvE"}
1
+ {"version":3,"file":"componentStatus.d.ts","sourceRoot":"","sources":["../../../../../lib/TrackState/componentStatus.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,sBAAsB,EAAgC;IACjE;;;;;;;;;;;OAWG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;;;;;;OAOG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAE7B;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAG/C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAiBxE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAsBvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"readTracking.d.ts","sourceRoot":"","sources":["../../../../../lib/TrackState/readTracking.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C;AAED,wBAAgB,kBAAkB,IAAI,GAAG,CAAC,GAAG,CAAC,CAE7C;AAED,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,QAE3C;AAED,wBAAgB,UAAU,SAEzB;AAED,wBAAgB,SAAS,SAExB;AAID,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB;AAED,wBAAgB,qBAAqB,IAAI,gBAAgB,CAQxD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,GAAG,CAAC,GAAG,CAAC,CAKhE;AAID,eAAO,MAAM,aAAa,8BAAwB,CAAC;AACnD,eAAO,MAAM,YAAY,wBAAkB,CAAC"}
1
+ {"version":3,"file":"readTracking.d.ts","sourceRoot":"","sources":["../../../../../lib/TrackState/readTracking.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C;AAED,wBAAgB,kBAAkB,IAAI,GAAG,CAAC,GAAG,CAAC,CAE7C;AAED,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,QAE3C;AAED,wBAAgB,UAAU,SAEzB;AAED,wBAAgB,SAAS,SAExB;AAID,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB;AAED,wBAAgB,qBAAqB,IAAI,gBAAgB,CAQxD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,GAAG,CAAC,GAAG,CAAC,CAKhE;AAID,eAAO,MAAM,aAAa,8BAAwB,CAAC;AACnD,eAAO,MAAM,YAAY,wBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getCookieObj(): Record<string, string>;
2
+ //# sourceMappingURL=cookie.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../../lib/Utils/cookie.ts"],"names":[],"mappings":"AAWA,wBAAgB,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0BrD"}
@@ -0,0 +1,48 @@
1
+ export type CountdownState = "idle" | "running" | "paused" | "stopped";
2
+ export interface Countdown {
3
+ /** Start the timer from the full duration. No-op if already running. */
4
+ start(): void;
5
+ /**
6
+ * Pause the timer. The remaining time is frozen at the current value.
7
+ * No-op if already paused, idle, or stopped.
8
+ */
9
+ pause(): void;
10
+ /**
11
+ * Resume a paused timer. Restarts a `setTimeout` for the remaining duration.
12
+ * No-op if already running, idle, or stopped.
13
+ */
14
+ resume(): void;
15
+ /**
16
+ * Stop and reset the timer. The callback will never fire.
17
+ * Remaining time is reset to the full duration.
18
+ * Calling start() after stop() begins a fresh countdown.
19
+ */
20
+ stop(): void;
21
+ /** Current state of the timer. */
22
+ readonly state: CountdownState;
23
+ /**
24
+ * Milliseconds remaining.
25
+ * - While `running`: live value computed from wall-clock elapsed.
26
+ * - While `paused` / `idle` / `stopped`: last frozen snapshot.
27
+ */
28
+ readonly remaining: number;
29
+ }
30
+ /**
31
+ * timer — precise pausable countdown timer.
32
+ *
33
+ * @param callback Called once when the full duration has elapsed.
34
+ * @param duration Total countdown duration in milliseconds.
35
+ *
36
+ * @example
37
+ * const { start, pause, resume, stop, remaining } = timer(() => {
38
+ * dismiss(id);
39
+ * }, 6000);
40
+ *
41
+ * start();
42
+ * // user hovers card
43
+ * pause();
44
+ * // user leaves card
45
+ * resume();
46
+ */
47
+ export declare function countdown(callback: () => void, duration: number): Countdown;
48
+ //# sourceMappingURL=countdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"countdown.d.ts","sourceRoot":"","sources":["../../../../../lib/Utils/countdown.ts"],"names":[],"mappings":"AAuBA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,SAAS;IACxB,wEAAwE;IACxE,KAAK,IAAI,IAAI,CAAC;IACd;;;OAGG;IACH,KAAK,IAAI,IAAI,CAAC;IACd;;;OAGG;IACH,MAAM,IAAI,IAAI,CAAC;IACf;;;;OAIG;IACH,IAAI,IAAI,IAAI,CAAC;IACb,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CA6G3E"}
@@ -1,4 +1,6 @@
1
1
  export * from "./Context";
2
+ export * from "./cookie";
3
+ export * from "./countdown";
2
4
  export * from "./deepClone";
3
5
  export * from "./deepFreeze";
4
6
  export * from "./getAllProps";
@@ -7,6 +9,7 @@ export * from "./is";
7
9
  export * from "./isDefinedAsGetter";
8
10
  export * from "./logger";
9
11
  export * from "./notificationManager";
12
+ export * from "./onceIdle";
10
13
  export * from "./registerCleanup";
11
14
  export * from "./svgIcon";
12
15
  export * from "./uuid";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/Utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/Utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * matesLogEvent — the internal pub/sub event fired by log() / logError() / logWarning().
3
+ *
4
+ * Deliberately does NOT use event() from events.ts to avoid a circular
5
+ * dependency (events.ts → logger.ts → events.ts).
6
+ *
7
+ * The shape matches EventType<T> so devtools and user code can subscribe
8
+ * with the same __subscribe / trigger API as any other mates event.
9
+ */
10
+ export interface MatesLogEventDetail {
11
+ level: "log" | "error" | "warn";
12
+ message: unknown;
13
+ data?: unknown;
14
+ ts: number;
15
+ }
16
+ type Handler = (data: MatesLogEventDetail) => void;
17
+ export declare const matesLogEvent: {
18
+ name: string;
19
+ __isEvent___: true;
20
+ trigger(data: MatesLogEventDetail): void;
21
+ __subscribe(fn: Handler): () => void;
22
+ };
23
+ export {};
24
+ //# sourceMappingURL=logEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logEvent.d.ts","sourceRoot":"","sources":["../../../../../lib/Utils/logEvent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAGnD,eAAO,MAAM,aAAa;;;kBAIV,mBAAmB,GAAG,IAAI;oBAUxB,OAAO,GAAG,MAAM,IAAI;CAIrC,CAAC"}
@@ -1,22 +1,33 @@
1
1
  /**
2
- * Logger utility that only logs errors in localhost/development environment
2
+ * Logger utility logs in dev, and always fires matesLogEvent so that
3
+ * mates-devtools can capture user logs regardless of environment.
3
4
  */
5
+ export type { MatesLogEventDetail } from "./logEvent";
6
+ export { matesLogEvent } from "./logEvent";
7
+ /** Deep-clone a value with structuredClone; falls back to the original if not cloneable. */
8
+ export declare function safeClone<T>(value: T): T;
4
9
  /**
5
- * Log an error only in localhost/development environment
6
- * @param error - The error to log
7
- * @param context - Optional context information
10
+ * Log a message + optional data.
11
+ * Always fires matesLogEvent (captured by devtools).
12
+ * Prints to console only in dev/localhost.
13
+ *
14
+ * @example
15
+ * log("User clicked", { id: 42 });
8
16
  */
9
- export declare function logError(error: any, context?: string): void;
17
+ export declare function log(message: unknown, data?: unknown): void;
10
18
  /**
11
- * Log a warning only in localhost/development environment
12
- * @param message - The warning message
13
- * @param context - Optional context information
19
+ * Log an error + optional context.
20
+ * Always fires matesLogEvent (captured by devtools).
21
+ * Prints to console only in dev/localhost.
22
+ *
23
+ * @example
24
+ * logError("Fetch failed", error);
14
25
  */
15
- export declare function logWarning(message: any, context?: string): void;
26
+ export declare function logError(error: unknown, context?: unknown): void;
16
27
  /**
17
- * Log info only in localhost/development environment
18
- * @param message - The info message
19
- * @param context - Optional context information
28
+ * Log a warning + optional data.
29
+ * Always fires matesLogEvent (captured by devtools).
30
+ * Prints to console only in dev/localhost.
20
31
  */
21
- export declare function logInfo(message: any, context?: string): void;
32
+ export declare function logWarning(message: unknown, data?: unknown): void;
22
33
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../lib/Utils/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAsBH;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAQ3D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAQ/D;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAQ5D"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../lib/Utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,4FAA4F;AAC5F,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAMxC;AAuBD;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAW1D;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAWhE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAWjE"}