@stencil/core 4.28.2-dev.1742453865.0e5a479 → 4.28.2-dev.1742533303.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.
@@ -384,30 +384,6 @@ var import_app_data19 = require("@stencil/core/internal/app-data");
384
384
  // src/utils/constants.ts
385
385
  var SVG_NS = "http://www.w3.org/2000/svg";
386
386
  var HTML_NS = "http://www.w3.org/1999/xhtml";
387
- var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
388
- PrimitiveType2["Undefined"] = "undefined";
389
- PrimitiveType2["Null"] = "null";
390
- PrimitiveType2["String"] = "string";
391
- PrimitiveType2["Number"] = "number";
392
- PrimitiveType2["SpecialNumber"] = "number";
393
- PrimitiveType2["Boolean"] = "boolean";
394
- PrimitiveType2["BigInt"] = "bigint";
395
- return PrimitiveType2;
396
- })(PrimitiveType || {});
397
- var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
398
- NonPrimitiveType2["Array"] = "array";
399
- NonPrimitiveType2["Date"] = "date";
400
- NonPrimitiveType2["Map"] = "map";
401
- NonPrimitiveType2["Object"] = "object";
402
- NonPrimitiveType2["RegularExpression"] = "regexp";
403
- NonPrimitiveType2["Set"] = "set";
404
- NonPrimitiveType2["Channel"] = "channel";
405
- NonPrimitiveType2["Symbol"] = "symbol";
406
- return NonPrimitiveType2;
407
- })(NonPrimitiveType || {});
408
- var TYPE_CONSTANT = "type";
409
- var VALUE_CONSTANT = "value";
410
- var SERIALIZED_PREFIX = "serialized:";
411
387
 
412
388
  // src/utils/helpers.ts
413
389
  var isDef = (v) => v != null && v !== void 0;
@@ -427,101 +403,6 @@ var escapeRegExpSpecialCharacters = (text) => {
427
403
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
428
404
  };
429
405
 
430
- // src/utils/remote-value.ts
431
- var RemoteValue = class _RemoteValue {
432
- /**
433
- * Deserializes a LocalValue serialized object back to its original JavaScript representation
434
- *
435
- * @param serialized The serialized LocalValue object
436
- * @returns The original JavaScript value/object
437
- */
438
- static fromLocalValue(serialized) {
439
- const type = serialized[TYPE_CONSTANT];
440
- const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
441
- switch (type) {
442
- case "string" /* String */:
443
- return value;
444
- case "boolean" /* Boolean */:
445
- return value;
446
- case "bigint" /* BigInt */:
447
- return BigInt(value);
448
- case "undefined" /* Undefined */:
449
- return void 0;
450
- case "null" /* Null */:
451
- return null;
452
- case "number" /* Number */:
453
- if (value === "NaN") return NaN;
454
- if (value === "-0") return -0;
455
- if (value === "Infinity") return Infinity;
456
- if (value === "-Infinity") return -Infinity;
457
- return value;
458
- case "array" /* Array */:
459
- return value.map((item) => _RemoteValue.fromLocalValue(item));
460
- case "date" /* Date */:
461
- return new Date(value);
462
- case "map" /* Map */:
463
- const map2 = /* @__PURE__ */ new Map();
464
- for (const [key, val] of value) {
465
- const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
466
- const deserializedValue = _RemoteValue.fromLocalValue(val);
467
- map2.set(deserializedKey, deserializedValue);
468
- }
469
- return map2;
470
- case "object" /* Object */:
471
- const obj = {};
472
- for (const [key, val] of value) {
473
- obj[key] = _RemoteValue.fromLocalValue(val);
474
- }
475
- return obj;
476
- case "regexp" /* RegularExpression */:
477
- const { pattern, flags } = value;
478
- return new RegExp(pattern, flags);
479
- case "set" /* Set */:
480
- const set = /* @__PURE__ */ new Set();
481
- for (const item of value) {
482
- set.add(_RemoteValue.fromLocalValue(item));
483
- }
484
- return set;
485
- case "symbol" /* Symbol */:
486
- return Symbol(value);
487
- default:
488
- throw new Error(`Unsupported type: ${type}`);
489
- }
490
- }
491
- /**
492
- * Utility method to deserialize multiple LocalValues at once
493
- *
494
- * @param serializedValues Array of serialized LocalValue objects
495
- * @returns Array of deserialized JavaScript values
496
- */
497
- static fromLocalValueArray(serializedValues) {
498
- return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
499
- }
500
- /**
501
- * Verifies if the given object matches the structure of a serialized LocalValue
502
- *
503
- * @param obj Object to verify
504
- * @returns boolean indicating if the object has LocalValue structure
505
- */
506
- static isLocalValueObject(obj) {
507
- if (typeof obj !== "object" || obj === null) {
508
- return false;
509
- }
510
- if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
511
- return false;
512
- }
513
- const type = obj[TYPE_CONSTANT];
514
- const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
515
- if (!hasTypeProperty) {
516
- return false;
517
- }
518
- if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
519
- return obj.hasOwnProperty(VALUE_CONSTANT);
520
- }
521
- return true;
522
- }
523
- };
524
-
525
406
  // src/utils/result.ts
526
407
  var result_exports = {};
527
408
  __export(result_exports, {
@@ -571,14 +452,6 @@ var unwrapErr = (result) => {
571
452
  }
572
453
  };
573
454
 
574
- // src/utils/serialize.ts
575
- function deserializeProperty(value) {
576
- if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
577
- return value;
578
- }
579
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
580
- }
581
-
582
455
  // src/utils/util.ts
583
456
  var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
584
457
  var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
@@ -1373,7 +1246,6 @@ var validateInputProperties = (inputElm) => {
1373
1246
 
1374
1247
  // src/runtime/client-hydrate.ts
1375
1248
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1376
- var _a;
1377
1249
  const endHydrate = createTime("hydrateClient", tagName);
1378
1250
  const shadowRoot = hostElm.shadowRoot;
1379
1251
  const childRenderNodes = [];
@@ -1382,19 +1254,6 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1382
1254
  const shadowRootNodes = import_app_data5.BUILD.shadowDom && shadowRoot ? [] : null;
1383
1255
  const vnode = newVNode(tagName, null);
1384
1256
  vnode.$elm$ = hostElm;
1385
- const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1386
- members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1387
- var _a2;
1388
- if (!(memberFlags & 31 /* Prop */)) {
1389
- return;
1390
- }
1391
- const attributeName = metaAttributeName || memberName;
1392
- const attrVal = hostElm.getAttribute(attributeName);
1393
- if (attrVal !== null) {
1394
- const attrPropVal = parsePropertyValue(attrVal, memberFlags);
1395
- (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1396
- }
1397
- });
1398
1257
  let scopeId2;
1399
1258
  if (import_app_data5.BUILD.scoped) {
1400
1259
  const cmpMeta = hostRef.$cmpMeta$;
@@ -2147,23 +2006,12 @@ var import_app_data14 = require("@stencil/core/internal/app-data");
2147
2006
  // src/runtime/parse-property-value.ts
2148
2007
  var import_app_data6 = require("@stencil/core/internal/app-data");
2149
2008
  var parsePropertyValue = (propValue, propType) => {
2150
- if ((import_app_data6.BUILD.hydrateClientSide || import_app_data6.BUILD.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2151
- try {
2152
- propValue = JSON.parse(propValue);
2153
- return propValue;
2154
- } catch (e) {
2155
- }
2156
- }
2157
- if ((import_app_data6.BUILD.hydrateClientSide || import_app_data6.BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2158
- propValue = deserializeProperty(propValue);
2159
- return propValue;
2160
- }
2161
2009
  if (propValue != null && !isComplexType(propValue)) {
2162
2010
  if (import_app_data6.BUILD.propBoolean && propType & 4 /* Boolean */) {
2163
2011
  return propValue === "false" ? false : propValue === "" || !!propValue;
2164
2012
  }
2165
2013
  if (import_app_data6.BUILD.propNumber && propType & 2 /* Number */) {
2166
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
2014
+ return parseFloat(propValue);
2167
2015
  }
2168
2016
  if (import_app_data6.BUILD.propString && propType & 1 /* String */) {
2169
2017
  return String(propValue);
@@ -2938,8 +2786,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2938
2786
  const hostElm = hostRef.$hostElement$;
2939
2787
  const cmpMeta = hostRef.$cmpMeta$;
2940
2788
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
2941
- const isHostElement = isHost(renderFnResults);
2942
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
2789
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
2943
2790
  hostTagName = hostElm.tagName;
2944
2791
  if (import_app_data12.BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
2945
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.1742453865.0e5a479",
3
+ "version": "4.28.2-dev.1742533303.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.1742453865.0e5a479 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.28.2-dev.1742533303.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.1742453865.0e5a479 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.28.2-dev.1742533303.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.1742453865.0e5a479",
3
+ "version": "4.28.2-dev.1742533303.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.1742453865.0e5a479",
3
+ "version": "4.28.2-dev.1742533303.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.1742453865.0e5a479 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.28.2-dev.1742533303.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.1742453865.0e5a479",
3
+ "version": "4.28.2-dev.1742533303.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.1742453865.0e5a479 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.28.2-dev.1742533303.37ac3fc | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;