@barefootjs/jsx 0.41.1 → 0.41.3
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/adapters/attr-plan.d.ts +8 -0
- package/dist/adapters/attr-plan.d.ts.map +1 -1
- package/dist/adapters/component-props.d.ts.map +1 -1
- package/dist/adapters/computed-const.d.ts +19 -0
- package/dist/adapters/computed-const.d.ts.map +1 -1
- package/dist/adapters/dsl-template-adapter.d.ts +2 -1
- package/dist/adapters/dsl-template-adapter.d.ts.map +1 -1
- package/dist/adapters/inherited-const-server-read.d.ts +37 -0
- package/dist/adapters/inherited-const-server-read.d.ts.map +1 -0
- package/dist/adapters/loop-row-type.d.ts +18 -0
- package/dist/adapters/loop-row-type.d.ts.map +1 -1
- package/dist/adapters/non-primitive-equality.d.ts +8 -2
- package/dist/adapters/non-primitive-equality.d.ts.map +1 -1
- package/dist/adapters/unapplied-prop-default.d.ts +34 -0
- package/dist/adapters/unapplied-prop-default.d.ts.map +1 -0
- package/dist/adapters/uninlinable-seed-call.d.ts +29 -0
- package/dist/adapters/uninlinable-seed-call.d.ts.map +1 -0
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/augment-inherited-props.d.ts +4 -22
- package/dist/augment-inherited-props.d.ts.map +1 -1
- package/dist/caller-value-reach.d.ts +57 -0
- package/dist/caller-value-reach.d.ts.map +1 -0
- package/dist/const-identity.d.ts +38 -0
- package/dist/const-identity.d.ts.map +1 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2685 -1381
- package/dist/ir-to-client-js/child-props-object.d.ts +39 -41
- package/dist/ir-to-client-js/child-props-object.d.ts.map +1 -1
- package/dist/ir-to-client-js/collect-elements.d.ts.map +1 -1
- package/dist/ir-to-client-js/component-scope.d.ts +13 -2
- package/dist/ir-to-client-js/component-scope.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-inner-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-loop-child-arm.d.ts.map +1 -1
- package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
- package/dist/ir-to-client-js/prop-handling.d.ts.map +1 -1
- package/dist/jsx-to-ir.d.ts.map +1 -1
- package/dist/local-call-body.d.ts +112 -0
- package/dist/local-call-body.d.ts.map +1 -0
- package/dist/nullable-signal-attr.d.ts +10 -0
- package/dist/nullable-signal-attr.d.ts.map +1 -1
- package/dist/prop-default-resolution.d.ts +52 -0
- package/dist/prop-default-resolution.d.ts.map +1 -0
- package/dist/props-binding.d.ts +15 -0
- package/dist/props-binding.d.ts.map +1 -1
- package/dist/server-read-walk.d.ts +66 -0
- package/dist/server-read-walk.d.ts.map +1 -0
- package/dist/ssr-defaults.d.ts.map +1 -1
- package/dist/ssr-seed-plan.d.ts +24 -1
- package/dist/ssr-seed-plan.d.ts.map +1 -1
- package/dist/static-const-member.d.ts +92 -0
- package/dist/static-const-member.d.ts.map +1 -0
- package/dist/static-literal.d.ts +21 -1
- package/dist/static-literal.d.ts.map +1 -1
- package/dist/types.d.ts +63 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/computed-const.test.ts +7 -1
- package/src/__tests__/const-identity-child-prop.test.ts +127 -0
- package/src/__tests__/inherited-const-server-read.test.ts +116 -0
- package/src/__tests__/issue-3688-props-spread-child-csr.test.ts +8 -3
- package/src/__tests__/issue-3714-open-rest-spread-child.test.ts +188 -0
- package/src/__tests__/local-call-body.test.ts +101 -0
- package/src/__tests__/loop-branch-bare-expression-reactive-text.test.ts +212 -56
- package/src/__tests__/nested-loop-conditional.test.ts +16 -16
- package/src/__tests__/prop-default-resolution.test.ts +185 -0
- package/src/__tests__/props-spread-shadowed.test.ts +113 -0
- package/src/__tests__/server-read-walk.test.ts +125 -0
- package/src/__tests__/ssr-defaults.test.ts +67 -7
- package/src/__tests__/static-literal.test.ts +47 -2
- package/src/__tests__/static-record-literal-array.test.ts +82 -11
- package/src/adapters/attr-plan.ts +12 -1
- package/src/adapters/component-props.ts +2 -1
- package/src/adapters/computed-const.ts +108 -12
- package/src/adapters/dsl-template-adapter.ts +17 -4
- package/src/adapters/inherited-const-server-read.ts +174 -0
- package/src/adapters/loop-row-type.ts +69 -2
- package/src/adapters/non-primitive-equality.ts +17 -2
- package/src/adapters/unapplied-prop-default.ts +83 -0
- package/src/adapters/uninlinable-seed-call.ts +62 -0
- package/src/analyzer.ts +43 -3
- package/src/augment-inherited-props.ts +4 -49
- package/src/caller-value-reach.ts +436 -0
- package/src/compiler.ts +4 -4
- package/src/const-identity.ts +189 -0
- package/src/index.ts +10 -5
- package/src/ir-to-client-js/child-props-object.ts +94 -62
- package/src/ir-to-client-js/collect-elements.ts +53 -68
- package/src/ir-to-client-js/component-scope.ts +16 -2
- package/src/ir-to-client-js/control-flow/plan/build-inner-loop.ts +1 -0
- package/src/ir-to-client-js/control-flow/plan/build-loop-child-arm.ts +1 -0
- package/src/ir-to-client-js/html-template.ts +24 -4
- package/src/ir-to-client-js/index.ts +2 -2
- package/src/ir-to-client-js/prop-handling.ts +4 -0
- package/src/jsx-to-ir.ts +40 -2
- package/src/local-call-body.ts +191 -0
- package/src/nullable-signal-attr.ts +39 -17
- package/src/prop-default-resolution.ts +195 -0
- package/src/props-binding.ts +16 -0
- package/src/server-read-walk.ts +174 -0
- package/src/ssr-defaults.ts +93 -10
- package/src/ssr-seed-plan.ts +104 -18
- package/src/static-const-member.ts +243 -0
- package/src/static-literal.ts +55 -1
- package/src/types.ts +63 -1
|
@@ -5,16 +5,20 @@
|
|
|
5
5
|
* Every call-site builder (top-level child, loop row, composite loop row,
|
|
6
6
|
* conditional branch, static-array row) decides each explicit prop's own
|
|
7
7
|
* value spelling, then hands the list here. This module is the one place
|
|
8
|
-
* that decides how a spread of the component's own
|
|
9
|
-
*
|
|
10
|
-
* in
|
|
8
|
+
* that decides how a spread of one of the component's own prop bags (the
|
|
9
|
+
* props object, `SpreadAttr.propsObject`, or its `...rest` binding,
|
|
10
|
+
* `SpreadAttr.callerBag === 'rest'`; both set in Phase 1) merges with the
|
|
11
|
+
* explicit props in source order (#3688, #3713, #3714):
|
|
11
12
|
*
|
|
12
13
|
* - a spread prop never becomes an entry of its own;
|
|
13
|
-
* - an explicit prop written before
|
|
14
|
-
* default: the caller's own value wins when the caller passed
|
|
14
|
+
* - an explicit prop written before a bag spread that carries its key is
|
|
15
|
+
* only a default: the caller's own value wins when the caller passed
|
|
16
|
+
* that key;
|
|
15
17
|
* - an explicit prop written after it wins as written;
|
|
16
|
-
* - every key the caller passed
|
|
17
|
-
* through `forwardProps`, as getters, so it stays
|
|
18
|
+
* - every key the caller passed, the call did not name and a bag spread
|
|
19
|
+
* carries is forwarded through `forwardProps`, as getters, so it stays
|
|
20
|
+
* reactive. A rest bag does not carry the keys the component
|
|
21
|
+
* destructured (`SpreadAttr.restOmittedKeys`).
|
|
18
22
|
*/
|
|
19
23
|
import type { AttrValue } from '../types.ts';
|
|
20
24
|
/** One explicit prop's value as a call-site builder spells it. */
|
|
@@ -30,18 +34,23 @@ interface ChildPropLike {
|
|
|
30
34
|
/** True for the IR name of a spread prop (`...` / `...expr`). */
|
|
31
35
|
export declare function isSpreadPropName(name: string): boolean;
|
|
32
36
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* overridden explicit expression can't overwrite the spread-selected value
|
|
39
|
-
* on update.
|
|
37
|
+
* The caller keys a spread of one of the component's own prop bags leaves
|
|
38
|
+
* out, or null when `value` is not such a spread: none for the props object
|
|
39
|
+
* (`SpreadAttr.propsObject`), the destructured keys for a `{...rest}` bag
|
|
40
|
+
* (`SpreadAttr.restOmittedKeys`, #3714). The client holds either bag as the
|
|
41
|
+
* caller's whole props object (`_p`).
|
|
40
42
|
*/
|
|
41
|
-
export declare function
|
|
43
|
+
export declare function callerBagSpreadOmit(value: AttrValue): readonly string[] | null;
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
44
|
-
* `
|
|
45
|
+
* A `{...rest}` bag as a props object: the caller's props without the keys
|
|
46
|
+
* the component destructured (`omit`), each read through a getter, so it
|
|
47
|
+
* stays live. The one spelling the child props object and the registration
|
|
48
|
+
* template share.
|
|
49
|
+
*/
|
|
50
|
+
export declare function restBagExpr(omit: readonly string[]): string;
|
|
51
|
+
/**
|
|
52
|
+
* The value of an explicit prop a later caller-bag spread overrides (see
|
|
53
|
+
* `laterCallerBagCarries`): the caller's own value when it passed the
|
|
45
54
|
* key, `expr` otherwise. `forwardProps` lets every override win, so the
|
|
46
55
|
* merge is spelled into the value itself.
|
|
47
56
|
*/
|
|
@@ -51,26 +60,16 @@ export declare function callerFirstPropExpr(name: string, expr: string): string;
|
|
|
51
60
|
* (`<Chip {...row} />`, a loop row `{...r}`): not one of the caller's own
|
|
52
61
|
* prop bags (`SpreadAttr.callerBag`, decided in Phase 1). Its keys are
|
|
53
62
|
* merged in source order through `spreadChildProps` (#3861). A caller-bag
|
|
54
|
-
* spread is the props object
|
|
55
|
-
* `
|
|
63
|
+
* spread is the props object or a `{...rest}` bag
|
|
64
|
+
* (`callerBagSpreadOmit`), merged by `forwardProps`.
|
|
56
65
|
*/
|
|
57
66
|
export declare function isObjectSpreadProp(prop: ChildPropLike): boolean;
|
|
58
67
|
export interface ChildPropsObjectOptions {
|
|
59
68
|
/** Entries appended after the explicit props (e.g. a row's `children` getter). */
|
|
60
69
|
trailing?: readonly string[];
|
|
61
|
-
/**
|
|
62
|
-
* Forward the caller's props even without a props-object spread — the
|
|
63
|
-
* top-level path's `{...rest}` forwarding, which predates the marker.
|
|
64
|
-
*/
|
|
65
|
-
forwardCaller?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* The caller's `{...rest}` bag as a props object (the caller's props
|
|
68
|
-
* without the keys the component destructured), so a call that also
|
|
69
|
-
* spreads an object merges the bag in source order as one more part.
|
|
70
|
-
* Without it a rest bag spread is left to `forwardCaller`.
|
|
71
|
-
*/
|
|
72
|
-
restBag?: string;
|
|
73
70
|
}
|
|
71
|
+
/** Whether a child component call spreads one of the component's own prop bags (`callerBagSpreadOmit`). */
|
|
72
|
+
export declare function spreadsCallerBag(props: readonly ChildPropLike[]): boolean;
|
|
74
73
|
/**
|
|
75
74
|
* A JS array literal of code-safe string literals (`codeSafeStringLiteral`),
|
|
76
75
|
* printed exactly as `JSON.stringify` prints an array of ordinary names.
|
|
@@ -82,9 +81,9 @@ export declare function lastObjectSpreadIndex(props: readonly ChildPropLike[]):
|
|
|
82
81
|
* The value of the explicit prop at `index` for a reactive DOM mirror,
|
|
83
82
|
* merged with every spread written after it, as the props object merges
|
|
84
83
|
* them: a later object spread (`spreadOf` spells its value) wins when its
|
|
85
|
-
* object has the key, and a later
|
|
86
|
-
*
|
|
87
|
-
* follows.
|
|
84
|
+
* object has the key, and a later caller-bag spread that carries the key
|
|
85
|
+
* (`callerBagSpreadOmit`) wins when the caller passed it
|
|
86
|
+
* (`callerFirstPropExpr`). `expr` as written when no spread follows.
|
|
88
87
|
*/
|
|
89
88
|
export declare function mergedExplicitPropExpr<P extends ChildPropLike>(props: readonly P[], index: number, expr: string, spreadOf: (prop: P) => string): string;
|
|
90
89
|
/**
|
|
@@ -93,13 +92,12 @@ export declare function mergedExplicitPropExpr<P extends ChildPropLike>(props: r
|
|
|
93
92
|
* also spells an object spread's value (`isObjectSpreadProp`).
|
|
94
93
|
*
|
|
95
94
|
* Without an object spread, the explicit props form one object literal,
|
|
96
|
-
* wrapped in `forwardProps` for a
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* the
|
|
101
|
-
*
|
|
102
|
-
* forwarded off `_p` after the merge.
|
|
95
|
+
* wrapped in `forwardProps` for a caller-bag spread. With one, every part
|
|
96
|
+
* merges in source order through `spreadChildProps` (#3861): each run of
|
|
97
|
+
* explicit props is an object literal, an object spread a thunk of its
|
|
98
|
+
* value, a props-object spread the thunk `() => _p`, and a `{...rest}` bag
|
|
99
|
+
* the caller's props without the destructured keys (`restBagExpr`), so a
|
|
100
|
+
* later part wins as in JS.
|
|
103
101
|
*/
|
|
104
102
|
export declare function childPropsObjectExpr<P extends ChildPropLike>(props: readonly P[], valueOf: (prop: P) => ChildPropValue | null, options?: ChildPropsObjectOptions): string;
|
|
105
103
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child-props-object.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/child-props-object.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"child-props-object.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/child-props-object.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,kEAAkE;AAClE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,CAAA;CACjB;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,CAI9E;AAmCD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAE/D;AAED,MAAM,WAAW,uBAAuB;IACtC,kFAAkF;IAClF,QAAQ,CAAC,EAAE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AC,EAAE,WAAW,CAAC,MAAM,CAAC;AACnC;;;;GAIG;AACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GACxB,iBAAiB,CAenB;AAED,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,eAAe,EACpB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACrC,SAAS,CAAC,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,SAAS,OAAO,aAAa,EAAE,gBAAgB,EAAE;AACrE;;;;;;;;GAQG;AACH,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;AACnC;;;GAGG;AACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;AACzB;;;;;;;;;;;;;;GAcG;AACH,UAAU,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,aAAa,CAAC;AAClD,uFAAuF;AACvF,WAAW,CAAC,EAAE,YAAY,GACzB,oBAAoB,EAAE,CAsFxB"}
|
|
@@ -33,10 +33,20 @@ import type { ImportInfo } from '../types.ts';
|
|
|
33
33
|
* unavailable).
|
|
34
34
|
*/
|
|
35
35
|
export declare function computeFileScope(entryPath: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Install `scope` and return the scope it replaces. A compile restores the
|
|
38
|
+
* returned scope when it finishes instead of clearing to `null`: an adapter
|
|
39
|
+
* may compile another file from inside `generate()` (go-template reads a
|
|
40
|
+
* cross-file child's shape that way, #3753), and the outer compile's client
|
|
41
|
+
* JS is emitted after that nested compile returns.
|
|
42
|
+
*/
|
|
36
43
|
export declare function setActiveComponentScope(scope: {
|
|
37
44
|
fileScope: string;
|
|
38
45
|
nonExportedSiblings: Set<string>;
|
|
39
|
-
} | null):
|
|
46
|
+
} | null): {
|
|
47
|
+
fileScope: string;
|
|
48
|
+
nonExportedSiblings: Set<string>;
|
|
49
|
+
} | null;
|
|
40
50
|
/**
|
|
41
51
|
* Build a local-alias → exported-name map from a component's parsed
|
|
42
52
|
* imports. Only VALUE, non-default, non-namespace, ALIASED specifiers
|
|
@@ -46,7 +56,8 @@ export declare function setActiveComponentScope(scope: {
|
|
|
46
56
|
* and a namespace member reference isn't an aliased specifier at all).
|
|
47
57
|
*/
|
|
48
58
|
export declare function buildImportAliasMap(imports: readonly ImportInfo[]): Map<string, string>;
|
|
49
|
-
|
|
59
|
+
/** Install `aliases` and return the map it replaces (restored the same way as the component scope). */
|
|
60
|
+
export declare function setActiveImportAliases(aliases: ReadonlyMap<string, string> | null): ReadonlyMap<string, string> | null;
|
|
50
61
|
/**
|
|
51
62
|
* Resolve a local JSX tag name to the name the referenced component's own
|
|
52
63
|
* module registers under (`hydrate(<name>, ...)`) — the caller-facing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-scope.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/component-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAY1D;AAeD,wBAAgB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"component-scope.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/component-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAY1D;AAeD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,GAAG,IAAI,GACpE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,GAAG,IAAI,CAIhE;AAkBD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAUvF;AAED,uGAAuG;AACvG,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAItH;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-inner-loop.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/plan/build-inner-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAEV,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"build-inner-loop.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/plan/build-inner-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAEV,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,gBAAgB,CAAA;AAuCvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAQ9C,OAAO,KAAK,EAKV,cAAc,EACf,MAAM,iBAAiB,CAAA;AAExB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,sBAAsB,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACpD,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAA;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,GAAG,cAAc,CA8E7E;AAiJD,MAAM,WAAW,4BAA4B;IAC3C,sEAAsE;IACtE,UAAU,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAA;IAC7C,mEAAmE;IACnE,MAAM,EAAE,SAAS,cAAc,EAAE,CAAA;IACjC,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAA;IACnB,qGAAqG;IACrG,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sBAAsB,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACpD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,4BAA4B,GAAG,cAAc,CAO/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-loop-child-arm.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/plan/build-loop-child-arm.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EAEpB,oBAAoB,EAEpB,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,EACX,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAGV,MAAM,EACN,MAAM,EACN,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAyE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE3H,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"build-loop-child-arm.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/plan/build-loop-child-arm.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EAEpB,oBAAoB,EAEpB,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,EACX,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAGV,MAAM,EACN,MAAM,EACN,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAyE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE3H,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AA+C7D,OAAO,KAAK,EAEV,6BAA6B,EAC7B,uBAAuB,EAKvB,oBAAoB,EAEpB,qBAAqB,EAErB,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,SAAS,sBAAsB,EAAE,GAAG,SAAS,CAAA;IACrD,+EAA+E;IAC/E,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9B,2EAA2E;IAC3E,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,4BAA4B,GACjC,uBAAuB,CAyBzB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,SAAS,oBAAoB,EAAE,GAAG,SAAS,CA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Ae,EACpB,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACnD,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,EACjD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAC9B,GAAG,CAAC,MAAM,CAAC,CA0Db"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-handling.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/prop-handling.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAA2B,UAAU,EAAE,MAAM,aAAa,CAAA;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAEnG;AAqCD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,CAahF;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"prop-handling.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/prop-handling.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAA2B,UAAU,EAAE,MAAM,aAAa,CAAA;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,uBAA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AAM,EAAE,YAAY,EAAE,CAAA;CACvB;AAED,UAAU,YAAY;IACpB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;CACd"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zero-argument calls a template resolves to what the called function
|
|
3
|
+
* returns (#3721).
|
|
4
|
+
*
|
|
5
|
+
* A template has no binding for a component's or module's functions: the
|
|
6
|
+
* backend receives the props, not the JS scope. Every template adapter reads
|
|
7
|
+
* a zero-argument identifier call as a signal or memo getter (`count()` →
|
|
8
|
+
* `count`), so a call to a function (`function value() { return 1 }` called
|
|
9
|
+
* as `value()`) read a template variable of the function's name — nothing,
|
|
10
|
+
* or a prop of the same name, which a `(props)`-arg component flattens into
|
|
11
|
+
* the same template namespace.
|
|
12
|
+
*
|
|
13
|
+
* This is the one decision of what such a call reads, made in two steps.
|
|
14
|
+
* First the declaration the name denotes where the call is written
|
|
15
|
+
* ({@link localBindings}): a component-scope declaration of a name hides
|
|
16
|
+
* the module one, whatever either is, and a function body's names resolve
|
|
17
|
+
* in the scope the function is declared in. A prop counts as a component
|
|
18
|
+
* binding only where its bare name is in scope (`templatePropReadParams`):
|
|
19
|
+
* a destructured parameter, or a body binding that holds the prop. A typed
|
|
20
|
+
* prop the body never binds does not hide a function of its name, as in JS.
|
|
21
|
+
* Then what a call of that declaration is ({@link localCall}): inlined, for
|
|
22
|
+
* a function taking no parameters whose body is a single `return <expr>` (a
|
|
23
|
+
* `function` declaration's `FunctionInfo.returnParsed`, or a zero-param
|
|
24
|
+
* arrow `const`); refused, for any other function; neither, for a binding
|
|
25
|
+
* that is not a function. The consumers resolve the call through this
|
|
26
|
+
* table: the SSR seed plan (signal seeds, memo bodies), the static SSR
|
|
27
|
+
* defaults, the template adapters' shared inlining of markup expressions
|
|
28
|
+
* (`inlineComputedConsts`), and the walk of what a server-rendered position
|
|
29
|
+
* reads (`walkServerReads`).
|
|
30
|
+
*/
|
|
31
|
+
import { type ParsedExpr } from './expression-parser.ts';
|
|
32
|
+
import { type TemplatePropReadBindings } from './props-binding.ts';
|
|
33
|
+
import type { ConstantInfo, FunctionInfo, MemoInfo, SignalInfo } from './types.ts';
|
|
34
|
+
/** A scope a name is declared in, and a function body's names are read in. */
|
|
35
|
+
export type LocalScope = 'component' | 'module';
|
|
36
|
+
/** What a zero-argument call of a function returns, and where its body's names resolve. */
|
|
37
|
+
export interface LocalCallBody {
|
|
38
|
+
/** The returned expression. */
|
|
39
|
+
body: ParsedExpr;
|
|
40
|
+
/** The scope the function is declared in, which the body's free names are read in. */
|
|
41
|
+
scope: LocalScope;
|
|
42
|
+
}
|
|
43
|
+
/** The component bindings {@link localBindings} reads. */
|
|
44
|
+
export interface LocalCallBindings extends TemplatePropReadBindings {
|
|
45
|
+
localFunctions: readonly FunctionInfo[];
|
|
46
|
+
restPropsName?: string | null;
|
|
47
|
+
signals: readonly SignalInfo[];
|
|
48
|
+
memos: readonly MemoInfo[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* What a name denotes in the scope it is declared in. `opaque` is a binding
|
|
52
|
+
* with no declaration to read: a prop in scope by its bare name, the props
|
|
53
|
+
* object, the rest props, a signal setter.
|
|
54
|
+
*/
|
|
55
|
+
export type LocalBinding = {
|
|
56
|
+
kind: 'signal';
|
|
57
|
+
scope: LocalScope;
|
|
58
|
+
info: SignalInfo;
|
|
59
|
+
} | {
|
|
60
|
+
kind: 'memo';
|
|
61
|
+
scope: LocalScope;
|
|
62
|
+
info: MemoInfo;
|
|
63
|
+
} | {
|
|
64
|
+
kind: 'const';
|
|
65
|
+
scope: LocalScope;
|
|
66
|
+
info: ConstantInfo;
|
|
67
|
+
} | {
|
|
68
|
+
kind: 'function';
|
|
69
|
+
scope: LocalScope;
|
|
70
|
+
info: FunctionInfo;
|
|
71
|
+
} | {
|
|
72
|
+
kind: 'opaque';
|
|
73
|
+
scope: LocalScope;
|
|
74
|
+
};
|
|
75
|
+
/** The declaration `name` denotes, read from `from`: `null` for a name neither scope declares. */
|
|
76
|
+
export type LocalBindingResolver = (name: string, from: LocalScope) => LocalBinding | null;
|
|
77
|
+
/**
|
|
78
|
+
* The lexical resolution of a component's and its module's names. Read from
|
|
79
|
+
* the component scope, a component declaration of the name is the binding,
|
|
80
|
+
* and only a name the component does not declare reaches the module's; read
|
|
81
|
+
* from the module scope (a module function's body), only the module's is.
|
|
82
|
+
*/
|
|
83
|
+
export declare function localBindings(b: LocalCallBindings): LocalBindingResolver;
|
|
84
|
+
/**
|
|
85
|
+
* What a zero-argument call of `binding` is to a template: `inline` with the
|
|
86
|
+
* expression the function returns, `refuse` for a function a template
|
|
87
|
+
* cannot inline (one with parameters, a body other than a single `return`,
|
|
88
|
+
* an `async` / generator one, a reassigned arrow `const`), or `null` for a
|
|
89
|
+
* binding that is not such a function. A function returning JSX is inlined
|
|
90
|
+
* into the markup before any template reads it, and is `null` too.
|
|
91
|
+
*/
|
|
92
|
+
export declare function localCall(binding: LocalBinding | null): {
|
|
93
|
+
kind: 'inline';
|
|
94
|
+
body: ParsedExpr;
|
|
95
|
+
} | {
|
|
96
|
+
kind: 'refuse';
|
|
97
|
+
} | null;
|
|
98
|
+
/**
|
|
99
|
+
* Each function name a zero-argument call written in `from` reads as a
|
|
100
|
+
* function whose returned expression a template can inline, with that
|
|
101
|
+
* expression ({@link inlinedBody}).
|
|
102
|
+
*/
|
|
103
|
+
export declare function localCallBodies(b: LocalCallBindings, from?: LocalScope): ReadonlyMap<string, LocalCallBody>;
|
|
104
|
+
/**
|
|
105
|
+
* Each function name a zero-argument call written in `from` reads as a
|
|
106
|
+
* function a template cannot inline: {@link localCall}'s `refuse`, or a
|
|
107
|
+
* module function whose returned expression calls one. Read as a getter,
|
|
108
|
+
* such a call would render an unbound name or a prop of that name, so a
|
|
109
|
+
* template refuses it.
|
|
110
|
+
*/
|
|
111
|
+
export declare function uninlinableLocalCalls(b: LocalCallBindings, from?: LocalScope): ReadonlySet<string>;
|
|
112
|
+
//# sourceMappingURL=local-call-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-call-body.d.ts","sourceRoot":"","sources":["../src/local-call-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAmD,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACzG,OAAO,EAA0B,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC1F,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAElF,8EAA8E;AAC9E,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAA;AAE/C,2FAA2F;AAC3F,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,IAAI,EAAE,UAAU,CAAA;IAChB,sFAAsF;IACtF,KAAK,EAAE,UAAU,CAAA;CAClB;AAED,0DAA0D;AAC1D,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;IACjE,cAAc,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IAC9B,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;CAC3B;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAA;AAEzC,kGAAkG;AAClG,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,YAAY,GAAG,IAAI,CAAA;AAE1F;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,iBAAiB,GAAG,oBAAoB,CAkBxE;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,IAAI,CAYxH;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,GAAE,UAAwB,GAAG,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CASxH;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,GAAE,UAAwB,GAAG,WAAW,CAAC,MAAM,CAAC,CAQ/G"}
|
|
@@ -100,6 +100,16 @@ export interface NullishAttrContext {
|
|
|
100
100
|
* ToNumber unless both sides are strings, so its nil's reading decides the
|
|
101
101
|
* comparison (`undefined < 1` is false, `null < 1` is true). */
|
|
102
102
|
readonly nullableScalarProps?: ReadonlyMap<string, NullableScalarProp>;
|
|
103
|
+
/**
|
|
104
|
+
* Whether the value a read names at the attribute site is declared to
|
|
105
|
+
* admit `undefined` / `null` (#3728): a loop row's optional member
|
|
106
|
+
* (`r.tone` where the element type has `tone?: string`, a destructured
|
|
107
|
+
* `tone`, `r.meta.tone`). The adapter answers it from the declared types
|
|
108
|
+
* through its live `BindingScope` (`declaredValueMayBeNil`). Consulted for
|
|
109
|
+
* the attribute's own reads only, never inside a memo body, whose names
|
|
110
|
+
* resolve where the memo is declared.
|
|
111
|
+
*/
|
|
112
|
+
readonly declaredNil?: (expr: ParsedExpr) => boolean;
|
|
103
113
|
}
|
|
104
114
|
/** A string or boolean prop's nil reading ({@link NullishAttrContext.nullableScalarProps}). */
|
|
105
115
|
export interface NullableScalarProp {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nullable-signal-attr.d.ts","sourceRoot":"","sources":["../src/nullable-signal-attr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAY,MAAM,YAAY,CAAA;AAYzF,sDAAsD;AACtD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAItE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAG5D;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAcpF;AA0BD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,iBAAiB,CAAC,EAC7D,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GACjC,OAAO,CAeT;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAA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GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAqB,GAClD,OAAO,CAGT;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,GAAG,EAAE,kBAAkB,EACvB,UAAU,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAqB,GAClD,OAAO,CAET;AA0FD;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAAuC,CAAA;AAEpG;;;;;;;;;;gFAUgF;AAChF,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,WAAW,GAAG,gBAAgB,GAAG,IAAI,CAAA;AAE/E;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,UAAU,GAAG,SAAS,EAC/B,KAAK,EAAE,UAAU,GAAG,SAAS,EAC7B,GAAG,EAAE,kBAAkB,EACvB,UAAU,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAqB,GAClD,kBAAkB,CASpB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a computed destructure default evaluates, once the declarations it
|
|
3
|
+
* reads are resolved (#3725, #3791).
|
|
4
|
+
*
|
|
5
|
+
* A backend applies a computed default when it renders (the SSR seed plan's
|
|
6
|
+
* prop steps, Go's props constructor), and it receives the props, not the JS
|
|
7
|
+
* scope: a default naming a const (`const DEF = 'z'`, `{ b =
|
|
8
|
+
* DEF.toUpperCase() }`) or calling a function has nothing to read there.
|
|
9
|
+
* This is the one resolution of those names into the expression the default
|
|
10
|
+
* stands for, each name read lexically (`localBindings`):
|
|
11
|
+
*
|
|
12
|
+
* - A body destructure (`const { b = DEF } = props`) reads the component
|
|
13
|
+
* scope, where a component const hides a module const of its name.
|
|
14
|
+
* - A parameter destructure (`function C({ b = DEF })`) reads the module
|
|
15
|
+
* scope: a parameter default cannot see the body's declarations.
|
|
16
|
+
*
|
|
17
|
+
* A `const` is replaced by its own value resolved in the scope it is
|
|
18
|
+
* declared in, and a zero-argument call of a function a template inlines
|
|
19
|
+
* (`localCall`) by the expression it returns. A module value is taken only
|
|
20
|
+
* when nothing is left to read in it, so no name it reads can meet a
|
|
21
|
+
* component binding where it lands. What stays free is a prop, the props
|
|
22
|
+
* object, a global, or a module name no backend computes.
|
|
23
|
+
*
|
|
24
|
+
* A component-scope declaration that has no such value (a signal, a memo, a
|
|
25
|
+
* `let`, a mutated const, a function with parameters or statements, a const
|
|
26
|
+
* declared after the destructure, which JS has not initialized when the
|
|
27
|
+
* default runs) leaves the default with nothing a template can compute: it
|
|
28
|
+
* is `blocked`, and the adapters refuse it where the server render reads the
|
|
29
|
+
* prop (`refuseUnappliedPropDefaults`).
|
|
30
|
+
*/
|
|
31
|
+
import { type ParsedExpr } from './expression-parser.ts';
|
|
32
|
+
import type { IRMetadata, ParamInfo, SourceLocation } from './types.ts';
|
|
33
|
+
/** A computed destructure default with the declarations it reads resolved. */
|
|
34
|
+
export interface ResolvedPropDefault {
|
|
35
|
+
/** The default as the expression it stands for. */
|
|
36
|
+
expr: ParsedExpr;
|
|
37
|
+
/** Whether a declaration the default reads was resolved into `expr`. */
|
|
38
|
+
readsDeclaration: boolean;
|
|
39
|
+
/** Where a body destructure binds the prop; unset for a parameter default. */
|
|
40
|
+
loc: SourceLocation | undefined;
|
|
41
|
+
/** The component declarations it reads that have no value a template can compute. */
|
|
42
|
+
blocked: readonly string[];
|
|
43
|
+
}
|
|
44
|
+
/** The metadata {@link propDefaultResolver} reads. */
|
|
45
|
+
export type PropDefaultBindings = Pick<IRMetadata, 'propsParams' | 'propsObjectName' | 'restPropsName' | 'signals' | 'memos' | 'localFunctions' | 'localConstants'>;
|
|
46
|
+
/**
|
|
47
|
+
* The resolver of a component's destructure defaults: `p`'s default as the
|
|
48
|
+
* expression it stands for ({@link ResolvedPropDefault}), or `null` for a
|
|
49
|
+
* prop with no parsed default.
|
|
50
|
+
*/
|
|
51
|
+
export declare function propDefaultResolver(metadata: PropDefaultBindings): (p: ParamInfo) => ResolvedPropDefault | null;
|
|
52
|
+
//# sourceMappingURL=prop-default-resolution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-default-resolution.d.ts","sourceRoot":"","sources":["../src/prop-default-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAkC,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxF,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAY,cAAc,EAAE,MAAM,YAAY,CAAA;AAEjF,8EAA8E;AAC9E,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,IAAI,EAAE,UAAU,CAAA;IAChB,wEAAwE;IACxE,gBAAgB,EAAE,OAAO,CAAA;IACzB,8EAA8E;IAC9E,GAAG,EAAE,cAAc,GAAG,SAAS,CAAA;IAC/B,qFAAqF;IACrF,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAC3B;AAED,sDAAsD;AACtD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,UAAU,EACV,aAAa,GAAG,iBAAiB,GAAG,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,gBAAgB,GAAG,gBAAgB,CAChH,CAAA;AAmBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,CAAC,CAAC,EAAE,SAAS,KAAK,mBAAmB,GAAG,IAAI,CAe/G"}
|
package/dist/props-binding.d.ts
CHANGED
|
@@ -372,6 +372,21 @@ export interface RestSpreadBindings {
|
|
|
372
372
|
restPropsName: string | null;
|
|
373
373
|
propsObjectName: string | null;
|
|
374
374
|
}
|
|
375
|
+
/**
|
|
376
|
+
* The caller keys the component's rest bag (`...rest`) leaves out: the keys
|
|
377
|
+
* its destructure takes before the rest element, spelled as the caller
|
|
378
|
+
* passes them. A body destructure of the props object (`const { a, ...rest }
|
|
379
|
+
* = props`) records them itself (`restPropsOmittedKeys`); a signature rest
|
|
380
|
+
* takes every destructured param, by its source key (`{ value: v }` takes
|
|
381
|
+
* `value`). The one definition `SpreadAttr.restOmittedKeys` is built from.
|
|
382
|
+
*/
|
|
383
|
+
export declare function restBagOmittedKeys(bindings: {
|
|
384
|
+
propsParams: ReadonlyArray<{
|
|
385
|
+
name: string;
|
|
386
|
+
sourceName?: string;
|
|
387
|
+
}>;
|
|
388
|
+
restPropsOmittedKeys?: readonly string[] | null;
|
|
389
|
+
}): string[];
|
|
375
390
|
/**
|
|
376
391
|
* Walks a bare `const x__alias = <name>` hop chain recorded in
|
|
377
392
|
* `constantValues` (name → initializer text) until `terminal` recognizes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props-binding.d.ts","sourceRoot":"","sources":["../src/props-binding.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACxH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKxD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAWrD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,CAO5D;AAkBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,kBAAkB,GAAG,yBAAyB,CAAC,EACzF,eAAe,EAAE,MAAM,GAAG,IAAI,GAC7B,OAAO,CAKT;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAChC,CAAC,EAAE;IAAE,eAAe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3721).
|
|
3
|
+
*
|
|
4
|
+
* A template renders a position from the values it reads there, and each of
|
|
5
|
+
* those from the values its own expression reads: a signal's seed, a memo's
|
|
6
|
+
* body, a const's initializer, the expression a called function returns.
|
|
7
|
+
* This is the one walk of that relation. It starts at every template
|
|
8
|
+
* position (`walkTemplatePositions`, which skips `/* @client *\/` reads) and
|
|
9
|
+
* follows the names each expression reads free, each resolved lexically
|
|
10
|
+
* (`localBindings`): a position's names in the scope it is read in, so a
|
|
11
|
+
* loop row, a callback param or a preamble local of a name is not the
|
|
12
|
+
* component's declaration of it (`BindingScope`); a declaration's names in
|
|
13
|
+
* the scope it is declared in, so a module function's body never reads a
|
|
14
|
+
* component binding.
|
|
15
|
+
*
|
|
16
|
+
* A function is read only where it is called with no arguments and a
|
|
17
|
+
* template inlines the call (`localCall`): its returned expression is then
|
|
18
|
+
* followed like any other. A call a template cannot inline ends the walk
|
|
19
|
+
* there and is reported on the declaration that makes it
|
|
20
|
+
* (`ServerRead.refusedCalls`). A function passed on uncalled, an event
|
|
21
|
+
* handler prop and a module-scope signal or memo (which never renders on the
|
|
22
|
+
* server) read nothing here.
|
|
23
|
+
*/
|
|
24
|
+
import { type ParsedExpr, type ParsedStatement } from './expression-parser.ts';
|
|
25
|
+
import { type LocalScope } from './local-call-body.ts';
|
|
26
|
+
import { type TemplatePosition } from './template-position-walk.ts';
|
|
27
|
+
import type { ComponentIR, SourceLocation } from './types.ts';
|
|
28
|
+
/** A declaration the server render reads. */
|
|
29
|
+
export interface ServerRead {
|
|
30
|
+
name: string;
|
|
31
|
+
kind: 'signal' | 'memo' | 'const' | 'function';
|
|
32
|
+
/** The scope the declaration sits in. */
|
|
33
|
+
scope: LocalScope;
|
|
34
|
+
loc: SourceLocation;
|
|
35
|
+
/**
|
|
36
|
+
* The expression its value comes from (a called function's returned
|
|
37
|
+
* expression), read in `scope`. Unset for a declaration with no
|
|
38
|
+
* expression tree (a block-bodied memo no single expression stands for).
|
|
39
|
+
*/
|
|
40
|
+
expr: ParsedExpr | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The statements of a block-bodied memo with no `expr`, as far as its
|
|
43
|
+
* parse represents them. No server value is computed from them, but they
|
|
44
|
+
* are what the browser evaluates for the same slot.
|
|
45
|
+
*/
|
|
46
|
+
block: readonly ParsedStatement[] | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The functions its expression calls with no arguments that a template
|
|
49
|
+
* cannot inline, by the name they are called under. Empty for a
|
|
50
|
+
* declaration with no expression tree (a block-bodied memo).
|
|
51
|
+
*/
|
|
52
|
+
refusedCalls: readonly string[];
|
|
53
|
+
}
|
|
54
|
+
/** What {@link walkServerReads} reports besides the declarations, and where it starts. */
|
|
55
|
+
export interface ServerReadWalkOptions {
|
|
56
|
+
/**
|
|
57
|
+
* Sees each name read that has no declaration to follow: a prop in scope
|
|
58
|
+
* by its bare name, the props object, the rest props.
|
|
59
|
+
*/
|
|
60
|
+
visitProp?: (name: string) => void;
|
|
61
|
+
/** The positions the walk starts from; every position when unset. */
|
|
62
|
+
startsAt?: (position: TemplatePosition) => boolean;
|
|
63
|
+
}
|
|
64
|
+
/** Visit each declaration the server render of `ir` reads, once. */
|
|
65
|
+
export declare function walkServerReads(ir: ComponentIR, visit: (read: ServerRead) => void, options?: ServerReadWalkOptions): void;
|
|
66
|
+
//# sourceMappingURL=server-read-walk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-read-walk.d.ts","sourceRoot":"","sources":["../src/server-read-walk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAkC,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE9G,OAAO,EAA0E,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAE9H,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,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