@hyperframes/core 0.7.99 → 0.7.100

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.
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Composition assembly decisions — the questions both assembly paths answer.
3
+ *
4
+ * A composition is assembled twice in this repo: `compiler/inlineSubCompositions.ts`
5
+ * assembles it for rendering (Node, linkedom, synchronous, emits strings) and
6
+ * `runtime/compositionLoader.ts` assembles it for mounting (browser, fetch, live
7
+ * DOM, executes scripts). Their I/O is genuinely different; their *decisions* are
8
+ * not. This module owns the decisions:
9
+ *
10
+ * - which nodes are a composition's asset sources, and in what order
11
+ * - which `<head>` elements hoist into the host document
12
+ * - the composition's scope identity (CSS scope, script scope, authored root id)
13
+ * - which nodes carry the composition's declared variable defaults
14
+ * - how nested `data-composition-src` hosts are enumerated
15
+ *
16
+ * It is deliberately DOM-free, filesystem-free and network-free: the runtime is
17
+ * bundled by esbuild into the IIFE published to a CDN, so anything reachable
18
+ * from `runtime/entry.ts` ships to every viewer. It takes narrow structural
19
+ * types instead of `Document`/`Element` for the same reason `compositionScoping.ts`
20
+ * takes strings — so both a linkedom document and a live browser document
21
+ * satisfy it without an `as T` cast at either call site.
22
+ */
23
+ /**
24
+ * The compiler's nesting cap, enforced against the ancestry chain rather than a
25
+ * counter so a wide tree is not penalised for a deep sibling.
26
+ */
27
+ export declare const MAX_SUB_COMPOSITION_DEPTH = 20;
28
+ /** An element this module only ever reads attributes from. */
29
+ export interface AssemblyAttributed {
30
+ getAttribute(name: string): string | null;
31
+ }
32
+ /** A node this module only ever searches with a CSS selector. */
33
+ export interface AssemblyQueryable<TElement> {
34
+ querySelectorAll(selectors: string): Iterable<TElement>;
35
+ }
36
+ export interface CompositionAssemblyInput<TElement extends AssemblyAttributed> {
37
+ /**
38
+ * The composition's content: a `<template>`'s content when the composition is
39
+ * templated, the parsed document's `<body>` otherwise.
40
+ *
41
+ * Asset sources are collected from the WHOLE content node, never from the
42
+ * composition root alone. The canonical authored shape puts `<style>`/`<script>`
43
+ * as SIBLINGS of the root inside `<template>`; scanning only the root dropped a
44
+ * composition's entire stylesheet on mount while its render stayed correct.
45
+ */
46
+ contentNode: AssemblyQueryable<TElement>;
47
+ /**
48
+ * The parsed document's `<head>`, when the composition was loaded as a full
49
+ * HTML document. Omit it for an inline `<template>`, which has no head of its
50
+ * own.
51
+ */
52
+ head?: AssemblyQueryable<TElement> | null;
53
+ /**
54
+ * The parsed document's `<html>` element, when there is one. It is the first
55
+ * variable-default carrier; see `variableDefaultCarriers`.
56
+ */
57
+ documentElement?: TElement | null;
58
+ /**
59
+ * True when `contentNode` came from a `<template>`. A templated composition's
60
+ * `<head>` styles and scripts are not part of the composition — the template
61
+ * already carries everything it needs — so they are not collected.
62
+ */
63
+ hasTemplate: boolean;
64
+ /**
65
+ * The composition id the host asks this composition to mount as, or `null` for
66
+ * an anonymous host.
67
+ */
68
+ compositionId: string | null;
69
+ }
70
+ export interface CompositionAssemblyPlan<TElement extends AssemblyAttributed> {
71
+ /**
72
+ * The composition root inside `contentNode`. Matched on an EXACT id when the
73
+ * host names one — a template may intentionally use a different local id (a
74
+ * `captions-comp` host mounting a `captions` template), and flattening that
75
+ * fallback root changes the assembled DOM. Anonymous hosts fall back to the
76
+ * first root in the content.
77
+ */
78
+ innerRoot: TElement | null;
79
+ /**
80
+ * The id CSS is scoped to: the host's id when it names one, otherwise the id
81
+ * declared inside the content.
82
+ */
83
+ authoredCompositionId: string | null;
84
+ /**
85
+ * The id composition scripts are scoped to. It differs from
86
+ * `authoredCompositionId` only when a host names an id that no root inside the
87
+ * content declares: CSS stays on the host's id while scripts follow the id the
88
+ * content actually declares, so a script's self-referencing
89
+ * `querySelector('[data-composition-id="X"]')` still resolves.
90
+ */
91
+ scriptCompositionId: string | null;
92
+ /** The `id` attribute authored on the composition root, if any. */
93
+ authoredRootId: string | null;
94
+ /** `<style>` sources in injection order: head-sourced first, then content. */
95
+ styleSources: TElement[];
96
+ /**
97
+ * `<script>` sources in execution order: head-sourced first, then content. A
98
+ * head script (a GSAP CDN tag in a non-templated composition) has to run
99
+ * before the content scripts that call into it.
100
+ */
101
+ scriptSources: TElement[];
102
+ /** `<head>` links to hoist into the host document. */
103
+ linkSources: TElement[];
104
+ /**
105
+ * Nodes that may declare the composition's variable defaults, in precedence
106
+ * order — later wins. Full-document compositions declare on `<html>`;
107
+ * template/fragment compositions declare on the `[data-composition-id]` root
108
+ * div, because they have no `<html>` of their own. Callers read the declared
109
+ * defaults off each carrier and merge left to right.
110
+ */
111
+ variableDefaultCarriers: TElement[];
112
+ }
113
+ /**
114
+ * Answer, for one composition, where its assets come from, in what order, and
115
+ * how it is identified. Pure: it reads attributes and runs selectors, and does
116
+ * not mutate, fetch, or touch a filesystem.
117
+ */
118
+ export declare function planCompositionAssembly<TElement extends AssemblyAttributed>(input: CompositionAssemblyInput<TElement>): CompositionAssemblyPlan<TElement>;
119
+ export type NestedHostSkipReason = "circular composition reference" | "nesting depth exceeded";
120
+ export interface NestedCompositionHost<TElement> {
121
+ host: TElement;
122
+ src: string;
123
+ }
124
+ export interface NestedCompositionHosts<TElement> {
125
+ hosts: NestedCompositionHost<TElement>[];
126
+ skipped: {
127
+ src: string;
128
+ reason: NestedHostSkipReason;
129
+ }[];
130
+ }
131
+ /**
132
+ * Enumerate the sub-composition hosts nested inside a composition that has just
133
+ * been assembled, refusing the two shapes that do not terminate.
134
+ *
135
+ * `ancestry` is the chain down to and including the assembled composition's own
136
+ * `src`, so a top-level host is enumerated with `[itsOwnSrc]`.
137
+ */
138
+ export declare function enumerateNestedCompositionHosts<TElement extends AssemblyAttributed>(assembledHost: AssemblyQueryable<TElement>, ancestry: readonly string[]): NestedCompositionHosts<TElement>;
139
+ //# sourceMappingURL=compositionAssembly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compositionAssembly.d.ts","sourceRoot":"","sources":["../../src/compiler/compositionAssembly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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GAIG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,SAAS,kBAAkB,EACzE,KAAK,EAAE,wBAAwB,CAAC,QAAQ,CAAC,GACxC,uBAAuB,CAAC,QAAQ,CAAC,CAmCnC;AAMD,MAAM,MAAM,oBAAoB,GAAG,gCAAgC,GAAG,wBAAwB,CAAC;AAE/F,MAAM,WAAW,qBAAqB,CAAC,QAAQ;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB,CAAC,QAAQ;IAC9C,KAAK,EAAE,qBAAqB,CAAC,QAAQ,CAAC,EAAE,CAAC;IACzC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,oBAAoB,CAAA;KAAE,EAAE,CAAC;CAC1D;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,SAAS,kBAAkB,EACjF,aAAa,EAAE,iBAAiB,CAAC,QAAQ,CAAC,EAC1C,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,sBAAsB,CAAC,QAAQ,CAAC,CAmBlC"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Composition assembly decisions — the questions both assembly paths answer.
3
+ *
4
+ * A composition is assembled twice in this repo: `compiler/inlineSubCompositions.ts`
5
+ * assembles it for rendering (Node, linkedom, synchronous, emits strings) and
6
+ * `runtime/compositionLoader.ts` assembles it for mounting (browser, fetch, live
7
+ * DOM, executes scripts). Their I/O is genuinely different; their *decisions* are
8
+ * not. This module owns the decisions:
9
+ *
10
+ * - which nodes are a composition's asset sources, and in what order
11
+ * - which `<head>` elements hoist into the host document
12
+ * - the composition's scope identity (CSS scope, script scope, authored root id)
13
+ * - which nodes carry the composition's declared variable defaults
14
+ * - how nested `data-composition-src` hosts are enumerated
15
+ *
16
+ * It is deliberately DOM-free, filesystem-free and network-free: the runtime is
17
+ * bundled by esbuild into the IIFE published to a CDN, so anything reachable
18
+ * from `runtime/entry.ts` ships to every viewer. It takes narrow structural
19
+ * types instead of `Document`/`Element` for the same reason `compositionScoping.ts`
20
+ * takes strings — so both a linkedom document and a live browser document
21
+ * satisfy it without an `as T` cast at either call site.
22
+ */
23
+ const COMPOSITION_ID_ATTR = "data-composition-id";
24
+ const COMPOSITION_SRC_ATTR = "data-composition-src";
25
+ const COMPOSITION_ROOT_SELECTOR = `[${COMPOSITION_ID_ATTR}]`;
26
+ const COMPOSITION_HOST_SELECTOR = `[${COMPOSITION_SRC_ATTR}]`;
27
+ const STYLE_SELECTOR = "style";
28
+ const SCRIPT_SELECTOR = "script";
29
+ /**
30
+ * `<head>` links both paths hoist into the host document. Stylesheets carry
31
+ * webfonts a composition's CSS depends on; preconnects are their latency hint.
32
+ */
33
+ const HOISTED_LINK_SELECTOR = 'link[rel="stylesheet"], link[rel="preconnect"]';
34
+ /**
35
+ * The compiler's nesting cap, enforced against the ancestry chain rather than a
36
+ * counter so a wide tree is not penalised for a deep sibling.
37
+ */
38
+ export const MAX_SUB_COMPOSITION_DEPTH = 20;
39
+ // ---------------------------------------------------------------------------
40
+ // Decisions
41
+ // ---------------------------------------------------------------------------
42
+ function toArray(items) {
43
+ return items ? Array.from(items) : [];
44
+ }
45
+ /**
46
+ * Answer, for one composition, where its assets come from, in what order, and
47
+ * how it is identified. Pure: it reads attributes and runs selectors, and does
48
+ * not mutate, fetch, or touch a filesystem.
49
+ */
50
+ export function planCompositionAssembly(input) {
51
+ const { contentNode, head, documentElement, hasTemplate, compositionId } = input;
52
+ const compositionRoots = toArray(contentNode.querySelectorAll(COMPOSITION_ROOT_SELECTOR));
53
+ const innerRoot = compositionId
54
+ ? (compositionRoots.find((root) => root.getAttribute(COMPOSITION_ID_ATTR) === compositionId) ??
55
+ null)
56
+ : (compositionRoots[0] ?? null);
57
+ // The id declared inside the content, even when the host asked for a
58
+ // different one. `innerRoot` is preferred so an exact match always wins.
59
+ const declaredCompositionId = (innerRoot ?? compositionRoots[0])?.getAttribute(COMPOSITION_ID_ATTR)?.trim() || "";
60
+ // A templated composition's <head> belongs to its host page, not to it.
61
+ const assetHead = hasTemplate ? null : (head ?? null);
62
+ return {
63
+ innerRoot,
64
+ authoredCompositionId: compositionId || declaredCompositionId || null,
65
+ scriptCompositionId: declaredCompositionId || compositionId || null,
66
+ authoredRootId: innerRoot?.getAttribute("id")?.trim() || null,
67
+ styleSources: [
68
+ ...toArray(assetHead?.querySelectorAll(STYLE_SELECTOR)),
69
+ ...toArray(contentNode.querySelectorAll(STYLE_SELECTOR)),
70
+ ],
71
+ scriptSources: [
72
+ ...toArray(assetHead?.querySelectorAll(SCRIPT_SELECTOR)),
73
+ ...toArray(contentNode.querySelectorAll(SCRIPT_SELECTOR)),
74
+ ],
75
+ linkSources: toArray(head?.querySelectorAll(HOISTED_LINK_SELECTOR)),
76
+ variableDefaultCarriers: [documentElement, innerRoot].filter((carrier) => carrier != null),
77
+ };
78
+ }
79
+ /**
80
+ * Enumerate the sub-composition hosts nested inside a composition that has just
81
+ * been assembled, refusing the two shapes that do not terminate.
82
+ *
83
+ * `ancestry` is the chain down to and including the assembled composition's own
84
+ * `src`, so a top-level host is enumerated with `[itsOwnSrc]`.
85
+ */
86
+ export function enumerateNestedCompositionHosts(assembledHost, ancestry) {
87
+ const hosts = [];
88
+ const skipped = [];
89
+ for (const nestedHost of assembledHost.querySelectorAll(COMPOSITION_HOST_SELECTOR)) {
90
+ const src = nestedHost.getAttribute(COMPOSITION_SRC_ATTR);
91
+ if (!src)
92
+ continue;
93
+ if (ancestry.includes(src)) {
94
+ skipped.push({ src, reason: "circular composition reference" });
95
+ continue;
96
+ }
97
+ if (ancestry.length >= MAX_SUB_COMPOSITION_DEPTH) {
98
+ skipped.push({ src, reason: "nesting depth exceeded" });
99
+ continue;
100
+ }
101
+ hosts.push({ host: nestedHost, src });
102
+ }
103
+ return { hosts, skipped };
104
+ }
105
+ //# sourceMappingURL=compositionAssembly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comp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AE1B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;;;;;OAOG;IACH,oBAAoB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACnE;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,WAAW,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5F,aAAa,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrE,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC1D;AAeD;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,OAAO,EAAE,EAChB,OAAO,EAAE,4BAA4B,GACpC,2BAA2B,CAgR7B"}
@@ -8,9 +8,9 @@
8
8
  * `data-composition-file`).
9
9
  */
10
10
  import { rewriteAssetPath, rewriteAssetPaths, rewriteCssAssetUrls, rewriteInlineStyleAssetUrls, } from "./rewriteSubCompPaths.js";
11
- import { queryByAttr } from "../utils/cssSelector.js";
12
11
  import { scopeCssToComposition, wrapInlineScriptWithErrorBoundary, wrapScopedCompositionScript, } from "./compositionScoping.js";
13
12
  import { checkSubCompositionUsability } from "@hyperframes/parsers/sub-composition-validity";
13
+ import { enumerateNestedCompositionHosts, planCompositionAssembly } from "./compositionAssembly.js";
14
14
  // ---------------------------------------------------------------------------
15
15
  // Default helpers
16
16
  // ---------------------------------------------------------------------------
@@ -18,7 +18,6 @@ function defaultBuildScopeSelector(compId) {
18
18
  const escaped = compId.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
19
19
  return `[data-composition-id="${escaped}"]`;
20
20
  }
21
- const MAX_SUB_COMPOSITION_DEPTH = 20;
22
21
  // ---------------------------------------------------------------------------
23
22
  // Core implementation
24
23
  // ---------------------------------------------------------------------------
@@ -97,31 +96,32 @@ export function inlineSubCompositions(document, hosts, options) {
97
96
  onMissingComposition?.(src);
98
97
  continue;
99
98
  }
100
- // Keep structural flattening tied to an exact mount-id match. A template
101
- // may intentionally use a different local id (for example, a
102
- // `captions-comp` host mounting a `captions` template); flattening that
103
- // fallback root changes the compiled DOM and can invalidate selectors and
104
- // regression goldens. Discover it separately so script timeline
105
- // registration can still map the authored id onto the runtime mount id.
106
- const innerRoot = compId
107
- ? queryByAttr(contentDoc, "data-composition-id", compId)
108
- : contentDoc.querySelector("[data-composition-id]");
109
- const authoredCompositionRoot = innerRoot ?? contentDoc.querySelector("[data-composition-id]");
110
- const inferredCompId = authoredCompositionRoot?.getAttribute("data-composition-id")?.trim() || "";
111
- const authoredRootId = innerRoot?.getAttribute("id")?.trim() || null;
112
- const scopeCompId = compId || inferredCompId;
113
- const scriptCompositionId = inferredCompId || scopeCompId;
99
+ // Which node is the composition root, which id its CSS scopes to, which
100
+ // id its scripts scope to, where its assets come from and in what order —
101
+ // every one of those is decided by the shared assembly module, so the mount
102
+ // path in runtime/compositionLoader.ts decides them the same way.
103
+ const plan = planCompositionAssembly({
104
+ contentNode: contentDoc,
105
+ head: compDoc.head,
106
+ documentElement: compDoc.documentElement,
107
+ hasTemplate: Boolean(contentRoot),
108
+ compositionId: compId,
109
+ });
110
+ const innerRoot = plan.innerRoot;
111
+ const authoredRootId = plan.authoredRootId;
112
+ const scopeCompId = plan.authoredCompositionId || "";
113
+ const scriptCompositionId = plan.scriptCompositionId || "";
114
114
  const runtimeScope = runtimeCompId ? buildScopeSelector(runtimeCompId) : "";
115
115
  // Variable merging (bundler feature). Read declared defaults from the
116
116
  // document element (full-document sub-comps) AND the inner composition root
117
117
  // (template/fragment sub-comps store their schema on the root div, not a
118
118
  // synthetic <html>), then let per-instance host values override.
119
119
  if (readVariableDefaults && parseHostVariables && runtimeCompId) {
120
- const mergedVariables = {
121
- ...readVariableDefaults(compDoc.documentElement),
122
- ...(innerRoot ? readVariableDefaults(innerRoot) : {}),
123
- ...parseHostVariables(hostEl),
124
- };
120
+ const mergedVariables = {};
121
+ for (const carrier of plan.variableDefaultCarriers) {
122
+ Object.assign(mergedVariables, readVariableDefaults(carrier));
123
+ }
124
+ Object.assign(mergedVariables, parseHostVariables(hostEl));
125
125
  if (Object.keys(mergedVariables).length > 0) {
126
126
  variablesByComp[runtimeCompId] = mergedVariables;
127
127
  }
@@ -142,45 +142,33 @@ export function inlineSubCompositions(document, hosts, options) {
142
142
  })
143
143
  : css;
144
144
  };
145
- // When a sub-composition is a full HTML document (no <template>), styles
146
- // and scripts in <head> are not part of contentDoc (which only has body
147
- // content). Extract them so backgrounds, positioning, fonts, and library
148
- // scripts (e.g. GSAP CDN) are not silently dropped.
149
- if (!contentRoot && compDoc.head) {
150
- for (const s of [...compDoc.head.querySelectorAll("style")]) {
151
- styles.push(scopeSubStyle(s.textContent || ""));
152
- }
153
- for (const s of [...compDoc.head.querySelectorAll("script")]) {
154
- const externalSrc = resolveSubAssetPath(s.getAttribute("src"));
155
- if (externalSrc) {
156
- if (!externalScriptSrcs.includes(externalSrc)) {
157
- externalScriptSrcs.push(externalSrc);
158
- }
159
- scriptItems.push({ kind: "external", src: externalSrc });
160
- }
161
- }
162
- for (const link of [
163
- ...compDoc.head.querySelectorAll('link[rel="stylesheet"], link[rel="preconnect"]'),
164
- ]) {
165
- const href = resolveSubAssetPath(link.getAttribute("href"));
166
- if (href && !seenLinkHrefs.has(href)) {
167
- seenLinkHrefs.add(href);
168
- const rel = (link.getAttribute("rel") || "").trim();
169
- const crossorigin = link.hasAttribute("crossorigin")
170
- ? link.getAttribute("crossorigin") || ""
171
- : undefined;
172
- externalLinks.push({ href, rel, crossorigin });
173
- }
145
+ // <link> hoisting is unconditional. A templated sub-composition's webfont
146
+ // link is as load-bearing as a non-templated one's, and the mount path has
147
+ // always hoisted both; gating this on `!contentRoot` dropped a templated
148
+ // composition's font from the render while preview kept it.
149
+ for (const link of plan.linkSources) {
150
+ const href = resolveSubAssetPath(link.getAttribute("href"));
151
+ if (href && !seenLinkHrefs.has(href)) {
152
+ seenLinkHrefs.add(href);
153
+ const rel = (link.getAttribute("rel") || "").trim();
154
+ const crossorigin = link.hasAttribute("crossorigin")
155
+ ? link.getAttribute("crossorigin") || ""
156
+ : undefined;
157
+ externalLinks.push({ href, rel, crossorigin });
174
158
  }
175
159
  }
176
- // Extract styles from content
177
- for (const s of [...contentDoc.querySelectorAll("style")]) {
178
- styles.push(scopeSubStyle(s.textContent || ""));
179
- s.remove();
160
+ // Head-sourced assets come first: a non-templated sub-composition's <head>
161
+ // carries its backgrounds, positioning and fonts, and a <head> library tag
162
+ // (GSAP from a CDN) has to run before the content scripts calling into it.
163
+ for (const styleEl of plan.styleSources) {
164
+ styles.push(scopeSubStyle(styleEl.textContent || ""));
165
+ styleEl.remove();
180
166
  }
181
- // Extract scripts from content
182
- for (const s of [...contentDoc.querySelectorAll("script")]) {
183
- const externalSrc = resolveSubAssetPath(s.getAttribute("src"));
167
+ // Head- and content-sourced scripts take the same branch. The head loop
168
+ // used to handle only `src`, so an inline <head> script was silently
169
+ // discarded on render while the mount path executed it.
170
+ for (const scriptEl of plan.scriptSources) {
171
+ const externalSrc = resolveSubAssetPath(scriptEl.getAttribute("src"));
184
172
  if (externalSrc) {
185
173
  if (!externalScriptSrcs.includes(externalSrc)) {
186
174
  externalScriptSrcs.push(externalSrc);
@@ -189,12 +177,12 @@ export function inlineSubCompositions(document, hosts, options) {
189
177
  }
190
178
  else {
191
179
  const wrappedScript = scriptCompositionId
192
- ? wrapScopedCompositionScript(s.textContent || "", scriptCompositionId, scriptErrorLabel, runtimeScope || undefined, runtimeCompId || scopeCompId || scriptCompositionId, authoredRootId)
193
- : wrapInlineScriptWithErrorBoundary(s.textContent || "", scriptErrorLabel);
180
+ ? wrapScopedCompositionScript(scriptEl.textContent || "", scriptCompositionId, scriptErrorLabel, runtimeScope || undefined, runtimeCompId || scopeCompId || scriptCompositionId, authoredRootId)
181
+ : wrapInlineScriptWithErrorBoundary(scriptEl.textContent || "", scriptErrorLabel);
194
182
  scripts.push(wrappedScript);
195
183
  scriptItems.push({ kind: "inline", content: wrappedScript });
196
184
  }
197
- s.remove();
185
+ scriptEl.remove();
198
186
  }
199
187
  // Rewrite relative asset paths before inlining so ../foo.svg from
200
188
  // compositions/ resolves correctly when the content moves to root.
@@ -232,7 +220,7 @@ export function inlineSubCompositions(document, hosts, options) {
232
220
  child.remove();
233
221
  if (flattenInnerRoot) {
234
222
  const prepared = flattenInnerRoot(innerRoot);
235
- if (!compId && inferredCompId) {
223
+ if (!compId && scopeCompId) {
236
224
  // Anonymous host: flattenInnerRoot strips data-composition-id,
237
225
  // assuming the host already carries the composition's identity.
238
226
  // When the host has none, nothing in the render DOM matches the
@@ -240,7 +228,7 @@ export function inlineSubCompositions(document, hosts, options) {
240
228
  // (e.g. document.querySelector('[data-composition-id="X"]')).
241
229
  // Restore it on the wrapper so both keep resolving, same as
242
230
  // before flattening preserved it via outerHTML.
243
- prepared.setAttribute("data-composition-id", inferredCompId);
231
+ prepared.setAttribute("data-composition-id", scopeCompId);
244
232
  }
245
233
  hostEl.innerHTML = prepared.outerHTML || "";
246
234
  }
@@ -266,19 +254,12 @@ export function inlineSubCompositions(document, hosts, options) {
266
254
  hostEl.setAttribute("data-composition-file", src);
267
255
  hostEl.removeAttribute("data-composition-src");
268
256
  const nestedAncestry = [...ancestry, src];
269
- for (const nestedHost of [...hostEl.querySelectorAll("[data-composition-src]")]) {
270
- const nestedSrc = nestedHost.getAttribute("data-composition-src");
271
- if (!nestedSrc)
272
- continue;
273
- if (nestedAncestry.includes(nestedSrc)) {
274
- onMissingComposition?.(nestedSrc, "circular composition reference");
275
- continue;
276
- }
277
- if (nestedAncestry.length >= MAX_SUB_COMPOSITION_DEPTH) {
278
- onMissingComposition?.(nestedSrc, "nesting depth exceeded");
279
- continue;
280
- }
281
- queue.push({ element: nestedHost, ancestry: nestedAncestry });
257
+ const nested = enumerateNestedCompositionHosts(hostEl, nestedAncestry);
258
+ for (const skipped of nested.skipped) {
259
+ onMissingComposition?.(skipped.src, skipped.reason);
260
+ }
261
+ for (const nestedHost of nested.hosts) {
262
+ queue.push({ element: nestedHost.host, ancestry: nestedAncestry });
282
263
  }
283
264
  }
284
265
  return { styles, scripts, externalScriptSrcs, scriptItems, externalLinks, variablesByComp };
@@ -1 +1 @@
1
- {"version":3,"file":"inlineSubCompositions.js","sourceRoot":"","sources":["../../src/compiler/inlineSubCompositions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,GAE5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EACL,qBAAqB,EACrB,iCAAiC,EACjC,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AA+G7F,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E,SAAS,yBAAyB,CAAC,MAAc;IAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACnE,OAAO,yBAAyB,OAAO,IAAI,CAAC;AAC9C,CAAC;AAED,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAErC,8EAA8E;A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