@barefootjs/jsx 0.9.2 → 0.9.4
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-value-emitter.d.ts +1 -1
- package/dist/adapters/attr-value-emitter.d.ts.map +1 -1
- package/dist/adapters/interface.d.ts +1 -1
- package/dist/adapters/interface.d.ts.map +1 -1
- package/dist/adapters/ir-node-emitter.d.ts +1 -1
- package/dist/adapters/ir-node-emitter.d.ts.map +1 -1
- package/dist/adapters/jsx-adapter.d.ts +2 -2
- package/dist/adapters/jsx-adapter.d.ts.map +1 -1
- package/dist/adapters/parsed-expr-emitter.d.ts +1 -1
- package/dist/adapters/parsed-expr-emitter.d.ts.map +1 -1
- package/dist/adapters/template-imports.d.ts +1 -1
- package/dist/adapters/template-imports.d.ts.map +1 -1
- package/dist/adapters/test-adapter.d.ts +3 -3
- package/dist/adapters/test-adapter.d.ts.map +1 -1
- package/dist/analyzer-context.d.ts +2 -2
- package/dist/analyzer-context.d.ts.map +1 -1
- package/dist/analyzer.d.ts +2 -2
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/augment-inherited-props.d.ts +1 -1
- package/dist/augment-inherited-props.d.ts.map +1 -1
- package/dist/compiler.d.ts +3 -3
- package/dist/compiler.d.ts.map +1 -1
- package/dist/css-layer-prefixer.d.ts +1 -1
- package/dist/css-layer-prefixer.d.ts.map +1 -1
- package/dist/debug.d.ts +3 -3
- package/dist/debug.d.ts.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/expression-parser.d.ts +12 -0
- package/dist/expression-parser.d.ts.map +1 -1
- package/dist/free-refs.d.ts +1 -1
- package/dist/free-refs.d.ts.map +1 -1
- package/dist/index.d.ts +42 -42
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/ir-to-client-js/build-references.d.ts +2 -2
- package/dist/ir-to-client-js/build-references.d.ts.map +1 -1
- package/dist/ir-to-client-js/child-components.d.ts +2 -2
- package/dist/ir-to-client-js/child-components.d.ts.map +1 -1
- package/dist/ir-to-client-js/collect-elements.d.ts +4 -4
- package/dist/ir-to-client-js/collect-elements.d.ts.map +1 -1
- package/dist/ir-to-client-js/compute-inlinability.d.ts +4 -4
- package/dist/ir-to-client-js/compute-inlinability.d.ts.map +1 -1
- package/dist/ir-to-client-js/compute-prop-usage.d.ts +2 -2
- package/dist/ir-to-client-js/compute-prop-usage.d.ts.map +1 -1
- package/dist/ir-to-client-js/compute-scope.d.ts +2 -2
- package/dist/ir-to-client-js/compute-scope.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/branch-loop.d.ts +3 -3
- package/dist/ir-to-client-js/control-flow/plan/branch-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-branch-loop.d.ts +2 -2
- package/dist/ir-to-client-js/control-flow/plan/build-branch-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-component-loop.d.ts +2 -2
- package/dist/ir-to-client-js/control-flow/plan/build-component-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-composite-loop.d.ts +2 -2
- package/dist/ir-to-client-js/control-flow/plan/build-composite-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-event-delegation.d.ts +2 -2
- package/dist/ir-to-client-js/control-flow/plan/build-event-delegation.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-inner-loop.d.ts +3 -3
- 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-insert.d.ts +2 -2
- package/dist/ir-to-client-js/control-flow/plan/build-insert.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-loop-child-arm.d.ts +3 -3
- package/dist/ir-to-client-js/control-flow/plan/build-loop-child-arm.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-loop.d.ts +2 -2
- package/dist/ir-to-client-js/control-flow/plan/build-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-reactive-effects.d.ts +3 -3
- package/dist/ir-to-client-js/control-flow/plan/build-reactive-effects.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/event-delegation.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/plan/event-delegation.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/inner-loop.d.ts +3 -3
- package/dist/ir-to-client-js/control-flow/plan/inner-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/insert.d.ts +3 -3
- package/dist/ir-to-client-js/control-flow/plan/insert.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/loop-child-arm.d.ts +4 -4
- package/dist/ir-to-client-js/control-flow/plan/loop-child-arm.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/loop.d.ts +4 -4
- package/dist/ir-to-client-js/control-flow/plan/loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/reactive-effects.d.ts +2 -2
- package/dist/ir-to-client-js/control-flow/plan/reactive-effects.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/types.d.ts +7 -7
- package/dist/ir-to-client-js/control-flow/plan/types.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/shared.d.ts +5 -5
- package/dist/ir-to-client-js/control-flow/shared.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/branch-loop.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/branch-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/component-loop.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/component-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/composite-loop.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/composite-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/event-delegation.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/event-delegation.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/inner-loop.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/inner-loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/insert.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/insert.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/loop-child-arm.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/loop-child-arm.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/loop.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/loop.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/reactive-effects.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/reactive-effects.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow.d.ts +1 -1
- package/dist/ir-to-client-js/control-flow.d.ts.map +1 -1
- package/dist/ir-to-client-js/csr-substitute.d.ts +1 -1
- package/dist/ir-to-client-js/csr-substitute.d.ts.map +1 -1
- package/dist/ir-to-client-js/declaration-sort.d.ts +1 -1
- package/dist/ir-to-client-js/declaration-sort.d.ts.map +1 -1
- package/dist/ir-to-client-js/element-refs.d.ts +1 -1
- package/dist/ir-to-client-js/element-refs.d.ts.map +1 -1
- package/dist/ir-to-client-js/emit-module-level.d.ts +1 -1
- package/dist/ir-to-client-js/emit-module-level.d.ts.map +1 -1
- package/dist/ir-to-client-js/emit-reactive.d.ts +2 -2
- package/dist/ir-to-client-js/emit-reactive.d.ts.map +1 -1
- package/dist/ir-to-client-js/emit-registration.d.ts +2 -2
- package/dist/ir-to-client-js/emit-registration.d.ts.map +1 -1
- package/dist/ir-to-client-js/generate-init.d.ts +2 -2
- package/dist/ir-to-client-js/generate-init.d.ts.map +1 -1
- package/dist/ir-to-client-js/html-template.d.ts +4 -4
- package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
- package/dist/ir-to-client-js/imports.d.ts +1 -1
- package/dist/ir-to-client-js/imports.d.ts.map +1 -1
- package/dist/ir-to-client-js/index.d.ts +3 -3
- package/dist/ir-to-client-js/index.d.ts.map +1 -1
- package/dist/ir-to-client-js/init-declarations.d.ts +2 -2
- package/dist/ir-to-client-js/init-declarations.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/conditional-slot-ids.d.ts +1 -1
- package/dist/ir-to-client-js/phases/conditional-slot-ids.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/effects-and-on-mounts.d.ts +1 -1
- package/dist/ir-to-client-js/phases/effects-and-on-mounts.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/event-handlers.d.ts +1 -1
- package/dist/ir-to-client-js/phases/event-handlers.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/init-statements.d.ts +1 -1
- package/dist/ir-to-client-js/phases/init-statements.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/props-event-handlers.d.ts +1 -1
- package/dist/ir-to-client-js/phases/props-event-handlers.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/props-extraction.d.ts +2 -2
- package/dist/ir-to-client-js/phases/props-extraction.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/provider-and-child-inits.d.ts +1 -1
- package/dist/ir-to-client-js/phases/provider-and-child-inits.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/ref-callbacks.d.ts +1 -1
- package/dist/ir-to-client-js/phases/ref-callbacks.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/rest-attr-applications.d.ts +1 -1
- package/dist/ir-to-client-js/phases/rest-attr-applications.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases/static-array-child-inits.d.ts +1 -1
- package/dist/ir-to-client-js/phases/static-array-child-inits.d.ts.map +1 -1
- package/dist/ir-to-client-js/phases.d.ts +3 -3
- package/dist/ir-to-client-js/phases.d.ts.map +1 -1
- package/dist/ir-to-client-js/plan/build-declaration-emit.d.ts +5 -5
- package/dist/ir-to-client-js/plan/build-declaration-emit.d.ts.map +1 -1
- package/dist/ir-to-client-js/plan/build-static-array-child-init.d.ts +2 -2
- package/dist/ir-to-client-js/plan/build-static-array-child-init.d.ts.map +1 -1
- package/dist/ir-to-client-js/plan/static-array-child-init.d.ts +1 -1
- package/dist/ir-to-client-js/plan/static-array-child-init.d.ts.map +1 -1
- package/dist/ir-to-client-js/prop-handling.d.ts +2 -2
- package/dist/ir-to-client-js/prop-handling.d.ts.map +1 -1
- package/dist/ir-to-client-js/reactivity.d.ts +2 -2
- package/dist/ir-to-client-js/reactivity.d.ts.map +1 -1
- package/dist/ir-to-client-js/source-map.d.ts +2 -2
- package/dist/ir-to-client-js/source-map.d.ts.map +1 -1
- package/dist/ir-to-client-js/stringify/declaration-emit.d.ts +1 -1
- package/dist/ir-to-client-js/stringify/declaration-emit.d.ts.map +1 -1
- package/dist/ir-to-client-js/stringify/static-array-child-init.d.ts +1 -1
- package/dist/ir-to-client-js/stringify/static-array-child-init.d.ts.map +1 -1
- package/dist/ir-to-client-js/types.d.ts +7 -7
- package/dist/ir-to-client-js/types.d.ts.map +1 -1
- package/dist/ir-to-client-js/utils.d.ts +2 -2
- package/dist/ir-to-client-js/utils.d.ts.map +1 -1
- package/dist/ir-to-client-js/walk-prop-accesses.d.ts +1 -1
- package/dist/ir-to-client-js/walk-prop-accesses.d.ts.map +1 -1
- package/dist/ir-to-client-js/walker.d.ts +1 -1
- package/dist/ir-to-client-js/walker.d.ts.map +1 -1
- package/dist/jsx-to-ir.d.ts +2 -2
- package/dist/jsx-to-ir.d.ts.map +1 -1
- package/dist/module-exports.d.ts +1 -1
- package/dist/module-exports.d.ts.map +1 -1
- package/dist/preprocess-inline-jsx-callbacks.d.ts +1 -1
- package/dist/preprocess-inline-jsx-callbacks.d.ts.map +1 -1
- package/dist/relocate.d.ts +3 -3
- package/dist/relocate.d.ts.map +1 -1
- package/dist/ssr-defaults.d.ts +1 -1
- package/dist/ssr-defaults.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/expression-parser.test.ts +30 -1
- package/src/adapters/attr-value-emitter.ts +1 -1
- package/src/adapters/interface.ts +1 -1
- package/src/adapters/ir-node-emitter.ts +1 -1
- package/src/adapters/jsx-adapter.ts +3 -3
- package/src/adapters/parsed-expr-emitter.ts +1 -1
- package/src/adapters/template-imports.ts +1 -1
- package/src/adapters/test-adapter.ts +5 -5
- package/src/analyzer-context.ts +2 -2
- package/src/analyzer.ts +8 -8
- package/src/augment-inherited-props.ts +2 -2
- package/src/compiler.ts +12 -12
- package/src/css-layer-prefixer.ts +1 -1
- package/src/debug.ts +7 -7
- package/src/errors.ts +2 -2
- package/src/expression-parser.ts +27 -0
- package/src/free-refs.ts +4 -4
- package/src/index.ts +42 -42
- package/src/ir-to-client-js/build-references.ts +6 -6
- package/src/ir-to-client-js/child-components.ts +2 -2
- package/src/ir-to-client-js/collect-elements.ts +14 -14
- package/src/ir-to-client-js/compute-inlinability.ts +10 -10
- package/src/ir-to-client-js/compute-prop-usage.ts +3 -3
- package/src/ir-to-client-js/compute-scope.ts +3 -3
- package/src/ir-to-client-js/control-flow/plan/branch-loop.ts +3 -3
- package/src/ir-to-client-js/control-flow/plan/build-branch-loop.ts +7 -7
- package/src/ir-to-client-js/control-flow/plan/build-component-loop.ts +6 -6
- package/src/ir-to-client-js/control-flow/plan/build-composite-loop.ts +7 -7
- package/src/ir-to-client-js/control-flow/plan/build-event-delegation.ts +3 -3
- package/src/ir-to-client-js/control-flow/plan/build-inner-loop.ts +8 -8
- package/src/ir-to-client-js/control-flow/plan/build-insert.ts +4 -4
- package/src/ir-to-client-js/control-flow/plan/build-loop-child-arm.ts +7 -7
- package/src/ir-to-client-js/control-flow/plan/build-loop.ts +7 -7
- package/src/ir-to-client-js/control-flow/plan/build-reactive-effects.ts +8 -8
- package/src/ir-to-client-js/control-flow/plan/event-delegation.ts +1 -1
- package/src/ir-to-client-js/control-flow/plan/inner-loop.ts +3 -3
- package/src/ir-to-client-js/control-flow/plan/insert.ts +3 -3
- package/src/ir-to-client-js/control-flow/plan/loop-child-arm.ts +4 -4
- package/src/ir-to-client-js/control-flow/plan/loop.ts +4 -4
- package/src/ir-to-client-js/control-flow/plan/reactive-effects.ts +2 -2
- package/src/ir-to-client-js/control-flow/plan/types.ts +7 -7
- package/src/ir-to-client-js/control-flow/shared.ts +8 -8
- package/src/ir-to-client-js/control-flow/stringify/branch-loop.ts +6 -6
- package/src/ir-to-client-js/control-flow/stringify/component-loop.ts +3 -3
- package/src/ir-to-client-js/control-flow/stringify/composite-loop.ts +6 -6
- package/src/ir-to-client-js/control-flow/stringify/event-delegation.ts +2 -2
- package/src/ir-to-client-js/control-flow/stringify/event-listener.ts +1 -1
- package/src/ir-to-client-js/control-flow/stringify/inner-loop.ts +6 -6
- package/src/ir-to-client-js/control-flow/stringify/insert.ts +6 -6
- package/src/ir-to-client-js/control-flow/stringify/loop-child-arm.ts +6 -6
- package/src/ir-to-client-js/control-flow/stringify/loop.ts +7 -7
- package/src/ir-to-client-js/control-flow/stringify/reactive-effects.ts +5 -5
- package/src/ir-to-client-js/control-flow/stringify/template-parse.ts +1 -1
- package/src/ir-to-client-js/control-flow.ts +7 -7
- package/src/ir-to-client-js/csr-substitute.ts +3 -3
- package/src/ir-to-client-js/declaration-sort.ts +2 -2
- package/src/ir-to-client-js/element-refs.ts +3 -3
- package/src/ir-to-client-js/emit-module-level.ts +2 -2
- package/src/ir-to-client-js/emit-reactive.ts +5 -5
- package/src/ir-to-client-js/emit-registration.ts +6 -6
- package/src/ir-to-client-js/generate-init.ts +14 -14
- package/src/ir-to-client-js/html-template.ts +11 -11
- package/src/ir-to-client-js/imports.ts +1 -1
- package/src/ir-to-client-js/index.ts +15 -15
- package/src/ir-to-client-js/init-declarations.ts +8 -8
- package/src/ir-to-client-js/phases/conditional-slot-ids.ts +1 -1
- package/src/ir-to-client-js/phases/effects-and-on-mounts.ts +1 -1
- package/src/ir-to-client-js/phases/event-handlers.ts +2 -2
- package/src/ir-to-client-js/phases/init-statements.ts +1 -1
- package/src/ir-to-client-js/phases/props-event-handlers.ts +2 -2
- package/src/ir-to-client-js/phases/props-extraction.ts +4 -4
- package/src/ir-to-client-js/phases/provider-and-child-inits.ts +3 -3
- package/src/ir-to-client-js/phases/ref-callbacks.ts +2 -2
- package/src/ir-to-client-js/phases/rest-attr-applications.ts +2 -2
- package/src/ir-to-client-js/phases/static-array-child-inits.ts +3 -3
- package/src/ir-to-client-js/phases.ts +18 -18
- package/src/ir-to-client-js/plan/build-declaration-emit.ts +6 -6
- package/src/ir-to-client-js/plan/build-static-array-child-init.ts +7 -7
- package/src/ir-to-client-js/plan/static-array-child-init.ts +1 -1
- package/src/ir-to-client-js/prop-handling.ts +2 -2
- package/src/ir-to-client-js/reactivity.ts +5 -5
- package/src/ir-to-client-js/rewrite-props-object.ts +1 -1
- package/src/ir-to-client-js/source-map.ts +4 -4
- package/src/ir-to-client-js/stringify/declaration-emit.ts +1 -1
- package/src/ir-to-client-js/stringify/static-array-child-init.ts +2 -2
- package/src/ir-to-client-js/types.ts +6 -6
- package/src/ir-to-client-js/utils.ts +4 -4
- package/src/ir-to-client-js/walk-prop-accesses.ts +2 -2
- package/src/ir-to-client-js/walker.ts +1 -1
- package/src/jsx-runtime/index.d.ts +27 -2
- package/src/jsx-to-ir.ts +9 -9
- package/src/module-exports.ts +1 -1
- package/src/preprocess-inline-jsx-callbacks.ts +2 -2
- package/src/prop-rewrite.ts +2 -2
- package/src/reactivity-checker.ts +1 -1
- package/src/relocate.ts +5 -5
- package/src/shared-program.ts +1 -1
- package/src/ssr-defaults.ts +1 -1
- package/src/types.ts +1 -1
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
* - a fully resolved `ReactiveEffectsPlan` for `childConditionals`
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import type { TopLevelLoop } from '../../types'
|
|
14
|
+
import type { TopLevelLoop } from '../../types.ts'
|
|
15
15
|
import {
|
|
16
16
|
buildChainedArrayExpr,
|
|
17
17
|
varSlotId,
|
|
18
18
|
wrapLoopParamAsAccessor,
|
|
19
19
|
irChildrenFreeIds,
|
|
20
|
-
} from '../../utils'
|
|
20
|
+
} from '../../utils.ts'
|
|
21
21
|
import {
|
|
22
22
|
loopKeyFn,
|
|
23
23
|
destructureLoopParam,
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
buildCompSelector,
|
|
26
26
|
isTextOnlyConditional,
|
|
27
27
|
buildChildRefBindings,
|
|
28
|
-
} from '../shared'
|
|
29
|
-
import { irChildrenToJsExpr } from '../../html-template'
|
|
30
|
-
import { buildReactiveEffectsPlan } from './build-reactive-effects'
|
|
31
|
-
import type { ComponentLoopPlan, NestedComponentInit } from './types'
|
|
28
|
+
} from '../shared.ts'
|
|
29
|
+
import { irChildrenToJsExpr } from '../../html-template.ts'
|
|
30
|
+
import { buildReactiveEffectsPlan } from './build-reactive-effects.ts'
|
|
31
|
+
import type { ComponentLoopPlan, NestedComponentInit } from './types.ts'
|
|
32
32
|
|
|
33
33
|
/** @internal — prefer `buildLoopPlan`. */
|
|
34
34
|
export function buildComponentLoopPlan(elem: TopLevelLoop): ComponentLoopPlan {
|
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
* consistent Plan.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { TopLevelLoop, BranchLoop, LoopChildConditional } from '../../types'
|
|
12
|
-
import type { IRLoopChildComponent } from '../../../types'
|
|
11
|
+
import type { TopLevelLoop, BranchLoop, LoopChildConditional } from '../../types.ts'
|
|
12
|
+
import type { IRLoopChildComponent } from '../../../types.ts'
|
|
13
13
|
import {
|
|
14
14
|
buildChainedArrayExpr,
|
|
15
15
|
varSlotId,
|
|
16
16
|
wrapLoopParamAsAccessor,
|
|
17
|
-
} from '../../utils'
|
|
17
|
+
} from '../../utils.ts'
|
|
18
18
|
import {
|
|
19
19
|
loopKeyFn,
|
|
20
20
|
destructureLoopParam,
|
|
21
21
|
buildDepthLevels,
|
|
22
22
|
buildChildRefBindings,
|
|
23
|
-
} from '../shared'
|
|
24
|
-
import { buildReactiveEffectsPlan } from './build-reactive-effects'
|
|
25
|
-
import { buildInnerLoopsPlan } from './build-inner-loop'
|
|
26
|
-
import type { CompositeLoopPlan } from './types'
|
|
23
|
+
} from '../shared.ts'
|
|
24
|
+
import { buildReactiveEffectsPlan } from './build-reactive-effects.ts'
|
|
25
|
+
import { buildInnerLoopsPlan } from './build-inner-loop.ts'
|
|
26
|
+
import type { CompositeLoopPlan } from './types.ts'
|
|
27
27
|
|
|
28
28
|
/** @internal — prefer `buildLoopPlan`. */
|
|
29
29
|
export function buildTopLevelCompositePlan(elem: TopLevelLoop): CompositeLoopPlan {
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* and the static-array context.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import type { TopLevelLoop, BranchLoop, LoopChildEvent } from '../../types'
|
|
13
|
-
import { buildChainedArrayExpr, varSlotId, substituteLoopBindings } from '../../utils'
|
|
12
|
+
import type { TopLevelLoop, BranchLoop, LoopChildEvent } from '../../types.ts'
|
|
13
|
+
import { buildChainedArrayExpr, varSlotId, substituteLoopBindings } from '../../utils.ts'
|
|
14
14
|
import type {
|
|
15
15
|
EventDelegationPlan,
|
|
16
16
|
ItemLookup,
|
|
17
|
-
} from './types'
|
|
17
|
+
} from './types.ts'
|
|
18
18
|
|
|
19
19
|
export function buildDynamicLoopDelegationPlan(elem: TopLevelLoop): EventDelegationPlan {
|
|
20
20
|
return {
|
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
import type {
|
|
17
17
|
LoopChildEvent,
|
|
18
18
|
NestedLoop,
|
|
19
|
-
} from '../../types'
|
|
19
|
+
} from '../../types.ts'
|
|
20
20
|
import type {
|
|
21
21
|
AttrValue,
|
|
22
22
|
IRLoopChildComponent,
|
|
23
23
|
IRNode,
|
|
24
24
|
LoopParamBinding,
|
|
25
|
-
} from '../../../types'
|
|
26
|
-
import { AttrValueOf, pickAttrMeta } from '../../../types'
|
|
25
|
+
} from '../../../types.ts'
|
|
26
|
+
import { AttrValueOf, pickAttrMeta } from '../../../types.ts'
|
|
27
27
|
import {
|
|
28
28
|
wrapLoopParamAsAccessor,
|
|
29
29
|
attrValueToString,
|
|
30
|
-
} from '../../utils'
|
|
31
|
-
import { buildChildRefBindings, buildStaticChildRefBindings } from '../shared'
|
|
30
|
+
} from '../../utils.ts'
|
|
31
|
+
import { buildChildRefBindings, buildStaticChildRefBindings } from '../shared.ts'
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Mirror of the helper in `build-loop-child-arm.ts` — kept local to avoid
|
|
@@ -54,11 +54,11 @@ function wrapAttrValueExpression(value: AttrValue, wrap: (s: string) => string):
|
|
|
54
54
|
return AttrValueOf.spread(wrap(value.expr), value.templateExpr ? wrap(value.templateExpr) : undefined)
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
import type { DepthLevel } from '../shared'
|
|
57
|
+
import type { DepthLevel } from '../shared.ts'
|
|
58
58
|
import {
|
|
59
59
|
destructureLoopParam,
|
|
60
60
|
loopKeyFn,
|
|
61
|
-
} from '../shared'
|
|
61
|
+
} from '../shared.ts'
|
|
62
62
|
import type {
|
|
63
63
|
InnerLoopPlan,
|
|
64
64
|
InnerLoopReactiveAttr,
|
|
@@ -66,7 +66,7 @@ import type {
|
|
|
66
66
|
InnerLoopStaticEmit,
|
|
67
67
|
InnerLoopText,
|
|
68
68
|
InnerLoopsPlan,
|
|
69
|
-
} from './inner-loop'
|
|
69
|
+
} from './inner-loop.ts'
|
|
70
70
|
|
|
71
71
|
export interface BuildInnerLoopsArgs {
|
|
72
72
|
levels: readonly DepthLevel[]
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
import type {
|
|
12
12
|
ConditionalElement,
|
|
13
13
|
BranchSummary,
|
|
14
|
-
} from '../../types'
|
|
15
|
-
import { addCondAttrToTemplate } from '../../html-template'
|
|
16
|
-
import { buildBranchLoopPlan } from './build-branch-loop'
|
|
14
|
+
} from '../../types.ts'
|
|
15
|
+
import { addCondAttrToTemplate } from '../../html-template.ts'
|
|
16
|
+
import { buildBranchLoopPlan } from './build-branch-loop.ts'
|
|
17
17
|
import type {
|
|
18
18
|
InsertPlan,
|
|
19
19
|
InsertArm,
|
|
20
20
|
ArmBody,
|
|
21
21
|
ScopeRef,
|
|
22
|
-
} from './types'
|
|
22
|
+
} from './types.ts'
|
|
23
23
|
|
|
24
24
|
export interface BuildInsertOptions {
|
|
25
25
|
scope: ScopeRef
|
|
@@ -12,17 +12,17 @@ import type {
|
|
|
12
12
|
LoopChildConditional,
|
|
13
13
|
LoopChildEvent,
|
|
14
14
|
NestedLoop,
|
|
15
|
-
} from '../../types'
|
|
15
|
+
} from '../../types.ts'
|
|
16
16
|
import type {
|
|
17
17
|
AttrValue,
|
|
18
18
|
IRLoopChildComponent,
|
|
19
19
|
IRNode,
|
|
20
20
|
IRProp,
|
|
21
21
|
LoopParamBinding,
|
|
22
|
-
} from '../../../types'
|
|
23
|
-
import { AttrValueOf } from '../../../types'
|
|
24
|
-
import { quotePropName, wrapLoopParamAsAccessor, attrValueToString } from '../../utils'
|
|
25
|
-
import { addCondAttrToTemplate, irChildrenToJsExpr } from '../../html-template'
|
|
22
|
+
} from '../../../types.ts'
|
|
23
|
+
import { AttrValueOf } from '../../../types.ts'
|
|
24
|
+
import { quotePropName, wrapLoopParamAsAccessor, attrValueToString } from '../../utils.ts'
|
|
25
|
+
import { addCondAttrToTemplate, irChildrenToJsExpr } from '../../html-template.ts'
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Apply a string-level expression rewriter (loop-param-accessor wrap, prop
|
|
@@ -57,7 +57,7 @@ function wrapAttrValueExpression(value: AttrValue, wrap: (s: string) => string):
|
|
|
57
57
|
return AttrValueOf.spread(wrap(value.expr), value.templateExpr ? wrap(value.templateExpr) : undefined)
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
import { destructureLoopParam, loopKeyFn, buildCompSelector } from '../shared'
|
|
60
|
+
import { destructureLoopParam, loopKeyFn, buildCompSelector } from '../shared.ts'
|
|
61
61
|
import { BF_HOST, BF_AT } from '@barefootjs/shared'
|
|
62
62
|
import type {
|
|
63
63
|
BranchChildComponentInit,
|
|
@@ -70,7 +70,7 @@ import type {
|
|
|
70
70
|
BranchInnerLoopsPlan,
|
|
71
71
|
LoopChildArmPlan,
|
|
72
72
|
LoopChildConditionalPlan,
|
|
73
|
-
} from './loop-child-arm'
|
|
73
|
+
} from './loop-child-arm.ts'
|
|
74
74
|
|
|
75
75
|
export interface BuildBranchEventBindingsArgs {
|
|
76
76
|
events: readonly ConditionalBranchEvent[] | undefined
|
|
@@ -22,29 +22,29 @@
|
|
|
22
22
|
import type {
|
|
23
23
|
TopLevelLoop,
|
|
24
24
|
LoopChildReactiveAttr,
|
|
25
|
-
} from '../../types'
|
|
25
|
+
} from '../../types.ts'
|
|
26
26
|
import {
|
|
27
27
|
buildChainedArrayExpr,
|
|
28
28
|
buildLoopChildIndexExpr,
|
|
29
29
|
setIntersects,
|
|
30
30
|
varSlotId,
|
|
31
31
|
wrapLoopParamAsAccessor,
|
|
32
|
-
} from '../../utils'
|
|
32
|
+
} from '../../utils.ts'
|
|
33
33
|
import {
|
|
34
34
|
loopKeyFn,
|
|
35
35
|
destructureLoopParam,
|
|
36
36
|
buildChildRefBindings,
|
|
37
37
|
buildStaticChildRefBindings,
|
|
38
|
-
} from '../shared'
|
|
39
|
-
import { buildLoopReactiveEffectsPlan } from './build-reactive-effects'
|
|
40
|
-
import { buildComponentLoopPlan } from './build-component-loop'
|
|
41
|
-
import { buildTopLevelCompositePlan } from './build-composite-loop'
|
|
38
|
+
} from '../shared.ts'
|
|
39
|
+
import { buildLoopReactiveEffectsPlan } from './build-reactive-effects.ts'
|
|
40
|
+
import { buildComponentLoopPlan } from './build-component-loop.ts'
|
|
41
|
+
import { buildTopLevelCompositePlan } from './build-composite-loop.ts'
|
|
42
42
|
import type {
|
|
43
43
|
LoopPlan,
|
|
44
44
|
PlainLoopPlan,
|
|
45
45
|
StaticLoopMaterializePlan,
|
|
46
46
|
StaticLoopPlan,
|
|
47
|
-
} from './types'
|
|
47
|
+
} from './types.ts'
|
|
48
48
|
|
|
49
49
|
/** Inputs only the static-array variant consumes. */
|
|
50
50
|
export interface BuildLoopPlanOptions {
|
|
@@ -22,27 +22,27 @@ import type {
|
|
|
22
22
|
LoopChildConditional,
|
|
23
23
|
LoopChildReactiveAttr,
|
|
24
24
|
LoopChildReactiveText,
|
|
25
|
-
} from '../../types'
|
|
26
|
-
import type { LoopParamBinding } from '../../../types'
|
|
27
|
-
import { pickAttrMeta } from '../../../types'
|
|
28
|
-
import { wrapLoopParamAsAccessor } from '../../utils'
|
|
29
|
-
import { addCondAttrToTemplate } from '../../html-template'
|
|
25
|
+
} from '../../types.ts'
|
|
26
|
+
import type { LoopParamBinding } from '../../../types.ts'
|
|
27
|
+
import { pickAttrMeta } from '../../../types.ts'
|
|
28
|
+
import { wrapLoopParamAsAccessor } from '../../utils.ts'
|
|
29
|
+
import { addCondAttrToTemplate } from '../../html-template.ts'
|
|
30
30
|
import {
|
|
31
31
|
buildBranchChildComponentInitsPlan,
|
|
32
32
|
buildBranchEventBindingsPlan,
|
|
33
33
|
buildBranchInnerLoopsPlan,
|
|
34
34
|
buildLoopChildConditionalsPlan,
|
|
35
|
-
} from './build-loop-child-arm'
|
|
35
|
+
} from './build-loop-child-arm.ts'
|
|
36
36
|
import type {
|
|
37
37
|
LoopChildArmPlan,
|
|
38
38
|
LoopChildArmText,
|
|
39
|
-
} from './loop-child-arm'
|
|
39
|
+
} from './loop-child-arm.ts'
|
|
40
40
|
import type {
|
|
41
41
|
NestedConditionalPlan,
|
|
42
42
|
ReactiveAttrSlot,
|
|
43
43
|
ReactiveEffectsPlan,
|
|
44
44
|
ReactiveTextEffect,
|
|
45
|
-
} from './reactive-effects'
|
|
45
|
+
} from './reactive-effects.ts'
|
|
46
46
|
|
|
47
47
|
export interface BuildReactiveEffectsArgs {
|
|
48
48
|
attrs: readonly LoopChildReactiveAttr[]
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* container variable and the per-event item-lookup strategy.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { LoopChildEvent, LoopOffset, TopLevelLoop } from '../../types'
|
|
8
|
+
import type { LoopChildEvent, LoopOffset, TopLevelLoop } from '../../types.ts'
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Plan for a loop's event-delegation block. Covers three legacy emitters:
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* stringifier is a deterministic walk.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type { LoopChildEvent } from '../../types'
|
|
13
|
+
import type { LoopChildEvent } from '../../types.ts'
|
|
14
14
|
import type {
|
|
15
15
|
AttrMeta,
|
|
16
16
|
IRLoopChildComponent,
|
|
17
17
|
LoopParamBinding,
|
|
18
|
-
} from '../../../types'
|
|
19
|
-
import type { LoopChildRefBinding } from './loop'
|
|
18
|
+
} from '../../../types.ts'
|
|
19
|
+
import type { LoopChildRefBinding } from './loop.ts'
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Body-entry statements emitted in order at the top of a `mapArray`
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* `ArmBody.conditionals`, so one stringifier handles arbitrary depth.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { AttrMeta } from '../../../types'
|
|
10
|
-
import type { ScopeRef } from './common'
|
|
11
|
-
import type { BranchLoopPlan } from './branch-loop'
|
|
9
|
+
import type { AttrMeta } from '../../../types.ts'
|
|
10
|
+
import type { ScopeRef } from './common.ts'
|
|
11
|
+
import type { BranchLoopPlan } from './branch-loop.ts'
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Plan for a single `insert(scope, slotId, () => cond, trueArm, falseArm)`
|
|
@@ -110,9 +110,9 @@ export interface BranchInnerLoop {
|
|
|
110
110
|
* Inner-wrapped component IR for `emitComponentAndEventSetup`. Inner-wrap
|
|
111
111
|
* runs at build time; the helper still applies `outerWrap` at emit time.
|
|
112
112
|
*/
|
|
113
|
-
legacyComponents: readonly import('../../../types').IRLoopChildComponent[]
|
|
113
|
+
legacyComponents: readonly import('../../../types.ts').IRLoopChildComponent[]
|
|
114
114
|
/** Inner-wrapped event IR for `emitComponentAndEventSetup`. */
|
|
115
|
-
legacyEvents: readonly import('../../types').LoopChildEvent[]
|
|
115
|
+
legacyEvents: readonly import('../../types.ts').LoopChildEvent[]
|
|
116
116
|
/** Pre-wrapped reactive text effects for the inner-item body. */
|
|
117
117
|
reactiveTexts: readonly BranchInnerLoopText[]
|
|
118
118
|
/**
|
|
@@ -124,11 +124,11 @@ export interface BranchInnerLoop {
|
|
|
124
124
|
/** Inner loop param identifier — needed for the legacy recursion. */
|
|
125
125
|
innerLoopParam: string
|
|
126
126
|
/** Inner loop param destructuring metadata. */
|
|
127
|
-
innerLoopParamBindings?: readonly import('../../../types').LoopParamBinding[]
|
|
127
|
+
innerLoopParamBindings?: readonly import('../../../types.ts').LoopParamBinding[]
|
|
128
128
|
/** Outer loop param identifier — threaded into emitComponentAndEventSetup. */
|
|
129
129
|
outerLoopParam: string
|
|
130
130
|
/** Outer loop param destructuring metadata. */
|
|
131
|
-
outerLoopParamBindings?: readonly import('../../../types').LoopParamBinding[]
|
|
131
|
+
outerLoopParamBindings?: readonly import('../../../types.ts').LoopParamBinding[]
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export type BranchInnerLoopsPlan = readonly BranchInnerLoop[]
|
|
@@ -21,10 +21,10 @@ import type {
|
|
|
21
21
|
LoopChildReactiveAttr,
|
|
22
22
|
LoopChildReactiveText,
|
|
23
23
|
TopLevelLoop,
|
|
24
|
-
} from '../../types'
|
|
25
|
-
import type { IRLoopChildComponent } from '../../../types'
|
|
26
|
-
import type { ReactiveEffectsPlan } from './reactive-effects'
|
|
27
|
-
import type { InnerLoopsPlan } from './inner-loop'
|
|
24
|
+
} from '../../types.ts'
|
|
25
|
+
import type { IRLoopChildComponent } from '../../../types.ts'
|
|
26
|
+
import type { ReactiveEffectsPlan } from './reactive-effects.ts'
|
|
27
|
+
import type { InnerLoopsPlan } from './inner-loop.ts'
|
|
28
28
|
|
|
29
29
|
/** Fields shared by every `LoopPlan` variant. */
|
|
30
30
|
interface LoopPlanCommon {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* nested conditionals) into a single `LoopChildArmPlan`.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import type { AttrMeta } from '../../../types'
|
|
13
|
-
import type { LoopChildArmPlan } from './loop-child-arm'
|
|
12
|
+
import type { AttrMeta } from '../../../types.ts'
|
|
13
|
+
import type { LoopChildArmPlan } from './loop-child-arm.ts'
|
|
14
14
|
|
|
15
15
|
/** A single reactive attribute effect (one createEffect block). */
|
|
16
16
|
export interface ReactiveAttrEffect {
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
* event-delegation.ts — `EventDelegationPlan`, `ItemLookup` family
|
|
17
17
|
*
|
|
18
18
|
* This file lets callers continue to write
|
|
19
|
-
* `import type { ... } from '../plan/types'` without caring which file
|
|
19
|
+
* `import type { ... } from '../plan/types.ts'` without caring which file
|
|
20
20
|
* a particular Plan type lives in.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
export type { ScopeRef } from './common'
|
|
23
|
+
export type { ScopeRef } from './common.ts'
|
|
24
24
|
export type {
|
|
25
25
|
ReactiveEffectsPlan,
|
|
26
26
|
ReactiveAttrSlot,
|
|
27
27
|
ReactiveAttrEffect,
|
|
28
28
|
ReactiveTextEffect,
|
|
29
29
|
NestedConditionalPlan,
|
|
30
|
-
} from './reactive-effects'
|
|
30
|
+
} from './reactive-effects.ts'
|
|
31
31
|
export type {
|
|
32
32
|
InsertPlan,
|
|
33
33
|
InsertArm,
|
|
@@ -36,7 +36,7 @@ export type {
|
|
|
36
36
|
ArmRefBind,
|
|
37
37
|
ArmChildComponentInit,
|
|
38
38
|
ArmTextEffect,
|
|
39
|
-
} from './insert'
|
|
39
|
+
} from './insert.ts'
|
|
40
40
|
export type {
|
|
41
41
|
LoopPlan,
|
|
42
42
|
PlainLoopPlan,
|
|
@@ -46,14 +46,14 @@ export type {
|
|
|
46
46
|
StaticLoopMaterializePlan,
|
|
47
47
|
NestedComponentInit,
|
|
48
48
|
LoopChildRefBinding,
|
|
49
|
-
} from './loop'
|
|
49
|
+
} from './loop.ts'
|
|
50
50
|
export type {
|
|
51
51
|
EventDelegationPlan,
|
|
52
52
|
ItemLookup,
|
|
53
53
|
KeyedItemLookup,
|
|
54
54
|
DynamicIndexItemLookup,
|
|
55
55
|
StaticIndexItemLookup,
|
|
56
|
-
} from './event-delegation'
|
|
56
|
+
} from './event-delegation.ts'
|
|
57
57
|
|
|
58
58
|
// Re-export legacy types referenced from Plan-level code paths.
|
|
59
59
|
export type {
|
|
@@ -61,4 +61,4 @@ export type {
|
|
|
61
61
|
LoopChildConditional,
|
|
62
62
|
BranchLoop,
|
|
63
63
|
LoopChildEvent,
|
|
64
|
-
} from '../../types'
|
|
64
|
+
} from '../../types.ts'
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
* control-flow.ts -> control-flow/{plan,stringify}/* -> shared.ts
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { LoopChildEvent, LoopChildRef, TopLevelLoop, NestedLoop, CollectedLoop } from '../types'
|
|
16
|
-
import type { IRLoopChildComponent, LoopParamBinding } from '../../types'
|
|
17
|
-
import { quotePropName, wrapLoopParamAsAccessor, irChildrenFreeIds, attrValueToString } from '../utils'
|
|
18
|
-
import { irChildrenToJsExpr } from '../html-template'
|
|
19
|
-
import { emitListenerBlock } from './stringify/event-listener'
|
|
20
|
-
import { nameForRegistryRef } from '../component-scope'
|
|
15
|
+
import type { LoopChildEvent, LoopChildRef, TopLevelLoop, NestedLoop, CollectedLoop } from '../types.ts'
|
|
16
|
+
import type { IRLoopChildComponent, LoopParamBinding } from '../../types.ts'
|
|
17
|
+
import { quotePropName, wrapLoopParamAsAccessor, irChildrenFreeIds, attrValueToString } from '../utils.ts'
|
|
18
|
+
import { irChildrenToJsExpr } from '../html-template.ts'
|
|
19
|
+
import { emitListenerBlock } from './stringify/event-listener.ts'
|
|
20
|
+
import { nameForRegistryRef } from '../component-scope.ts'
|
|
21
21
|
import { BF_SCOPE, BF_HOST, BF_AT } from '@barefootjs/shared'
|
|
22
|
-
import type { LoopChildRefBinding } from './plan/loop'
|
|
22
|
+
import type { LoopChildRefBinding } from './plan/loop.ts'
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Build the `keyFn` argument for mapArray / reconcileElements. `null` when
|
|
@@ -144,7 +144,7 @@ export function destructureLoopParam(
|
|
|
144
144
|
* Shared by emitComponentLoopReconciliation and emitCompositeElementReconciliation.
|
|
145
145
|
*/
|
|
146
146
|
export function buildComponentPropsExpr(
|
|
147
|
-
comp: { props: Array<{ name: string; value: import('../../types').AttrValue; isEventHandler: boolean }>, children?: import('../../types').IRNode[] },
|
|
147
|
+
comp: { props: Array<{ name: string; value: import('../../types.ts').AttrValue; isEventHandler: boolean }>, children?: import('../../types.ts').IRNode[] },
|
|
148
148
|
loopParam?: string,
|
|
149
149
|
loopParamBindings?: readonly LoopParamBinding[],
|
|
150
150
|
): string {
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
* `emitBranchLoopEventDelegation` pair.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { stringifyCompositeLoop } from './composite-loop'
|
|
14
|
-
import { stringifyEventDelegation } from './event-delegation'
|
|
15
|
-
import { stringifyReactiveEffects } from './reactive-effects'
|
|
16
|
-
import { emitTemplateCloneInline, emitLoopItemElementSetup } from './template-parse'
|
|
17
|
-
import { emitLoopChildRefs } from './loop'
|
|
13
|
+
import { stringifyCompositeLoop } from './composite-loop.ts'
|
|
14
|
+
import { stringifyEventDelegation } from './event-delegation.ts'
|
|
15
|
+
import { stringifyReactiveEffects } from './reactive-effects.ts'
|
|
16
|
+
import { emitTemplateCloneInline, emitLoopItemElementSetup } from './template-parse.ts'
|
|
17
|
+
import { emitLoopChildRefs } from './loop.ts'
|
|
18
18
|
import type {
|
|
19
19
|
BranchLoopPlan,
|
|
20
20
|
BranchPlainLoopPlan,
|
|
21
|
-
} from '../plan/branch-loop'
|
|
21
|
+
} from '../plan/branch-loop.ts'
|
|
22
22
|
|
|
23
23
|
export function stringifyBranchLoop(lines: string[], plan: BranchLoopPlan): void {
|
|
24
24
|
// The container query runs first regardless of kind so the
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
* SSR-side nested-comp lines use 6 spaces (matches legacy).
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
import { stringifyReactiveEffects } from './reactive-effects'
|
|
34
|
-
import type { ComponentLoopPlan, NestedComponentInit } from '../plan/types'
|
|
35
|
-
import { nameForRegistryRef } from '../../component-scope'
|
|
33
|
+
import { stringifyReactiveEffects } from './reactive-effects.ts'
|
|
34
|
+
import type { ComponentLoopPlan, NestedComponentInit } from '../plan/types.ts'
|
|
35
|
+
import { nameForRegistryRef } from '../../component-scope.ts'
|
|
36
36
|
|
|
37
37
|
export function stringifyComponentLoop(lines: string[], plan: ComponentLoopPlan): void {
|
|
38
38
|
const {
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
* after the migration completes.
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
import { emitComponentAndEventSetup } from '../shared'
|
|
34
|
-
import { stringifyInnerLoops } from './inner-loop'
|
|
35
|
-
import { stringifyReactiveEffects } from './reactive-effects'
|
|
36
|
-
import { emitLoopItemElementSetup } from './template-parse'
|
|
37
|
-
import { emitLoopChildRefs } from './loop'
|
|
38
|
-
import type { CompositeLoopPlan } from '../plan/types'
|
|
33
|
+
import { emitComponentAndEventSetup } from '../shared.ts'
|
|
34
|
+
import { stringifyInnerLoops } from './inner-loop.ts'
|
|
35
|
+
import { stringifyReactiveEffects } from './reactive-effects.ts'
|
|
36
|
+
import { emitLoopItemElementSetup } from './template-parse.ts'
|
|
37
|
+
import { emitLoopChildRefs } from './loop.ts'
|
|
38
|
+
import type { CompositeLoopPlan } from '../plan/types.ts'
|
|
39
39
|
|
|
40
40
|
export function stringifyCompositeLoop(lines: string[], plan: CompositeLoopPlan): void {
|
|
41
41
|
const {
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
* sentinel before destructuring (#951 TDZ-safe).
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
-
import { toDomEventName, varSlotId, substituteLoopBindings, buildLoopChildIndexSubtraction, DATA_KEY, keyAttrName } from '../../utils'
|
|
35
|
+
import { toDomEventName, varSlotId, substituteLoopBindings, buildLoopChildIndexSubtraction, DATA_KEY, keyAttrName } from '../../utils.ts'
|
|
36
36
|
import type {
|
|
37
37
|
EventDelegationPlan,
|
|
38
38
|
KeyedItemLookup,
|
|
39
39
|
DynamicIndexItemLookup,
|
|
40
40
|
StaticIndexItemLookup,
|
|
41
41
|
LoopChildEvent,
|
|
42
|
-
} from '../plan/types'
|
|
42
|
+
} from '../plan/types.ts'
|
|
43
43
|
|
|
44
44
|
/** Non-bubbling events that require addEventListener with capture for delegation. */
|
|
45
45
|
const NON_BUBBLING_EVENTS = new Set([
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
* <indent>}) }
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
import { keyAttrName } from '../../utils'
|
|
34
|
-
import { emitComponentAndEventSetup } from '../shared'
|
|
35
|
-
import { emitAttrUpdate } from '../../emit-reactive'
|
|
36
|
-
import { emitMultiRootTemplateCloneLines } from './template-parse'
|
|
37
|
-
import { emitLoopChildRefs } from './loop'
|
|
33
|
+
import { keyAttrName } from '../../utils.ts'
|
|
34
|
+
import { emitComponentAndEventSetup } from '../shared.ts'
|
|
35
|
+
import { emitAttrUpdate } from '../../emit-reactive.ts'
|
|
36
|
+
import { emitMultiRootTemplateCloneLines } from './template-parse.ts'
|
|
37
|
+
import { emitLoopChildRefs } from './loop.ts'
|
|
38
38
|
import type {
|
|
39
39
|
InnerLoopPlan,
|
|
40
40
|
InnerLoopsPlan,
|
|
41
|
-
} from '../plan/inner-loop'
|
|
41
|
+
} from '../plan/inner-loop.ts'
|
|
42
42
|
|
|
43
43
|
export function stringifyInnerLoops(
|
|
44
44
|
lines: string[],
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
* preserve it; a follow-up PR can fix it now that the indent is data-driven.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
import { emitRefCall, varSlotId } from '../../utils'
|
|
32
|
-
import { emitAttrUpdate } from '../../emit-reactive'
|
|
33
|
-
import type { InsertPlan, InsertArm, ArmBody, ScopeRef } from '../plan/types'
|
|
34
|
-
import { stringifyBranchLoops } from './branch-loop'
|
|
35
|
-
import { emitListenerLine } from './event-listener'
|
|
36
|
-
import { nameForRegistryRef } from '../../component-scope'
|
|
31
|
+
import { emitRefCall, varSlotId } from '../../utils.ts'
|
|
32
|
+
import { emitAttrUpdate } from '../../emit-reactive.ts'
|
|
33
|
+
import type { InsertPlan, InsertArm, ArmBody, ScopeRef } from '../plan/types.ts'
|
|
34
|
+
import { stringifyBranchLoops } from './branch-loop.ts'
|
|
35
|
+
import { emitListenerLine } from './event-listener.ts'
|
|
36
|
+
import { nameForRegistryRef } from '../../component-scope.ts'
|
|
37
37
|
|
|
38
38
|
export interface StringifyInsertOptions {
|
|
39
39
|
/** Indent on the `insert(` line itself. */
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
* every nesting depth.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { varSlotId, DATA_BF_PH, keyAttrName } from '../../utils'
|
|
15
|
-
import { emitComponentAndEventSetup } from '../shared'
|
|
16
|
-
import { templateRootIsSvg } from './template-parse'
|
|
17
|
-
import { emitListenerLine } from './event-listener'
|
|
18
|
-
import { nameForRegistryRef } from '../../component-scope'
|
|
14
|
+
import { varSlotId, DATA_BF_PH, keyAttrName } from '../../utils.ts'
|
|
15
|
+
import { emitComponentAndEventSetup } from '../shared.ts'
|
|
16
|
+
import { templateRootIsSvg } from './template-parse.ts'
|
|
17
|
+
import { emitListenerLine } from './event-listener.ts'
|
|
18
|
+
import { nameForRegistryRef } from '../../component-scope.ts'
|
|
19
19
|
import type {
|
|
20
20
|
BranchChildComponentInitsPlan,
|
|
21
21
|
BranchEventBindingsPlan,
|
|
22
22
|
BranchInnerLoopsPlan,
|
|
23
23
|
LoopChildArmPlan,
|
|
24
24
|
LoopChildConditionalPlan,
|
|
25
|
-
} from '../plan/loop-child-arm'
|
|
25
|
+
} from '../plan/loop-child-arm.ts'
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Emit `addEventListener` setup for a loop-cond branch arm. One qsa() per
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
* passed in via `topIndent`.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
import { emitRefCall, varSlotId } from '../../utils'
|
|
28
|
-
import { emitAttrUpdate } from '../../emit-reactive'
|
|
29
|
-
import { stringifyReactiveEffects } from './reactive-effects'
|
|
30
|
-
import { emitTemplateCloneInline, emitLoopItemElementSetup } from './template-parse'
|
|
31
|
-
import { stringifyComponentLoop } from './component-loop'
|
|
32
|
-
import { stringifyCompositeLoop } from './composite-loop'
|
|
33
|
-
import type { LoopChildRefBinding, LoopPlan, PlainLoopPlan, StaticLoopPlan } from '../plan/types'
|
|
27
|
+
import { emitRefCall, varSlotId } from '../../utils.ts'
|
|
28
|
+
import { emitAttrUpdate } from '../../emit-reactive.ts'
|
|
29
|
+
import { stringifyReactiveEffects } from './reactive-effects.ts'
|
|
30
|
+
import { emitTemplateCloneInline, emitLoopItemElementSetup } from './template-parse.ts'
|
|
31
|
+
import { stringifyComponentLoop } from './component-loop.ts'
|
|
32
|
+
import { stringifyCompositeLoop } from './composite-loop.ts'
|
|
33
|
+
import type { LoopChildRefBinding, LoopPlan, PlainLoopPlan, StaticLoopPlan } from '../plan/types.ts'
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Emit `(callback)(__rf)` for each ref on a per-item slot, looking up the
|