@stencil/core 4.28.2-dev.1742328872.ce86124 → 4.28.2-dev.1742410675.302a004

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.
@@ -3,6 +3,18 @@
3
3
  import { Readable } from 'node:stream';
4
4
 
5
5
  export declare function createWindowFromHtml(templateHtml: string, uniqueId: string): any;
6
+ /**
7
+ * Serialize a value to a string that can be deserialized later.
8
+ * @param {unknown} value - The value to serialize.
9
+ * @returns {string} A string that can be deserialized later.
10
+ */
11
+ export declare function serializeProperty(value: unknown): string | number | boolean;
12
+ /**
13
+ * Deserialize a value from a string that was serialized earlier.
14
+ * @param {string} value - The string to deserialize.
15
+ * @returns {unknown} The deserialized value.
16
+ */
17
+ export declare function deserializeProperty(value: string): any;
6
18
  export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
7
19
  export interface HydrateDocumentOptions {
8
20
  /**
@@ -255,17 +267,5 @@ export declare function renderToString(html: string | any, options: SerializeDoc
255
267
  export declare function hydrateDocument(doc: any | string, options?: HydrateDocumentOptions): Promise<HydrateResults>;
256
268
  export declare function hydrateDocument(doc: any | string, options: HydrateDocumentOptions | undefined, asStream?: boolean): Readable;
257
269
  export declare function serializeDocumentToString(doc: Document, opts: HydrateFactoryOptions): string;
258
- /**
259
- * Serialize a value to a string that can be deserialized later.
260
- * @param {unknown} value - The value to serialize.
261
- * @returns {string} A string that can be deserialized later.
262
- */
263
- export declare function serializeProperty(value: unknown): string | number | boolean;
264
- /**
265
- * Deserialize a value from a string that was serialized earlier.
266
- * @param {string} value - The string to deserialize.
267
- * @returns {unknown} The deserialized value.
268
- */
269
- export declare function deserializeProperty(value: string): any;
270
270
 
271
271
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Hydrate Runner v4.28.2-dev.1742328872.ce86124 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Runner v4.28.2-dev.1742410675.302a004 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -14087,6 +14087,32 @@ import { BUILD as BUILD3 } from "@stencil/core/internal/app-data";
14087
14087
  // src/utils/es2022-rewire-class-members.ts
14088
14088
  import { BUILD as BUILD2 } from "@stencil/core/internal/app-data";
14089
14089
 
14090
+ // src/utils/constants.ts
14091
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
14092
+ PrimitiveType2["Undefined"] = "undefined";
14093
+ PrimitiveType2["Null"] = "null";
14094
+ PrimitiveType2["String"] = "string";
14095
+ PrimitiveType2["Number"] = "number";
14096
+ PrimitiveType2["SpecialNumber"] = "number";
14097
+ PrimitiveType2["Boolean"] = "boolean";
14098
+ PrimitiveType2["BigInt"] = "bigint";
14099
+ return PrimitiveType2;
14100
+ })(PrimitiveType || {});
14101
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
14102
+ NonPrimitiveType2["Array"] = "array";
14103
+ NonPrimitiveType2["Date"] = "date";
14104
+ NonPrimitiveType2["Map"] = "map";
14105
+ NonPrimitiveType2["Object"] = "object";
14106
+ NonPrimitiveType2["RegularExpression"] = "regexp";
14107
+ NonPrimitiveType2["Set"] = "set";
14108
+ NonPrimitiveType2["Channel"] = "channel";
14109
+ NonPrimitiveType2["Symbol"] = "symbol";
14110
+ return NonPrimitiveType2;
14111
+ })(NonPrimitiveType || {});
14112
+ var TYPE_CONSTANT = "type";
14113
+ var VALUE_CONSTANT = "value";
14114
+ var SERIALIZED_PREFIX = "serialized:";
14115
+
14090
14116
  // src/client/client-load-module.ts
14091
14117
  import { BUILD as BUILD5 } from "@stencil/core/internal/app-data";
14092
14118
 
@@ -14127,151 +14153,7 @@ import { BUILD as BUILD26 } from "@stencil/core/internal/app-data";
14127
14153
  // src/utils/helpers.ts
14128
14154
  var isString = (v) => typeof v === "string";
14129
14155
 
14130
- // src/utils/message-utils.ts
14131
- var catchError = (diagnostics, err2, msg) => {
14132
- const diagnostic = {
14133
- level: "error",
14134
- type: "build",
14135
- header: "Build Error",
14136
- messageText: "build error",
14137
- lines: []
14138
- };
14139
- if (isString(msg)) {
14140
- diagnostic.messageText = msg.length ? msg : "UNKNOWN ERROR";
14141
- } else if (err2 != null) {
14142
- if (err2.stack != null) {
14143
- diagnostic.messageText = err2.stack.toString();
14144
- } else {
14145
- if (err2.message != null) {
14146
- diagnostic.messageText = err2.message.length ? err2.message : "UNKNOWN ERROR";
14147
- } else {
14148
- diagnostic.messageText = err2.toString();
14149
- }
14150
- }
14151
- }
14152
- if (diagnostics != null && !shouldIgnoreError(diagnostic.messageText)) {
14153
- diagnostics.push(diagnostic);
14154
- }
14155
- return diagnostic;
14156
- };
14157
- var hasError = (diagnostics) => {
14158
- if (diagnostics == null || diagnostics.length === 0) {
14159
- return false;
14160
- }
14161
- return diagnostics.some((d) => d.level === "error" && d.type !== "runtime");
14162
- };
14163
- var shouldIgnoreError = (msg) => {
14164
- return msg === TASK_CANCELED_MSG;
14165
- };
14166
- var TASK_CANCELED_MSG = `task canceled`;
14167
-
14168
- // src/utils/result.ts
14169
- var result_exports = {};
14170
- __export(result_exports, {
14171
- err: () => err,
14172
- map: () => map,
14173
- ok: () => ok,
14174
- unwrap: () => unwrap,
14175
- unwrapErr: () => unwrapErr
14176
- });
14177
- var ok = (value) => ({
14178
- isOk: true,
14179
- isErr: false,
14180
- value
14181
- });
14182
- var err = (value) => ({
14183
- isOk: false,
14184
- isErr: true,
14185
- value
14186
- });
14187
- function map(result, fn) {
14188
- if (result.isOk) {
14189
- const val = fn(result.value);
14190
- if (val instanceof Promise) {
14191
- return val.then((newVal) => ok(newVal));
14192
- } else {
14193
- return ok(val);
14194
- }
14195
- }
14196
- if (result.isErr) {
14197
- const value = result.value;
14198
- return err(value);
14199
- }
14200
- throw "should never get here";
14201
- }
14202
- var unwrap = (result) => {
14203
- if (result.isOk) {
14204
- return result.value;
14205
- } else {
14206
- throw result.value;
14207
- }
14208
- };
14209
- var unwrapErr = (result) => {
14210
- if (result.isErr) {
14211
- return result.value;
14212
- } else {
14213
- throw result.value;
14214
- }
14215
- };
14216
-
14217
- // src/utils/util.ts
14218
- var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
14219
- var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
14220
- var isTsFile = lowerPathParam(
14221
- (p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
14222
- );
14223
- var isTsxFile = lowerPathParam(
14224
- (p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
14225
- );
14226
- var isJsxFile = lowerPathParam(
14227
- (p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
14228
- );
14229
- var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
14230
-
14231
- // src/runtime/connected-callback.ts
14232
- import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
14233
-
14234
- // src/runtime/client-hydrate.ts
14235
- import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
14236
-
14237
- // src/hydrate/runner/serialize.ts
14238
- var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
14239
- PrimitiveType2["Undefined"] = "undefined";
14240
- PrimitiveType2["Null"] = "null";
14241
- PrimitiveType2["String"] = "string";
14242
- PrimitiveType2["Number"] = "number";
14243
- PrimitiveType2["SpecialNumber"] = "number";
14244
- PrimitiveType2["Boolean"] = "boolean";
14245
- PrimitiveType2["BigInt"] = "bigint";
14246
- return PrimitiveType2;
14247
- })(PrimitiveType || {});
14248
- var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
14249
- NonPrimitiveType2["Array"] = "array";
14250
- NonPrimitiveType2["Date"] = "date";
14251
- NonPrimitiveType2["Map"] = "map";
14252
- NonPrimitiveType2["Object"] = "object";
14253
- NonPrimitiveType2["RegularExpression"] = "regexp";
14254
- NonPrimitiveType2["Set"] = "set";
14255
- NonPrimitiveType2["Channel"] = "channel";
14256
- NonPrimitiveType2["Symbol"] = "symbol";
14257
- return NonPrimitiveType2;
14258
- })(NonPrimitiveType || {});
14259
- var TYPE_CONSTANT = "type";
14260
- var VALUE_CONSTANT = "value";
14261
- var SERIALIZED_PREFIX = "serialized:";
14262
- function serializeProperty(value) {
14263
- if (["string", "boolean", "undefined"].includes(typeof value) || typeof value === "number" && value !== Infinity && value !== -Infinity && !isNaN(value)) {
14264
- return value;
14265
- }
14266
- const arg = LocalValue.getArgument(value);
14267
- return SERIALIZED_PREFIX + btoa(JSON.stringify(arg));
14268
- }
14269
- function deserializeProperty(value) {
14270
- if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
14271
- return value;
14272
- }
14273
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
14274
- }
14156
+ // src/utils/local-value.ts
14275
14157
  var LocalValue = class _LocalValue {
14276
14158
  constructor(type, value) {
14277
14159
  if (type === "undefined" /* Undefined */ || type === "null" /* Null */) {
@@ -14496,6 +14378,46 @@ var LocalValue = class _LocalValue {
14496
14378
  };
14497
14379
  }
14498
14380
  };
14381
+
14382
+ // src/utils/message-utils.ts
14383
+ var catchError = (diagnostics, err2, msg) => {
14384
+ const diagnostic = {
14385
+ level: "error",
14386
+ type: "build",
14387
+ header: "Build Error",
14388
+ messageText: "build error",
14389
+ lines: []
14390
+ };
14391
+ if (isString(msg)) {
14392
+ diagnostic.messageText = msg.length ? msg : "UNKNOWN ERROR";
14393
+ } else if (err2 != null) {
14394
+ if (err2.stack != null) {
14395
+ diagnostic.messageText = err2.stack.toString();
14396
+ } else {
14397
+ if (err2.message != null) {
14398
+ diagnostic.messageText = err2.message.length ? err2.message : "UNKNOWN ERROR";
14399
+ } else {
14400
+ diagnostic.messageText = err2.toString();
14401
+ }
14402
+ }
14403
+ }
14404
+ if (diagnostics != null && !shouldIgnoreError(diagnostic.messageText)) {
14405
+ diagnostics.push(diagnostic);
14406
+ }
14407
+ return diagnostic;
14408
+ };
14409
+ var hasError = (diagnostics) => {
14410
+ if (diagnostics == null || diagnostics.length === 0) {
14411
+ return false;
14412
+ }
14413
+ return diagnostics.some((d) => d.level === "error" && d.type !== "runtime");
14414
+ };
14415
+ var shouldIgnoreError = (msg) => {
14416
+ return msg === TASK_CANCELED_MSG;
14417
+ };
14418
+ var TASK_CANCELED_MSG = `task canceled`;
14419
+
14420
+ // src/utils/remote-value.ts
14499
14421
  var RemoteValue = class _RemoteValue {
14500
14422
  /**
14501
14423
  * Deserializes a LocalValue serialized object back to its original JavaScript representation
@@ -14590,6 +14512,90 @@ var RemoteValue = class _RemoteValue {
14590
14512
  }
14591
14513
  };
14592
14514
 
14515
+ // src/utils/result.ts
14516
+ var result_exports = {};
14517
+ __export(result_exports, {
14518
+ err: () => err,
14519
+ map: () => map,
14520
+ ok: () => ok,
14521
+ unwrap: () => unwrap,
14522
+ unwrapErr: () => unwrapErr
14523
+ });
14524
+ var ok = (value) => ({
14525
+ isOk: true,
14526
+ isErr: false,
14527
+ value
14528
+ });
14529
+ var err = (value) => ({
14530
+ isOk: false,
14531
+ isErr: true,
14532
+ value
14533
+ });
14534
+ function map(result, fn) {
14535
+ if (result.isOk) {
14536
+ const val = fn(result.value);
14537
+ if (val instanceof Promise) {
14538
+ return val.then((newVal) => ok(newVal));
14539
+ } else {
14540
+ return ok(val);
14541
+ }
14542
+ }
14543
+ if (result.isErr) {
14544
+ const value = result.value;
14545
+ return err(value);
14546
+ }
14547
+ throw "should never get here";
14548
+ }
14549
+ var unwrap = (result) => {
14550
+ if (result.isOk) {
14551
+ return result.value;
14552
+ } else {
14553
+ throw result.value;
14554
+ }
14555
+ };
14556
+ var unwrapErr = (result) => {
14557
+ if (result.isErr) {
14558
+ return result.value;
14559
+ } else {
14560
+ throw result.value;
14561
+ }
14562
+ };
14563
+
14564
+ // src/utils/serialize.ts
14565
+ function serializeProperty(value) {
14566
+ if (["string", "boolean", "undefined"].includes(typeof value) || typeof value === "number" && value !== Infinity && value !== -Infinity && !isNaN(value)) {
14567
+ return value;
14568
+ }
14569
+ const arg = LocalValue.getArgument(value);
14570
+ return SERIALIZED_PREFIX + btoa(JSON.stringify(arg));
14571
+ }
14572
+ function deserializeProperty(value) {
14573
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
14574
+ return value;
14575
+ }
14576
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
14577
+ }
14578
+
14579
+ // src/utils/util.ts
14580
+ var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
14581
+ var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
14582
+ var isTsFile = lowerPathParam(
14583
+ (p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
14584
+ );
14585
+ var isTsxFile = lowerPathParam(
14586
+ (p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
14587
+ );
14588
+ var isJsxFile = lowerPathParam(
14589
+ (p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
14590
+ );
14591
+ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
14592
+
14593
+ // src/runtime/connected-callback.ts
14594
+ import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
14595
+
14596
+ // src/runtime/client-hydrate.ts
14597
+ import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
14598
+
14593
14599
  // src/runtime/dom-extras.ts
14594
14600
  import { BUILD as BUILD9 } from "@stencil/core/internal/app-data";
14595
14601
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.28.2-dev.1742328872.ce86124",
3
+ "version": "4.28.2-dev.1742410675.302a004",
4
4
  "description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -384,95 +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
-
388
- // src/utils/helpers.ts
389
- var isDef = (v) => v != null && v !== void 0;
390
- var isComplexType = (o) => {
391
- o = typeof o;
392
- return o === "object" || o === "function";
393
- };
394
-
395
- // src/utils/query-nonce-meta-tag-content.ts
396
- function queryNonceMetaTagContent(doc) {
397
- var _a, _b, _c;
398
- return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
399
- }
400
-
401
- // src/utils/regular-expression.ts
402
- var escapeRegExpSpecialCharacters = (text) => {
403
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
404
- };
405
-
406
- // src/utils/result.ts
407
- var result_exports = {};
408
- __export(result_exports, {
409
- err: () => err,
410
- map: () => map,
411
- ok: () => ok,
412
- unwrap: () => unwrap,
413
- unwrapErr: () => unwrapErr
414
- });
415
- var ok = (value) => ({
416
- isOk: true,
417
- isErr: false,
418
- value
419
- });
420
- var err = (value) => ({
421
- isOk: false,
422
- isErr: true,
423
- value
424
- });
425
- function map(result, fn) {
426
- if (result.isOk) {
427
- const val = fn(result.value);
428
- if (val instanceof Promise) {
429
- return val.then((newVal) => ok(newVal));
430
- } else {
431
- return ok(val);
432
- }
433
- }
434
- if (result.isErr) {
435
- const value = result.value;
436
- return err(value);
437
- }
438
- throw "should never get here";
439
- }
440
- var unwrap = (result) => {
441
- if (result.isOk) {
442
- return result.value;
443
- } else {
444
- throw result.value;
445
- }
446
- };
447
- var unwrapErr = (result) => {
448
- if (result.isErr) {
449
- return result.value;
450
- } else {
451
- throw result.value;
452
- }
453
- };
454
-
455
- // src/utils/util.ts
456
- var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
457
- var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
458
- var isTsFile = lowerPathParam(
459
- (p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
460
- );
461
- var isTsxFile = lowerPathParam(
462
- (p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
463
- );
464
- var isJsxFile = lowerPathParam(
465
- (p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
466
- );
467
- var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
468
-
469
- // src/runtime/connected-callback.ts
470
- var import_app_data17 = require("@stencil/core/internal/app-data");
471
-
472
- // src/runtime/client-hydrate.ts
473
- var import_app_data5 = require("@stencil/core/internal/app-data");
474
-
475
- // src/hydrate/runner/serialize.ts
476
387
  var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
477
388
  PrimitiveType2["Undefined"] = "undefined";
478
389
  PrimitiveType2["Null"] = "null";
@@ -497,12 +408,26 @@ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
497
408
  var TYPE_CONSTANT = "type";
498
409
  var VALUE_CONSTANT = "value";
499
410
  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))));
411
+
412
+ // src/utils/helpers.ts
413
+ var isDef = (v) => v != null && v !== void 0;
414
+ var isComplexType = (o) => {
415
+ o = typeof o;
416
+ return o === "object" || o === "function";
417
+ };
418
+
419
+ // src/utils/query-nonce-meta-tag-content.ts
420
+ function queryNonceMetaTagContent(doc) {
421
+ var _a, _b, _c;
422
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
505
423
  }
424
+
425
+ // src/utils/regular-expression.ts
426
+ var escapeRegExpSpecialCharacters = (text) => {
427
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
428
+ };
429
+
430
+ // src/utils/remote-value.ts
506
431
  var RemoteValue = class _RemoteValue {
507
432
  /**
508
433
  * Deserializes a LocalValue serialized object back to its original JavaScript representation
@@ -597,6 +522,83 @@ var RemoteValue = class _RemoteValue {
597
522
  }
598
523
  };
599
524
 
525
+ // src/utils/result.ts
526
+ var result_exports = {};
527
+ __export(result_exports, {
528
+ err: () => err,
529
+ map: () => map,
530
+ ok: () => ok,
531
+ unwrap: () => unwrap,
532
+ unwrapErr: () => unwrapErr
533
+ });
534
+ var ok = (value) => ({
535
+ isOk: true,
536
+ isErr: false,
537
+ value
538
+ });
539
+ var err = (value) => ({
540
+ isOk: false,
541
+ isErr: true,
542
+ value
543
+ });
544
+ function map(result, fn) {
545
+ if (result.isOk) {
546
+ const val = fn(result.value);
547
+ if (val instanceof Promise) {
548
+ return val.then((newVal) => ok(newVal));
549
+ } else {
550
+ return ok(val);
551
+ }
552
+ }
553
+ if (result.isErr) {
554
+ const value = result.value;
555
+ return err(value);
556
+ }
557
+ throw "should never get here";
558
+ }
559
+ var unwrap = (result) => {
560
+ if (result.isOk) {
561
+ return result.value;
562
+ } else {
563
+ throw result.value;
564
+ }
565
+ };
566
+ var unwrapErr = (result) => {
567
+ if (result.isErr) {
568
+ return result.value;
569
+ } else {
570
+ throw result.value;
571
+ }
572
+ };
573
+
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
+ // src/utils/util.ts
583
+ var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
584
+ var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
585
+ var isTsFile = lowerPathParam(
586
+ (p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
587
+ );
588
+ var isTsxFile = lowerPathParam(
589
+ (p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
590
+ );
591
+ var isJsxFile = lowerPathParam(
592
+ (p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
593
+ );
594
+ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
595
+
596
+ // src/runtime/connected-callback.ts
597
+ var import_app_data17 = require("@stencil/core/internal/app-data");
598
+
599
+ // src/runtime/client-hydrate.ts
600
+ var import_app_data5 = require("@stencil/core/internal/app-data");
601
+
600
602
  // src/runtime/dom-extras.ts
601
603
  var import_app_data2 = require("@stencil/core/internal/app-data");
602
604
 
@@ -1380,26 +1382,17 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1380
1382
  const shadowRootNodes = import_app_data5.BUILD.shadowDom && shadowRoot ? [] : null;
1381
1383
  const vnode = newVNode(tagName, null);
1382
1384
  vnode.$elm$ = hostElm;
1383
- let attributes;
1385
+ vnode.$attrs$ = {};
1384
1386
  const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1385
1387
  members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1388
+ var _a2;
1386
1389
  if (!(memberFlags & 31 /* Prop */)) {
1387
1390
  return;
1388
1391
  }
1389
1392
  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);
1393
+ const attrPropVal = parsePropertyValue(hostElm.getAttribute(attributeName), memberFlags);
1394
+ vnode.$attrs$[memberName] = attrPropVal;
1395
+ (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1403
1396
  });
1404
1397
  let scopeId2;
1405
1398
  if (import_app_data5.BUILD.scoped) {
@@ -2153,17 +2146,25 @@ var import_app_data14 = require("@stencil/core/internal/app-data");
2153
2146
  // src/runtime/parse-property-value.ts
2154
2147
  var import_app_data6 = require("@stencil/core/internal/app-data");
2155
2148
  var parsePropertyValue = (propValue, propType) => {
2149
+ if (import_app_data6.BUILD.hydrateClientSide && isComplexType(propValue) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2150
+ try {
2151
+ return JSON.parse(propValue);
2152
+ } catch (e) {
2153
+ }
2154
+ }
2155
+ if (import_app_data6.BUILD.hydrateClientSide && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2156
+ return deserializeProperty(propValue);
2157
+ }
2156
2158
  if (propValue != null && !isComplexType(propValue)) {
2157
2159
  if (import_app_data6.BUILD.propBoolean && propType & 4 /* Boolean */) {
2158
2160
  return propValue === "false" ? false : propValue === "" || !!propValue;
2159
2161
  }
2160
2162
  if (import_app_data6.BUILD.propNumber && propType & 2 /* Number */) {
2161
- return parseFloat(propValue);
2163
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
2162
2164
  }
2163
2165
  if (import_app_data6.BUILD.propString && propType & 1 /* String */) {
2164
2166
  return String(propValue);
2165
2167
  }
2166
- return propValue;
2167
2168
  }
2168
2169
  return propValue;
2169
2170
  };
@@ -2933,8 +2934,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2933
2934
  const hostElm = hostRef.$hostElement$;
2934
2935
  const cmpMeta = hostRef.$cmpMeta$;
2935
2936
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
2936
- const isHostElem = isHost(renderFnResults);
2937
- const rootVnode = isHostElem ? renderFnResults : h(null, null, renderFnResults);
2937
+ const isHostElement = isHost(renderFnResults);
2938
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
2939
+ if (!isHostElement) {
2940
+ rootVnode.$attrs$ = oldVNode.$attrs$;
2941
+ }
2938
2942
  hostTagName = hostElm.tagName;
2939
2943
  if (import_app_data12.BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
2940
2944
  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.1742410675.302a004",
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.1742410675.302a004 | 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.1742410675.302a004 | 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.1742410675.302a004",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",