@vmz/core 0.3.11 → 0.3.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.
@@ -419,11 +419,17 @@ export const directApi = {
419
419
  // Enter the host's private child pool so nested create cannot see uncle siblings.
420
420
  const adopt = directApi._resumeAdopt;
421
421
  const entered = adopt && typeof adopt.enter === 'function' ? adopt.enter(host) : false;
422
+ // A child nested inside the parent's `v-for` must not feed the parent item
423
+ // patch sink: those patches belong to the child instance (`this`) and the
424
+ // parent's each replays them with the parent host, wiping child output.
425
+ const prevItemPatches = directApi._itemPatches;
426
+ directApi._itemPatches = null;
422
427
  let node;
423
428
  try {
424
429
  node = runDirectCreate(Ctor, child);
425
430
  }
426
431
  finally {
432
+ directApi._itemPatches = prevItemPatches;
427
433
  if (entered && adopt && typeof adopt.leave === 'function')
428
434
  adopt.leave();
429
435
  }
@@ -447,6 +447,20 @@ function contentType(filePath, nodePath) {
447
447
  return 'image/svg+xml';
448
448
  case '.map':
449
449
  return 'application/json; charset=utf-8';
450
+ case '.wasm':
451
+ return 'application/wasm';
452
+ case '.woff2':
453
+ return 'font/woff2';
454
+ case '.woff':
455
+ return 'font/woff';
456
+ case '.otf':
457
+ return 'font/otf';
458
+ case '.ttf':
459
+ return 'font/ttf';
460
+ case '.xml':
461
+ return 'application/xml';
462
+ case '.txt':
463
+ return 'text/plain; charset=utf-8';
450
464
  default:
451
465
  return 'application/octet-stream';
452
466
  }
@@ -692,7 +692,13 @@ const serializeApi = {
692
692
  const child = serializeApi._ssrChildInstance(Ctor, resolved);
693
693
  if (Ctor.__vmzDirect && typeof Ctor.__vmzCreate === 'function') {
694
694
  const prev = serializeApi._inst;
695
+ // A child nested inside the parent's `v-for` must not feed the parent
696
+ // item patch sink: those patches belong to the child instance (`this`).
697
+ // Replaying them with the parent's each host clears child output
698
+ // (innerHTML / text) that was already correct at create time.
699
+ const prevItemPatches = serializeApi._itemPatches;
695
700
  serializeApi._inst = child;
701
+ serializeApi._itemPatches = null;
696
702
  try {
697
703
  const node = Ctor.__vmzCreate.call(child, serializeApi);
698
704
  const attrs = { 'data-vmz': name };
@@ -712,6 +718,7 @@ const serializeApi = {
712
718
  }
713
719
  finally {
714
720
  serializeApi._inst = prev;
721
+ serializeApi._itemPatches = prevItemPatches;
715
722
  }
716
723
  }
717
724
  throw new Error(`vmz:dom serialize component <${name}> requires __vmzCreate (rebuild child with Direct)`);
package/package.json CHANGED
@@ -68,12 +68,12 @@
68
68
  "main": "./dist/faces/server.js",
69
69
  "name": "@vmz/core",
70
70
  "optionalDependencies": {
71
- "@vmz/vmz-darwin-arm64": "0.3.11",
72
- "@vmz/vmz-darwin-x64": "0.3.11",
73
- "@vmz/vmz-linux-arm64": "0.3.11",
74
- "@vmz/vmz-linux-x64": "0.3.11",
75
- "@vmz/vmz-win32-arm64": "0.3.11",
76
- "@vmz/vmz-win32-x64": "0.3.11"
71
+ "@vmz/vmz-darwin-arm64": "0.3.12",
72
+ "@vmz/vmz-darwin-x64": "0.3.12",
73
+ "@vmz/vmz-linux-arm64": "0.3.12",
74
+ "@vmz/vmz-linux-x64": "0.3.12",
75
+ "@vmz/vmz-win32-arm64": "0.3.12",
76
+ "@vmz/vmz-win32-x64": "0.3.12"
77
77
  },
78
78
  "publishConfig": {
79
79
  "access": "public"
@@ -88,5 +88,5 @@
88
88
  },
89
89
  "type": "module",
90
90
  "types": "./dist/faces/index.d.ts",
91
- "version": "0.3.11"
91
+ "version": "0.3.12"
92
92
  }