mates-devtools 0.1.0-beta.5 → 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 +953 -835
  2. package/dist/mates-devtools.umd.js +190 -179
  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,29 +1,22 @@
1
1
  /**
2
- * mates — SSR mode flag
2
+ * mates — SSR mode flag + async completion tracking
3
3
  *
4
- * A simple global boolean that browser-only hooks check before doing work.
5
- * When `setSSRMode(true)` is called (by mates-ssr's renderer before rendering),
6
- * hooks like onBlur, onFocus, onResize, onInterval, etc. skip their work
7
- * entirely no event listeners, no timers, no observers.
4
+ * SSR mode flag:
5
+ * A simple global boolean that browser-only hooks check before doing work.
6
+ * When `setSSRMode(true)` is called (by mates-ssr's renderer before rendering),
7
+ * hooks like onBlur, onFocus, onResize, onInterval, etc. skip their work
8
+ * entirely — no event listeners, no timers, no observers.
8
9
  *
9
- * This is the lightest possible SSR guard: one boolean check per hook call.
10
+ * SSR async completion tracking:
11
+ * Tracks in-flight asyncAction and Fetch calls during SSR.
12
+ * When all async work completes (counter hits 0), a 5ms debounce fires
13
+ * the registered done callback so the renderer knows it's safe to serialize.
10
14
  *
11
- * Usage (inside mates-ssr renderer):
15
+ * asyncAction and Fetch call incrementSsrAsyncCounter() on start and
16
+ * decrementSsrAsyncCounter() on finish (success or error).
12
17
  *
13
- * import { setSSRMode } from "mates";
14
- *
15
- * setSSRMode(true);
16
- * // ... render components ...
17
- * setSSRMode(false);
18
- *
19
- * Usage (inside a hook):
20
- *
21
- * import { isSSR } from "../ssr/ssrFlag";
22
- *
23
- * export const onBlur = (fn) => {
24
- * if (isSSR()) return;
25
- * // ... browser-only work ...
26
- * };
18
+ * The renderer registers a callback via setSsrDoneCallback() before rendering.
19
+ * Users can also call done() explicitly to signal early completion.
27
20
  */
28
21
  /**
29
22
  * Enable or disable SSR mode.
@@ -35,4 +28,46 @@ export declare function setSSRMode(value: boolean): void;
35
28
  * Hooks should check this and bail early if true.
36
29
  */
37
30
  export declare function isSSR(): boolean;
31
+ /**
32
+ * Register the callback the renderer will invoke when all async work is done.
33
+ * Called by the renderer once per render pass, before setup runs.
34
+ * @internal
35
+ */
36
+ export declare function setSsrDoneCallback(cb: () => void): void;
37
+ /**
38
+ * Increment the in-flight counter.
39
+ * Called by asyncAction and Fetch when they start an async operation during SSR.
40
+ * @internal
41
+ */
42
+ export declare function incrementSsrAsyncCounter(): void;
43
+ /**
44
+ * Decrement the in-flight counter.
45
+ * Called by asyncAction and Fetch when they finish (success or error).
46
+ * When counter hits 0, schedules the done callback with a 5ms debounce.
47
+ * @internal
48
+ */
49
+ export declare function decrementSsrAsyncCounter(): void;
50
+ /**
51
+ * Explicitly signal that the component is done with all async work.
52
+ * Call this if you have async work that happens outside asyncAction/Fetch
53
+ * and the renderer should not wait longer.
54
+ *
55
+ * @example
56
+ * export default (_: Props<{}>) => {
57
+ * const data = asyncAction(fetchData);
58
+ * data();
59
+ *
60
+ * // If you have additional async work tracked manually:
61
+ * done();
62
+ *
63
+ * return () => html`...`;
64
+ * };
65
+ */
66
+ export declare function done(): void;
67
+ /**
68
+ * Returns the current number of in-flight SSR async operations.
69
+ * Useful for debugging and tests.
70
+ */
71
+ export declare function getSsrAsyncCounter(): number;
72
+ export declare function isDev(): boolean;
38
73
  //# sourceMappingURL=ssrFlag.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssrFlag.d.ts","sourceRoot":"","sources":["../../../../../lib/ssr/ssrFlag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAE/C;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAE/B"}
1
+ {"version":3,"file":"ssrFlag.d.ts","sourceRoot":"","sources":["../../../../../lib/ssr/ssrFlag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAQ/C;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAgBD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAOvD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAQ/C;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAI/C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,IAAI,IAAI,CAS3B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAqBD,wBAAgB,KAAK,IAAI,OAAO,CAQ/B"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * mates — useCtx
3
+ *
4
+ * Retrieves the current server-side Context (Hono-style) during SSR or
5
+ * RPC calls. Uses the same global AsyncLocalStorage key as mates-fullstack's
6
+ * ssr-context.ts, so it works inside the SSR esbuild bundle as well.
7
+ *
8
+ * Returns undefined when called outside a request context (e.g. client-side).
9
+ *
10
+ * @example
11
+ * // In a component outer function:
12
+ * const ctx = useCtx();
13
+ * if (ctx) {
14
+ * console.log("request path:", ctx.req.path);
15
+ * }
16
+ */
17
+ /**
18
+ * Minimal Ctx interface matching the Hono-style Context shape.
19
+ * Defined locally — mates doesn't import from mates-fullstack.
20
+ */
21
+ export interface Ctx {
22
+ req: {
23
+ raw: Request;
24
+ method: string;
25
+ url: string;
26
+ path: string;
27
+ param(name: string): string | undefined;
28
+ query(name: string): string | undefined;
29
+ header(name: string): string | undefined;
30
+ params: Record<string, string>;
31
+ queries: Record<string, string>;
32
+ };
33
+ isSSR: boolean;
34
+ auth: Record<string, unknown> | null;
35
+ cookie: {
36
+ get(name: string): string | undefined;
37
+ getAll(): Record<string, string>;
38
+ set(name: string, value: string, options?: Record<string, unknown>): void;
39
+ delete(name: string, options?: Record<string, unknown>): void;
40
+ };
41
+ var: Record<string, unknown>;
42
+ set(key: string, value: unknown): void;
43
+ get(key: string): unknown;
44
+ [key: string]: unknown;
45
+ }
46
+ /**
47
+ * Get the current server-side Context (Hono-style).
48
+ *
49
+ * Returns `undefined` when called:
50
+ * - On the client (browser)
51
+ * - Outside a request handler
52
+ *
53
+ * Available when called:
54
+ * - During SSR page rendering
55
+ * - Inside RPC functions (both SSR and HTTP paths)
56
+ * - Inside onRequest/onBeforeRPC/onAfterRPC hooks
57
+ */
58
+ export declare function useCtx(): Ctx | undefined;
59
+ /**
60
+ * Returns true when currently executing inside an SSR render pass.
61
+ */
62
+ export declare function useIsSSR(): boolean;
63
+ //# sourceMappingURL=useCtx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCtx.d.ts","sourceRoot":"","sources":["../../../../../lib/ssr/useCtx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE;QACH,GAAG,EAAE,OAAO,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;QACxC,KAAK,CAAC,IAA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
  private _scrollEventListeners;
90
91
  private _scrollEventListenerOptions;
91
92
  private _loadListener;
@@ -117,7 +118,7 @@ export declare class Virtualizer {
117
118
  * Index of the last item intersecting the viewport.
118
119
  */
119
120
  private _lastVisible;
120
- protected _scheduled: WeakSet<Function>;
121
+ protected _scheduled: Map<Function, number>;
121
122
  /**
122
123
  * Invoked at the end of each render cycle: children in the range are
123
124
  * measured, and their dimensions passed to this callback. Use it to layout
@@ -164,7 +165,7 @@ export declare class Virtualizer {
164
165
  * Returns the width, height, and margins of the given child.
165
166
  */
166
167
  _measureChild(element: Element): ItemBox;
167
- protected _schedule(method: Function): Promise<void>;
168
+ protected _schedule(method: Function): void;
168
169
  _updateDOM(state: StateChangedMessage): Promise<void>;
169
170
  _finishDOMUpdate(): void;
170
171
  _updateLayout(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"Virtualizer.d.ts","sourceRoot":"","sources":["../../../../../lib/virtualizer/Virtualizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAEV,iBAAiB,EAGjB,OAAO,EAEP,iBAAiB,EAEjB,iBAAiB,EAGjB,oBAAoB,EAGpB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAYpC;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,cAAc,QAEhE;AAED,eAAO,MAAM,cAAc,eAA2B,CAAC;AAGvD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,mBAAmB;QAC3B,YAAY,EAAE,iBAAiB,CAAC;QAChC,iBAAiB,EAAE,sBAAsB,CAAC;QAC1C,QAAQ,EAAE,aAAa,CAAC;KACzB;CACF;AAED,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,CAAC,cAAc,CAAC,CAAC,EAAE,WAAW,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4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C,gBAAgB;IAgBxB;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO;IAOxC,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI;IAgBrC,UAAU,CAAC,KAAK,EAAE,mBAAmB;IAiB3C,gBAAgB;IAchB,aAAa;IAkBb,OAAO,CAAC,kBAAkB;IA8B1B,WAAW,CAAC,KAAK,EAAE,WAAW;IAe9B,oBAAoB,CAAC,OAAO,EAAE,iBAAiB;IAY/C,IAAI,SAAS,IAAI,KAAK,CAAC,WAAW,CAAC,CAUlC;IAED,OAAO,CAAC,WAAW;IAoDnB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAiBxB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;YAuBX,YAAY;IAc1B,OAAO,CAAC,mBAAmB;IAYpB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,4BAA4B,GAAG,SAAS;IAYvE,OAAO,CAAC,sBAAsB;IAqB9B;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IASlC;;;OAGG;IACH,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,iBAAiB;IASzB,IAAW,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CASzC;IAED,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,6BAA6B;IAOrC,OAAO,CAAC,yBAAyB;IAOjC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAS/B,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,oBAAoB;CAmB7B"}
@@ -95,6 +95,14 @@ export declare abstract class BaseLayout<C extends BaseLayoutConfig> implements
95
95
  * in the active range of items.
96
96
  */
97
97
  protected _overhang: number;
98
+ /**
99
+ * Recompute _overhang whenever the viewport size changes.
100
+ * We use 2× the viewport's scroll-axis dimension so that
101
+ * the user can scroll at full speed without hitting blank rows.
102
+ * Minimum of 200px so tiny/zero-height viewports still pre-render
103
+ * a sensible buffer.
104
+ */
105
+ protected _updateOverhang(): void;
98
106
  /**
99
107
  * Call this to deliver messages (e.g. stateChanged, unpinned) to host
100
108
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLayout.d.ts","sourceRoot":"","sources":["../../../../../../../lib/virtualizer/layouts/shared/BaseLayout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAEhB,SAAS,EACT,MAAM,EACN,cAAc,EACd,UAAU,EACV,SAAS,EACT,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,IAAI,EAEL,MAAM,aAAa,CAAC;AAErB,KAAK,2BAA2B,GAAG;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,SAAS,CAE1D;AAED,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,SAAS,CAE1D;AAED,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,QAAQ,CAEzD;AAED,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,QAAQ,CAEzD;AAED,8BAAsB,UAAU,CAAC,CAAC,SAAS,gBAAgB,CAAE,YAAW,MAAM;IAC5E;;OAEG;IACH,OAAO,CAAC,aAAa,CAAkC;IAEvD;;OAEG;IACH,OAAO,CAAC,UAAU,CAAgC;IAElD;;OAEG;IACH,OAAO,CAAC,aAAa,CAAiC;IAE/C,eAAe,EAAE,IAAI,CAA2B;IAEhD,oBAAoB,EAAE,SAAS,CAAuB;IAE7D;;OAEG;IACH,OAAO,CAAC,cAAc,CAAS;IAE/B,OAAO,CAAC,oBAAoB,CAAS;IAErC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAQ;IAEzC;;OAEG;IACH,SAAS,CAAC,aAAa,SAAK;IAE5B;;OAEG;IACH,SAAS,CAAC,YAAY,SAAK;IAE3B;;OAEG;IACH,SAAS,CAAC,YAAY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ualizer engine.
5
3
  *
6
- * Mates adapter for @lit-labs/virtualizer (forked).
4
+ * Exposes two helpers:
5
+ * - `virtualList` — virtualised vertical list, drop-in for `repeat`.
6
+ * Supports dynamic item heights, dynamic container sizes,
7
+ * and dynamic item counts via ResizeObserver measurement.
8
+ * - `virtualMasonry` — virtualised masonry grid with variable item heights.
7
9
  *
8
- * Exposes `virtualList`, `virtualGrid`, and `virtualMasonry` the same
9
- * friendly API that mates users already know — but now backed by the
10
- * battle-tested lit virtualizer engine.
10
+ * Both are used directly in lit-html templates:
11
11
  *
12
- * Key improvement over the old repeatVirtual implementation:
13
- * - `virtualList` no longer requires `itemHeight`. The FlowLayout uses
14
- * ResizeObserver to measure each child's actual rendered height, just
15
- * like the browser's native flow layout. Items can be any height and
16
- * can change height dynamically.
17
- * - `virtualGrid` and `virtualMasonry` still accept explicit sizes since
18
- * the grid/masonry layouts need them for position pre-computation.
12
+ * html`<div style="height:600px;overflow:auto">
13
+ * ${virtualList(items, (item) => html`<div>${item.name}</div>`)}
14
+ * </div>`
19
15
  */
20
16
  import type { TemplateResult } from "lit-html";
21
17
  import type { KeyFn } from "lit-html/directives/repeat.js";
@@ -28,7 +24,7 @@ export interface VirtualListOptions {
28
24
  direction?: "vertical" | "horizontal";
29
25
  /**
30
26
  * If true the virtualizer element itself becomes the scroller.
31
- * Set an explicit height/width on the host element when using this.
27
+ * Give it an explicit height/width via CSS when using this.
32
28
  */
33
29
  scroller?: boolean;
34
30
  /**
@@ -41,16 +37,15 @@ export interface VirtualListOptions {
41
37
  };
42
38
  }
43
39
  /**
44
- * `virtualList` — virtualised single-column list backed by the lit virtualizer
45
- * FlowLayout.
40
+ * `virtualList` — virtualised list backed by the FlowLayout engine.
46
41
  *
47
- * Unlike the previous implementation, **no `itemHeight` is required**. Each
48
- * item is measured by a ResizeObserver after it renders, so items can have
49
- * any height — fixed, dynamic, or content-driven — and the virtualizer adapts
50
- * automatically.
42
+ * **No `itemHeight` required.** Each item is measured by a ResizeObserver
43
+ * after it renders, so items can have any height — fixed, dynamic, or
44
+ * content-driven — and the virtualizer adapts automatically. Also responds
45
+ * to container size changes and item count changes in real time.
51
46
  *
52
- * The parent element of the expression becomes the scroll container. Give it
53
- * a fixed height via CSS or inline style.
47
+ * The parent element of the expression becomes the scroll container.
48
+ * Give it a fixed height via CSS or inline style.
54
49
  *
55
50
  * @example
56
51
  * ```ts
@@ -77,76 +72,30 @@ export interface VirtualListOptions {
77
72
  * { direction: 'horizontal' },
78
73
  * )}
79
74
  * </div>`
80
- * ```
81
- */
82
- export declare function virtualList<T>(items: readonly T[], template: VirtualItemTemplate<T>, options?: VirtualListOptions): unknown;
83
- export declare function virtualList<T>(items: readonly T[], keyFn: VirtualKeyFn<T>, template: VirtualItemTemplate<T>, options?: VirtualListOptions): unknown;
84
- export interface VirtualGridOptions {
85
- /**
86
- * Item width in CSS pixel string, e.g. `'200px'`. Required.
87
- */
88
- itemWidth: `${number}px`;
89
- /**
90
- * Item height in CSS pixel string, e.g. `'200px'`. Required.
91
- */
92
- itemHeight: `${number}px`;
93
- /**
94
- * Gap between cells. Accepts any value supported by the grid layout,
95
- * e.g. `'12px'`, `'12px 8px'`. Defaults to `'8px'`.
96
- */
97
- gap?: `${number}px` | `${number}px ${number}px`;
98
- /**
99
- * Scrolling direction. Defaults to `'vertical'`.
100
- */
101
- direction?: "vertical" | "horizontal";
102
- /**
103
- * If true the virtualizer element itself becomes the scroller.
104
- */
105
- scroller?: boolean;
106
- /**
107
- * Whether to flex items to fill available space. Defaults to `false`.
108
- * Set to `true` to let the grid decide how many columns fit.
109
- */
110
- flex?: boolean;
111
- /**
112
- * Pin a specific item into view on first render.
113
- */
114
- pin?: {
115
- index: number;
116
- block?: ScrollLogicalPosition;
117
- };
118
- }
119
- /**
120
- * `virtualGrid` — virtualised uniform multi-column grid.
121
- *
122
- * Pass flat items — no row-grouping needed. The grid layout computes row and
123
- * column positions automatically. All cells have the same size.
124
75
  *
125
- * @example
126
- * ```ts
127
- * html`<div style="height:600px;overflow:auto">
128
- * ${virtualGrid(
129
- * photos,
130
- * (p) => p.id,
131
- * (p) => html`<img src=${p.url} style="width:100%;height:100%;object-fit:cover" />`,
132
- * { itemWidth: '220px', itemHeight: '220px', gap: '12px' },
76
+ * // Self-scrolling container (virtualizer is its own scroller)
77
+ * html`<div>
78
+ * ${virtualList(
79
+ * items,
80
+ * (item) => html`<div>${item.name}</div>`,
81
+ * { scroller: true },
133
82
  * )}
134
83
  * </div>`
135
84
  * ```
136
85
  */
137
- export declare function virtualGrid<T>(items: readonly T[], template: VirtualItemTemplate<T>, options: VirtualGridOptions): unknown;
138
- export declare function virtualGrid<T>(items: readonly T[], keyFn: VirtualKeyFn<T>, template: VirtualItemTemplate<T>, options: VirtualGridOptions): unknown;
86
+ export declare function virtualList<T>(items: readonly T[], template: VirtualItemTemplate<T>, options?: VirtualListOptions): unknown;
87
+ export declare function virtualList<T>(items: readonly T[], keyFn: VirtualKeyFn<T>, template: VirtualItemTemplate<T>, options?: VirtualListOptions): unknown;
139
88
  export interface VirtualMasonryOptions {
140
89
  /**
141
90
  * A function that returns the aspect ratio (width / height) of each item.
142
- * This is used by the masonry layout to compute item heights based on column
143
- * width. Required.
91
+ * Used by the masonry layout to compute item heights from the column width.
92
+ * Required.
144
93
  */
145
94
  getAspectRatio: (item: unknown) => number;
146
95
  /**
147
- * Item size (column width) as a CSS pixel string, e.g. `'300px'`.
148
- * The masonry layout derives height from the aspect ratio, so only one
149
- * dimension is needed. Defaults to `'300px'`.
96
+ * Column width as a CSS pixel string, e.g. `'300px'`.
97
+ * Height is derived from the aspect ratio.
98
+ * Defaults to `'300px'`.
150
99
  */
151
100
  itemSize?: `${number}px` | "0";
152
101
  /**
@@ -172,10 +121,9 @@ export interface VirtualMasonryOptions {
172
121
  /**
173
122
  * `virtualMasonry` — virtualised masonry grid with variable item heights.
174
123
  *
175
- * Positions are computed automatically using the lit virtualizer's MasonryLayout,
176
- * which places items in the shortest column (greedy algorithm). Provide
177
- * `getAspectRatio` to let the layout derive each item's height from its
178
- * column width.
124
+ * Items are placed into the shortest column (greedy algorithm). Provide
125
+ * `getAspectRatio` so the layout can derive each item's height from its
126
+ * column width without measuring.
179
127
  *
180
128
  * @example
181
129
  * ```ts
@@ -188,8 +136,8 @@ export interface VirtualMasonryOptions {
188
136
  * style="width:100%;height:100%;object-fit:cover;border-radius:8px" />
189
137
  * `,
190
138
  * {
191
- * getAspectRatio: (p) => p.width / p.height,
192
- * itemWidth: '220px',
139
+ * getAspectRatio: (p) => (p as Photo).width / (p as Photo).height,
140
+ * itemSize: '220px',
193
141
  * gap: '12px',
194
142
  * },
195
143
  * )}
@@ -1 +1 @@
1
- {"version":3,"file":"mates-adapter.d.ts","sourceRoot":"","sources":["../../../../../lib/virtualizer/mates-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAW3D,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,cAAc,CAAC;AAChF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAIvC,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,GAAG,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,QAAQ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AK,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC;AACX,wBAAgB,cAAc,CAAC,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EACtB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mates-devtools",
3
- "version": "0.1.0-beta.5",
3
+ "version": "0.1.0-beta.7",
4
4
  "description": "In-app DevTools panel for the Mates framework",
5
5
  "type": "module",
6
6
  "main": "./dist/mates-devtools.umd.js",
@@ -1,9 +0,0 @@
1
- export { buildPath } from "./buildPath";
2
- export { hashAtom } from "./hashAtom";
3
- export { isPathMatching } from "./isPathMatching";
4
- export { location } from "./location";
5
- export { navigateTo } from "./navigateTo";
6
- export { lockNavigation, navigationLocked, unlockNavigation, } from "./navigationLock";
7
- export { pathAtom } from "./pathAtom";
8
- export { qsAtom } from "./qsAtom";
9
- //# sourceMappingURL=pathResolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pathResolver.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/pathResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -1,38 +0,0 @@
1
- import type { TemplateResult } from "lit-html";
2
- import type { DirectiveResult } from "lit-html/directive.js";
3
- export type TipContent = string | TemplateResult;
4
- export interface TipStyle {
5
- /** Extra inline styles applied to the tooltip element for this instance. */
6
- style?: Partial<CSSStyleDeclaration>;
7
- /** Override max-width (e.g. "400px", "none"). */
8
- maxWidth?: string;
9
- /** Override padding (e.g. "12px 20px"). */
10
- padding?: string;
11
- /** Override border-radius. */
12
- borderRadius?: string;
13
- /** Override font-size. */
14
- fontSize?: string;
15
- /** Override white-space (e.g. "normal" for wrapping). */
16
- whiteSpace?: string;
17
- /** Delay in ms before showing. Default 150. */
18
- delay?: number;
19
- }
20
- /**
21
- * `tooltip(content, opts?)` — lightweight auto-positioning tooltip directive.
22
- *
23
- * Appends a singleton `position:fixed` div to `<body>` — escapes any
24
- * `overflow:hidden`, `transform`, or stacking context. Automatically places
25
- * above or below the trigger based on available viewport space.
26
- *
27
- * Per-instance style overrides are applied at show-time and reset at hide-time
28
- * so the singleton is always clean for the next tooltip.
29
- *
30
- * @example
31
- * html`<button ${tooltip("Save changes")}>Save</button>`
32
- * html`<button ${tooltip("Long text", { maxWidth: "300px", whiteSpace: "normal" })}>Info</button>`
33
- * html`<button ${tooltip(html`Press <kbd>Ctrl+S</kbd>`)}>Save</button>`
34
- */
35
- export declare function tooltip(content: TipContent, opts?: TipStyle): DirectiveResult;
36
- /** Alias — kept for backward compatibility. */
37
- export declare const tip: typeof tooltip;
38
- //# sourceMappingURL=tip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tip.d.ts","sourceRoot":"","sources":["../../../../../lib/portals/tip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK7D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,cAAc,CAAC;AAEjD,MAAM,WAAW,QAAQ;IACvB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACrC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAwPD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,UAAU,EACnB,IAAI,GAAE,QAAa,GAClB,eAAe,CAEjB;AAED,+CAA+C;AAC/C,eAAO,MAAM,GAAG,gBAAU,CAAC"}
@@ -1,25 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2021 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- import { GridBaseLayout, type GridBaseLayoutConfig } from "./shared/GridBaseLayout.js";
7
- import type { LayoutHostSink, Positions, Size } from "./shared/Layout.js";
8
- type GridLayoutSpecifier = GridBaseLayoutConfig & {
9
- type: new (hostSink: LayoutHostSink, config?: GridBaseLayoutConfig) => GridLayout;
10
- };
11
- type GridLayoutSpecifierFactory = (config?: GridBaseLayoutConfig) => GridLayoutSpecifier;
12
- export declare const grid: GridLayoutSpecifierFactory;
13
- export declare class GridLayout extends GridBaseLayout<GridBaseLayoutConfig> {
14
- /**
15
- * Returns the average size (precise or estimated) of an item in the scrolling direction,
16
- * including any surrounding space.
17
- */
18
- protected get _delta(): number;
19
- protected _getItemSize(_idx: number): Size;
20
- _getActiveItems(): void;
21
- _getItemPosition(idx: number): Positions;
22
- _updateScrollSize(): void;
23
- }
24
- export {};
25
- //# sourceMappingURL=grid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../../../lib/virtualizer/layouts/grid.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1E,KAAK,mBAAmB,GAAG,oBAAoB,GAAG;IAChD,IAAI,EAAE,KACJ,QAAQ,EAAE,cAAc,EACxB,MAAM,CAAC,EAAE,oBAAoB,KAC1B,UAAU,CAAC;CACjB,CAAC;AAEF,KAAK,0BAA0B,GAAG,CAChC,MAAM,CAAC,EAAE,oBAAoB,KAC1B,mBAAmB,CAAC;AAEzB,eAAO,MAAM,IAAI,EAAE,0BAQhB,CAAC;AAEJ,qBAAa,UAAW,SAAQ,cAAc,CAAC,oBAAoB,CAAC;IAClE;;;OAGG;IACH,SAAS,KAAK,MAAM,WAEnB;IAED,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO1C,eAAe;IA+Bf,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAYxC,iBAAiB;CAUlB"}