@hyperframes/core 0.9.10 → 0.9.12

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.
@@ -29,8 +29,8 @@ export interface InlineSubCompositionsOptions {
29
29
  parseHtml: (html: string) => Document;
30
30
  /**
31
31
  * Identity map produced by `assignBundledRuntimeCompositionIds`.
32
- * When provided, authoredCompositionId and runtimeCompositionId are read
33
- * from this map instead of from the host element's attributes directly.
32
+ * When provided, a host's ids are read from this map; a host it lacks (one
33
+ * inside a scene) is read from its own attributes, as without a map.
34
34
  * The bundler uses this; the producer can omit it.
35
35
  */
36
36
  hostIdentityMap?: Map<Element, {
@@ -263,10 +263,10 @@ export function inlineSubCompositions(document, hosts, options) {
263
263
  // Determine composition IDs
264
264
  let compId;
265
265
  let runtimeCompId;
266
- if (hostIdentityMap) {
267
- const identity = hostIdentityMap.get(hostEl);
268
- compId = identity?.authoredCompositionId || null;
269
- runtimeCompId = identity?.runtimeCompositionId || compId || "";
266
+ const identity = hostIdentityMap?.get(hostEl);
267
+ if (identity) {
268
+ compId = identity.authoredCompositionId || null;
269
+ runtimeCompId = identity.runtimeCompositionId || compId || "";
270
270
  }
271
271
  else {
272
272
  compId = hostEl.getAttribute("data-composition-id") || null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/core",
3
- "version": "0.9.10",
3
+ "version": "0.9.12",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -437,9 +437,9 @@
437
437
  "linkedom": "^0.18.12",
438
438
  "postcss": "^8.5.8",
439
439
  "wawoff2": "^2.0.1",
440
- "@hyperframes/lint": "0.9.10",
441
- "@hyperframes/studio-server": "0.9.10",
442
- "@hyperframes/parsers": "0.9.10"
440
+ "@hyperframes/lint": "0.9.12",
441
+ "@hyperframes/studio-server": "0.9.12",
442
+ "@hyperframes/parsers": "0.9.12"
443
443
  },
444
444
  "devDependencies": {
445
445
  "@fontsource/archivo-black": "^5.2.8",