@lark.js/mvc 0.0.14 → 0.0.15

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 (59) hide show
  1. package/README.md +4 -4
  2. package/dist/apply-style.d.ts +9 -0
  3. package/dist/cache.d.ts +69 -0
  4. package/dist/client.d.ts +87 -0
  5. package/dist/common.d.ts +64 -0
  6. package/dist/compiler/compile-template.d.ts +16 -0
  7. package/dist/compiler/compile-to-vdom-function.d.ts +13 -0
  8. package/dist/compiler/extract-global-vars.d.ts +17 -0
  9. package/dist/compiler/template-syntax.d.ts +61 -0
  10. package/dist/compiler.cjs +15847 -15482
  11. package/dist/compiler.js +15844 -15467
  12. package/dist/cross-site.d.ts +29 -0
  13. package/dist/devtool.cjs +4138 -3183
  14. package/dist/devtool.d.cts +2 -1
  15. package/dist/devtool.d.ts +2 -1
  16. package/dist/devtool.js +4164 -3125
  17. package/dist/dom.d.ts +45 -0
  18. package/dist/event-delegator.d.ts +28 -0
  19. package/dist/event-emitter.d.ts +38 -0
  20. package/dist/frame.d.ts +143 -0
  21. package/dist/framework.d.ts +9 -0
  22. package/dist/hmr.d.ts +53 -0
  23. package/dist/index.amd.js +6285 -0
  24. package/dist/index.cjs +5959 -4489
  25. package/dist/index.d.cts +9 -8
  26. package/dist/index.d.ts +9 -8
  27. package/dist/index.js +5920 -4425
  28. package/dist/index.umd.js +6272 -0
  29. package/dist/mark.d.ts +26 -0
  30. package/dist/module-loader.d.ts +20 -0
  31. package/dist/router.d.ts +14 -0
  32. package/dist/rspack.cjs +15931 -15553
  33. package/dist/rspack.d.cts +42 -5
  34. package/dist/rspack.d.ts +42 -5
  35. package/dist/rspack.js +15930 -15546
  36. package/dist/runtime.amd.js +94 -0
  37. package/dist/runtime.cjs +79 -82
  38. package/dist/runtime.js +85 -19
  39. package/dist/runtime.umd.js +98 -0
  40. package/dist/service.d.ts +173 -0
  41. package/dist/state.d.ts +8 -0
  42. package/dist/store.d.ts +60 -0
  43. package/dist/types.d.ts +1259 -0
  44. package/dist/updater.d.ts +90 -0
  45. package/dist/url-state.d.ts +32 -0
  46. package/dist/utils.d.ts +90 -0
  47. package/dist/vdom.d.ts +45 -0
  48. package/dist/view-registry.d.ts +20 -0
  49. package/dist/view.d.ts +214 -0
  50. package/dist/vite.cjs +15944 -15582
  51. package/dist/vite.d.cts +2 -1
  52. package/dist/vite.d.ts +2 -1
  53. package/dist/vite.js +15941 -15574
  54. package/dist/webpack.cjs +15981 -15553
  55. package/dist/webpack.d.cts +32 -4
  56. package/dist/webpack.d.ts +32 -4
  57. package/dist/webpack.js +15980 -15546
  58. package/package.json +2 -2
  59. package/dist/chunk-66OZBBSP.js +0 -108
package/dist/mark.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Mark/Unmark: signature-based lifecycle tracking for async callbacks.
3
+ *
4
+ * `mark(host, key)` returns a validity checker. The checker returns `false`
5
+ * once the host is unmarked (e.g. when a view re-renders or is destroyed),
6
+ * so stale async callbacks can short-circuit and skip work.
7
+ *
8
+ * State is stored in a module-level WeakMap, not on the host object, so
9
+ * `mark/unmark` never pollutes user objects with magic keys, never breaks
10
+ * on `Object.freeze`-ed inputs, and never shows up in debug snapshots.
11
+ */
12
+ /**
13
+ * Create a mark for tracking async callback validity.
14
+ * Returns a function that returns true while the mark is still valid.
15
+ *
16
+ * @param host - Object to associate the mark with (typically a view)
17
+ * @param key - Key to track (typically "render" or a specific async-op identifier)
18
+ */
19
+ export declare function mark(host: object, key: string): () => boolean;
20
+ /**
21
+ * Clear all marks for a host object, invalidating every existing checker.
22
+ * Called when a view re-renders or is destroyed.
23
+ *
24
+ * @param host - Object whose marks should be invalidated
25
+ */
26
+ export declare function unmark(host: object): void;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Module loader: async view loading via FrameworkConfig.require or dynamic import.
3
+ *
4
+ * Extracted from framework.ts to avoid circular dependency with frame.ts.
5
+ * Both framework.ts and frame.ts import from this module.
6
+ */
7
+ import type { FrameworkConfig } from "./types";
8
+ /** Framework configuration */
9
+ export declare const config: FrameworkConfig;
10
+ /**
11
+ * Load modules via the configured require function or dynamic import fallback.
12
+ *
13
+ * Two calling conventions:
14
+ * 1. `use(name | name[], callback)`
15
+ * 2. `use(name | name[])` — returns Promise<unknown[]> (no callback)
16
+ *
17
+ * When `FrameworkConfig.require` is configured, delegates to it (e.g., Webpack Module Federation).
18
+ * When not configured, falls back to `dynamic import()` for ESM-based loading.
19
+ */
20
+ export declare function use(names: string | string[], callback?: (...modules: unknown[]) => void): Promise<unknown[]>;
@@ -0,0 +1,14 @@
1
+ import type { RouterInterface } from "./types";
2
+ /**
3
+ * Router with two-phase change confirmation (supports history and hash modes).
4
+ *
5
+ * @example
6
+ * Router.to('/list', { page: 2 });
7
+ * const loc = Router.parse();
8
+ * const diff = Router.diff();
9
+ */
10
+ export declare const Router: RouterInterface;
11
+ /** Mark framework as booted (called by Framework.boot) */
12
+ export declare function markRouterBooted(): void;
13
+ /** Get current routing mode */
14
+ export declare function getRouteMode(): "history" | "hash";