@fluixi/compiler 1.0.0-alpha.91 → 1.0.0-alpha.93
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.
- package/dist/analyze/intrinsics.cjs +21 -1
- package/dist/analyze/intrinsics.d.ts.map +1 -1
- package/dist/analyze/intrinsics.js +20 -0
- package/dist/analyze/intrinsics.mjs +21 -1
- package/dist/analyze/reactive-bindings.cjs +21 -1
- package/dist/analyze/reactive-bindings.mjs +21 -1
- package/dist/analyze/static-graph.cjs +25 -5
- package/dist/analyze/static-graph.d.ts.map +1 -1
- package/dist/analyze/static-graph.js +6 -4
- package/dist/analyze/static-graph.mjs +25 -5
- package/dist/{babel-VBLQRHQ2.mjs → babel-RJHJQVEM.mjs} +4 -4
- package/dist/{chunk-D53J7ICY.mjs → chunk-56QSOVVL.mjs} +1 -1
- package/dist/{chunk-S4J4OCWK.mjs → chunk-OD53TMER.mjs} +22 -2
- package/dist/{chunk-TWDJUXWZ.mjs → chunk-R7PPFBCL.mjs} +1 -1
- package/dist/{chunk-QX6Y3OAR.mjs → chunk-TJIH7TLX.mjs} +1 -1
- package/dist/{chunk-3JWMCK4A.mjs → chunk-U7HCFLZ2.mjs} +153 -48
- package/dist/codegen/backends/imperative.cjs +27 -7
- package/dist/codegen/backends/imperative.d.ts.map +1 -1
- package/dist/codegen/backends/imperative.js +19 -4
- package/dist/codegen/backends/imperative.mjs +27 -7
- package/dist/frontend/babel/build-ir-lit.cjs +123 -44
- package/dist/frontend/babel/build-ir-lit.mjs +123 -44
- package/dist/frontend/babel/build-ir.cjs +123 -44
- package/dist/frontend/babel/build-ir.mjs +123 -44
- package/dist/frontend/babel/index.cjs +124 -45
- package/dist/frontend/babel/index.mjs +124 -45
- package/dist/frontend/babel/lower-template.cjs +123 -44
- package/dist/frontend/babel/lower-template.mjs +123 -44
- package/dist/frontend/babel/plugin.cjs +123 -44
- package/dist/frontend/babel/plugin.mjs +123 -44
- package/dist/index.cjs +86 -46
- package/dist/index.mjs +88 -48
- package/dist/integrations.cjs +246 -61
- package/dist/integrations.mjs +53 -19
- package/dist/lower/compile-template.cjs +44 -39
- package/dist/lower/compile-template.mjs +44 -39
- package/dist/lower/jsx.cjs +509 -6
- package/dist/lower/jsx.d.ts.map +1 -1
- package/dist/lower/jsx.js +114 -6
- package/dist/lower/jsx.mjs +509 -6
- package/dist/lower/template.cjs +43 -38
- package/dist/lower/template.d.ts.map +1 -1
- package/dist/lower/template.js +22 -30
- package/dist/lower/template.mjs +43 -38
- package/dist/resolve/builtins.cjs +1 -1
- package/dist/resolve/builtins.mjs +1 -1
- package/dist/resolve/component-globals.cjs +33 -8
- package/dist/resolve/component-globals.d.cts +8 -0
- package/dist/resolve/component-globals.d.ts +8 -0
- package/dist/resolve/component-globals.d.ts.map +1 -1
- package/dist/resolve/component-globals.js +21 -12
- package/dist/resolve/component-globals.mjs +33 -8
- package/dist/resolve/write-globals.cjs +59 -8
- package/dist/resolve/write-globals.d.cts +6 -0
- package/dist/resolve/write-globals.d.ts +6 -0
- package/dist/resolve/write-globals.d.ts.map +1 -1
- package/dist/resolve/write-globals.js +35 -2
- package/dist/resolve/write-globals.mjs +61 -10
- package/dist/{server-fns-J56G3PFP.mjs → server-fns-ZFRDIQ2X.mjs} +4 -4
- package/dist/{server-functions-7PUFLRGF.mjs → server-functions-CTDXX67X.mjs} +3 -3
- package/dist/transform/index.cjs +199 -49
- package/dist/transform/index.mjs +199 -49
- package/dist/transform/intrinsics.cjs +47 -2
- package/dist/transform/intrinsics.d.cts +12 -0
- package/dist/transform/intrinsics.d.ts +12 -0
- package/dist/transform/intrinsics.d.ts.map +1 -1
- package/dist/transform/intrinsics.js +43 -1
- package/dist/transform/intrinsics.mjs +47 -2
- package/dist/transform/source-locations.cjs +67 -4
- package/dist/transform/source-locations.d.cts +7 -2
- package/dist/transform/source-locations.d.ts +7 -2
- package/dist/transform/source-locations.d.ts.map +1 -1
- package/dist/transform/source-locations.js +68 -3
- package/dist/transform/source-locations.mjs +67 -4
- package/dist/transform/templates.cjs +198 -48
- package/dist/transform/templates.d.ts.map +1 -1
- package/dist/transform/templates.js +5 -3
- package/dist/transform/templates.mjs +198 -48
- package/dist/{transform-D536WXGM.mjs → transform-QWWQDCXE.mjs} +33 -8
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +9 -3
|
@@ -36,6 +36,7 @@ var INTRINSICS = {
|
|
|
36
36
|
$effect: { export: "effect", module: REACTIVE_MODULE, returns: "effect" },
|
|
37
37
|
$store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
|
|
38
38
|
$resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
|
|
39
|
+
$cachedResource: { export: "cachedResource", module: "@fluixi/reactive/cached-resource", returns: "resource-handle" },
|
|
39
40
|
// No short runtime form for these yet, so the intrinsic stands for the `create*`
|
|
40
41
|
// name. Still worth having: no import to write, and when a shorter form is
|
|
41
42
|
// designed, the change is this line rather than a compiler pass.
|
|
@@ -45,7 +46,22 @@ var INTRINSICS = {
|
|
|
45
46
|
// does. `untrack` suppresses dependency collection, which is exactly the kind of thing
|
|
46
47
|
// dependency analysis must not guess at.
|
|
47
48
|
$untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
|
|
48
|
-
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" }
|
|
49
|
+
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" },
|
|
50
|
+
// Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
|
|
51
|
+
// no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
|
|
52
|
+
$batch: { export: "batch", module: REACTIVE_MODULE, returns: "plain" },
|
|
53
|
+
$cleanup: { export: "onCleanup", module: REACTIVE_MODULE, returns: "plain" },
|
|
54
|
+
$root: { export: "root", module: REACTIVE_MODULE, returns: "plain" },
|
|
55
|
+
$context: { export: "context", module: REACTIVE_MODULE, returns: "plain" },
|
|
56
|
+
$renderEffect: { export: "renderEffect", module: REACTIVE_MODULE, returns: "effect" },
|
|
57
|
+
$computed: { export: "computed", module: REACTIVE_MODULE, returns: "effect" },
|
|
58
|
+
// Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
|
|
59
|
+
// handle as far as reads go: the same accessor with `set` on it.
|
|
60
|
+
$storage: { export: "useStorage", module: "@fluixi/core/storage", returns: "plain" },
|
|
61
|
+
$asyncStorage: { export: "useAsyncStorage", module: "@fluixi/core/storage", returns: "plain" },
|
|
62
|
+
$persisted: { export: "persisted", module: "@fluixi/core/storage", returns: "signal-handle" },
|
|
63
|
+
// An environment variable, public or server-only; the browser build refuses a secret.
|
|
64
|
+
$env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
|
|
49
65
|
};
|
|
50
66
|
var RUNTIME_PRIMITIVES = {
|
|
51
67
|
signal: "signal-handle",
|
|
@@ -56,8 +72,11 @@ var RUNTIME_PRIMITIVES = {
|
|
|
56
72
|
createMemo: "memo-accessor",
|
|
57
73
|
createEffect: "effect",
|
|
58
74
|
createRenderEffect: "effect",
|
|
75
|
+
renderEffect: "effect",
|
|
76
|
+
computed: "effect",
|
|
59
77
|
createStore: "reactive-object",
|
|
60
78
|
resource: "resource-handle",
|
|
79
|
+
cachedResource: "resource-handle",
|
|
61
80
|
createResource: "reactive-object",
|
|
62
81
|
createSelector: "memo-accessor",
|
|
63
82
|
createDeferred: "memo-accessor"
|
|
@@ -66,6 +85,7 @@ var PRIMITIVE_MODULES = [
|
|
|
66
85
|
"@fluixi/reactive",
|
|
67
86
|
"@fluixi/reactive/signal",
|
|
68
87
|
"@fluixi/reactive/store",
|
|
88
|
+
"@fluixi/reactive/cached-resource",
|
|
69
89
|
"@fluixi/core"
|
|
70
90
|
];
|
|
71
91
|
var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intrinsics.d.ts","sourceRoot":"","sources":["../../src/analyze/intrinsics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6DAA6D;AAC7D,MAAM,MAAM,YAAY,GACpB,OAAO;AACT,6EAA6E;GAC3E,eAAe;AACjB,+CAA+C;GAC7C,aAAa;AACf,+DAA+D;GAC7D,cAAc;AAChB,oFAAoF;GAClF,iBAAiB;AACnB,8EAA8E;GAC5E,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,QAAQ,GACR,iBAAiB,CAAC;AAEtB,MAAM,WAAW,SAAS;IACxB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,EAAE,YAAY,GAAG,SAAS,YAAY,EAAE,CAAC;CACjD;AAED,0FAA0F;AAC1F,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"intrinsics.d.ts","sourceRoot":"","sources":["../../src/analyze/intrinsics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6DAA6D;AAC7D,MAAM,MAAM,YAAY,GACpB,OAAO;AACT,6EAA6E;GAC3E,eAAe;AACjB,+CAA+C;GAC7C,aAAa;AACf,+DAA+D;GAC7D,cAAc;AAChB,oFAAoF;GAClF,iBAAiB;AACnB,8EAA8E;GAC5E,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,QAAQ,GACR,iBAAiB,CAAC;AAEtB,MAAM,WAAW,SAAS;IACxB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,EAAE,YAAY,GAAG,SAAS,YAAY,EAAE,CAAC;CACjD;AAED,0FAA0F;AAC1F,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAsC1D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAiB7E,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAM9C,CAAC;AAQF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,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,21 @@ 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' },
|
|
61
|
+
// An environment variable, public or server-only; the browser build refuses a secret.
|
|
62
|
+
$env: { export: 'env', module: '@fluixi/start/env', returns: 'plain' },
|
|
47
63
|
};
|
|
48
64
|
/**
|
|
49
65
|
* The runtime names, for the other direction: source that imports `createSignal` gets
|
|
@@ -59,8 +75,11 @@ export const RUNTIME_PRIMITIVES = {
|
|
|
59
75
|
createMemo: 'memo-accessor',
|
|
60
76
|
createEffect: 'effect',
|
|
61
77
|
createRenderEffect: 'effect',
|
|
78
|
+
renderEffect: 'effect',
|
|
79
|
+
computed: 'effect',
|
|
62
80
|
createStore: 'reactive-object',
|
|
63
81
|
resource: 'resource-handle',
|
|
82
|
+
cachedResource: 'resource-handle',
|
|
64
83
|
createResource: 'reactive-object',
|
|
65
84
|
createSelector: 'memo-accessor',
|
|
66
85
|
createDeferred: 'memo-accessor',
|
|
@@ -70,6 +89,7 @@ export const PRIMITIVE_MODULES = [
|
|
|
70
89
|
'@fluixi/reactive',
|
|
71
90
|
'@fluixi/reactive/signal',
|
|
72
91
|
'@fluixi/reactive/store',
|
|
92
|
+
'@fluixi/reactive/cached-resource',
|
|
73
93
|
'@fluixi/core',
|
|
74
94
|
];
|
|
75
95
|
/**
|
|
@@ -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.
|
|
@@ -15,7 +16,22 @@ var INTRINSICS = {
|
|
|
15
16
|
// does. `untrack` suppresses dependency collection, which is exactly the kind of thing
|
|
16
17
|
// dependency analysis must not guess at.
|
|
17
18
|
$untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
|
|
18
|
-
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" }
|
|
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" },
|
|
33
|
+
// An environment variable, public or server-only; the browser build refuses a secret.
|
|
34
|
+
$env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
|
|
19
35
|
};
|
|
20
36
|
var RUNTIME_PRIMITIVES = {
|
|
21
37
|
signal: "signal-handle",
|
|
@@ -26,8 +42,11 @@ var RUNTIME_PRIMITIVES = {
|
|
|
26
42
|
createMemo: "memo-accessor",
|
|
27
43
|
createEffect: "effect",
|
|
28
44
|
createRenderEffect: "effect",
|
|
45
|
+
renderEffect: "effect",
|
|
46
|
+
computed: "effect",
|
|
29
47
|
createStore: "reactive-object",
|
|
30
48
|
resource: "resource-handle",
|
|
49
|
+
cachedResource: "resource-handle",
|
|
31
50
|
createResource: "reactive-object",
|
|
32
51
|
createSelector: "memo-accessor",
|
|
33
52
|
createDeferred: "memo-accessor"
|
|
@@ -36,6 +55,7 @@ var PRIMITIVE_MODULES = [
|
|
|
36
55
|
"@fluixi/reactive",
|
|
37
56
|
"@fluixi/reactive/signal",
|
|
38
57
|
"@fluixi/reactive/store",
|
|
58
|
+
"@fluixi/reactive/cached-resource",
|
|
39
59
|
"@fluixi/core"
|
|
40
60
|
];
|
|
41
61
|
var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
|
|
@@ -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.
|
|
@@ -42,7 +43,22 @@ var INTRINSICS = {
|
|
|
42
43
|
// does. `untrack` suppresses dependency collection, which is exactly the kind of thing
|
|
43
44
|
// dependency analysis must not guess at.
|
|
44
45
|
$untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
|
|
45
|
-
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" }
|
|
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" },
|
|
60
|
+
// An environment variable, public or server-only; the browser build refuses a secret.
|
|
61
|
+
$env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
|
|
46
62
|
};
|
|
47
63
|
var RUNTIME_PRIMITIVES = {
|
|
48
64
|
signal: "signal-handle",
|
|
@@ -53,8 +69,11 @@ var RUNTIME_PRIMITIVES = {
|
|
|
53
69
|
createMemo: "memo-accessor",
|
|
54
70
|
createEffect: "effect",
|
|
55
71
|
createRenderEffect: "effect",
|
|
72
|
+
renderEffect: "effect",
|
|
73
|
+
computed: "effect",
|
|
56
74
|
createStore: "reactive-object",
|
|
57
75
|
resource: "resource-handle",
|
|
76
|
+
cachedResource: "resource-handle",
|
|
58
77
|
createResource: "reactive-object",
|
|
59
78
|
createSelector: "memo-accessor",
|
|
60
79
|
createDeferred: "memo-accessor"
|
|
@@ -63,6 +82,7 @@ var PRIMITIVE_MODULES = [
|
|
|
63
82
|
"@fluixi/reactive",
|
|
64
83
|
"@fluixi/reactive/signal",
|
|
65
84
|
"@fluixi/reactive/store",
|
|
85
|
+
"@fluixi/reactive/cached-resource",
|
|
66
86
|
"@fluixi/core"
|
|
67
87
|
];
|
|
68
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.
|
|
@@ -15,7 +16,22 @@ var INTRINSICS = {
|
|
|
15
16
|
// does. `untrack` suppresses dependency collection, which is exactly the kind of thing
|
|
16
17
|
// dependency analysis must not guess at.
|
|
17
18
|
$untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
|
|
18
|
-
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" }
|
|
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" },
|
|
33
|
+
// An environment variable, public or server-only; the browser build refuses a secret.
|
|
34
|
+
$env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
|
|
19
35
|
};
|
|
20
36
|
var RUNTIME_PRIMITIVES = {
|
|
21
37
|
signal: "signal-handle",
|
|
@@ -26,8 +42,11 @@ var RUNTIME_PRIMITIVES = {
|
|
|
26
42
|
createMemo: "memo-accessor",
|
|
27
43
|
createEffect: "effect",
|
|
28
44
|
createRenderEffect: "effect",
|
|
45
|
+
renderEffect: "effect",
|
|
46
|
+
computed: "effect",
|
|
29
47
|
createStore: "reactive-object",
|
|
30
48
|
resource: "resource-handle",
|
|
49
|
+
cachedResource: "resource-handle",
|
|
31
50
|
createResource: "reactive-object",
|
|
32
51
|
createSelector: "memo-accessor",
|
|
33
52
|
createDeferred: "memo-accessor"
|
|
@@ -36,6 +55,7 @@ var PRIMITIVE_MODULES = [
|
|
|
36
55
|
"@fluixi/reactive",
|
|
37
56
|
"@fluixi/reactive/signal",
|
|
38
57
|
"@fluixi/reactive/store",
|
|
58
|
+
"@fluixi/reactive/cached-resource",
|
|
39
59
|
"@fluixi/core"
|
|
40
60
|
];
|
|
41
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.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.93 | (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.
|
|
@@ -44,7 +45,22 @@ var INTRINSICS = {
|
|
|
44
45
|
// does. `untrack` suppresses dependency collection, which is exactly the kind of thing
|
|
45
46
|
// dependency analysis must not guess at.
|
|
46
47
|
$untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
|
|
47
|
-
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" }
|
|
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" },
|
|
62
|
+
// An environment variable, public or server-only; the browser build refuses a secret.
|
|
63
|
+
$env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
|
|
48
64
|
};
|
|
49
65
|
var RUNTIME_PRIMITIVES = {
|
|
50
66
|
signal: "signal-handle",
|
|
@@ -55,8 +71,11 @@ var RUNTIME_PRIMITIVES = {
|
|
|
55
71
|
createMemo: "memo-accessor",
|
|
56
72
|
createEffect: "effect",
|
|
57
73
|
createRenderEffect: "effect",
|
|
74
|
+
renderEffect: "effect",
|
|
75
|
+
computed: "effect",
|
|
58
76
|
createStore: "reactive-object",
|
|
59
77
|
resource: "resource-handle",
|
|
78
|
+
cachedResource: "resource-handle",
|
|
60
79
|
createResource: "reactive-object",
|
|
61
80
|
createSelector: "memo-accessor",
|
|
62
81
|
createDeferred: "memo-accessor"
|
|
@@ -65,6 +84,7 @@ var PRIMITIVE_MODULES = [
|
|
|
65
84
|
"@fluixi/reactive",
|
|
66
85
|
"@fluixi/reactive/signal",
|
|
67
86
|
"@fluixi/reactive/store",
|
|
87
|
+
"@fluixi/reactive/cached-resource",
|
|
68
88
|
"@fluixi/core"
|
|
69
89
|
];
|
|
70
90
|
var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
|
|
@@ -641,10 +661,10 @@ function analyzeReactiveGraph(files, options = {}) {
|
|
|
641
661
|
const ifDir = child.attributes.find((a) => a.kind === "IfDirective");
|
|
642
662
|
const eachDir = child.attributes.find((a) => a.kind === "EachDirective");
|
|
643
663
|
let inner = owner2;
|
|
644
|
-
if (ifDir?.kind === "IfDirective") inner = addControl("Show", child.loc?.start, ifDir.hole,
|
|
645
|
-
|
|
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;
|
|
646
666
|
elementTargets(child);
|
|
647
|
-
visit(child.children, inner, describeTemplateElement(child));
|
|
667
|
+
visit(child.children, inner, child.tag === "container" ? holder : describeTemplateElement(child));
|
|
648
668
|
break;
|
|
649
669
|
}
|
|
650
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,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B;;;OAGG;IACH,GAAG,CAAC,EAAE,aAAa,EAAE,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,EAAE,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,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,
|
|
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,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B;;;OAGG;IACH,GAAG,CAAC,EAAE,aAAa,EAAE,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,EAAE,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,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,
|
|
635
|
-
|
|
636
|
-
inner = addControl('For', child.loc?.start, eachDir.hole,
|
|
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
|
-
|
|
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.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.93 | (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.
|
|
@@ -23,7 +24,22 @@ var INTRINSICS = {
|
|
|
23
24
|
// does. `untrack` suppresses dependency collection, which is exactly the kind of thing
|
|
24
25
|
// dependency analysis must not guess at.
|
|
25
26
|
$untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
|
|
26
|
-
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" }
|
|
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" },
|
|
41
|
+
// An environment variable, public or server-only; the browser build refuses a secret.
|
|
42
|
+
$env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
|
|
27
43
|
};
|
|
28
44
|
var RUNTIME_PRIMITIVES = {
|
|
29
45
|
signal: "signal-handle",
|
|
@@ -34,8 +50,11 @@ var RUNTIME_PRIMITIVES = {
|
|
|
34
50
|
createMemo: "memo-accessor",
|
|
35
51
|
createEffect: "effect",
|
|
36
52
|
createRenderEffect: "effect",
|
|
53
|
+
renderEffect: "effect",
|
|
54
|
+
computed: "effect",
|
|
37
55
|
createStore: "reactive-object",
|
|
38
56
|
resource: "resource-handle",
|
|
57
|
+
cachedResource: "resource-handle",
|
|
39
58
|
createResource: "reactive-object",
|
|
40
59
|
createSelector: "memo-accessor",
|
|
41
60
|
createDeferred: "memo-accessor"
|
|
@@ -44,6 +63,7 @@ var PRIMITIVE_MODULES = [
|
|
|
44
63
|
"@fluixi/reactive",
|
|
45
64
|
"@fluixi/reactive/signal",
|
|
46
65
|
"@fluixi/reactive/store",
|
|
66
|
+
"@fluixi/reactive/cached-resource",
|
|
47
67
|
"@fluixi/core"
|
|
48
68
|
];
|
|
49
69
|
var INTRINSIC_CALL = new RegExp(`\\$(?:${Object.keys(INTRINSICS).map((n) => n.slice(1)).join("|")})\\s*\\(`);
|
|
@@ -620,10 +640,10 @@ function analyzeReactiveGraph(files, options = {}) {
|
|
|
620
640
|
const ifDir = child.attributes.find((a) => a.kind === "IfDirective");
|
|
621
641
|
const eachDir = child.attributes.find((a) => a.kind === "EachDirective");
|
|
622
642
|
let inner = owner2;
|
|
623
|
-
if (ifDir?.kind === "IfDirective") inner = addControl("Show", child.loc?.start, ifDir.hole,
|
|
624
|
-
|
|
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;
|
|
625
645
|
elementTargets(child);
|
|
626
|
-
visit(child.children, inner, describeTemplateElement(child));
|
|
646
|
+
visit(child.children, inner, child.tag === "container" ? holder : describeTemplateElement(child));
|
|
627
647
|
break;
|
|
628
648
|
}
|
|
629
649
|
case "Component": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/compiler v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.93 | (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-
|
|
13
|
+
} from "./chunk-U7HCFLZ2.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CORE_CONTROL_FLOW,
|
|
16
16
|
ROUTER_COMPONENTS,
|
|
17
17
|
createComponentResolver
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-OD53TMER.mjs";
|
|
19
|
+
import "./chunk-TJIH7TLX.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.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.93 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
|
|
3
3
|
// src/resolve/component-resolver.ts
|
|
4
4
|
var isMapRule = (rule) => "components" in rule;
|
|
@@ -100,6 +100,7 @@ var INTRINSICS = {
|
|
|
100
100
|
$effect: { export: "effect", module: REACTIVE_MODULE, returns: "effect" },
|
|
101
101
|
$store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
|
|
102
102
|
$resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
|
|
103
|
+
$cachedResource: { export: "cachedResource", module: "@fluixi/reactive/cached-resource", returns: "resource-handle" },
|
|
103
104
|
// No short runtime form for these yet, so the intrinsic stands for the `create*`
|
|
104
105
|
// name. Still worth having: no import to write, and when a shorter form is
|
|
105
106
|
// designed, the change is this line rather than a compiler pass.
|
|
@@ -109,7 +110,22 @@ var INTRINSICS = {
|
|
|
109
110
|
// does. `untrack` suppresses dependency collection, which is exactly the kind of thing
|
|
110
111
|
// dependency analysis must not guess at.
|
|
111
112
|
$untrack: { export: "untrack", module: REACTIVE_MODULE, returns: "plain" },
|
|
112
|
-
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" }
|
|
113
|
+
$untrackStore: { export: "untrackStore", module: "@fluixi/reactive/store", returns: "plain" },
|
|
114
|
+
// Scopes, scheduling and lifecycle: no value to classify, but the same authoring promise,
|
|
115
|
+
// no import to write. `$cleanup` registers a callback on the current owner (`onCleanup`).
|
|
116
|
+
$batch: { export: "batch", module: REACTIVE_MODULE, returns: "plain" },
|
|
117
|
+
$cleanup: { export: "onCleanup", module: REACTIVE_MODULE, returns: "plain" },
|
|
118
|
+
$root: { export: "root", module: REACTIVE_MODULE, returns: "plain" },
|
|
119
|
+
$context: { export: "context", module: REACTIVE_MODULE, returns: "plain" },
|
|
120
|
+
$renderEffect: { export: "renderEffect", module: REACTIVE_MODULE, returns: "effect" },
|
|
121
|
+
$computed: { export: "computed", module: REACTIVE_MODULE, returns: "effect" },
|
|
122
|
+
// Storage for where the code runs, and a signal kept in it. `$persisted` is a signal
|
|
123
|
+
// handle as far as reads go: the same accessor with `set` on it.
|
|
124
|
+
$storage: { export: "useStorage", module: "@fluixi/core/storage", returns: "plain" },
|
|
125
|
+
$asyncStorage: { export: "useAsyncStorage", module: "@fluixi/core/storage", returns: "plain" },
|
|
126
|
+
$persisted: { export: "persisted", module: "@fluixi/core/storage", returns: "signal-handle" },
|
|
127
|
+
// An environment variable, public or server-only; the browser build refuses a secret.
|
|
128
|
+
$env: { export: "env", module: "@fluixi/start/env", returns: "plain" }
|
|
113
129
|
};
|
|
114
130
|
var RUNTIME_PRIMITIVES = {
|
|
115
131
|
signal: "signal-handle",
|
|
@@ -120,8 +136,11 @@ var RUNTIME_PRIMITIVES = {
|
|
|
120
136
|
createMemo: "memo-accessor",
|
|
121
137
|
createEffect: "effect",
|
|
122
138
|
createRenderEffect: "effect",
|
|
139
|
+
renderEffect: "effect",
|
|
140
|
+
computed: "effect",
|
|
123
141
|
createStore: "reactive-object",
|
|
124
142
|
resource: "resource-handle",
|
|
143
|
+
cachedResource: "resource-handle",
|
|
125
144
|
createResource: "reactive-object",
|
|
126
145
|
createSelector: "memo-accessor",
|
|
127
146
|
createDeferred: "memo-accessor"
|
|
@@ -130,6 +149,7 @@ var PRIMITIVE_MODULES = [
|
|
|
130
149
|
"@fluixi/reactive",
|
|
131
150
|
"@fluixi/reactive/signal",
|
|
132
151
|
"@fluixi/reactive/store",
|
|
152
|
+
"@fluixi/reactive/cached-resource",
|
|
133
153
|
"@fluixi/core"
|
|
134
154
|
];
|
|
135
155
|
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.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.93 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
4
4
|
var comma = ",".charCodeAt(0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/compiler v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.93 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
3
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
4
|
}) : x)(function(x) {
|