@pithyjs/core 0.1.0-beta.7 → 0.1.0-beta.9
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 +1 -1
- package/dist/a11y/focus-trap.d.ts.map +1 -1
- package/dist/a11y/focus-trap.js +2 -0
- package/dist/a11y/focus-trap.js.map +1 -1
- package/dist/a11y/index.d.ts +4 -4
- package/dist/a11y/index.js +4 -4
- package/dist/compile/bindSwitchCases.js +5 -5
- package/dist/compile/binds/bindBoundAttributes.d.ts +1 -0
- package/dist/compile/binds/bindBoundAttributes.d.ts.map +1 -1
- package/dist/compile/binds/bindBoundAttributes.js +24 -2
- package/dist/compile/binds/bindBoundAttributes.js.map +1 -1
- package/dist/compile/binds/bindClassDirectives.js +3 -3
- package/dist/compile/binds/bindComponentsTags.d.ts +2 -0
- package/dist/compile/binds/bindComponentsTags.d.ts.map +1 -1
- package/dist/compile/binds/bindComponentsTags.js +60 -37
- package/dist/compile/binds/bindComponentsTags.js.map +1 -1
- package/dist/compile/binds/bindConditionals.js +2 -2
- package/dist/compile/binds/bindDeferDirectives.js +4 -4
- package/dist/compile/binds/bindEventHandlers.js +2 -2
- package/dist/compile/binds/bindStyleDirectives.js +2 -2
- package/dist/compile/binds/bindTextInterpolations.js +5 -5
- package/dist/compile/binds/propNames.d.ts +14 -0
- package/dist/compile/binds/propNames.d.ts.map +1 -0
- package/dist/compile/binds/propNames.js +116 -0
- package/dist/compile/binds/propNames.js.map +1 -0
- package/dist/compile/compileNodes.d.ts.map +1 -1
- package/dist/compile/compileNodes.js +6 -3
- package/dist/compile/compileNodes.js.map +1 -1
- package/dist/compile/compileTemplate.d.ts.map +1 -1
- package/dist/compile/compileTemplate.js +17 -16
- package/dist/compile/compileTemplate.js.map +1 -1
- package/dist/compile/contentProjection.js +6 -6
- package/dist/compile/forLoops/bindForLoops.js +6 -6
- package/dist/compile/forLoops/createLoopManager.d.ts +2 -2
- package/dist/compile/forLoops/createLoopManager.js +10 -10
- package/dist/compile/forLoops/index.d.ts +5 -5
- package/dist/compile/forLoops/index.js +5 -5
- package/dist/compile/handleConditionalChain.js +3 -3
- package/dist/compile/index.d.ts +17 -17
- package/dist/compile/index.js +14 -14
- package/dist/compile/parseHtml.js +1 -1
- package/dist/compile/pithyTreeToDom.js +1 -1
- package/dist/compile/renderBranch.js +7 -7
- package/dist/compile/renderChildren.d.ts +2 -2
- package/dist/compile/renderChildren.js +2 -2
- package/dist/compile/ssrCrashes.d.ts +1 -1
- package/dist/compile/ssrCrashes.js +3 -3
- package/dist/compile/ssrMode.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/interfaces/index.d.ts +2 -2
- package/dist/interfaces/index.js +2 -2
- package/dist/runtime/applyBindings.d.ts +3 -3
- package/dist/runtime/applyBindings.d.ts.map +1 -1
- package/dist/runtime/applyBindings.js +12 -6
- package/dist/runtime/applyBindings.js.map +1 -1
- package/dist/runtime/bindings/applyComponent.d.ts +1 -1
- package/dist/runtime/bindings/applyComponent.d.ts.map +1 -1
- package/dist/runtime/bindings/applyComponent.js +26 -25
- package/dist/runtime/bindings/applyComponent.js.map +1 -1
- package/dist/runtime/bindings/applyDefer.d.ts +1 -1
- package/dist/runtime/bindings/applyDefer.js +6 -6
- package/dist/runtime/bindings/applySimple.d.ts +1 -1
- package/dist/runtime/bindings/applySimple.d.ts.map +1 -1
- package/dist/runtime/bindings/applySimple.js +15 -10
- package/dist/runtime/bindings/applySimple.js.map +1 -1
- package/dist/runtime/bindings/applyStructural.d.ts +1 -1
- package/dist/runtime/bindings/applyStructural.js +5 -5
- package/dist/runtime/bindings/helpers.d.ts +1 -1
- package/dist/runtime/bindings/helpers.js +1 -1
- package/dist/runtime/bindings/index.d.ts +6 -6
- package/dist/runtime/bindings/index.js +5 -5
- package/dist/runtime/bootstrap.d.ts +1 -1
- package/dist/runtime/bootstrap.js +1 -1
- package/dist/runtime/deferHelpers.d.ts +1 -1
- package/dist/runtime/html.d.ts.map +1 -1
- package/dist/runtime/html.js +6 -5
- package/dist/runtime/html.js.map +1 -1
- package/dist/runtime/index.d.ts +6 -6
- package/dist/runtime/index.js +6 -6
- package/dist/runtime/lazy.js +1 -1
- package/dist/runtime/onDestroy.d.ts +7 -0
- package/dist/runtime/onDestroy.d.ts.map +1 -1
- package/dist/runtime/onDestroy.js +16 -1
- package/dist/runtime/onDestroy.js.map +1 -1
- package/dist/runtime/parseIdentifiersFromTemplate.js +1 -1
- package/dist/runtime/resource/createAction.d.ts +1 -1
- package/dist/runtime/resource/createAction.js +1 -1
- package/dist/runtime/resource/createResource.d.ts +1 -1
- package/dist/runtime/resource/createResource.js +2 -2
- package/dist/runtime/resource/engine.d.ts +1 -1
- package/dist/runtime/resource/index.d.ts +3 -3
- package/dist/runtime/resource/index.js +2 -2
- package/dist/types/globals.d.ts +2 -2
- package/dist/utilities/index.d.ts +2 -2
- package/dist/utilities/index.js +2 -2
- package/dist/utilities/ref-signal.utility.d.ts +1 -1
- package/dist/utilities/ref.untility.d.ts +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propNames.js","sourceRoot":"","sources":["../../../src/compile/binds/propNames.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAQF,MAAM,IAAI,GAAc,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;AAE3E,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,MAAM,KAAK,GAAG,0CAA0C,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnE,IAAI,IAAY,CAAC;IACjB,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,IACE,IAAI,GAAG,CAAC;YACR,CAAC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AE,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"compileNodes.d.ts","sourceRoot":"","sources":["../../src/compile/compileNodes.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAEF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAQnD;;;;;;;;;;;;;;;;;GAiBG;AACH,0NAA0N;AAC1N,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,EAAE,EAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B;IAAE,EAAE,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CA2E/C"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"category": "runtime"
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
|
-
import { pithyTreeToDom } from './pithyTreeToDom';
|
|
9
|
-
import { bindStructuralDirectives, bindTemplateDirectives, } from './compileTemplate';
|
|
10
|
-
import { drainDestroyCallbacks } from '../runtime/onDestroy';
|
|
8
|
+
import { pithyTreeToDom } from './pithyTreeToDom.js';
|
|
9
|
+
import { bindStructuralDirectives, bindTemplateDirectives, } from './compileTemplate.js';
|
|
10
|
+
import { drainDestroyCallbacks } from '../runtime/onDestroy.js';
|
|
11
11
|
/**
|
|
12
12
|
* Compiles an array of PithyNode AST nodes into live DOM with full binding pipeline.
|
|
13
13
|
*
|
|
@@ -76,6 +76,7 @@ export function compileNodes(nodes, context) {
|
|
|
76
76
|
/* ignore */
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
disposers.length = 0;
|
|
79
80
|
},
|
|
80
81
|
};
|
|
81
82
|
}
|
|
@@ -90,6 +91,7 @@ export function compileNodes(nodes, context) {
|
|
|
90
91
|
/* ignore */
|
|
91
92
|
}
|
|
92
93
|
}
|
|
94
|
+
disposers.length = 0;
|
|
93
95
|
for (let i = destroyCallbacks.length - 1; i >= 0; i--) {
|
|
94
96
|
try {
|
|
95
97
|
destroyCallbacks[i]();
|
|
@@ -98,6 +100,7 @@ export function compileNodes(nodes, context) {
|
|
|
98
100
|
/* ignore */
|
|
99
101
|
}
|
|
100
102
|
}
|
|
103
|
+
destroyCallbacks.length = 0;
|
|
101
104
|
},
|
|
102
105
|
};
|
|
103
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileNodes.js","sourceRoot":"","sources":["../../src/compile/compileNodes.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAGF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;;;;;;;;;;;;;;GAiBG;AACH,0NAA0N;AAC1N,MAAM,UAAU,YAAY,CAC1B,KAAkB,EAClB,OAAgC;IAEhC,yEAAyE;IACzE,+DAA+D;IAC/D,MAAM,gBAAgB,GAAG,qBAAqB,EAAE,CAAC;IACjD,MAAM,SAAS,GAAmB,EAAE,CAAC;IAErC,IAAI,QAA0B,CAAC;IAC/B,IAAI,CAAC;QACH,uBAAuB;QACvB,QAAQ,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAE1C,sDAAsD;QACtD,wBAAwB,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAE9D,sFAAsF;QACtF,sBAAsB,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,uEAAuE;QACvE,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,IAAI,CAAC;gBACH,SAA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|
5
5
|
"category": "runtime"
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
|
-
import { parseHtml } from './parseHtml';
|
|
9
|
-
import { injectScopedStyle } from './injectScopedStyle';
|
|
10
|
-
import { bindTextInterpolations } from './binds/bindTextInterpolations';
|
|
11
|
-
import { bindEventHandlers } from './binds/bindEventHandlers';
|
|
12
|
-
import { bindClassDirectives } from './binds/bindClassDirectives';
|
|
13
|
-
import { bindComponentTags } from './binds/bindComponentsTags';
|
|
14
|
-
import { bindConditionals } from './binds/bindConditionals';
|
|
15
|
-
import { bindBoundAttributes } from './binds/bindBoundAttributes';
|
|
16
|
-
import { bindRefDirectives } from './binds/bindRefDirectives';
|
|
17
|
-
import { bindDefaultTwoWay } from './binds/bindDefaultTwoWay';
|
|
18
|
-
import { bindErrorBoundary } from './binds/bindErrorBoundary';
|
|
19
|
-
import { bindDeferDirectives } from './binds/bindDeferDirectives';
|
|
20
|
-
import { bindForLoops } from './forLoops/bindForLoops';
|
|
21
|
-
import { bindSwitchCases } from './bindSwitchCases';
|
|
22
|
-
import { extractSlotDefs, mountProjection, } from './contentProjection';
|
|
23
|
-
import { executeCustomDirectiveBinders } from './binds/directiveRegistry';
|
|
8
|
+
import { parseHtml } from './parseHtml.js';
|
|
9
|
+
import { injectScopedStyle } from './injectScopedStyle.js';
|
|
10
|
+
import { bindTextInterpolations } from './binds/bindTextInterpolations.js';
|
|
11
|
+
import { bindEventHandlers } from './binds/bindEventHandlers.js';
|
|
12
|
+
import { bindClassDirectives } from './binds/bindClassDirectives.js';
|
|
13
|
+
import { bindComponentTags } from './binds/bindComponentsTags.js';
|
|
14
|
+
import { bindConditionals } from './binds/bindConditionals.js';
|
|
15
|
+
import { bindBoundAttributes } from './binds/bindBoundAttributes.js';
|
|
16
|
+
import { bindRefDirectives } from './binds/bindRefDirectives.js';
|
|
17
|
+
import { bindDefaultTwoWay } from './binds/bindDefaultTwoWay.js';
|
|
18
|
+
import { bindErrorBoundary } from './binds/bindErrorBoundary.js';
|
|
19
|
+
import { bindDeferDirectives } from './binds/bindDeferDirectives.js';
|
|
20
|
+
import { bindForLoops } from './forLoops/bindForLoops.js';
|
|
21
|
+
import { bindSwitchCases } from './bindSwitchCases.js';
|
|
22
|
+
import { extractSlotDefs, mountProjection, } from './contentProjection.js';
|
|
23
|
+
import { executeCustomDirectiveBinders } from './binds/directiveRegistry.js';
|
|
24
24
|
/**
|
|
25
25
|
* Runs all structural directive bindings on a fragment.
|
|
26
26
|
*
|
|
@@ -98,6 +98,7 @@ export function compileTemplate(html, context, css, scopeId, importedIdentifiers
|
|
|
98
98
|
/* ignore */
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
disposers.length = 0;
|
|
101
102
|
},
|
|
102
103
|
};
|
|
103
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileTemplate.js","sourceRoot":"","sources":["../../src/compile/compileTemplate.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAEF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6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AE5D,uEAAuE;IACvE,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
"category": "feature"
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
|
-
import { pithyTreeToDom } from './pithyTreeToDom';
|
|
9
|
-
import { bindStructuralDirectives } from './compileTemplate';
|
|
10
|
-
import { nodeExpando } from './nodeExpando';
|
|
11
|
-
import { bindErrorBoundary } from './binds/bindErrorBoundary';
|
|
12
|
-
import { pithyGlobals } from '../types/globals';
|
|
13
|
-
import { trimBlankEdges } from './trimBlankEdges';
|
|
8
|
+
import { pithyTreeToDom } from './pithyTreeToDom.js';
|
|
9
|
+
import { bindStructuralDirectives } from './compileTemplate.js';
|
|
10
|
+
import { nodeExpando } from './nodeExpando.js';
|
|
11
|
+
import { bindErrorBoundary } from './binds/bindErrorBoundary.js';
|
|
12
|
+
import { pithyGlobals } from '../types/globals.js';
|
|
13
|
+
import { trimBlankEdges } from './trimBlankEdges.js';
|
|
14
14
|
function expando(node) {
|
|
15
15
|
return node;
|
|
16
16
|
}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
"category": "directive"
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
|
-
import { compileExpression } from '../compileExpression';
|
|
9
|
-
import { createLoopManager } from './createLoopManager';
|
|
8
|
+
import { compileExpression } from '../compileExpression.js';
|
|
9
|
+
import { createLoopManager } from './createLoopManager.js';
|
|
10
10
|
import { effect } from '@pithyjs/signals';
|
|
11
|
-
import { findAllNestedLoopNodes } from './loopTraversal';
|
|
12
|
-
import { isSSRMode } from '../ssrMode';
|
|
13
|
-
import { nodeExpando } from '../nodeExpando';
|
|
14
|
-
import { compileTrackBy } from './loopHelpers';
|
|
11
|
+
import { findAllNestedLoopNodes } from './loopTraversal.js';
|
|
12
|
+
import { isSSRMode } from '../ssrMode.js';
|
|
13
|
+
import { nodeExpando } from '../nodeExpando.js';
|
|
14
|
+
import { compileTrackBy } from './loopHelpers.js';
|
|
15
15
|
/**
|
|
16
16
|
* Bind all @for loops found under `rootEl` using the parsed AST nodes.
|
|
17
17
|
*
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* - Dev-time duplicate key detection.
|
|
20
20
|
*/
|
|
21
21
|
import type { PithyNode } from '@pithyjs/compiler';
|
|
22
|
-
import type { ChildFactory } from '../../runtime/bindings/types';
|
|
23
|
-
import { LoopSignals } from './loopSignals';
|
|
22
|
+
import type { ChildFactory } from '../../runtime/bindings/types.js';
|
|
23
|
+
import { LoopSignals } from './loopSignals.js';
|
|
24
24
|
export type { ChildFactory };
|
|
25
25
|
export interface LoopItem {
|
|
26
26
|
key: string;
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
8
|
import { batch, createRoot, untrack } from '@pithyjs/signals';
|
|
9
|
-
import { pithyTreeToDom } from '../pithyTreeToDom';
|
|
10
|
-
import { bindForLoops } from './bindForLoops';
|
|
11
|
-
import { flashUpdate } from '../binds/bindTextInterpolations';
|
|
12
|
-
import { bindTemplateDirectives } from '
|
|
13
|
-
import { bindConditionals } from '../binds/bindConditionals';
|
|
14
|
-
import { bindSwitchCases } from '../bindSwitchCases';
|
|
15
|
-
import { createLoopSignals, updateLoopSignals, createLoopContext, } from './loopSignals';
|
|
16
|
-
import { safeInsertBefore, markElementsAsLoopGenerated, createItemRange, wrapInRange, detachRange, } from './loopHelpers';
|
|
17
|
-
import { findAllNestedLoopNodes } from './loopTraversal';
|
|
18
|
-
import { nodeExpando } from '../nodeExpando';
|
|
9
|
+
import { pithyTreeToDom } from '../pithyTreeToDom.js';
|
|
10
|
+
import { bindForLoops } from './bindForLoops.js';
|
|
11
|
+
import { flashUpdate } from '../binds/bindTextInterpolations.js';
|
|
12
|
+
import { bindTemplateDirectives } from '../index.js';
|
|
13
|
+
import { bindConditionals } from '../binds/bindConditionals.js';
|
|
14
|
+
import { bindSwitchCases } from '../bindSwitchCases.js';
|
|
15
|
+
import { createLoopSignals, updateLoopSignals, createLoopContext, } from './loopSignals.js';
|
|
16
|
+
import { safeInsertBefore, markElementsAsLoopGenerated, createItemRange, wrapInRange, detachRange, } from './loopHelpers.js';
|
|
17
|
+
import { findAllNestedLoopNodes } from './loopTraversal.js';
|
|
18
|
+
import { nodeExpando } from '../nodeExpando.js';
|
|
19
19
|
/** First real element between [start..end] to use as a flash target. */
|
|
20
20
|
function firstElInRange(start, end) {
|
|
21
21
|
let n = start.nextSibling;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './bindForLoops';
|
|
2
|
-
export * from './createLoopManager';
|
|
3
|
-
export * from './loopHelpers';
|
|
4
|
-
export * from './loopSignals';
|
|
5
|
-
export * from './loopTraversal';
|
|
1
|
+
export * from './bindForLoops.js';
|
|
2
|
+
export * from './createLoopManager.js';
|
|
3
|
+
export * from './loopHelpers.js';
|
|
4
|
+
export * from './loopSignals.js';
|
|
5
|
+
export * from './loopTraversal.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Main loop functionality
|
|
2
|
-
export * from './bindForLoops';
|
|
3
|
-
export * from './createLoopManager';
|
|
2
|
+
export * from './bindForLoops.js';
|
|
3
|
+
export * from './createLoopManager.js';
|
|
4
4
|
// Helper utilities
|
|
5
|
-
export * from './loopHelpers';
|
|
6
|
-
export * from './loopSignals';
|
|
7
|
-
export * from './loopTraversal';
|
|
5
|
+
export * from './loopHelpers.js';
|
|
6
|
+
export * from './loopSignals.js';
|
|
7
|
+
export * from './loopTraversal.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
8
|
import { effect } from '@pithyjs/signals';
|
|
9
|
-
import { compileExpression } from './compileExpression';
|
|
10
|
-
import { clearBranch, renderBranch } from './renderBranch';
|
|
11
|
-
import { isSSRMode } from './ssrMode';
|
|
9
|
+
import { compileExpression } from './compileExpression.js';
|
|
10
|
+
import { clearBranch, renderBranch } from './renderBranch.js';
|
|
11
|
+
import { isSSRMode } from './ssrMode.js';
|
|
12
12
|
/**
|
|
13
13
|
* Handles rendering and reactivity for an @if/@else-if/@else chain.
|
|
14
14
|
* Returns a Set of all node IDs that were processed (to avoid double-binding).
|
package/dist/compile/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { compileTemplate } from './compileTemplate';
|
|
2
|
-
export { compileNodes } from './compileNodes';
|
|
3
|
-
export { renderChildren, captureChildren, readChildPayload, type ChildPayload, } from './renderChildren';
|
|
4
|
-
export { injectScopedStyle } from './injectScopedStyle';
|
|
5
|
-
export { bindTextInterpolations } from './binds/bindTextInterpolations';
|
|
6
|
-
export { bindEventHandlers } from './binds/bindEventHandlers';
|
|
7
|
-
export { bindClassDirectives } from './binds/bindClassDirectives';
|
|
8
|
-
export { bindComponentTags } from './binds/bindComponentsTags';
|
|
9
|
-
export { bindForLoops, createLoopManager, type ChildFactory, type LoopManager, } from './forLoops';
|
|
10
|
-
export { bindTemplateDirectives } from './compileTemplate';
|
|
11
|
-
export type { SlotMap } from './contentProjection';
|
|
12
|
-
export { isSSRMode } from './ssrMode';
|
|
13
|
-
export { registerDirectiveBinder, unregisterDirectiveBinder, executeCustomDirectiveBinders, type DirectiveBinder, } from './binds/directiveRegistry';
|
|
14
|
-
export { boundaryForElement, setBoundaryError, clearBoundaryError, registerBoundary, } from './binds/bindErrorBoundary';
|
|
15
|
-
export type { BoundaryInfo } from './binds/bindErrorBoundary';
|
|
16
|
-
export { collectUnhandledSSRRenderCrashes, resetSSRRenderCrashes, } from './ssrCrashes';
|
|
17
|
-
export type { SSRRenderCrash } from './ssrCrashes';
|
|
1
|
+
export { compileTemplate } from './compileTemplate.js';
|
|
2
|
+
export { compileNodes } from './compileNodes.js';
|
|
3
|
+
export { renderChildren, captureChildren, readChildPayload, type ChildPayload, } from './renderChildren.js';
|
|
4
|
+
export { injectScopedStyle } from './injectScopedStyle.js';
|
|
5
|
+
export { bindTextInterpolations } from './binds/bindTextInterpolations.js';
|
|
6
|
+
export { bindEventHandlers } from './binds/bindEventHandlers.js';
|
|
7
|
+
export { bindClassDirectives } from './binds/bindClassDirectives.js';
|
|
8
|
+
export { bindComponentTags } from './binds/bindComponentsTags.js';
|
|
9
|
+
export { bindForLoops, createLoopManager, type ChildFactory, type LoopManager, } from './forLoops/index.js';
|
|
10
|
+
export { bindTemplateDirectives } from './compileTemplate.js';
|
|
11
|
+
export type { SlotMap } from './contentProjection.js';
|
|
12
|
+
export { isSSRMode } from './ssrMode.js';
|
|
13
|
+
export { registerDirectiveBinder, unregisterDirectiveBinder, executeCustomDirectiveBinders, type DirectiveBinder, } from './binds/directiveRegistry.js';
|
|
14
|
+
export { boundaryForElement, setBoundaryError, clearBoundaryError, registerBoundary, } from './binds/bindErrorBoundary.js';
|
|
15
|
+
export type { BoundaryInfo } from './binds/bindErrorBoundary.js';
|
|
16
|
+
export { collectUnhandledSSRRenderCrashes, resetSSRRenderCrashes, } from './ssrCrashes.js';
|
|
17
|
+
export type { SSRRenderCrash } from './ssrCrashes.js';
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/compile/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export { compileTemplate } from './compileTemplate';
|
|
2
|
-
export { compileNodes } from './compileNodes';
|
|
3
|
-
export { renderChildren, captureChildren, readChildPayload, } from './renderChildren';
|
|
1
|
+
export { compileTemplate } from './compileTemplate.js';
|
|
2
|
+
export { compileNodes } from './compileNodes.js';
|
|
3
|
+
export { renderChildren, captureChildren, readChildPayload, } from './renderChildren.js';
|
|
4
4
|
// parseHtml is NOT re-exported from this barrel to prevent parse5 from
|
|
5
5
|
// being pulled into production bundles. Use the dedicated subpath export:
|
|
6
6
|
// import { loadJITCompiler } from '@pithyjs/core/compile/parseHtml'
|
|
7
|
-
export { injectScopedStyle } from './injectScopedStyle';
|
|
7
|
+
export { injectScopedStyle } from './injectScopedStyle.js';
|
|
8
8
|
// Only export these if useful for advanced users / SSR:
|
|
9
|
-
export { bindTextInterpolations } from './binds/bindTextInterpolations';
|
|
10
|
-
export { bindEventHandlers } from './binds/bindEventHandlers';
|
|
11
|
-
export { bindClassDirectives } from './binds/bindClassDirectives';
|
|
12
|
-
export { bindComponentTags } from './binds/bindComponentsTags';
|
|
13
|
-
export { bindForLoops, createLoopManager, } from './forLoops';
|
|
14
|
-
export { bindTemplateDirectives } from './compileTemplate';
|
|
9
|
+
export { bindTextInterpolations } from './binds/bindTextInterpolations.js';
|
|
10
|
+
export { bindEventHandlers } from './binds/bindEventHandlers.js';
|
|
11
|
+
export { bindClassDirectives } from './binds/bindClassDirectives.js';
|
|
12
|
+
export { bindComponentTags } from './binds/bindComponentsTags.js';
|
|
13
|
+
export { bindForLoops, createLoopManager, } from './forLoops/index.js';
|
|
14
|
+
export { bindTemplateDirectives } from './compileTemplate.js';
|
|
15
15
|
// The explicit static-render signal. `@pithyjs/ssr`'s setupEnvironment() copies
|
|
16
16
|
// a happy-dom window onto globalThis — IntersectionObserver, requestAnimationFrame
|
|
17
17
|
// and matchMedia included — so no `typeof` feature check can distinguish a server
|
|
18
18
|
// render from a browser. Packages that must branch on it (e.g. @pithyjs/ui-kit's
|
|
19
19
|
// section entrance animations, BUG-010) read this rather than hand-rolling their
|
|
20
20
|
// own derivation of the underlying `__PITHY_SSR__` global.
|
|
21
|
-
export { isSSRMode } from './ssrMode';
|
|
21
|
+
export { isSSRMode } from './ssrMode.js';
|
|
22
22
|
// Custom directive registry - allows external packages (router, etc.) to register binders
|
|
23
|
-
export { registerDirectiveBinder, unregisterDirectiveBinder, executeCustomDirectiveBinders, } from './binds/directiveRegistry';
|
|
23
|
+
export { registerDirectiveBinder, unregisterDirectiveBinder, executeCustomDirectiveBinders, } from './binds/directiveRegistry.js';
|
|
24
24
|
// Error boundary functions for router integration:
|
|
25
|
-
export { boundaryForElement, setBoundaryError, clearBoundaryError, registerBoundary, } from './binds/bindErrorBoundary';
|
|
25
|
+
export { boundaryForElement, setBoundaryError, clearBoundaryError, registerBoundary, } from './binds/bindErrorBoundary.js';
|
|
26
26
|
// Unhandled component crashes recorded during a server render. Consumed by
|
|
27
27
|
// @pithyjs/ssr's renderToString so a crash fails its route (BUG-018).
|
|
28
28
|
//
|
|
@@ -31,5 +31,5 @@ export { boundaryForElement, setBoundaryError, clearBoundaryError, registerBound
|
|
|
31
31
|
// binders inside this package, so they are annotated `internal` rather than
|
|
32
32
|
// exported here — advertising them as stable in the generated API table while
|
|
33
33
|
// leaving them unimportable is worse than either alternative.
|
|
34
|
-
export { collectUnhandledSSRRenderCrashes, resetSSRRenderCrashes, } from './ssrCrashes';
|
|
34
|
+
export { collectUnhandledSSRRenderCrashes, resetSSRRenderCrashes, } from './ssrCrashes.js';
|
|
35
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
8
|
import { parse5ToPithyTree, escapeComponentTags, extractOriginalTagNames, extractOriginalAttributeNames, } from '@pithyjs/compiler';
|
|
9
|
-
import { pithyTreeToDom } from './pithyTreeToDom';
|
|
9
|
+
import { pithyTreeToDom } from './pithyTreeToDom.js';
|
|
10
10
|
let _parseFragment = null;
|
|
11
11
|
let _loadPromise = null;
|
|
12
12
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
8
|
import { SVG_TAGS, SVG_NS, forEachDirectiveAttr, } from '@pithyjs/compiler';
|
|
9
|
-
import { nodeExpando } from './nodeExpando';
|
|
9
|
+
import { nodeExpando } from './nodeExpando.js';
|
|
10
10
|
/**
|
|
11
11
|
* Converts a list of PithyNodes into a DocumentFragment of real DOM nodes.
|
|
12
12
|
* Component tags (isComponent: true) are rendered as placeholder elements.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRoot } from '@pithyjs/signals';
|
|
2
|
-
import { bindConditionals } from './binds/bindConditionals';
|
|
3
|
-
import { flashUpdate } from './binds/bindTextInterpolations';
|
|
4
|
-
import { bindSwitchBlock, bindSwitchCases } from './bindSwitchCases';
|
|
5
|
-
import { bindTemplateDirectives } from './compileTemplate';
|
|
6
|
-
import { bindForLoops } from './forLoops/bindForLoops';
|
|
7
|
-
import { pithyTreeToDom } from './pithyTreeToDom';
|
|
8
|
-
import { isSSRMode } from './ssrMode';
|
|
2
|
+
import { bindConditionals } from './binds/bindConditionals.js';
|
|
3
|
+
import { flashUpdate } from './binds/bindTextInterpolations.js';
|
|
4
|
+
import { bindSwitchBlock, bindSwitchCases } from './bindSwitchCases.js';
|
|
5
|
+
import { bindTemplateDirectives } from './compileTemplate.js';
|
|
6
|
+
import { bindForLoops } from './forLoops/bindForLoops.js';
|
|
7
|
+
import { pithyTreeToDom } from './pithyTreeToDom.js';
|
|
8
|
+
import { isSSRMode } from './ssrMode.js';
|
|
9
9
|
/**
|
|
10
10
|
* Builds the DOM for one `@if` or `@case` branch from its AST, binds it, and
|
|
11
11
|
* inserts it after `anchor`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PithyNode } from '@pithyjs/compiler';
|
|
2
|
-
import { type PithyComponentContext } from '../types/globals';
|
|
3
|
-
import type { ChildFactory } from '../runtime/bindings/types';
|
|
2
|
+
import { type PithyComponentContext } from '../types/globals.js';
|
|
3
|
+
import type { ChildFactory } from '../runtime/bindings/types.js';
|
|
4
4
|
/**
|
|
5
5
|
* If the registry renderer has set `globalThis.__pithyProjectedChildren` (a
|
|
6
6
|
* `DocumentFragment` of already-rendered slot children), returns and clears it —
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { compileNodes } from './compileNodes';
|
|
2
|
-
import { pithyGlobals } from '../types/globals';
|
|
1
|
+
import { compileNodes } from './compileNodes.js';
|
|
2
|
+
import { pithyGlobals } from '../types/globals.js';
|
|
3
3
|
/**
|
|
4
4
|
* If the registry renderer has set `globalThis.__pithyProjectedChildren` (a
|
|
5
5
|
* `DocumentFragment` of already-rendered slot children), returns and clears it —
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"risk": "high"
|
|
7
7
|
}
|
|
8
8
|
*/
|
|
9
|
-
import { pithyGlobals } from '../types/globals';
|
|
10
|
-
import { isSSRMode } from './ssrMode';
|
|
11
|
-
import { setBoundaryError } from './binds/bindErrorBoundary';
|
|
9
|
+
import { pithyGlobals } from '../types/globals.js';
|
|
10
|
+
import { isSSRMode } from './ssrMode.js';
|
|
11
|
+
import { setBoundaryError } from './binds/bindErrorBoundary.js';
|
|
12
12
|
/**
|
|
13
13
|
* Crashes recorded during the current server render, keyed by the placeholder
|
|
14
14
|
* element so a later binding pass over the same element can retract its own
|
package/dist/compile/ssrMode.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * from './compile';
|
|
3
|
-
export * from './runtime';
|
|
4
|
-
export * from './utilities';
|
|
5
|
-
export * from './interfaces';
|
|
6
|
-
export * from './a11y';
|
|
1
|
+
export * from './types/index.js';
|
|
2
|
+
export * from './compile/index.js';
|
|
3
|
+
export * from './runtime/index.js';
|
|
4
|
+
export * from './utilities/index.js';
|
|
5
|
+
export * from './interfaces/index.js';
|
|
6
|
+
export * from './a11y/index.js';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * from './compile';
|
|
3
|
-
export * from './runtime';
|
|
4
|
-
export * from './utilities';
|
|
5
|
-
export * from './interfaces';
|
|
6
|
-
export * from './a11y';
|
|
1
|
+
export * from './types/index.js';
|
|
2
|
+
export * from './compile/index.js';
|
|
3
|
+
export * from './runtime/index.js';
|
|
4
|
+
export * from './utilities/index.js';
|
|
5
|
+
export * from './interfaces/index.js';
|
|
6
|
+
export * from './a11y/index.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ref.interface';
|
|
2
|
-
export * from './ref-signal.interface';
|
|
1
|
+
export * from './ref.interface.js';
|
|
2
|
+
export * from './ref-signal.interface.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/interfaces/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './ref.interface';
|
|
2
|
-
export * from './ref-signal.interface';
|
|
1
|
+
export * from './ref.interface.js';
|
|
2
|
+
export * from './ref-signal.interface.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"category": "runtime"
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
|
-
import { type Desc, type EventDesc, type InterpDesc, type ClassDesc, type ClassesDesc, type StyleDesc, type BoundDesc, type RefDesc, type BindDesc, type CompDesc, type DeferDesc, type ErrorDesc, type ProjDesc, type IfDesc, type ForDesc, type SwitchDesc } from './bindings';
|
|
8
|
+
import { type Desc, type EventDesc, type InterpDesc, type ClassDesc, type ClassesDesc, type StyleDesc, type BoundDesc, type RefDesc, type BindDesc, type CompDesc, type DeferDesc, type ErrorDesc, type ProjDesc, type IfDesc, type ForDesc, type SwitchDesc } from './bindings/index.js';
|
|
9
9
|
export type { Desc, EventDesc, InterpDesc, ClassDesc, ClassesDesc, StyleDesc, BoundDesc, RefDesc, BindDesc, CompDesc, DeferDesc, ErrorDesc, ProjDesc, IfDesc, ForDesc, SwitchDesc, };
|
|
10
10
|
/**
|
|
11
11
|
* Applies pre-extracted binding descriptors to an AOT-generated DOM fragment.
|
|
@@ -28,8 +28,8 @@ export type { Desc, EventDesc, InterpDesc, ClassDesc, ClassesDesc, StyleDesc, Bo
|
|
|
28
28
|
* @param bindings - Array of binding descriptors from codegen
|
|
29
29
|
* @param context - Reactive context object with signals, methods, components
|
|
30
30
|
*/
|
|
31
|
-
/** @codexApi {"parent":"pithy.runtime.apply-bindings","name":"__applyBindings","stability":"experimental","signature":"(fragment: DocumentFragment, bindings: Desc[], context: Record<string, unknown
|
|
32
|
-
export declare function __applyBindings(fragment: DocumentFragment, bindings: Desc[], context: Record<string, unknown
|
|
31
|
+
/** @codexApi {"parent":"pithy.runtime.apply-bindings","name":"__applyBindings","stability":"experimental","signature":"(fragment: DocumentFragment, bindings: Desc[], context: Record<string, unknown>, ownsDestroyCallbacks?: boolean) => { el: DocumentFragment; destroy: () => void }"} */
|
|
32
|
+
export declare function __applyBindings(fragment: DocumentFragment, bindings: Desc[], context: Record<string, unknown>, ownsDestroyCallbacks?: boolean): {
|
|
33
33
|
el: DocumentFragment;
|
|
34
34
|
destroy: () => void;
|
|
35
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyBindings.d.ts","sourceRoot":"","sources":["../../src/runtime/applyBindings.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAIF,OAAO,EAmBL,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,OAAO,EACZ,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,IAAI,EACJ,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,UAAU,GACX,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,
|
|
1
|
+
{"version":3,"file":"applyBindings.d.ts","sourceRoot":"","sources":["../../src/runtime/applyBindings.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAIF,OAAO,EAmBL,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,OAAO,EACZ,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,IAAI,EACJ,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,UAAU,GACX,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,8RAA8R;AAC9R,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,IAAI,EAAE,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,oBAAoB,UAAO,GAC1B;IAAE,EAAE,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CA2I/C"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"category": "runtime"
|
|
6
6
|
}
|
|
7
7
|
*/
|
|
8
|
-
import { drainDestroyCallbacks } from './onDestroy';
|
|
9
|
-
import { clearSSRRenderCrash } from '../compile/ssrCrashes';
|
|
10
|
-
import { buildPidMap, buildCommentMap, mergeContexts, applyRef, applyError, applyProjection, applyComponent, applyBind, applyInterpolation, applyEvent, applyClass, applyClasses, applyStyle, applyBound, applyIf, applyFor, applySwitch, applyDefer, } from './bindings';
|
|
8
|
+
import { drainDestroyCallbacks } from './onDestroy.js';
|
|
9
|
+
import { clearSSRRenderCrash } from '../compile/ssrCrashes.js';
|
|
10
|
+
import { buildPidMap, buildCommentMap, mergeContexts, applyRef, applyError, applyProjection, applyComponent, applyBind, applyInterpolation, applyEvent, applyClass, applyClasses, applyStyle, applyBound, applyIf, applyFor, applySwitch, applyDefer, } from './bindings/index.js';
|
|
11
11
|
// ─── Main entry point ─────────────────────────────────────────────────────────
|
|
12
12
|
/**
|
|
13
13
|
* Applies pre-extracted binding descriptors to an AOT-generated DOM fragment.
|
|
@@ -30,12 +30,14 @@ import { buildPidMap, buildCommentMap, mergeContexts, applyRef, applyError, appl
|
|
|
30
30
|
* @param bindings - Array of binding descriptors from codegen
|
|
31
31
|
* @param context - Reactive context object with signals, methods, components
|
|
32
32
|
*/
|
|
33
|
-
/** @codexApi {"parent":"pithy.runtime.apply-bindings","name":"__applyBindings","stability":"experimental","signature":"(fragment: DocumentFragment, bindings: Desc[], context: Record<string, unknown
|
|
34
|
-
export function __applyBindings(fragment, bindings, context) {
|
|
33
|
+
/** @codexApi {"parent":"pithy.runtime.apply-bindings","name":"__applyBindings","stability":"experimental","signature":"(fragment: DocumentFragment, bindings: Desc[], context: Record<string, unknown>, ownsDestroyCallbacks?: boolean) => { el: DocumentFragment; destroy: () => void }"} */
|
|
34
|
+
export function __applyBindings(fragment, bindings, context, ownsDestroyCallbacks = true) {
|
|
35
35
|
// Drain onDestroy() callbacks BEFORE processing bindings — child components
|
|
36
36
|
// instantiated during binding will drain their own callbacks independently.
|
|
37
|
-
const destroyCallbacks = drainDestroyCallbacks();
|
|
37
|
+
const destroyCallbacks = ownsDestroyCallbacks ? drainDestroyCallbacks() : [];
|
|
38
38
|
const disposers = [];
|
|
39
|
+
if (bindings.length === 0)
|
|
40
|
+
return bindingsResult(fragment, disposers, destroyCallbacks);
|
|
39
41
|
// Merge parent component + async (SSR) contexts — AOT factories bypass html()
|
|
40
42
|
const ctx = mergeContexts(context);
|
|
41
43
|
// Build lookup maps
|
|
@@ -161,6 +163,9 @@ export function __applyBindings(fragment, bindings, context) {
|
|
|
161
163
|
}
|
|
162
164
|
throw err;
|
|
163
165
|
}
|
|
166
|
+
return bindingsResult(fragment, disposers, destroyCallbacks);
|
|
167
|
+
}
|
|
168
|
+
function bindingsResult(fragment, disposers, destroyCallbacks) {
|
|
164
169
|
return {
|
|
165
170
|
el: fragment,
|
|
166
171
|
destroy() {
|
|
@@ -183,6 +188,7 @@ export function __applyBindings(fragment, bindings, context) {
|
|
|
183
188
|
/* ignore disposal errors */
|
|
184
189
|
}
|
|
185
190
|
}
|
|
191
|
+
destroyCallbacks.length = 0;
|
|
186
192
|
},
|
|
187
193
|
};
|
|
188
194
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyBindings.js","sourceRoot":"","sources":["../../src/runtime/applyBindings.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAEF,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,QAAQ,EACR,UAAU,EACV,eAAe,EACf,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,UAAU,GAiBX,MAAM,YAAY,CAAC;AAsBpB,iFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,
|
|
1
|
+
{"version":3,"file":"applyBindings.js","sourceRoot":"","sources":["../../src/runtime/applyBindings.ts"],"names":[],"mappings":"AAAA;;;;;;EAME;AAEF,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,QAAQ,EACR,UAAU,EACV,eAAe,EACf,cAAc,EACd,SAAS,EACT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