@fluixi/compiler 1.0.0-alpha.92 → 1.0.0-alpha.94

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 (102) hide show
  1. package/dist/analyze/intrinsics.cjs +31 -1
  2. package/dist/analyze/intrinsics.d.cts +14 -0
  3. package/dist/analyze/intrinsics.d.ts +14 -0
  4. package/dist/analyze/intrinsics.d.ts.map +1 -1
  5. package/dist/analyze/intrinsics.js +35 -0
  6. package/dist/analyze/intrinsics.mjs +31 -1
  7. package/dist/analyze/reactive-bindings.cjs +18 -0
  8. package/dist/analyze/reactive-bindings.mjs +18 -0
  9. package/dist/analyze/static-graph.cjs +22 -4
  10. package/dist/analyze/static-graph.d.ts.map +1 -1
  11. package/dist/analyze/static-graph.js +6 -4
  12. package/dist/analyze/static-graph.mjs +22 -4
  13. package/dist/{babel-GI375YZ2.mjs → babel-RJFQVFJW.mjs} +4 -4
  14. package/dist/{chunk-QZ4CJPYP.mjs → chunk-DP2QDWWH.mjs} +1 -1
  15. package/dist/{chunk-DWNWN5RH.mjs → chunk-E2RWTIYE.mjs} +21 -15
  16. package/dist/{chunk-XJ5H2MXY.mjs → chunk-HCCBEJEZ.mjs} +31 -1
  17. package/dist/{chunk-VOUI6XPV.mjs → chunk-HIZU7WI2.mjs} +1 -1
  18. package/dist/{chunk-VC6X44FS.mjs → chunk-ZR2QHTEX.mjs} +505 -68
  19. package/dist/codegen/backends/imperative.cjs +24 -6
  20. package/dist/codegen/backends/imperative.d.ts.map +1 -1
  21. package/dist/codegen/backends/imperative.js +20 -4
  22. package/dist/codegen/backends/imperative.mjs +24 -6
  23. package/dist/frontend/babel/build-ir-lit.cjs +470 -63
  24. package/dist/frontend/babel/build-ir-lit.mjs +470 -63
  25. package/dist/frontend/babel/build-ir.cjs +470 -63
  26. package/dist/frontend/babel/build-ir.mjs +470 -63
  27. package/dist/frontend/babel/index.cjs +471 -64
  28. package/dist/frontend/babel/index.mjs +471 -64
  29. package/dist/frontend/babel/lower-template.cjs +470 -63
  30. package/dist/frontend/babel/lower-template.mjs +470 -63
  31. package/dist/frontend/babel/plugin.cjs +470 -63
  32. package/dist/frontend/babel/plugin.mjs +470 -63
  33. package/dist/index.cjs +360 -58
  34. package/dist/index.mjs +372 -58
  35. package/dist/integrations.cjs +1347 -98
  36. package/dist/integrations.d.ts.map +1 -1
  37. package/dist/integrations.js +44 -2
  38. package/dist/integrations.mjs +205 -19
  39. package/dist/lower/compile-template.cjs +354 -57
  40. package/dist/lower/compile-template.d.cts +13 -0
  41. package/dist/lower/compile-template.d.ts +13 -0
  42. package/dist/lower/compile-template.d.ts.map +1 -1
  43. package/dist/lower/compile-template.js +3 -0
  44. package/dist/lower/compile-template.mjs +366 -57
  45. package/dist/lower/entities.cjs +288 -0
  46. package/dist/lower/entities.d.cts +1 -0
  47. package/dist/lower/entities.d.ts +2 -0
  48. package/dist/lower/entities.d.ts.map +1 -0
  49. package/dist/lower/entities.js +54 -0
  50. package/dist/lower/entities.mjs +267 -0
  51. package/dist/lower/jsx.cjs +567 -7
  52. package/dist/lower/jsx.d.cts +8 -0
  53. package/dist/lower/jsx.d.ts +8 -0
  54. package/dist/lower/jsx.d.ts.map +1 -1
  55. package/dist/lower/jsx.js +205 -7
  56. package/dist/lower/jsx.mjs +567 -7
  57. package/dist/lower/template.cjs +332 -56
  58. package/dist/lower/template.d.ts.map +1 -1
  59. package/dist/lower/template.js +57 -49
  60. package/dist/lower/template.mjs +332 -56
  61. package/dist/resolve/builtins.cjs +1 -1
  62. package/dist/resolve/builtins.mjs +1 -1
  63. package/dist/resolve/component-globals.cjs +20 -1
  64. package/dist/resolve/component-globals.js +2 -2
  65. package/dist/resolve/component-globals.mjs +20 -1
  66. package/dist/resolve/write-globals.cjs +20 -1
  67. package/dist/resolve/write-globals.mjs +20 -1
  68. package/dist/{server-fns-BBZRZUPP.mjs → server-fns-JLSTKWPS.mjs} +4 -4
  69. package/dist/{server-functions-VEGLIFCE.mjs → server-functions-BGY3RD4R.mjs} +3 -3
  70. package/dist/transform/index.cjs +1123 -77
  71. package/dist/transform/index.mjs +1141 -91
  72. package/dist/transform/intrinsics.cjs +18 -0
  73. package/dist/transform/intrinsics.mjs +18 -0
  74. package/dist/transform/props.mjs +19 -14
  75. package/dist/transform/server-fns.mjs +19 -14
  76. package/dist/transform/source-locations.cjs +64 -3
  77. package/dist/transform/source-locations.d.cts +7 -2
  78. package/dist/transform/source-locations.d.ts +7 -2
  79. package/dist/transform/source-locations.d.ts.map +1 -1
  80. package/dist/transform/source-locations.js +68 -3
  81. package/dist/transform/source-locations.mjs +64 -3
  82. package/dist/transform/styles.cjs +588 -0
  83. package/dist/transform/styles.d.cts +211 -0
  84. package/dist/transform/styles.d.ts +212 -0
  85. package/dist/transform/styles.d.ts.map +1 -0
  86. package/dist/transform/styles.js +714 -0
  87. package/dist/transform/styles.mjs +653 -0
  88. package/dist/transform/templates.cjs +1122 -76
  89. package/dist/transform/templates.d.cts +13 -0
  90. package/dist/transform/templates.d.ts +13 -0
  91. package/dist/transform/templates.d.ts.map +1 -1
  92. package/dist/transform/templates.js +51 -14
  93. package/dist/transform/templates.mjs +1140 -90
  94. package/dist/{transform-UWZ7ZGJ2.mjs → transform-GBP6Y4UI.mjs} +603 -19
  95. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  96. package/dist/vite-styles.cjs +180 -0
  97. package/dist/vite-styles.d.cts +59 -0
  98. package/dist/vite-styles.d.ts +60 -0
  99. package/dist/vite-styles.d.ts.map +1 -0
  100. package/dist/vite-styles.js +198 -0
  101. package/dist/vite-styles.mjs +159 -0
  102. package/package.json +10 -3
@@ -24,9 +24,11 @@ __export(intrinsics_exports, {
24
24
  PRIMITIVE_MODULES: () => PRIMITIVE_MODULES,
25
25
  REACTIVE_MODULE: () => REACTIVE_MODULE,
26
26
  RUNTIME_PRIMITIVES: () => RUNTIME_PRIMITIVES,
27
+ TAG_INTRINSICS: () => TAG_INTRINSICS,
27
28
  isIntrinsicName: () => isIntrinsicName,
28
29
  isPrimitiveModule: () => isPrimitiveModule,
29
- mayHaveIntrinsic: () => mayHaveIntrinsic
30
+ mayHaveIntrinsic: () => mayHaveIntrinsic,
31
+ tagIntrinsics: () => tagIntrinsics
30
32
  });
31
33
  module.exports = __toCommonJS(intrinsics_exports);
32
34
  var REACTIVE_MODULE = "@fluixi/reactive/signal";
@@ -36,6 +38,7 @@ var INTRINSICS = {
36
38
  $effect: { export: "effect", module: REACTIVE_MODULE, returns: "effect" },
37
39
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
38
40
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
41
+ $cachedResource: { export: "cachedResource", module: "@fluixi/reactive/cached-resource", returns: "resource-handle" },
39
42
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
40
43
  // name. Still worth having: no import to write, and when a shorter form is
41
44
  // designed, the change is this line rather than a compiler pass.
@@ -46,6 +49,19 @@ var INTRINSICS = {
46
49
  // dependency analysis must not guess at.
47
50
  $untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
48
51
  $untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" },
52
+ // Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
53
+ // no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
54
+ $batch: { export: "batch", module: REACTIVE_MODULE, returns: "plain" },
55
+ $cleanup: { export: "onCleanup", module: REACTIVE_MODULE, returns: "plain" },
56
+ $root: { export: "root", module: REACTIVE_MODULE, returns: "plain" },
57
+ $context: { export: "context", module: REACTIVE_MODULE, returns: "plain" },
58
+ $renderEffect: { export: "renderEffect", module: REACTIVE_MODULE, returns: "effect" },
59
+ $computed: { export: "computed", module: REACTIVE_MODULE, returns: "effect" },
60
+ // Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
61
+ // handle as far as reads go: the same accessor with `set` on it.
62
+ $storage: { export: "useStorage", module: "@fluixi/core/storage", returns: "plain" },
63
+ $asyncStorage: { export: "useAsyncStorage", module: "@fluixi/core/storage", returns: "plain" },
64
+ $persisted: { export: "persisted", module: "@fluixi/core/storage", returns: "signal-handle" },
49
65
  // An environment variable, public or server-only; the browser build refuses a secret.
50
66
  $env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
51
67
  };
@@ -58,8 +74,11 @@ var RUNTIME_PRIMITIVES = {
58
74
  createMemo: "memo-accessor",
59
75
  createEffect: "effect",
60
76
  createRenderEffect: "effect",
77
+ renderEffect: "effect",
78
+ computed: "effect",
61
79
  createStore: "reactive-object",
62
80
  resource: "resource-handle",
81
+ cachedResource: "resource-handle",
63
82
  createResource: "reactive-object",
64
83
  createSelector: "memo-accessor",
65
84
  createDeferred: "memo-accessor"
@@ -68,8 +87,19 @@ var PRIMITIVE_MODULES = [
68
87
  "@fluixi/reactive",
69
88
  "@fluixi/reactive/signal",
70
89
  "@fluixi/reactive/store",
90
+ "@fluixi/reactive/cached-resource",
71
91
  "@fluixi/core"
72
92
  ];
93
+ var TAG_INTRINSICS = {
94
+ $html: { export: "html", module: "@fluixi/core" },
95
+ $svg: { export: "svg", module: "@fluixi/core" },
96
+ $css: { export: "css", module: "@fluixi/core" }
97
+ };
98
+ function tagIntrinsics(bound) {
99
+ const tags = /* @__PURE__ */ new Map();
100
+ for (const [name, tag] of Object.entries(TAG_INTRINSICS)) if (!bound.has(name)) tags.set(name, tag.export);
101
+ return tags;
102
+ }
73
103
  var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
74
104
  function mayHaveIntrinsic(code) {
75
105
  return INTRINSIC_CALL.test(code);
@@ -60,6 +60,20 @@ export declare const INTRINSICS: Readonly<Record<string, Intrinsic>>;
60
60
  export declare const RUNTIME_PRIMITIVES: Readonly<Record<string, Intrinsic['returns']>>;
61
61
  /** Modules whose exports count as reactive primitives. */
62
62
  export declare const PRIMITIVE_MODULES: readonly string[];
63
+ /**
64
+ * Cheap text check for the file-skipping fast path: a module with no `$` call never
65
+ * needs parsing. Non-global, so it has no lastIndex to carry between calls.
66
+ */
67
+ /**
68
+ * Template tags an app writes without importing them. Each compiles exactly like the marker
69
+ * it names; a module that binds the name itself keeps its own meaning.
70
+ */
71
+ export declare const TAG_INTRINSICS: Readonly<Record<string, {
72
+ export: 'html' | 'svg' | 'css';
73
+ module: string;
74
+ }>>;
75
+ /** The `$` tags this module can use: all of them, less the ones it binds. */
76
+ export declare function tagIntrinsics(bound: Set<string>): Map<string, 'html' | 'svg' | 'css'>;
63
77
  export declare function mayHaveIntrinsic(code: string): boolean;
64
78
  export declare function isIntrinsicName(name: string): boolean;
65
79
  /** Whether a module path exports the reactive primitives. */
@@ -60,6 +60,20 @@ export declare const INTRINSICS: Readonly<Record<string, Intrinsic>>;
60
60
  export declare const RUNTIME_PRIMITIVES: Readonly<Record<string, Intrinsic['returns']>>;
61
61
  /** Modules whose exports count as reactive primitives. */
62
62
  export declare const PRIMITIVE_MODULES: readonly string[];
63
+ /**
64
+ * Cheap text check for the file-skipping fast path: a module with no `$` call never
65
+ * needs parsing. Non-global, so it has no lastIndex to carry between calls.
66
+ */
67
+ /**
68
+ * Template tags an app writes without importing them. Each compiles exactly like the marker
69
+ * it names; a module that binds the name itself keeps its own meaning.
70
+ */
71
+ export declare const TAG_INTRINSICS: Readonly<Record<string, {
72
+ export: 'html' | 'svg' | 'css';
73
+ module: string;
74
+ }>>;
75
+ /** The `$` tags this module can use: all of them, less the ones it binds. */
76
+ export declare function tagIntrinsics(bound: Set<string>): Map<string, 'html' | 'svg' | 'css'>;
63
77
  export declare function mayHaveIntrinsic(code: string): boolean;
64
78
  export declare function isIntrinsicName(name: string): boolean;
65
79
  /** Whether a module path exports the reactive primitives. */
@@ -1 +1 @@
1
- {"version":3,"file":"intrinsics.d.ts","sourceRoot":"","sources":["../../src/analyze/intrinsics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6DAA6D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,CAEzD"}
@@ -34,6 +34,7 @@ export const INTRINSICS = {
34
34
  $effect: { export: 'effect', module: REACTIVE_MODULE, returns: 'effect' },
35
35
  $store: { export: 'store', module: '@fluixi/reactive/store', returns: 'store-handle' },
36
36
  $resource: { export: 'resource', module: REACTIVE_MODULE, returns: 'resource-handle' },
37
+ $cachedResource: { export: 'cachedResource', module: '@fluixi/reactive/cached-resource', returns: 'resource-handle' },
37
38
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
38
39
  // name. Still worth having: no import to write, and when a shorter form is
39
40
  // designed, the change is this line rather than a compiler pass.
@@ -44,6 +45,19 @@ export const INTRINSICS = {
44
45
  // dependency analysis must not guess at.
45
46
  $untrack: { export: 'untrack', module: REACTIVE_MODULE, returns: 'plain' },
46
47
  $untrackStore: { export: 'untrackStore', module: '@fluixi/reactive/store', returns: 'plain' },
48
+ // Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
49
+ // no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
50
+ $batch: { export: 'batch', module: REACTIVE_MODULE, returns: 'plain' },
51
+ $cleanup: { export: 'onCleanup', module: REACTIVE_MODULE, returns: 'plain' },
52
+ $root: { export: 'root', module: REACTIVE_MODULE, returns: 'plain' },
53
+ $context: { export: 'context', module: REACTIVE_MODULE, returns: 'plain' },
54
+ $renderEffect: { export: 'renderEffect', module: REACTIVE_MODULE, returns: 'effect' },
55
+ $computed: { export: 'computed', module: REACTIVE_MODULE, returns: 'effect' },
56
+ // Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
57
+ // handle as far as reads go: the same accessor with `set` on it.
58
+ $storage: { export: 'useStorage', module: '@fluixi/core/storage', returns: 'plain' },
59
+ $asyncStorage: { export: 'useAsyncStorage', module: '@fluixi/core/storage', returns: 'plain' },
60
+ $persisted: { export: 'persisted', module: '@fluixi/core/storage', returns: 'signal-handle' },
47
61
  // An environment variable, public or server-only; the browser build refuses a secret.
48
62
  $env: { export: 'env', module: '@fluixi/start/env', returns: 'plain' },
49
63
  };
@@ -61,8 +75,11 @@ export const RUNTIME_PRIMITIVES = {
61
75
  createMemo: 'memo-accessor',
62
76
  createEffect: 'effect',
63
77
  createRenderEffect: 'effect',
78
+ renderEffect: 'effect',
79
+ computed: 'effect',
64
80
  createStore: 'reactive-object',
65
81
  resource: 'resource-handle',
82
+ cachedResource: 'resource-handle',
66
83
  createResource: 'reactive-object',
67
84
  createSelector: 'memo-accessor',
68
85
  createDeferred: 'memo-accessor',
@@ -72,12 +89,30 @@ export const PRIMITIVE_MODULES = [
72
89
  '@fluixi/reactive',
73
90
  '@fluixi/reactive/signal',
74
91
  '@fluixi/reactive/store',
92
+ '@fluixi/reactive/cached-resource',
75
93
  '@fluixi/core',
76
94
  ];
77
95
  /**
78
96
  * Cheap text check for the file-skipping fast path: a module with no `$` call never
79
97
  * needs parsing. Non-global, so it has no lastIndex to carry between calls.
80
98
  */
99
+ /**
100
+ * Template tags an app writes without importing them. Each compiles exactly like the marker
101
+ * it names; a module that binds the name itself keeps its own meaning.
102
+ */
103
+ export const TAG_INTRINSICS = {
104
+ $html: { export: 'html', module: '@fluixi/core' },
105
+ $svg: { export: 'svg', module: '@fluixi/core' },
106
+ $css: { export: 'css', module: '@fluixi/core' },
107
+ };
108
+ /** The `$` tags this module can use: all of them, less the ones it binds. */
109
+ export function tagIntrinsics(bound) {
110
+ const tags = new Map();
111
+ for (const [name, tag] of Object.entries(TAG_INTRINSICS))
112
+ if (!bound.has(name))
113
+ tags.set(name, tag.export);
114
+ return tags;
115
+ }
81
116
  const INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join('|')})\\s*\\(`);
82
117
  export function mayHaveIntrinsic(code) {
83
118
  return INTRINSIC_CALL.test(code);
@@ -6,6 +6,7 @@ var INTRINSICS = {
6
6
  $effect: { export: "effect", module: REACTIVE_MODULE, returns: "effect" },
7
7
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
8
8
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
9
+ $cachedResource: { export: "cachedResource", module: "@fluixi/reactive/cached-resource", returns: "resource-handle" },
9
10
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
10
11
  // name. Still worth having: no import to write, and when a shorter form is
11
12
  // designed, the change is this line rather than a compiler pass.
@@ -16,6 +17,19 @@ var INTRINSICS = {
16
17
  // dependency analysis must not guess at.
17
18
  $untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
18
19
  $untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" },
20
+ // Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
21
+ // no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
22
+ $batch: { export: "batch", module: REACTIVE_MODULE, returns: "plain" },
23
+ $cleanup: { export: "onCleanup", module: REACTIVE_MODULE, returns: "plain" },
24
+ $root: { export: "root", module: REACTIVE_MODULE, returns: "plain" },
25
+ $context: { export: "context", module: REACTIVE_MODULE, returns: "plain" },
26
+ $renderEffect: { export: "renderEffect", module: REACTIVE_MODULE, returns: "effect" },
27
+ $computed: { export: "computed", module: REACTIVE_MODULE, returns: "effect" },
28
+ // Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
29
+ // handle as far as reads go: the same accessor with `set` on it.
30
+ $storage: { export: "useStorage", module: "@fluixi/core/storage", returns: "plain" },
31
+ $asyncStorage: { export: "useAsyncStorage", module: "@fluixi/core/storage", returns: "plain" },
32
+ $persisted: { export: "persisted", module: "@fluixi/core/storage", returns: "signal-handle" },
19
33
  // An environment variable, public or server-only; the browser build refuses a secret.
20
34
  $env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
21
35
  };
@@ -28,8 +42,11 @@ var RUNTIME_PRIMITIVES = {
28
42
  createMemo: "memo-accessor",
29
43
  createEffect: "effect",
30
44
  createRenderEffect: "effect",
45
+ renderEffect: "effect",
46
+ computed: "effect",
31
47
  createStore: "reactive-object",
32
48
  resource: "resource-handle",
49
+ cachedResource: "resource-handle",
33
50
  createResource: "reactive-object",
34
51
  createSelector: "memo-accessor",
35
52
  createDeferred: "memo-accessor"
@@ -38,8 +55,19 @@ var PRIMITIVE_MODULES = [
38
55
  "@fluixi/reactive",
39
56
  "@fluixi/reactive/signal",
40
57
  "@fluixi/reactive/store",
58
+ "@fluixi/reactive/cached-resource",
41
59
  "@fluixi/core"
42
60
  ];
61
+ var TAG_INTRINSICS = {
62
+ $html: { export: "html", module: "@fluixi/core" },
63
+ $svg: { export: "svg", module: "@fluixi/core" },
64
+ $css: { export: "css", module: "@fluixi/core" }
65
+ };
66
+ function tagIntrinsics(bound) {
67
+ const tags = /* @__PURE__ */ new Map();
68
+ for (const [name, tag] of Object.entries(TAG_INTRINSICS)) if (!bound.has(name)) tags.set(name, tag.export);
69
+ return tags;
70
+ }
43
71
  var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
44
72
  function mayHaveIntrinsic(code) {
45
73
  return INTRINSIC_CALL.test(code);
@@ -55,7 +83,9 @@ export {
55
83
  PRIMITIVE_MODULES,
56
84
  REACTIVE_MODULE,
57
85
  RUNTIME_PRIMITIVES,
86
+ TAG_INTRINSICS,
58
87
  isIntrinsicName,
59
88
  isPrimitiveModule,
60
- mayHaveIntrinsic
89
+ mayHaveIntrinsic,
90
+ tagIntrinsics
61
91
  };
@@ -33,6 +33,7 @@ var INTRINSICS = {
33
33
  $effect: { export: "effect", module: REACTIVE_MODULE, returns: "effect" },
34
34
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
35
35
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
36
+ $cachedResource: { export: "cachedResource", module: "@fluixi/reactive/cached-resource", returns: "resource-handle" },
36
37
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
37
38
  // name. Still worth having: no import to write, and when a shorter form is
38
39
  // designed, the change is this line rather than a compiler pass.
@@ -43,6 +44,19 @@ var INTRINSICS = {
43
44
  // dependency analysis must not guess at.
44
45
  $untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
45
46
  $untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" },
47
+ // Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
48
+ // no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
49
+ $batch: { export: "batch", module: REACTIVE_MODULE, returns: "plain" },
50
+ $cleanup: { export: "onCleanup", module: REACTIVE_MODULE, returns: "plain" },
51
+ $root: { export: "root", module: REACTIVE_MODULE, returns: "plain" },
52
+ $context: { export: "context", module: REACTIVE_MODULE, returns: "plain" },
53
+ $renderEffect: { export: "renderEffect", module: REACTIVE_MODULE, returns: "effect" },
54
+ $computed: { export: "computed", module: REACTIVE_MODULE, returns: "effect" },
55
+ // Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
56
+ // handle as far as reads go: the same accessor with `set` on it.
57
+ $storage: { export: "useStorage", module: "@fluixi/core/storage", returns: "plain" },
58
+ $asyncStorage: { export: "useAsyncStorage", module: "@fluixi/core/storage", returns: "plain" },
59
+ $persisted: { export: "persisted", module: "@fluixi/core/storage", returns: "signal-handle" },
46
60
  // An environment variable, public or server-only; the browser build refuses a secret.
47
61
  $env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
48
62
  };
@@ -55,8 +69,11 @@ var RUNTIME_PRIMITIVES = {
55
69
  createMemo: "memo-accessor",
56
70
  createEffect: "effect",
57
71
  createRenderEffect: "effect",
72
+ renderEffect: "effect",
73
+ computed: "effect",
58
74
  createStore: "reactive-object",
59
75
  resource: "resource-handle",
76
+ cachedResource: "resource-handle",
60
77
  createResource: "reactive-object",
61
78
  createSelector: "memo-accessor",
62
79
  createDeferred: "memo-accessor"
@@ -65,6 +82,7 @@ var PRIMITIVE_MODULES = [
65
82
  "@fluixi/reactive",
66
83
  "@fluixi/reactive/signal",
67
84
  "@fluixi/reactive/store",
85
+ "@fluixi/reactive/cached-resource",
68
86
  "@fluixi/core"
69
87
  ];
70
88
  var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
@@ -6,6 +6,7 @@ var INTRINSICS = {
6
6
  $effect: { export: "effect", module: REACTIVE_MODULE, returns: "effect" },
7
7
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
8
8
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
9
+ $cachedResource: { export: "cachedResource", module: "@fluixi/reactive/cached-resource", returns: "resource-handle" },
9
10
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
10
11
  // name. Still worth having: no import to write, and when a shorter form is
11
12
  // designed, the change is this line rather than a compiler pass.
@@ -16,6 +17,19 @@ var INTRINSICS = {
16
17
  // dependency analysis must not guess at.
17
18
  $untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
18
19
  $untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" },
20
+ // Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
21
+ // no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
22
+ $batch: { export: "batch", module: REACTIVE_MODULE, returns: "plain" },
23
+ $cleanup: { export: "onCleanup", module: REACTIVE_MODULE, returns: "plain" },
24
+ $root: { export: "root", module: REACTIVE_MODULE, returns: "plain" },
25
+ $context: { export: "context", module: REACTIVE_MODULE, returns: "plain" },
26
+ $renderEffect: { export: "renderEffect", module: REACTIVE_MODULE, returns: "effect" },
27
+ $computed: { export: "computed", module: REACTIVE_MODULE, returns: "effect" },
28
+ // Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
29
+ // handle as far as reads go: the same accessor with `set` on it.
30
+ $storage: { export: "useStorage", module: "@fluixi/core/storage", returns: "plain" },
31
+ $asyncStorage: { export: "useAsyncStorage", module: "@fluixi/core/storage", returns: "plain" },
32
+ $persisted: { export: "persisted", module: "@fluixi/core/storage", returns: "signal-handle" },
19
33
  // An environment variable, public or server-only; the browser build refuses a secret.
20
34
  $env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
21
35
  };
@@ -28,8 +42,11 @@ var RUNTIME_PRIMITIVES = {
28
42
  createMemo: "memo-accessor",
29
43
  createEffect: "effect",
30
44
  createRenderEffect: "effect",
45
+ renderEffect: "effect",
46
+ computed: "effect",
31
47
  createStore: "reactive-object",
32
48
  resource: "resource-handle",
49
+ cachedResource: "resource-handle",
33
50
  createResource: "reactive-object",
34
51
  createSelector: "memo-accessor",
35
52
  createDeferred: "memo-accessor"
@@ -38,6 +55,7 @@ var PRIMITIVE_MODULES = [
38
55
  "@fluixi/reactive",
39
56
  "@fluixi/reactive/signal",
40
57
  "@fluixi/reactive/store",
58
+ "@fluixi/reactive/cached-resource",
41
59
  "@fluixi/core"
42
60
  ];
43
61
  var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
@@ -1,4 +1,4 @@
1
- /*! @fluixi/compiler v1.0.0-alpha.92 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/compiler v1.0.0-alpha.94 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -35,6 +35,7 @@ var INTRINSICS = {
35
35
  $effect: { export: "effect", module: REACTIVE_MODULE, returns: "effect" },
36
36
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
37
37
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
38
+ $cachedResource: { export: "cachedResource", module: "@fluixi/reactive/cached-resource", returns: "resource-handle" },
38
39
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
39
40
  // name. Still worth having: no import to write, and when a shorter form is
40
41
  // designed, the change is this line rather than a compiler pass.
@@ -45,6 +46,19 @@ var INTRINSICS = {
45
46
  // dependency analysis must not guess at.
46
47
  $untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
47
48
  $untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" },
49
+ // Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
50
+ // no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
51
+ $batch: { export: "batch", module: REACTIVE_MODULE, returns: "plain" },
52
+ $cleanup: { export: "onCleanup", module: REACTIVE_MODULE, returns: "plain" },
53
+ $root: { export: "root", module: REACTIVE_MODULE, returns: "plain" },
54
+ $context: { export: "context", module: REACTIVE_MODULE, returns: "plain" },
55
+ $renderEffect: { export: "renderEffect", module: REACTIVE_MODULE, returns: "effect" },
56
+ $computed: { export: "computed", module: REACTIVE_MODULE, returns: "effect" },
57
+ // Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
58
+ // handle as far as reads go: the same accessor with `set` on it.
59
+ $storage: { export: "useStorage", module: "@fluixi/core/storage", returns: "plain" },
60
+ $asyncStorage: { export: "useAsyncStorage", module: "@fluixi/core/storage", returns: "plain" },
61
+ $persisted: { export: "persisted", module: "@fluixi/core/storage", returns: "signal-handle" },
48
62
  // An environment variable, public or server-only; the browser build refuses a secret.
49
63
  $env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
50
64
  };
@@ -57,8 +71,11 @@ var RUNTIME_PRIMITIVES = {
57
71
  createMemo: "memo-accessor",
58
72
  createEffect: "effect",
59
73
  createRenderEffect: "effect",
74
+ renderEffect: "effect",
75
+ computed: "effect",
60
76
  createStore: "reactive-object",
61
77
  resource: "resource-handle",
78
+ cachedResource: "resource-handle",
62
79
  createResource: "reactive-object",
63
80
  createSelector: "memo-accessor",
64
81
  createDeferred: "memo-accessor"
@@ -67,6 +84,7 @@ var PRIMITIVE_MODULES = [
67
84
  "@fluixi/reactive",
68
85
  "@fluixi/reactive/signal",
69
86
  "@fluixi/reactive/store",
87
+ "@fluixi/reactive/cached-resource",
70
88
  "@fluixi/core"
71
89
  ];
72
90
  var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
@@ -643,10 +661,10 @@ function analyzeReactiveGraph(files, options = {}) {
643
661
  const ifDir = child.attributes.find((a) => a.kind === "IfDirective");
644
662
  const eachDir = child.attributes.find((a) => a.kind === "EachDirective");
645
663
  let inner = owner2;
646
- if (ifDir?.kind === "IfDirective") inner = addControl("Show", child.loc?.start, ifDir.hole, owner2) ?? owner2;
647
- else if (eachDir?.kind === "EachDirective") inner = addControl("For", child.loc?.start, eachDir.hole, owner2) ?? owner2;
664
+ if (ifDir?.kind === "IfDirective") inner = addControl("Show", child.loc?.start, ifDir.hole, inner) ?? inner;
665
+ if (eachDir?.kind === "EachDirective") inner = addControl("For", child.loc?.start, eachDir.hole, inner) ?? inner;
648
666
  elementTargets(child);
649
- visit(child.children, inner, describeTemplateElement(child));
667
+ visit(child.children, inner, child.tag === "container" ? holder : describeTemplateElement(child));
650
668
  break;
651
669
  }
652
670
  case "Component": {
@@ -1 +1 @@
1
- {"version":3,"file":"static-graph.d.ts","sourceRoot":"","sources":["../../src/analyze/static-graph.ts"],"names":[],"mappings":"AA6BA,MAAM,MAAM,cAAc,GACtB,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,UAAU,GACV,WAAW;AACb,yFAAyF;GACvF,SAAS;AACX,qEAAqE;GACnE,QAAQ;AACV,6EAA6E;GAC3E,SAAS,CAAC;AAEd,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,CAAC;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CA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AM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACrD;AAED,6FAA6F;AAC7F,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,IAAI,EAAE,SAAS,GAAG,WAAW,CAAC;IAC9B,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACxD;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,kEAAkE;IAClE,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA+PD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,OAAO,GAAE,cAAmB,GAC3B,WAAW,CAmmBb"}
@@ -629,13 +629,15 @@ export function analyzeReactiveGraph(files, options = {}) {
629
629
  // `if=`/`each=` are `<Show>`/`<For>` once lowered, so they are nodes here too.
630
630
  const ifDir = child.attributes.find((a) => a.kind === 'IfDirective');
631
631
  const eachDir = child.attributes.find((a) => a.kind === 'EachDirective');
632
+ // Both can sit on one element: the condition around it, the list inside it.
632
633
  let inner = owner;
633
634
  if (ifDir?.kind === 'IfDirective')
634
- inner = addControl('Show', child.loc?.start, ifDir.hole, owner) ?? owner;
635
- else if (eachDir?.kind === 'EachDirective')
636
- inner = addControl('For', child.loc?.start, eachDir.hole, owner) ?? owner;
635
+ inner = addControl('Show', child.loc?.start, ifDir.hole, inner) ?? inner;
636
+ if (eachDir?.kind === 'EachDirective')
637
+ inner = addControl('For', child.loc?.start, eachDir.hole, inner) ?? inner;
637
638
  elementTargets(child);
638
- visit(child.children, inner, describeTemplateElement(child));
639
+ // A <container> renders only its content, so what is inside it belongs to the parent's element.
640
+ visit(child.children, inner, child.tag === 'container' ? holder : describeTemplateElement(child));
639
641
  break;
640
642
  }
641
643
  case 'Component': {
@@ -1,4 +1,4 @@
1
- /*! @fluixi/compiler v1.0.0-alpha.92 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/compiler v1.0.0-alpha.94 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
3
  // src/analyze/static-graph.ts
4
4
  import { parse } from "@babel/parser";
@@ -14,6 +14,7 @@ var INTRINSICS = {
14
14
  $effect: { export: "effect", module: REACTIVE_MODULE, returns: "effect" },
15
15
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
16
16
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
17
+ $cachedResource: { export: "cachedResource", module: "@fluixi/reactive/cached-resource", returns: "resource-handle" },
17
18
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
18
19
  // name. Still worth having: no import to write, and when a shorter form is
19
20
  // designed, the change is this line rather than a compiler pass.
@@ -24,6 +25,19 @@ var INTRINSICS = {
24
25
  // dependency analysis must not guess at.
25
26
  $untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
26
27
  $untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" },
28
+ // Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
29
+ // no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
30
+ $batch: { export: "batch", module: REACTIVE_MODULE, returns: "plain" },
31
+ $cleanup: { export: "onCleanup", module: REACTIVE_MODULE, returns: "plain" },
32
+ $root: { export: "root", module: REACTIVE_MODULE, returns: "plain" },
33
+ $context: { export: "context", module: REACTIVE_MODULE, returns: "plain" },
34
+ $renderEffect: { export: "renderEffect", module: REACTIVE_MODULE, returns: "effect" },
35
+ $computed: { export: "computed", module: REACTIVE_MODULE, returns: "effect" },
36
+ // Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
37
+ // handle as far as reads go: the same accessor with `set` on it.
38
+ $storage: { export: "useStorage", module: "@fluixi/core/storage", returns: "plain" },
39
+ $asyncStorage: { export: "useAsyncStorage", module: "@fluixi/core/storage", returns: "plain" },
40
+ $persisted: { export: "persisted", module: "@fluixi/core/storage", returns: "signal-handle" },
27
41
  // An environment variable, public or server-only; the browser build refuses a secret.
28
42
  $env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
29
43
  };
@@ -36,8 +50,11 @@ var RUNTIME_PRIMITIVES = {
36
50
  createMemo: "memo-accessor",
37
51
  createEffect: "effect",
38
52
  createRenderEffect: "effect",
53
+ renderEffect: "effect",
54
+ computed: "effect",
39
55
  createStore: "reactive-object",
40
56
  resource: "resource-handle",
57
+ cachedResource: "resource-handle",
41
58
  createResource: "reactive-object",
42
59
  createSelector: "memo-accessor",
43
60
  createDeferred: "memo-accessor"
@@ -46,6 +63,7 @@ var PRIMITIVE_MODULES = [
46
63
  "@fluixi/reactive",
47
64
  "@fluixi/reactive/signal",
48
65
  "@fluixi/reactive/store",
66
+ "@fluixi/reactive/cached-resource",
49
67
  "@fluixi/core"
50
68
  ];
51
69
  var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
@@ -622,10 +640,10 @@ function analyzeReactiveGraph(files, options = {}) {
622
640
  const ifDir = child.attributes.find((a) => a.kind === "IfDirective");
623
641
  const eachDir = child.attributes.find((a) => a.kind === "EachDirective");
624
642
  let inner = owner2;
625
- if (ifDir?.kind === "IfDirective") inner = addControl("Show", child.loc?.start, ifDir.hole, owner2) ?? owner2;
626
- else if (eachDir?.kind === "EachDirective") inner = addControl("For", child.loc?.start, eachDir.hole, owner2) ?? owner2;
643
+ if (ifDir?.kind === "IfDirective") inner = addControl("Show", child.loc?.start, ifDir.hole, inner) ?? inner;
644
+ if (eachDir?.kind === "EachDirective") inner = addControl("For", child.loc?.start, eachDir.hole, inner) ?? inner;
627
645
  elementTargets(child);
628
- visit(child.children, inner, describeTemplateElement(child));
646
+ visit(child.children, inner, child.tag === "container" ? holder : describeTemplateElement(child));
629
647
  break;
630
648
  }
631
649
  case "Component": {
@@ -1,4 +1,4 @@
1
- /*! @fluixi/compiler v1.0.0-alpha.92 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/compiler v1.0.0-alpha.94 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  import {
3
3
  analyzeStatic,
4
4
  buildJsxIR,
@@ -10,13 +10,13 @@ import {
10
10
  lowerTemplate,
11
11
  resolveComponentSources,
12
12
  shapeOf
13
- } from "./chunk-VC6X44FS.mjs";
13
+ } from "./chunk-ZR2QHTEX.mjs";
14
14
  import {
15
15
  CORE_CONTROL_FLOW,
16
16
  ROUTER_COMPONENTS,
17
17
  createComponentResolver
18
- } from "./chunk-XJ5H2MXY.mjs";
19
- import "./chunk-VOUI6XPV.mjs";
18
+ } from "./chunk-HCCBEJEZ.mjs";
19
+ import "./chunk-HIZU7WI2.mjs";
20
20
 
21
21
  // src/frontend/babel/plugin.ts
22
22
  import { declare } from "@babel/helper-plugin-utils";
@@ -1,4 +1,4 @@
1
- /*! @fluixi/compiler v1.0.0-alpha.92 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/compiler v1.0.0-alpha.94 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
3
  // src/transform/server-fn-id.ts
4
4
  function hash(s) {
@@ -1,6 +1,6 @@
1
- /*! @fluixi/compiler v1.0.0-alpha.92 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/compiler v1.0.0-alpha.94 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
- // ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
3
+ // ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.6.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
4
4
  var comma = ",".charCodeAt(0);
5
5
  var semicolon = ";".charCodeAt(0);
6
6
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -11,16 +11,16 @@ for (let i = 0; i < chars.length; i++) {
11
11
  intToChar[i] = c;
12
12
  charToInt[c] = i;
13
13
  }
14
- function encodeInteger(builder, num, relative) {
15
- let delta = num - relative;
16
- delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
14
+ function encodeInteger(builder, num) {
17
15
  do {
18
- let clamped = delta & 31;
19
- delta >>>= 5;
20
- if (delta > 0) clamped |= 32;
16
+ let clamped = num & 31;
17
+ num >>>= 5;
18
+ if (num > 0) clamped |= 32;
21
19
  builder.write(intToChar[clamped]);
22
- } while (delta > 0);
23
- return num;
20
+ } while (num > 0);
21
+ }
22
+ function encodeSign(num) {
23
+ return num < 0 ? -num << 1 | 1 : num << 1;
24
24
  }
25
25
  var bufLength = 1024 * 16;
26
26
  var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
@@ -70,13 +70,18 @@ function encode(decoded) {
70
70
  for (let j = 0; j < line.length; j++) {
71
71
  const segment = line[j];
72
72
  if (j > 0) writer.write(comma);
73
- genColumn = encodeInteger(writer, segment[0], genColumn);
73
+ encodeInteger(writer, encodeSign(segment[0] - genColumn));
74
+ genColumn = segment[0];
74
75
  if (segment.length === 1) continue;
75
- sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
76
- sourceLine = encodeInteger(writer, segment[2], sourceLine);
77
- sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
76
+ encodeInteger(writer, encodeSign(segment[1] - sourcesIndex));
77
+ encodeInteger(writer, encodeSign(segment[2] - sourceLine));
78
+ encodeInteger(writer, encodeSign(segment[3] - sourceColumn));
79
+ sourcesIndex = segment[1];
80
+ sourceLine = segment[2];
81
+ sourceColumn = segment[3];
78
82
  if (segment.length === 4) continue;
79
- namesIndex = encodeInteger(writer, segment[4], namesIndex);
83
+ encodeInteger(writer, encodeSign(segment[4] - namesIndex));
84
+ namesIndex = segment[4];
80
85
  }
81
86
  }
82
87
  return writer.flush();
@@ -1074,5 +1079,6 @@ var MagicString = class _MagicString {
1074
1079
  };
1075
1080
 
1076
1081
  export {
1082
+ encode,
1077
1083
  MagicString
1078
1084
  };