@lark.js/mvc 0.0.15 → 0.0.17

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 (62) hide show
  1. package/README.md +324 -215
  2. package/dist/chunk-OGPBFCIK.js +105 -0
  3. package/dist/client.d.cts +63 -0
  4. package/dist/client.d.ts +10 -34
  5. package/dist/compiler.cjs +15534 -15854
  6. package/dist/compiler.d.cts +1 -1
  7. package/dist/compiler.d.ts +1 -1
  8. package/dist/compiler.js +15519 -15851
  9. package/dist/devtool.cjs +2617 -4152
  10. package/dist/devtool.d.cts +1 -2
  11. package/dist/devtool.d.ts +1 -2
  12. package/dist/devtool.js +2543 -4159
  13. package/dist/index.cjs +4128 -6008
  14. package/dist/index.d.cts +571 -1291
  15. package/dist/index.d.ts +571 -1291
  16. package/dist/index.js +4058 -5976
  17. package/dist/rspack.cjs +15648 -15935
  18. package/dist/rspack.d.cts +8 -45
  19. package/dist/rspack.d.ts +8 -45
  20. package/dist/rspack.js +15641 -15934
  21. package/dist/runtime.cjs +79 -79
  22. package/dist/runtime.js +19 -85
  23. package/dist/vite.cjs +15841 -15957
  24. package/dist/vite.d.cts +6 -7
  25. package/dist/vite.d.ts +6 -7
  26. package/dist/vite.js +15834 -15955
  27. package/dist/webpack.cjs +15648 -15985
  28. package/dist/webpack.d.cts +5 -33
  29. package/dist/webpack.d.ts +5 -33
  30. package/dist/webpack.js +15641 -15984
  31. package/package.json +3 -4
  32. package/dist/apply-style.d.ts +0 -9
  33. package/dist/cache.d.ts +0 -69
  34. package/dist/common.d.ts +0 -64
  35. package/dist/compiler/compile-template.d.ts +0 -16
  36. package/dist/compiler/compile-to-vdom-function.d.ts +0 -13
  37. package/dist/compiler/extract-global-vars.d.ts +0 -17
  38. package/dist/compiler/template-syntax.d.ts +0 -61
  39. package/dist/cross-site.d.ts +0 -29
  40. package/dist/dom.d.ts +0 -45
  41. package/dist/event-delegator.d.ts +0 -28
  42. package/dist/event-emitter.d.ts +0 -38
  43. package/dist/frame.d.ts +0 -143
  44. package/dist/framework.d.ts +0 -9
  45. package/dist/hmr.d.ts +0 -53
  46. package/dist/index.amd.js +0 -6285
  47. package/dist/index.umd.js +0 -6272
  48. package/dist/mark.d.ts +0 -26
  49. package/dist/module-loader.d.ts +0 -20
  50. package/dist/router.d.ts +0 -14
  51. package/dist/runtime.amd.js +0 -94
  52. package/dist/runtime.umd.js +0 -98
  53. package/dist/service.d.ts +0 -173
  54. package/dist/state.d.ts +0 -8
  55. package/dist/store.d.ts +0 -60
  56. package/dist/types.d.ts +0 -1259
  57. package/dist/updater.d.ts +0 -90
  58. package/dist/url-state.d.ts +0 -32
  59. package/dist/utils.d.ts +0 -90
  60. package/dist/vdom.d.ts +0 -45
  61. package/dist/view-registry.d.ts +0 -20
  62. package/dist/view.d.ts +0 -214
package/dist/rspack.d.cts CHANGED
@@ -1,44 +1,8 @@
1
1
  import { RspackPluginInstance, Compiler } from '@rspack/core';
2
-
3
- /**
4
- * @lark.js/mvc Vite Plugin for Template Compilation
5
- *
6
- * Compiles .html template files using @lark.js/mvc template syntax
7
- * into JS function modules at build/dev time.
8
- *
9
- * 0 configuration — just add the plugin and it works.
10
- * - All template operators: = (escape), ! (raw), @ (ref lookup), : (binding)
11
- * - @event attribute processing with $g prefix
12
- * - $eu (URI encoding), $eq (quote encoding), $i (reference lookup)
13
- * - Debug mode with line tracking
14
- * - View ID injection
15
- * - Auto variable extraction
16
- *
17
- * Usage in vite.config.ts:
18
- * ```ts
19
- * import { larkMvcPlugin } from '@lark.js/mvc/vite';
20
- *
21
- * export default defineConfig({
22
- * plugins: [larkMvcPlugin()],
23
- * });
24
- * ```
25
- */
26
-
27
- interface LarkMvcVitePluginOptions {
28
- /** Enable debug mode with line tracking (default: false) */
29
- debug?: boolean;
30
- /** Enable virtual DOM output (default: false) */
31
- virtualDom?: boolean;
32
- }
33
-
34
- type LarkMvcWebpackLoaderOptions = LarkMvcVitePluginOptions;
35
- /** Plugin options */
36
- interface LarkMvcWebpackPluginOptions extends LarkMvcWebpackLoaderOptions {
37
- /** File extension to match (default: /\.html$/) */
38
- test?: RegExp;
39
- /** Exclude pattern (default: /node_modules/) */
40
- exclude?: RegExp;
41
- }
2
+ import { LarkMvcWebpackPluginOptions, LarkMvcWebpackLoaderOptions } from './webpack.cjs';
3
+ import './vite.cjs';
4
+ import 'vite';
5
+ import 'vite7';
42
6
 
43
7
  /**
44
8
  * @lark.js/mvc Rspack Integration for Template Compilation
@@ -71,7 +35,7 @@ interface LarkMvcWebpackPluginOptions extends LarkMvcWebpackLoaderOptions {
71
35
  * plugins: [
72
36
  * new LarkMvcPlugin({
73
37
  * debug: process.env.NODE_ENV !== 'production',
74
- * virtualDom: false,
38
+ * vdom: false,
75
39
  * }),
76
40
  * ],
77
41
  * };
@@ -84,7 +48,7 @@ interface LarkMvcWebpackPluginOptions extends LarkMvcWebpackLoaderOptions {
84
48
  * rules: [{
85
49
  * test: /\.html$/,
86
50
  * loader: '@lark.js/mvc/rspack',
87
- * options: { debug: false, virtualDom: false },
51
+ * options: { debug: false, vdom: false },
88
52
  * }],
89
53
  * },
90
54
  * };
@@ -124,7 +88,7 @@ declare function larkMvcLoader(this: LoaderContext, source: string): Promise<str
124
88
  * plugins: [
125
89
  * new LarkMvcPlugin({
126
90
  * debug: true,
127
- * virtualDom: false,
91
+ * vdom: false,
128
92
  * }),
129
93
  * ],
130
94
  * };
@@ -140,5 +104,4 @@ declare class LarkMvcPlugin implements RspackPluginInstance {
140
104
  apply(compiler: Compiler): void;
141
105
  }
142
106
 
143
- export { LarkMvcPlugin, larkMvcLoader as default, larkMvcLoader };
144
- export type { LarkMvcWebpackLoaderOptions, LarkMvcWebpackPluginOptions };
107
+ export { LarkMvcPlugin, LarkMvcWebpackLoaderOptions, LarkMvcWebpackPluginOptions, larkMvcLoader as default, larkMvcLoader };
package/dist/rspack.d.ts CHANGED
@@ -1,44 +1,8 @@
1
1
  import { RspackPluginInstance, Compiler } from '@rspack/core';
2
-
3
- /**
4
- * @lark.js/mvc Vite Plugin for Template Compilation
5
- *
6
- * Compiles .html template files using @lark.js/mvc template syntax
7
- * into JS function modules at build/dev time.
8
- *
9
- * 0 configuration — just add the plugin and it works.
10
- * - All template operators: = (escape), ! (raw), @ (ref lookup), : (binding)
11
- * - @event attribute processing with $g prefix
12
- * - $eu (URI encoding), $eq (quote encoding), $i (reference lookup)
13
- * - Debug mode with line tracking
14
- * - View ID injection
15
- * - Auto variable extraction
16
- *
17
- * Usage in vite.config.ts:
18
- * ```ts
19
- * import { larkMvcPlugin } from '@lark.js/mvc/vite';
20
- *
21
- * export default defineConfig({
22
- * plugins: [larkMvcPlugin()],
23
- * });
24
- * ```
25
- */
26
-
27
- interface LarkMvcVitePluginOptions {
28
- /** Enable debug mode with line tracking (default: false) */
29
- debug?: boolean;
30
- /** Enable virtual DOM output (default: false) */
31
- virtualDom?: boolean;
32
- }
33
-
34
- type LarkMvcWebpackLoaderOptions = LarkMvcVitePluginOptions;
35
- /** Plugin options */
36
- interface LarkMvcWebpackPluginOptions extends LarkMvcWebpackLoaderOptions {
37
- /** File extension to match (default: /\.html$/) */
38
- test?: RegExp;
39
- /** Exclude pattern (default: /node_modules/) */
40
- exclude?: RegExp;
41
- }
2
+ import { LarkMvcWebpackPluginOptions, LarkMvcWebpackLoaderOptions } from './webpack.js';
3
+ import './vite.js';
4
+ import 'vite';
5
+ import 'vite7';
42
6
 
43
7
  /**
44
8
  * @lark.js/mvc Rspack Integration for Template Compilation
@@ -71,7 +35,7 @@ interface LarkMvcWebpackPluginOptions extends LarkMvcWebpackLoaderOptions {
71
35
  * plugins: [
72
36
  * new LarkMvcPlugin({
73
37
  * debug: process.env.NODE_ENV !== 'production',
74
- * virtualDom: false,
38
+ * vdom: false,
75
39
  * }),
76
40
  * ],
77
41
  * };
@@ -84,7 +48,7 @@ interface LarkMvcWebpackPluginOptions extends LarkMvcWebpackLoaderOptions {
84
48
  * rules: [{
85
49
  * test: /\.html$/,
86
50
  * loader: '@lark.js/mvc/rspack',
87
- * options: { debug: false, virtualDom: false },
51
+ * options: { debug: false, vdom: false },
88
52
  * }],
89
53
  * },
90
54
  * };
@@ -124,7 +88,7 @@ declare function larkMvcLoader(this: LoaderContext, source: string): Promise<str
124
88
  * plugins: [
125
89
  * new LarkMvcPlugin({
126
90
  * debug: true,
127
- * virtualDom: false,
91
+ * vdom: false,
128
92
  * }),
129
93
  * ],
130
94
  * };
@@ -140,5 +104,4 @@ declare class LarkMvcPlugin implements RspackPluginInstance {
140
104
  apply(compiler: Compiler): void;
141
105
  }
142
106
 
143
- export { LarkMvcPlugin, larkMvcLoader as default, larkMvcLoader };
144
- export type { LarkMvcWebpackLoaderOptions, LarkMvcWebpackPluginOptions };
107
+ export { LarkMvcPlugin, LarkMvcWebpackLoaderOptions, LarkMvcWebpackPluginOptions, larkMvcLoader as default, larkMvcLoader };