@stencil/core 4.28.2-dev.1742328872.ce86124 → 4.28.2-dev.1742360514.37ac3fc

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.
@@ -472,131 +472,6 @@ var import_app_data17 = require("@stencil/core/internal/app-data");
472
472
  // src/runtime/client-hydrate.ts
473
473
  var import_app_data5 = require("@stencil/core/internal/app-data");
474
474
 
475
- // src/hydrate/runner/serialize.ts
476
- var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
477
- PrimitiveType2["Undefined"] = "undefined";
478
- PrimitiveType2["Null"] = "null";
479
- PrimitiveType2["String"] = "string";
480
- PrimitiveType2["Number"] = "number";
481
- PrimitiveType2["SpecialNumber"] = "number";
482
- PrimitiveType2["Boolean"] = "boolean";
483
- PrimitiveType2["BigInt"] = "bigint";
484
- return PrimitiveType2;
485
- })(PrimitiveType || {});
486
- var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
487
- NonPrimitiveType2["Array"] = "array";
488
- NonPrimitiveType2["Date"] = "date";
489
- NonPrimitiveType2["Map"] = "map";
490
- NonPrimitiveType2["Object"] = "object";
491
- NonPrimitiveType2["RegularExpression"] = "regexp";
492
- NonPrimitiveType2["Set"] = "set";
493
- NonPrimitiveType2["Channel"] = "channel";
494
- NonPrimitiveType2["Symbol"] = "symbol";
495
- return NonPrimitiveType2;
496
- })(NonPrimitiveType || {});
497
- var TYPE_CONSTANT = "type";
498
- var VALUE_CONSTANT = "value";
499
- var SERIALIZED_PREFIX = "serialized:";
500
- function deserializeProperty(value) {
501
- if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
502
- return value;
503
- }
504
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
505
- }
506
- var RemoteValue = class _RemoteValue {
507
- /**
508
- * Deserializes a LocalValue serialized object back to its original JavaScript representation
509
- *
510
- * @param serialized The serialized LocalValue object
511
- * @returns The original JavaScript value/object
512
- */
513
- static fromLocalValue(serialized) {
514
- const type = serialized[TYPE_CONSTANT];
515
- const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
516
- switch (type) {
517
- case "string" /* String */:
518
- return value;
519
- case "boolean" /* Boolean */:
520
- return value;
521
- case "bigint" /* BigInt */:
522
- return BigInt(value);
523
- case "undefined" /* Undefined */:
524
- return void 0;
525
- case "null" /* Null */:
526
- return null;
527
- case "number" /* Number */:
528
- if (value === "NaN") return NaN;
529
- if (value === "-0") return -0;
530
- if (value === "Infinity") return Infinity;
531
- if (value === "-Infinity") return -Infinity;
532
- return value;
533
- case "array" /* Array */:
534
- return value.map((item) => _RemoteValue.fromLocalValue(item));
535
- case "date" /* Date */:
536
- return new Date(value);
537
- case "map" /* Map */:
538
- const map2 = /* @__PURE__ */ new Map();
539
- for (const [key, val] of value) {
540
- const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
541
- const deserializedValue = _RemoteValue.fromLocalValue(val);
542
- map2.set(deserializedKey, deserializedValue);
543
- }
544
- return map2;
545
- case "object" /* Object */:
546
- const obj = {};
547
- for (const [key, val] of value) {
548
- obj[key] = _RemoteValue.fromLocalValue(val);
549
- }
550
- return obj;
551
- case "regexp" /* RegularExpression */:
552
- const { pattern, flags } = value;
553
- return new RegExp(pattern, flags);
554
- case "set" /* Set */:
555
- const set = /* @__PURE__ */ new Set();
556
- for (const item of value) {
557
- set.add(_RemoteValue.fromLocalValue(item));
558
- }
559
- return set;
560
- case "symbol" /* Symbol */:
561
- return Symbol(value);
562
- default:
563
- throw new Error(`Unsupported type: ${type}`);
564
- }
565
- }
566
- /**
567
- * Utility method to deserialize multiple LocalValues at once
568
- *
569
- * @param serializedValues Array of serialized LocalValue objects
570
- * @returns Array of deserialized JavaScript values
571
- */
572
- static fromLocalValueArray(serializedValues) {
573
- return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
574
- }
575
- /**
576
- * Verifies if the given object matches the structure of a serialized LocalValue
577
- *
578
- * @param obj Object to verify
579
- * @returns boolean indicating if the object has LocalValue structure
580
- */
581
- static isLocalValueObject(obj) {
582
- if (typeof obj !== "object" || obj === null) {
583
- return false;
584
- }
585
- if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
586
- return false;
587
- }
588
- const type = obj[TYPE_CONSTANT];
589
- const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
590
- if (!hasTypeProperty) {
591
- return false;
592
- }
593
- if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
594
- return obj.hasOwnProperty(VALUE_CONSTANT);
595
- }
596
- return true;
597
- }
598
- };
599
-
600
475
  // src/runtime/dom-extras.ts
601
476
  var import_app_data2 = require("@stencil/core/internal/app-data");
602
477
 
@@ -1371,7 +1246,6 @@ var validateInputProperties = (inputElm) => {
1371
1246
 
1372
1247
  // src/runtime/client-hydrate.ts
1373
1248
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1374
- var _a;
1375
1249
  const endHydrate = createTime("hydrateClient", tagName);
1376
1250
  const shadowRoot = hostElm.shadowRoot;
1377
1251
  const childRenderNodes = [];
@@ -1380,27 +1254,6 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1380
1254
  const shadowRootNodes = import_app_data5.BUILD.shadowDom && shadowRoot ? [] : null;
1381
1255
  const vnode = newVNode(tagName, null);
1382
1256
  vnode.$elm$ = hostElm;
1383
- let attributes;
1384
- const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1385
- members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1386
- if (!(memberFlags & 31 /* Prop */)) {
1387
- return;
1388
- }
1389
- const attributeName = metaAttributeName || memberName;
1390
- let attrValue = hostElm.getAttribute(attributeName);
1391
- if ((attrValue == null ? void 0 : attrValue.startsWith("{")) && attrValue.endsWith("}") || (attrValue == null ? void 0 : attrValue.startsWith("[")) && attrValue.endsWith("]")) {
1392
- try {
1393
- attrValue = JSON.parse(attrValue);
1394
- } catch (e) {
1395
- }
1396
- } else if (attrValue == null ? void 0 : attrValue.startsWith(SERIALIZED_PREFIX)) {
1397
- attrValue = deserializeProperty(attrValue);
1398
- }
1399
- if (!attributes) {
1400
- attributes = {};
1401
- }
1402
- hostRef.$instanceValues$.set(memberName, attrValue);
1403
- });
1404
1257
  let scopeId2;
1405
1258
  if (import_app_data5.BUILD.scoped) {
1406
1259
  const cmpMeta = hostRef.$cmpMeta$;
@@ -2933,8 +2786,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2933
2786
  const hostElm = hostRef.$hostElement$;
2934
2787
  const cmpMeta = hostRef.$cmpMeta$;
2935
2788
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
2936
- const isHostElem = isHost(renderFnResults);
2937
- const rootVnode = isHostElem ? renderFnResults : h(null, null, renderFnResults);
2789
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
2938
2790
  hostTagName = hostElm.tagName;
2939
2791
  if (import_app_data12.BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
2940
2792
  throw new Error(`The <Host> must be the single root component.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.28.2-dev.1742328872.ce86124",
3
+ "version": "4.28.2-dev.1742360514.37ac3fc",
4
4
  "description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc (CommonJS) v4.28.2-dev.1742328872.ce86124 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.28.2-dev.1742360514.37ac3fc | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.28.2-dev.1742328872.ce86124 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.28.2-dev.1742360514.37ac3fc | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/runtime/runtime-constants.ts
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.28.2-dev.1742328872.ce86124",
3
+ "version": "4.28.2-dev.1742360514.37ac3fc",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "4.28.2-dev.1742328872.ce86124",
3
+ "version": "4.28.2-dev.1742360514.37ac3fc",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot v4.28.2-dev.1742328872.ce86124 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.28.2-dev.1742360514.37ac3fc | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "4.28.2-dev.1742328872.ce86124",
3
+ "version": "4.28.2-dev.1742360514.37ac3fc",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot Pixel Match v4.28.2-dev.1742328872.ce86124 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.28.2-dev.1742360514.37ac3fc | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;