@memoized-dom/compiler 0.0.4 → 0.0.6
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/README.md +106 -28
- package/dist/analysis/access-table.d.ts +1 -1
- package/dist/analysis/access-table.d.ts.map +1 -1
- package/dist/analysis/component-graph.d.ts +16 -1
- package/dist/analysis/component-graph.d.ts.map +1 -1
- package/dist/analysis/component-reads.d.ts +1 -1
- package/dist/analysis/component-reads.d.ts.map +1 -1
- package/dist/analysis/computed.d.ts +9 -5
- package/dist/analysis/computed.d.ts.map +1 -1
- package/dist/analysis/instance-control-flow.d.ts +1 -1
- package/dist/analysis/instance-control-flow.d.ts.map +1 -1
- package/dist/analysis/instance.d.ts +3 -4
- package/dist/analysis/instance.d.ts.map +1 -1
- package/dist/analysis/module-discovery.d.ts +27 -0
- package/dist/analysis/module-discovery.d.ts.map +1 -0
- package/dist/analysis/opaque-volatility.d.ts +7 -0
- package/dist/analysis/opaque-volatility.d.ts.map +1 -0
- package/dist/analysis/runtime-pattern.d.ts +3 -4
- package/dist/analysis/runtime-pattern.d.ts.map +1 -1
- package/dist/analysis/type-candidates.d.ts +15 -3
- package/dist/analysis/type-candidates.d.ts.map +1 -1
- package/dist/analysis.d.ts +7 -4
- package/dist/analysis.d.ts.map +1 -1
- package/dist/ast/builders.d.ts +108 -0
- package/dist/ast/builders.d.ts.map +1 -0
- package/dist/ast/compiler-types.d.ts +196 -0
- package/dist/ast/compiler-types.d.ts.map +1 -0
- package/dist/ast/factory.d.ts +139 -0
- package/dist/ast/factory.d.ts.map +1 -0
- package/dist/ast/index.d.ts +15 -0
- package/dist/ast/index.d.ts.map +1 -0
- package/dist/ast/mutate.d.ts +17 -0
- package/dist/ast/mutate.d.ts.map +1 -0
- package/dist/ast/normalize.d.ts +9 -0
- package/dist/ast/normalize.d.ts.map +1 -0
- package/dist/ast/parser.d.ts +72 -0
- package/dist/ast/parser.d.ts.map +1 -0
- package/dist/ast/printer.d.ts +23 -0
- package/dist/ast/printer.d.ts.map +1 -0
- package/dist/ast/scope.d.ts +44 -0
- package/dist/ast/scope.d.ts.map +1 -0
- package/dist/ast/strip-typescript.d.ts +9 -0
- package/dist/ast/strip-typescript.d.ts.map +1 -0
- package/dist/ast/transform.d.ts +21 -0
- package/dist/ast/transform.d.ts.map +1 -0
- package/dist/ast/tsrx/frontend.d.ts +8 -0
- package/dist/ast/tsrx/frontend.d.ts.map +1 -0
- package/dist/ast/tsrx/index.d.ts +5 -0
- package/dist/ast/tsrx/index.d.ts.map +1 -0
- package/dist/ast/tsrx/lower.d.ts +8 -0
- package/dist/ast/tsrx/lower.d.ts.map +1 -0
- package/dist/ast/tsrx/style.d.ts +8 -0
- package/dist/ast/tsrx/style.d.ts.map +1 -0
- package/dist/ast/tsrx/types.d.ts +50 -0
- package/dist/ast/tsrx/types.d.ts.map +1 -0
- package/dist/ast/types.d.ts +478 -0
- package/dist/ast/types.d.ts.map +1 -0
- package/dist/ast/walk.d.ts +22 -0
- package/dist/ast/walk.d.ts.map +1 -0
- package/dist/cells.d.ts +10 -0
- package/dist/cells.d.ts.map +1 -0
- package/dist/compile.d.ts +30 -14
- package/dist/compile.d.ts.map +1 -1
- package/dist/component-linker.d.ts +5 -1
- package/dist/component-linker.d.ts.map +1 -1
- package/dist/components/callback-props.d.ts +1 -1
- package/dist/components/callback-props.d.ts.map +1 -1
- package/dist/components/calls.d.ts +1 -1
- package/dist/components/calls.d.ts.map +1 -1
- package/dist/components/children.d.ts +5 -3
- package/dist/components/children.d.ts.map +1 -1
- package/dist/components/declarations.d.ts +10 -3
- package/dist/components/declarations.d.ts.map +1 -1
- package/dist/components/jsx-values.d.ts +2 -4
- package/dist/components/jsx-values.d.ts.map +1 -1
- package/dist/components/local-derived.d.ts +1 -1
- package/dist/components/local-derived.d.ts.map +1 -1
- package/dist/components/manifest.d.ts +2 -3
- package/dist/components/manifest.d.ts.map +1 -1
- package/dist/components/prop-effects.d.ts.map +1 -1
- package/dist/components/prop-linker.d.ts.map +1 -1
- package/dist/components/prop-origins.d.ts +2 -0
- package/dist/components/prop-origins.d.ts.map +1 -1
- package/dist/components/prop-projections.d.ts.map +1 -1
- package/dist/components/prop-shape.d.ts +11 -0
- package/dist/components/prop-shape.d.ts.map +1 -0
- package/dist/components/props.d.ts +9 -1
- package/dist/components/props.d.ts.map +1 -1
- package/dist/components/ref-props.d.ts.map +1 -1
- package/dist/components/render-callbacks.d.ts +9 -5
- package/dist/components/render-callbacks.d.ts.map +1 -1
- package/dist/components/render-functions.d.ts +1 -0
- package/dist/components/render-functions.d.ts.map +1 -1
- package/dist/components/render-prelude.d.ts +1 -1
- package/dist/components/render-prelude.d.ts.map +1 -1
- package/dist/components/return-plan.d.ts +13 -7
- package/dist/components/return-plan.d.ts.map +1 -1
- package/dist/conds.d.ts +6 -3
- package/dist/conds.d.ts.map +1 -1
- package/dist/context/ast.d.ts +18 -5
- package/dist/context/ast.d.ts.map +1 -1
- package/dist/context/model.d.ts +146 -13
- package/dist/context/model.d.ts.map +1 -1
- package/dist/data-sources.d.ts +78 -0
- package/dist/data-sources.d.ts.map +1 -0
- package/dist/diagnostics.d.ts +20 -0
- package/dist/diagnostics.d.ts.map +1 -0
- package/dist/effects.d.ts +13 -5
- package/dist/effects.d.ts.map +1 -1
- package/dist/emission/component.d.ts +3 -3
- package/dist/emission/component.d.ts.map +1 -1
- package/dist/emission/conditional-region.d.ts +6 -5
- package/dist/emission/conditional-region.d.ts.map +1 -1
- package/dist/emission/dom-template.d.ts.map +1 -1
- package/dist/emission/list-region.d.ts +6 -4
- package/dist/emission/list-region.d.ts.map +1 -1
- package/dist/emission/node-emitter.d.ts +4 -3
- package/dist/emission/node-emitter.d.ts.map +1 -1
- package/dist/emission/render-callback.d.ts +4 -3
- package/dist/emission/render-callback.d.ts.map +1 -1
- package/dist/emission/route-region.d.ts +10 -0
- package/dist/emission/route-region.d.ts.map +1 -0
- package/dist/emission/scope.d.ts +14 -2
- package/dist/emission/scope.d.ts.map +1 -1
- package/dist/emit.d.ts +5 -4
- package/dist/emit.d.ts.map +1 -1
- package/dist/errors.d.ts +15 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/handler-commits.d.ts +6 -1
- package/dist/handler-commits.d.ts.map +1 -1
- package/dist/handler-origin.d.ts +1 -1
- package/dist/handler-origin.d.ts.map +1 -1
- package/dist/handlers/analyze.d.ts +1 -1
- package/dist/handlers/analyze.d.ts.map +1 -1
- package/dist/handlers/local-calls.d.ts +2 -2
- package/dist/handlers/local-calls.d.ts.map +1 -1
- package/dist/handlers.d.ts +6 -5
- package/dist/handlers.d.ts.map +1 -1
- package/dist/helper-summaries.d.ts +2 -3
- package/dist/helper-summaries.d.ts.map +1 -1
- package/dist/identifiers.d.ts +15 -8
- package/dist/identifiers.d.ts.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/jsx/attributes.d.ts +1 -1
- package/dist/jsx/attributes.d.ts.map +1 -1
- package/dist/jsx/children.d.ts +3 -2
- package/dist/jsx/children.d.ts.map +1 -1
- package/dist/jsx/conditional-directives.d.ts +21 -0
- package/dist/jsx/conditional-directives.d.ts.map +1 -0
- package/dist/jsx/dom-attributes.d.ts +1 -1
- package/dist/jsx/dom-attributes.d.ts.map +1 -1
- package/dist/jsx/dynamic-tags.d.ts +9 -15
- package/dist/jsx/dynamic-tags.d.ts.map +1 -1
- package/dist/jsx/events.d.ts +2 -3
- package/dist/jsx/events.d.ts.map +1 -1
- package/dist/jsx/refs.d.ts +5 -4
- package/dist/jsx/refs.d.ts.map +1 -1
- package/dist/jsx/svg.d.ts +2 -2
- package/dist/jsx/svg.d.ts.map +1 -1
- package/dist/jsx-types.d.ts +42 -0
- package/dist/jsx-types.d.ts.map +1 -0
- package/dist/lifecycle.d.ts +10 -5
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/linker.d.ts +56 -5
- package/dist/linker.d.ts.map +1 -1
- package/dist/lists/calculated-sources.d.ts +1 -1
- package/dist/lists/calculated-sources.d.ts.map +1 -1
- package/dist/lists/map-site.d.ts +16 -8
- package/dist/lists/map-site.d.ts.map +1 -1
- package/dist/lists/source-shapes.d.ts +12 -3
- package/dist/lists/source-shapes.d.ts.map +1 -1
- package/dist/lists/static-derived.d.ts +37 -0
- package/dist/lists/static-derived.d.ts.map +1 -0
- package/dist/lists/targeted-refresh.d.ts +9 -2
- package/dist/lists/targeted-refresh.d.ts.map +1 -1
- package/dist/lists.d.ts +1 -0
- package/dist/lists.d.ts.map +1 -1
- package/dist/module-control-flow.d.ts +7 -6
- package/dist/module-control-flow.d.ts.map +1 -1
- package/dist/mutation-analysis.d.ts +22 -8
- package/dist/mutation-analysis.d.ts.map +1 -1
- package/dist/plugin.d.ts +15 -14
- package/dist/plugin.d.ts.map +1 -1
- package/dist/router.d.ts +32 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/server-functions.d.ts +49 -0
- package/dist/server-functions.d.ts.map +1 -0
- package/package.json +34 -30
package/dist/compile.d.ts
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
* One function: component source (.tsx) in, compiled JavaScript out.
|
|
5
|
-
*
|
|
6
|
-
* Plugin pipeline:
|
|
7
|
-
* 1. @babel/plugin-syntax-jsx — parse JSX (no transform)
|
|
8
|
-
* 2. memoDomPlugin — the paradigm transform (R1–R6, L1)
|
|
9
|
-
* 3. @babel/plugin-transform-typescript — strip types from emitted code
|
|
10
|
-
*
|
|
11
|
-
* The transform is written against standard ESTree nodes via @babel/types so
|
|
12
|
-
* frontend #2 (oxc) can reuse the emission logic later.
|
|
13
|
-
*/
|
|
1
|
+
/** Public compiler entry point: frontend ESTree in, compiler transform, Esrap out. */
|
|
2
|
+
import type * as t from './ast/compiler-types';
|
|
3
|
+
import { type EstreeFrontend } from './ast';
|
|
14
4
|
import { type MemoDomOptions } from './plugin';
|
|
5
|
+
import type { InternalMemoDomOptions } from './context';
|
|
15
6
|
export type { MemoDomOptions };
|
|
16
|
-
export
|
|
7
|
+
export interface CompilerSourceMap {
|
|
8
|
+
version: 3;
|
|
9
|
+
file?: string;
|
|
10
|
+
sourceRoot?: string;
|
|
11
|
+
sources: string[];
|
|
12
|
+
sourcesContent?: Array<string | null>;
|
|
13
|
+
names: string[];
|
|
14
|
+
mappings: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CompiledSource {
|
|
17
|
+
code: string;
|
|
18
|
+
map: CompilerSourceMap;
|
|
19
|
+
css?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CompileOptions extends MemoDomOptions {
|
|
22
|
+
/** Parser adapter. The default selects TSRX or Yuku from the source extension. */
|
|
23
|
+
frontend?: EstreeFrontend;
|
|
24
|
+
}
|
|
25
|
+
/** Compile source while preserving the historical string-only API. */
|
|
26
|
+
export declare function compile(source: string, opts?: CompileOptions): string;
|
|
27
|
+
/** Internal linked-graph path that reuses an ESTree program. */
|
|
28
|
+
export declare function compileAst(source: string, opts: InternalMemoDomOptions, ast?: t.File | t.Program): string;
|
|
29
|
+
/** Compile source and return a source map back to the authored TSX module. */
|
|
30
|
+
export declare function compileDetailed(source: string, opts?: CompileOptions): CompiledSource;
|
|
31
|
+
/** Internal linked-graph path that reuses a cached ESTree program. */
|
|
32
|
+
export declare function compileAstDetailed(source: string, opts: InternalMemoDomOptions, ast?: t.File | t.Program): CompiledSource;
|
|
17
33
|
//# sourceMappingURL=compile.d.ts.map
|
package/dist/compile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../src/compile.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../src/compile.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,KAAK,KAAK,CAAC,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAOL,KAAK,cAAc,EAGpB,MAA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}
|
|
@@ -22,11 +22,15 @@ export interface ComponentGraphNode {
|
|
|
22
22
|
local: string;
|
|
23
23
|
edges: ComponentGraphEdge[];
|
|
24
24
|
}
|
|
25
|
+
export interface ApplicationRootPlacement {
|
|
26
|
+
key: string;
|
|
27
|
+
rootId: string;
|
|
28
|
+
}
|
|
25
29
|
export interface LinkedComponentGraph {
|
|
26
30
|
paths: Map<string, string[]>;
|
|
27
31
|
rows: Map<string, LinkedComponentRowUse[]>;
|
|
28
32
|
propSources: Map<string, Map<string, LinkedComponentPropSource>>;
|
|
29
33
|
}
|
|
30
34
|
/** Compute every declaration's caller-derived paths and keyed-row metadata. */
|
|
31
|
-
export declare function linkComponentGraph(declarations: readonly ComponentGraphNode[],
|
|
35
|
+
export declare function linkComponentGraph(declarations: readonly ComponentGraphNode[], applicationRoot?: ApplicationRootPlacement): LinkedComponentGraph;
|
|
32
36
|
//# sourceMappingURL=component-linker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-linker.d.ts","sourceRoot":"","sources":["../src/component-linker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,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CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7B,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAC3C,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;CAClE;AAoBD,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,SAAS,kBAAkB,EAAE,EAC3C,eAAe,CAAC,EAAE,wBAAwB,GACzC,oBAAoB,CA8EtB"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* closures observe the component's live bindings, so recreating them in every
|
|
6
6
|
* prop replay only causes identity churn and needless child invalidation.
|
|
7
7
|
*/
|
|
8
|
-
import * as t from '
|
|
8
|
+
import type * as t from '../ast/compiler-types';
|
|
9
9
|
import type { Ctx } from '../context';
|
|
10
10
|
import type { EmitScope } from '../emission/scope';
|
|
11
11
|
export declare function isInlineScalarCallback(value: t.Expression): value is t.ArrowFunctionExpression | t.FunctionExpression;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callback-props.d.ts","sourceRoot":"","sources":["../../src/components/callback-props.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"callback-props.d.ts","sourceRoot":"","sources":["../../src/components/callback-props.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAIhD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,CAAC,CAAC,UAAU,GAClB,KAAK,IAAI,CAAC,CAAC,uBAAuB,GAAG,CAAC,CAAC,kBAAkB,CAK3D;AAED,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,CAAC,CAAC,uBAAuB,GAAG,CAAC,CAAC,kBAAkB,EACvD,IAAI,SAAa,GAChB,CAAC,CAAC,UAAU,CAQd;AAED,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,CAAC,CAAC,SAAS,EAAE,EACzB,KAAK,EAAE,CAAC,CAAC,uBAAuB,GAAG,CAAC,CAAC,kBAAkB,EACvD,IAAI,SAAa,GAChB,CAAC,CAAC,UAAU,CAQd"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* one object envelope. These builders are shared by static and keyed-row
|
|
6
6
|
* component emission so prop order and spread projection cannot drift.
|
|
7
7
|
*/
|
|
8
|
-
import * as t from '
|
|
8
|
+
import type * as t from '../ast/compiler-types';
|
|
9
9
|
import type { Ctx } from '../context';
|
|
10
10
|
export interface ComponentPropEntry {
|
|
11
11
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calls.d.ts","sourceRoot":"","sources":["../../src/components/calls.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"calls.d.ts","sourceRoot":"","sources":["../../src/components/calls.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAMhD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,CAAC,UAAU,CAAC;CACrB;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,kBAAkB,EAAE,GAC5B,CAAC,CAAC,UAAU,EAAE,CAgDhB;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,CAAC,CAAC,UAAU,GACnB,CAAC,CAAC,UAAU,EAAE,CAYhB;AAED,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,CAAC,CAAC,UAAU,EACrB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,CAAC,CAAC,gBAAgB,GAC7B,CAAC,CAAC,SAAS,CAoBb"}
|
|
@@ -5,15 +5,17 @@
|
|
|
5
5
|
* node. Its update closure remains attached to the lexical owner's update so
|
|
6
6
|
* ordinary state routing and guarded DOM writes keep their existing shape.
|
|
7
7
|
*/
|
|
8
|
-
import * as t from '
|
|
8
|
+
import type * as t from '../ast/compiler-types';
|
|
9
|
+
import { type BaseNode } from '../ast';
|
|
9
10
|
import { type Ctx } from '../context';
|
|
10
11
|
import { type EmitScope } from '../emission/scope';
|
|
12
|
+
import { type MapCallExpression } from '../lists';
|
|
11
13
|
export type EmitChildSlot = (scope: EmitScope, parentNode: t.Identifier, ownerId: t.Identifier) => void;
|
|
12
14
|
export type JsxChild = t.JSXElement['children'][number];
|
|
13
15
|
export interface ChildContentEmitters {
|
|
14
16
|
emitText(expression: t.Expression): string;
|
|
15
17
|
emitNode(node: t.JSXElement | t.JSXFragment): string;
|
|
16
|
-
emitList(call:
|
|
18
|
+
emitList(call: MapCallExpression, parentVar: string): void;
|
|
17
19
|
emitCondition(expression: t.ConditionalExpression | t.LogicalExpression, parentVar: string): void;
|
|
18
20
|
isForwarded(expression: t.Expression): boolean;
|
|
19
21
|
emitForwarded(expression: t.Expression, parentVar: string): void;
|
|
@@ -27,7 +29,7 @@ export declare function normalizeJsxText(raw: string): string;
|
|
|
27
29
|
/** Does a component element contain authored, non-whitespace children? */
|
|
28
30
|
export declare function hasComponentChildren(children: readonly JsxChild[]): boolean;
|
|
29
31
|
/** Declared render-prop name referenced by one interpolation/forwarding site. */
|
|
30
|
-
export declare function renderPropReferenceName(ctx: Ctx, compName: string, expression:
|
|
32
|
+
export declare function renderPropReferenceName(ctx: Ctx, compName: string, expression: BaseNode): string | null;
|
|
31
33
|
/** Is this expression one of the component's compiler-owned mount slots? */
|
|
32
34
|
export declare function isRenderPropReference(ctx: Ctx, compName: string, expression: t.Expression): boolean;
|
|
33
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/components/children.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/components/children.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAGhD,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAc,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOhE,MAAM,MAAM,aAAa,GAAG,CAC1B,KAAK,EAAE,SAAS,EAChB,UAAU,EAAE,CAAC,CAAC,UAAU,EACxB,OAAO,EAAE,CAAC,CAAC,UAAU,KAClB,IAAI,CAAC;AACV,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,GAAG,MAAM,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,WAAW,GAAG,MAAM,CAAC;IACrD,QAAQ,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,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,SAAS,EAChB,QAAQ,EAAE,SAAS,QAAQ,EAAE,EAC7B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,oBAAoB,GAC7B,IAAI,CAyDN"}
|
|
@@ -6,11 +6,18 @@
|
|
|
6
6
|
* function expressions before analysis keeps component/linker/emitter logic
|
|
7
7
|
* unified instead of adding expression-path branches to every pass.
|
|
8
8
|
*/
|
|
9
|
-
import type
|
|
10
|
-
|
|
9
|
+
import type * as t from '../ast/compiler-types';
|
|
10
|
+
interface ProgramContainer {
|
|
11
|
+
node: t.Program;
|
|
12
|
+
buildCodeFrameError(message: string): Error;
|
|
13
|
+
scope?: {
|
|
14
|
+
crawl(): void;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
11
17
|
/**
|
|
12
18
|
* Rewrite top-level uppercase const function values containing JSX into the
|
|
13
19
|
* canonical declaration shape consumed by all later passes.
|
|
14
20
|
*/
|
|
15
|
-
export declare function normalizeComponentDeclarations(programPath:
|
|
21
|
+
export declare function normalizeComponentDeclarations(programPath: ProgramContainer): void;
|
|
22
|
+
export {};
|
|
16
23
|
//# sourceMappingURL=declarations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../src/components/declarations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../src/components/declarations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAShD,UAAU,gBAAgB;IACxB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;IAChB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5C,KAAK,CAAC,EAAE;QAAE,KAAK,IAAI,IAAI,CAAA;KAAE,CAAC;CAC3B;AA6GD;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,gBAAgB,GAC5B,IAAI,CAsCN"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
+
/** Component-local JSX values are compile-time render aliases. */
|
|
1
2
|
import { type Ctx } from '../context';
|
|
2
|
-
/**
|
|
3
|
-
* Expand top-level component `const view = <JSX />` aliases at each render
|
|
4
|
-
* use. Aliases may chain and may hold JSX-bearing conditional expressions.
|
|
5
|
-
*/
|
|
3
|
+
/** Expand component JSX aliases and statically structured JSX collections. */
|
|
6
4
|
export declare function normalizeComponentJsxValues(ctx: Ctx): void;
|
|
7
5
|
//# sourceMappingURL=jsx-values.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-values.d.ts","sourceRoot":"","sources":["../../src/components/jsx-values.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsx-values.d.ts","sourceRoot":"","sources":["../../src/components/jsx-values.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAclE,OAAO,EAIL,KAAK,GAAG,EACT,MAAM,YAAY,CAAC;AA8UpB,8EAA8E;AAC9E,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CA0L1D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Emits dependency-selected replay for component-local derivations.
|
|
3
3
|
*/
|
|
4
|
-
import * as t from '
|
|
4
|
+
import type * as t from '../ast/compiler-types';
|
|
5
5
|
export declare function reasonCondition(reasonVar: string, reasons: number[]): t.Expression;
|
|
6
6
|
//# sourceMappingURL=local-derived.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-derived.d.ts","sourceRoot":"","sources":["../../src/components/local-derived.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"local-derived.d.ts","sourceRoot":"","sources":["../../src/components/local-derived.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAShD,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,CAAC,CAAC,UAAU,CAgDd"}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* composition/list sites into canonical graph edges. Graph traversal itself
|
|
6
6
|
* remains in component-linker.ts.
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import * as t from '@babel/types';
|
|
8
|
+
import { type BaseNode } from '../ast';
|
|
10
9
|
import { type Ctx } from '../context';
|
|
11
10
|
import { type ComponentGraphNode } from '../component-linker';
|
|
12
11
|
export interface ComponentExportInfo {
|
|
@@ -23,7 +22,7 @@ export interface ComponentExportInfo {
|
|
|
23
22
|
subtreeReads: string[];
|
|
24
23
|
}
|
|
25
24
|
/** Discover enough component shape to bootstrap the first import-link pass. */
|
|
26
|
-
export declare function discoverComponentExports(
|
|
25
|
+
export declare function discoverComponentExports(program: BaseNode, moduleId: string): Map<string, ComponentExportInfo>;
|
|
27
26
|
/** Export metadata after full binding-aware module analysis. */
|
|
28
27
|
export declare function analyzedComponentExport(ctx: Ctx, moduleId: string, local: string): ComponentExportInfo;
|
|
29
28
|
/** Convert analyzed local calls and list sites into graph placement edges. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/components/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/components/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEhD,OAAO,EAGL,KAAK,GAAG,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAQ7B,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,+EAA+E;AAC/E,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,MAAM,GACf,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAmDlC;AAED,gEAAgE;AAChE,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,mBAAmB,CAiBrB;AAMD,8EAA8E;AAC9E,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,GAAG,GACP,kBAAkB,EAAE,CAkFtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-effects.d.ts","sourceRoot":"","sources":["../../src/components/prop-effects.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"prop-effects.d.ts","sourceRoot":"","sources":["../../src/components/prop-effects.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAmC3D;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,WAAW,GACjB,OAAO,CAyBT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-linker.d.ts","sourceRoot":"","sources":["../../src/components/prop-linker.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACV,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,yBAAyB,EAC1B,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-linker.d.ts","sourceRoot":"","sources":["../../src/components/prop-linker.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACV,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AA4DpB,wEAAwE;AACxE,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,EACtC,KAAK,EAAE,MAAM,EAAE,GACd,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CA0CrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-origins.d.ts","sourceRoot":"","sources":["../../src/components/prop-origins.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prop-origins.d.ts","sourceRoot":"","sources":["../../src/components/prop-origins.ts"],"names":[],"mappings":"AAMA,OAAO,EAOL,KAAK,GAAG,EACT,MAAM,YAAY,CAAC;AAOpB,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtB,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,MAAM,EACN,sBAAsB,EAAE,CACzB,CAAC;AAyVF,6EAA6E;AAC7E,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,MAAM,GACZ,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CA+CtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-projections.d.ts","sourceRoot":"","sources":["../../src/components/prop-projections.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prop-projections.d.ts","sourceRoot":"","sources":["../../src/components/prop-projections.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,GAAG,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AA8I9B,4EAA4E;AAC5E,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,MAAM,GAChB,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAY7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BaseNode } from '../ast';
|
|
2
|
+
export interface ComponentPropShape {
|
|
3
|
+
mode: 'positional' | 'object';
|
|
4
|
+
names: string[];
|
|
5
|
+
acceptsUnknown: boolean;
|
|
6
|
+
bindings: string[];
|
|
7
|
+
hasWholeDefault: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Analyze component parameter syntax without a parser-specific AST API. */
|
|
10
|
+
export declare function analyzeComponentPropShape(parameters: readonly BaseNode[]): ComponentPropShape;
|
|
11
|
+
//# sourceMappingURL=prop-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-shape.d.ts","sourceRoot":"","sources":["../../src/components/prop-shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAAC;IAC9B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAuGD,4EAA4E;AAC5E,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,SAAS,QAAQ,EAAE,GAC9B,kBAAkB,CAyDpB"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* then emits assignments that replay defaults and destructuring after a prop
|
|
7
7
|
* box update. It contains no runtime or component-placement policy.
|
|
8
8
|
*/
|
|
9
|
-
import * as t from '
|
|
9
|
+
import type * as t from '../ast/compiler-types';
|
|
10
10
|
export type ComponentParam = Exclude<t.FunctionDeclaration['params'][number], t.TSParameterProperty>;
|
|
11
11
|
export interface ComponentPropsPlan {
|
|
12
12
|
mode: 'positional' | 'object';
|
|
@@ -49,6 +49,14 @@ export interface LocalDerivation {
|
|
|
49
49
|
bindings: string[];
|
|
50
50
|
/** Transitive non-derived roots that can change this value. */
|
|
51
51
|
sources: string[];
|
|
52
|
+
/**
|
|
53
|
+
* Some reactive setup keeps its authored binding stable and only updates
|
|
54
|
+
* the hidden value behind it. Fetch query rebinding is the first such
|
|
55
|
+
* case: subscribers must keep the original resource identity.
|
|
56
|
+
*/
|
|
57
|
+
stableTarget?: boolean;
|
|
58
|
+
/** Compiler-owned replay used instead of assigning `source` to `target`. */
|
|
59
|
+
replay?: t.Statement;
|
|
52
60
|
}
|
|
53
61
|
export interface ControlFlowDerivation {
|
|
54
62
|
/** Pure authored control flow retained for initial factory evaluation. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/components/props.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/components/props.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAUhD,MAAM,MAAM,cAAc,GAAG,OAAO,CAClC,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EACvC,CAAC,CAAC,mBAAmB,CACtB,CAAC;AAoBF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAAC;IAC9B,4DAA4D;IAC5D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,4EAA4E;IAC5E,cAAc,EAAE,OAAO,CAAC;IACxB,qEAAqE;IACrE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,6DAA6D;IAC7D,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,8DAA8D;IAC9D,eAAe,EAAE,OAAO,CAAC;IACzB,8EAA8E;IAC9E,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,4EAA4E;IAC5E,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,kBAAkB,GACvB,uBAAuB,EAAE,GAAG,IAAI,CAyBlC;AAED,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,WAAW,EAAE,CAAC,CAAC,mBAAmB,CAAC;IACnC,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b;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,GAAG,MAAM,EAAE,CAInD;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,CAIzE;AAED,iEAAiE;AACjE,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,kBAAkB,EACxB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,CAiBf;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CAmBf;AAiBD,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAItE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref-props.d.ts","sourceRoot":"","sources":["../../src/components/ref-props.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"ref-props.d.ts","sourceRoot":"","sources":["../../src/components/ref-props.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAgB3C"}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import
|
|
3
|
-
import type { Ctx } from '../context';
|
|
1
|
+
import type * as t from '../ast/compiler-types';
|
|
2
|
+
import { type BaseNode } from '../ast';
|
|
3
|
+
import type { Ctx, MapCallExpression } from '../context';
|
|
4
4
|
export interface RenderCallbackInvocation {
|
|
5
5
|
propName: string;
|
|
6
6
|
target: t.Expression;
|
|
7
7
|
arguments: t.Expression[];
|
|
8
8
|
}
|
|
9
|
+
interface NodeHolder {
|
|
10
|
+
node: BaseNode;
|
|
11
|
+
}
|
|
9
12
|
/** Is this JSX element the returned root of a declared callback prop value? */
|
|
10
|
-
export declare function isRenderCallbackJsxRoot(ctx: Ctx,
|
|
13
|
+
export declare function isRenderCallbackJsxRoot(ctx: Ctx, input: BaseNode | NodeHolder): boolean;
|
|
11
14
|
/** Match `items.map((item, index) => renderItem(item, index))`. */
|
|
12
|
-
export declare function matchRenderCallbackMap(ctx: Ctx, componentName: string, call:
|
|
15
|
+
export declare function matchRenderCallbackMap(ctx: Ctx, componentName: string, call: MapCallExpression): RenderCallbackInvocation | null;
|
|
13
16
|
/**
|
|
14
17
|
* Discover structural callback props before map-site analysis. No callback
|
|
15
18
|
* method names or runtime JSX values are involved: the callee declares the
|
|
16
19
|
* contract by directly returning a prop invocation from a structural map.
|
|
17
20
|
*/
|
|
18
21
|
export declare function scanRenderCallbacks(ctx: Ctx): void;
|
|
22
|
+
export {};
|
|
19
23
|
//# sourceMappingURL=render-callbacks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-callbacks.d.ts","sourceRoot":"","sources":["../../src/components/render-callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"render-callbacks.d.ts","sourceRoot":"","sources":["../../src/components/render-callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAGhD,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAOzD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IACrB,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;CAC3B;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAwBD,+EAA+E;AAC/E,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,QAAQ,GAAG,UAAU,GAC3B,OAAO,CA2DT;AAqDD,mEAAmE;AACnE,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,iBAAiB,GACtB,wBAAwB,GAAG,IAAI,CA4BjC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAyBlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-functions.d.ts","sourceRoot":"","sources":["../../src/components/render-functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render-functions.d.ts","sourceRoot":"","sources":["../../src/components/render-functions.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAerD,OAAO,EAIL,KAAK,GAAG,EACT,MAAM,YAAY,CAAC;AA+cpB,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAkGvD"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Dirty reasons guard adjacent calculations with equal dependencies; a
|
|
7
7
|
* reason-less update conservatively runs every calculation.
|
|
8
8
|
*/
|
|
9
|
-
import * as t from '
|
|
9
|
+
import type * as t from '../ast/compiler-types';
|
|
10
10
|
import type { Ctx } from '../context';
|
|
11
11
|
import { type ControlFlowDerivation, type LocalDerivation } from './props';
|
|
12
12
|
export declare function buildRenderPreludeReplay(ctx: Ctx, component: string, reasonVar: string | null, body: t.Statement[], locals: LocalDerivation[], controls: ControlFlowDerivation[]): t.BlockStatement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-prelude.d.ts","sourceRoot":"","sources":["../../src/components/render-prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"render-prelude.d.ts","sourceRoot":"","sources":["../../src/components/render-prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAGhD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;AAejB,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,IAAI,EAAE,CAAC,CAAC,SAAS,EAAE,EACnB,MAAM,EAAE,eAAe,EAAE,EACzB,QAAQ,EAAE,qBAAqB,EAAE,GAChC,CAAC,CAAC,cAAc,CAqElB"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Normalize supported JSX return control flow into one stable branch picker.
|
|
3
3
|
*/
|
|
4
|
-
import type
|
|
5
|
-
import * as t from '@babel/types';
|
|
4
|
+
import type * as t from '../ast/compiler-types';
|
|
6
5
|
import type { JsxNode } from '../jsx/children';
|
|
6
|
+
interface ComponentFunctionContainer {
|
|
7
|
+
node: t.FunctionDeclaration;
|
|
8
|
+
buildCodeFrameError(message: string): Error;
|
|
9
|
+
}
|
|
7
10
|
export interface ComponentReturnPlan {
|
|
8
11
|
/** Branch picker passed directly to createCondRegion(). */
|
|
9
12
|
pick: t.ArrowFunctionExpression;
|
|
10
|
-
|
|
13
|
+
/** null marks an empty branch (`return null/false/undefined`). */
|
|
14
|
+
branches: (JsxNode | null)[];
|
|
11
15
|
/** Top-level source statements replaced by the structural region. */
|
|
12
16
|
statements: Set<t.Statement>;
|
|
13
17
|
}
|
|
@@ -19,9 +23,11 @@ export type ComponentReturns = DirectComponentReturn | ComponentReturnPlan;
|
|
|
19
23
|
/**
|
|
20
24
|
* Supported structural forms:
|
|
21
25
|
* - one direct JSX return
|
|
22
|
-
* - a contiguous tail chain of `if (test) return <JSX>` plus final return
|
|
23
|
-
*
|
|
24
|
-
* - a terminal
|
|
26
|
+
* - a contiguous tail chain of `if (test) return <JSX|null>` plus final return
|
|
27
|
+
* (empty returns become null branches)
|
|
28
|
+
* - a terminal if/else whose two arms return JSX or an empty value
|
|
29
|
+
* - a terminal exhaustive switch whose cases return JSX or an empty value
|
|
25
30
|
*/
|
|
26
|
-
export declare function analyzeComponentReturns(path:
|
|
31
|
+
export declare function analyzeComponentReturns(path: ComponentFunctionContainer, name: string): ComponentReturns;
|
|
32
|
+
export {};
|
|
27
33
|
//# sourceMappingURL=return-plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"return-plan.d.ts","sourceRoot":"","sources":["../../src/components/return-plan.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"return-plan.d.ts","sourceRoot":"","sources":["../../src/components/return-plan.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAIhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,UAAU,0BAA0B;IAClC,IAAI,EAAE,CAAC,CAAC,mBAAmB,CAAC;IAC5B,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;CAC7C;AAqBD,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,IAAI,EAAE,CAAC,CAAC,uBAAuB,CAAC;IAChC,kEAAkE;IAClE,QAAQ,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;IAC7B,qEAAqE;IACrE,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC;CAC9B;AAED,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,mBAAmB,CAAC;AAoJ3E;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,0BAA0B,EAChC,IAAI,EAAE,MAAM,GACX,gBAAgB,CA6FlB"}
|
package/dist/conds.d.ts
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* Direct JSX-child ternaries and logical conditions become anchored regions.
|
|
5
5
|
* Right-associated ternary chains flatten into one multi-branch region.
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
8
|
-
import * as t from '@babel/types';
|
|
7
|
+
import type * as t from './ast/compiler-types';
|
|
9
8
|
import type { JsxNode } from './jsx/children';
|
|
9
|
+
interface ErrorPath {
|
|
10
|
+
buildCodeFrameError(message: string): Error;
|
|
11
|
+
}
|
|
10
12
|
export interface CondSite {
|
|
11
13
|
/** Expression selecting an index in branches. */
|
|
12
14
|
pickExpr: t.Expression;
|
|
@@ -15,7 +17,8 @@ export interface CondSite {
|
|
|
15
17
|
suffix: string;
|
|
16
18
|
}
|
|
17
19
|
export declare function matchCond(expr: t.Node): t.ConditionalExpression | t.LogicalExpression | null;
|
|
18
|
-
export declare function analyzeCondSite(expr: t.ConditionalExpression | t.LogicalExpression, errorAt:
|
|
20
|
+
export declare function analyzeCondSite(expr: t.ConditionalExpression | t.LogicalExpression, errorAt: ErrorPath, usedConds: {
|
|
19
21
|
count: number;
|
|
20
22
|
}): CondSite;
|
|
23
|
+
export {};
|
|
21
24
|
//# sourceMappingURL=conds.d.ts.map
|
package/dist/conds.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conds.d.ts","sourceRoot":"","sources":["../src/conds.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"conds.d.ts","sourceRoot":"","sources":["../src/conds.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,CAAC,MAAM,sBAAsB,CAAC;AAK/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,UAAU,SAAS;IACjB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;CAC7C;AAED,MAAM,WAAW,QAAQ;IACvB,iDAAiD;IACjD,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;IAC7B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,CAAC,CAAC,IAAI,GACX,CAAC,CAAC,qBAAqB,GAAG,CAAC,CAAC,iBAAiB,GAAG,IAAI,CAStD;AAsCD,wBAAgB,eAAe,CAC7B,IAAI,EAAE,CAAC,CAAC,qBAAqB,GAAG,CAAC,CAAC,iBAAiB,EACnD,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3B,QAAQ,CAiEV"}
|
package/dist/context/ast.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import * as t from '
|
|
1
|
+
import type * as t from '../ast/compiler-types';
|
|
2
|
+
import { type BaseNode, type Binding as AstBinding, type Scope, type ScopeAnalysis } from '../ast';
|
|
2
3
|
import type { Ctx, StateKind } from './model';
|
|
4
|
+
/** Rebuild parser-neutral parent and lexical-scope facts after AST mutation. */
|
|
5
|
+
export declare function refreshAstAnalysis(ctx: Ctx, root: BaseNode): ScopeAnalysis;
|
|
6
|
+
/** Lexical scope active at a node in the latest parser-neutral index. */
|
|
7
|
+
export declare function astScopeAt(ctx: Ctx, node: BaseNode): Scope | undefined;
|
|
8
|
+
/** Resolve a binding from a node without Babel NodePath scope services. */
|
|
9
|
+
export declare function astBindingAt(ctx: Ctx, node: BaseNode, name: string): AstBinding | undefined;
|
|
10
|
+
/** Whether a binding has a visible rebind or receiver/member mutation site. */
|
|
11
|
+
export declare function bindingHasVisibleWrite(ctx: Ctx, binding: AstBinding | undefined): boolean;
|
|
12
|
+
/** Remove TypeScript-only wrappers without changing runtime semantics. */
|
|
13
|
+
export declare function unwrapTypeExpression<TExpression extends BaseNode>(expression: TExpression): TExpression;
|
|
3
14
|
/** Register a state binding while preserving a linker-provided import entry. */
|
|
4
15
|
export declare function registerState(ctx: Ctx, name: string, kind: StateKind): void;
|
|
5
16
|
/** Convert a binding-relative analysis key to its defining module identity. */
|
|
@@ -8,8 +19,9 @@ export declare function canonicalStateKey(ctx: Ctx, key: string): string;
|
|
|
8
19
|
export declare function freshWriteConst(ctx: Ctx, writes: readonly string[]): t.Identifier;
|
|
9
20
|
/** Hoist and dedupe a sorted array used to batch local dirty reasons. */
|
|
10
21
|
export declare function freshReasonConst(ctx: Ctx, reasons: readonly number[]): t.Identifier;
|
|
11
|
-
|
|
12
|
-
|
|
22
|
+
type MemberLike = t.MemberExpression | t.OptionalMemberExpression;
|
|
23
|
+
/** Static property-path key for `a.b.c`, including optional member chains. */
|
|
24
|
+
export declare function memberKey(node: MemberLike): string | null;
|
|
13
25
|
/** Reactive list-row context used during event-handler analysis. */
|
|
14
26
|
export interface RowCtx {
|
|
15
27
|
itemParam: string;
|
|
@@ -30,8 +42,8 @@ export interface ComputedAnalysis {
|
|
|
30
42
|
impure: boolean;
|
|
31
43
|
reason?: string;
|
|
32
44
|
}
|
|
33
|
-
/** Root identifier of a member chain, including
|
|
34
|
-
export declare function memberRootName(node:
|
|
45
|
+
/** Root identifier of a member chain, including optional member segments. */
|
|
46
|
+
export declare function memberRootName(node: MemberLike): string | null;
|
|
35
47
|
/** Whether an initializer is a statically-shaped plain object store. */
|
|
36
48
|
export declare function isStoreObject(init: t.Expression | null | undefined): boolean;
|
|
37
49
|
/** Whether a const initializer creates a mutable object root. */
|
|
@@ -48,4 +60,5 @@ export declare function walkNodes(root: t.Node, visit: (node: t.Node, parent: t.
|
|
|
48
60
|
export declare function nodeHasJsx(root: t.Node): boolean;
|
|
49
61
|
/** Root state identifiers referenced by a raw AST subtree. */
|
|
50
62
|
export declare function collectStateIds(ctx: Ctx, root: t.Node): Set<string>;
|
|
63
|
+
export {};
|
|
51
64
|
//# sourceMappingURL=ast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/context/ast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/context/ast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,OAAO,IAAI,UAAU,EAC1B,KAAK,KAAK,EACV,KAAK,aAAa,EACnB,MAAM,QAAQ,CAAC;AAEhB,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9C,gFAAgF;AAChF,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,QAAQ,GACb,aAAa,CAIf;AAED,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,SAAS,CAEtE;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,MAAM,GACX,UAAU,GAAG,SAAS,CAExB;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,UAAU,GAAG,SAAS,GAC9B,OAAO,CAmDT;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,WAAW,SAAS,QAAQ,EAC/D,UAAU,EAAE,WAAW,GACtB,WAAW,CAab;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IA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