@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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v4.28.2-dev.1742328872.ce86124 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform 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) => {
@@ -25,6 +25,30 @@ import { BUILD as BUILD2 } from "@stencil/core/internal/app-data";
25
25
  // src/utils/constants.ts
26
26
  var SVG_NS = "http://www.w3.org/2000/svg";
27
27
  var HTML_NS = "http://www.w3.org/1999/xhtml";
28
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
29
+ PrimitiveType2["Undefined"] = "undefined";
30
+ PrimitiveType2["Null"] = "null";
31
+ PrimitiveType2["String"] = "string";
32
+ PrimitiveType2["Number"] = "number";
33
+ PrimitiveType2["SpecialNumber"] = "number";
34
+ PrimitiveType2["Boolean"] = "boolean";
35
+ PrimitiveType2["BigInt"] = "bigint";
36
+ return PrimitiveType2;
37
+ })(PrimitiveType || {});
38
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
39
+ NonPrimitiveType2["Array"] = "array";
40
+ NonPrimitiveType2["Date"] = "date";
41
+ NonPrimitiveType2["Map"] = "map";
42
+ NonPrimitiveType2["Object"] = "object";
43
+ NonPrimitiveType2["RegularExpression"] = "regexp";
44
+ NonPrimitiveType2["Set"] = "set";
45
+ NonPrimitiveType2["Channel"] = "channel";
46
+ NonPrimitiveType2["Symbol"] = "symbol";
47
+ return NonPrimitiveType2;
48
+ })(NonPrimitiveType || {});
49
+ var TYPE_CONSTANT = "type";
50
+ var VALUE_CONSTANT = "value";
51
+ var SERIALIZED_PREFIX = "serialized:";
28
52
 
29
53
  // src/utils/es2022-rewire-class-members.ts
30
54
  var reWireGetterSetter = (instance, hostRef) => {
@@ -325,106 +349,7 @@ var escapeRegExpSpecialCharacters = (text) => {
325
349
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
326
350
  };
327
351
 
328
- // src/utils/result.ts
329
- var result_exports = {};
330
- __export(result_exports, {
331
- err: () => err,
332
- map: () => map,
333
- ok: () => ok,
334
- unwrap: () => unwrap,
335
- unwrapErr: () => unwrapErr
336
- });
337
- var ok = (value) => ({
338
- isOk: true,
339
- isErr: false,
340
- value
341
- });
342
- var err = (value) => ({
343
- isOk: false,
344
- isErr: true,
345
- value
346
- });
347
- function map(result, fn) {
348
- if (result.isOk) {
349
- const val = fn(result.value);
350
- if (val instanceof Promise) {
351
- return val.then((newVal) => ok(newVal));
352
- } else {
353
- return ok(val);
354
- }
355
- }
356
- if (result.isErr) {
357
- const value = result.value;
358
- return err(value);
359
- }
360
- throw "should never get here";
361
- }
362
- var unwrap = (result) => {
363
- if (result.isOk) {
364
- return result.value;
365
- } else {
366
- throw result.value;
367
- }
368
- };
369
- var unwrapErr = (result) => {
370
- if (result.isErr) {
371
- return result.value;
372
- } else {
373
- throw result.value;
374
- }
375
- };
376
-
377
- // src/utils/util.ts
378
- var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
379
- var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
380
- var isTsFile = lowerPathParam(
381
- (p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
382
- );
383
- var isTsxFile = lowerPathParam(
384
- (p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
385
- );
386
- var isJsxFile = lowerPathParam(
387
- (p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
388
- );
389
- var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
390
-
391
- // src/runtime/connected-callback.ts
392
- import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
393
-
394
- // src/runtime/client-hydrate.ts
395
- import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
396
-
397
- // src/hydrate/runner/serialize.ts
398
- var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
399
- PrimitiveType2["Undefined"] = "undefined";
400
- PrimitiveType2["Null"] = "null";
401
- PrimitiveType2["String"] = "string";
402
- PrimitiveType2["Number"] = "number";
403
- PrimitiveType2["SpecialNumber"] = "number";
404
- PrimitiveType2["Boolean"] = "boolean";
405
- PrimitiveType2["BigInt"] = "bigint";
406
- return PrimitiveType2;
407
- })(PrimitiveType || {});
408
- var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
409
- NonPrimitiveType2["Array"] = "array";
410
- NonPrimitiveType2["Date"] = "date";
411
- NonPrimitiveType2["Map"] = "map";
412
- NonPrimitiveType2["Object"] = "object";
413
- NonPrimitiveType2["RegularExpression"] = "regexp";
414
- NonPrimitiveType2["Set"] = "set";
415
- NonPrimitiveType2["Channel"] = "channel";
416
- NonPrimitiveType2["Symbol"] = "symbol";
417
- return NonPrimitiveType2;
418
- })(NonPrimitiveType || {});
419
- var TYPE_CONSTANT = "type";
420
- var VALUE_CONSTANT = "value";
421
- var SERIALIZED_PREFIX = "serialized:";
422
- function deserializeProperty(value) {
423
- if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
424
- return value;
425
- }
426
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
427
- }
352
+ // src/utils/remote-value.ts
428
353
  var RemoteValue = class _RemoteValue {
429
354
  /**
430
355
  * Deserializes a LocalValue serialized object back to its original JavaScript representation
@@ -519,6 +444,83 @@ var RemoteValue = class _RemoteValue {
519
444
  }
520
445
  };
521
446
 
447
+ // src/utils/result.ts
448
+ var result_exports = {};
449
+ __export(result_exports, {
450
+ err: () => err,
451
+ map: () => map,
452
+ ok: () => ok,
453
+ unwrap: () => unwrap,
454
+ unwrapErr: () => unwrapErr
455
+ });
456
+ var ok = (value) => ({
457
+ isOk: true,
458
+ isErr: false,
459
+ value
460
+ });
461
+ var err = (value) => ({
462
+ isOk: false,
463
+ isErr: true,
464
+ value
465
+ });
466
+ function map(result, fn) {
467
+ if (result.isOk) {
468
+ const val = fn(result.value);
469
+ if (val instanceof Promise) {
470
+ return val.then((newVal) => ok(newVal));
471
+ } else {
472
+ return ok(val);
473
+ }
474
+ }
475
+ if (result.isErr) {
476
+ const value = result.value;
477
+ return err(value);
478
+ }
479
+ throw "should never get here";
480
+ }
481
+ var unwrap = (result) => {
482
+ if (result.isOk) {
483
+ return result.value;
484
+ } else {
485
+ throw result.value;
486
+ }
487
+ };
488
+ var unwrapErr = (result) => {
489
+ if (result.isErr) {
490
+ return result.value;
491
+ } else {
492
+ throw result.value;
493
+ }
494
+ };
495
+
496
+ // src/utils/serialize.ts
497
+ function deserializeProperty(value) {
498
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
499
+ return value;
500
+ }
501
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
502
+ }
503
+
504
+ // src/utils/util.ts
505
+ var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
506
+ var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
507
+ var isTsFile = lowerPathParam(
508
+ (p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
509
+ );
510
+ var isTsxFile = lowerPathParam(
511
+ (p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
512
+ );
513
+ var isJsxFile = lowerPathParam(
514
+ (p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
515
+ );
516
+ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
517
+
518
+ // src/runtime/connected-callback.ts
519
+ import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
520
+
521
+ // src/runtime/client-hydrate.ts
522
+ import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
523
+
522
524
  // src/runtime/dom-extras.ts
523
525
  import { BUILD as BUILD9 } from "@stencil/core/internal/app-data";
524
526
 
@@ -1275,26 +1277,17 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1275
1277
  const shadowRootNodes = BUILD12.shadowDom && shadowRoot ? [] : null;
1276
1278
  const vnode = newVNode(tagName, null);
1277
1279
  vnode.$elm$ = hostElm;
1278
- let attributes;
1280
+ vnode.$attrs$ = {};
1279
1281
  const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1280
1282
  members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1283
+ var _a2;
1281
1284
  if (!(memberFlags & 31 /* Prop */)) {
1282
1285
  return;
1283
1286
  }
1284
1287
  const attributeName = metaAttributeName || memberName;
1285
- let attrValue = hostElm.getAttribute(attributeName);
1286
- if ((attrValue == null ? void 0 : attrValue.startsWith("{")) && attrValue.endsWith("}") || (attrValue == null ? void 0 : attrValue.startsWith("[")) && attrValue.endsWith("]")) {
1287
- try {
1288
- attrValue = JSON.parse(attrValue);
1289
- } catch (e) {
1290
- }
1291
- } else if (attrValue == null ? void 0 : attrValue.startsWith(SERIALIZED_PREFIX)) {
1292
- attrValue = deserializeProperty(attrValue);
1293
- }
1294
- if (!attributes) {
1295
- attributes = {};
1296
- }
1297
- hostRef.$instanceValues$.set(memberName, attrValue);
1288
+ const attrPropVal = parsePropertyValue(hostElm.getAttribute(attributeName), memberFlags);
1289
+ vnode.$attrs$[memberName] = attrPropVal;
1290
+ (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1298
1291
  });
1299
1292
  let scopeId2;
1300
1293
  if (BUILD12.scoped) {
@@ -2048,17 +2041,25 @@ import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
2048
2041
  // src/runtime/parse-property-value.ts
2049
2042
  import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
2050
2043
  var parsePropertyValue = (propValue, propType) => {
2044
+ if (BUILD13.hydrateClientSide && isComplexType(propValue) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2045
+ try {
2046
+ return JSON.parse(propValue);
2047
+ } catch (e) {
2048
+ }
2049
+ }
2050
+ if (BUILD13.hydrateClientSide && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2051
+ return deserializeProperty(propValue);
2052
+ }
2051
2053
  if (propValue != null && !isComplexType(propValue)) {
2052
2054
  if (BUILD13.propBoolean && propType & 4 /* Boolean */) {
2053
2055
  return propValue === "false" ? false : propValue === "" || !!propValue;
2054
2056
  }
2055
2057
  if (BUILD13.propNumber && propType & 2 /* Number */) {
2056
- return parseFloat(propValue);
2058
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
2057
2059
  }
2058
2060
  if (BUILD13.propString && propType & 1 /* String */) {
2059
2061
  return String(propValue);
2060
2062
  }
2061
- return propValue;
2062
2063
  }
2063
2064
  return propValue;
2064
2065
  };
@@ -2828,8 +2829,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2828
2829
  const hostElm = hostRef.$hostElement$;
2829
2830
  const cmpMeta = hostRef.$cmpMeta$;
2830
2831
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
2831
- const isHostElem = isHost(renderFnResults);
2832
- const rootVnode = isHostElem ? renderFnResults : h(null, null, renderFnResults);
2832
+ const isHostElement = isHost(renderFnResults);
2833
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
2834
+ if (!isHostElement) {
2835
+ rootVnode.$attrs$ = oldVNode.$attrs$;
2836
+ }
2833
2837
  hostTagName = hostElm.tagName;
2834
2838
  if (BUILD19.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
2835
2839
  throw new Error(`The <Host> must be the single root component.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/client",
3
- "version": "4.28.2-dev.1742328872.ce86124",
3
+ "version": "4.28.2-dev.1742410675.302a004",
4
4
  "description": "Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "exports": "./index.js",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Patch Browser v4.28.2-dev.1742328872.ce86124 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Browser v4.28.2-dev.1742410675.302a004 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/client/client-patch-browser.ts
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Hydrate Platform v4.28.2-dev.1742328872.ce86124 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Platform 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) => {
@@ -16,6 +16,30 @@ import { BUILD } from "@stencil/core/internal/app-data";
16
16
  // src/utils/constants.ts
17
17
  var SVG_NS = "http://www.w3.org/2000/svg";
18
18
  var HTML_NS = "http://www.w3.org/1999/xhtml";
19
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
20
+ PrimitiveType2["Undefined"] = "undefined";
21
+ PrimitiveType2["Null"] = "null";
22
+ PrimitiveType2["String"] = "string";
23
+ PrimitiveType2["Number"] = "number";
24
+ PrimitiveType2["SpecialNumber"] = "number";
25
+ PrimitiveType2["Boolean"] = "boolean";
26
+ PrimitiveType2["BigInt"] = "bigint";
27
+ return PrimitiveType2;
28
+ })(PrimitiveType || {});
29
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
30
+ NonPrimitiveType2["Array"] = "array";
31
+ NonPrimitiveType2["Date"] = "date";
32
+ NonPrimitiveType2["Map"] = "map";
33
+ NonPrimitiveType2["Object"] = "object";
34
+ NonPrimitiveType2["RegularExpression"] = "regexp";
35
+ NonPrimitiveType2["Set"] = "set";
36
+ NonPrimitiveType2["Channel"] = "channel";
37
+ NonPrimitiveType2["Symbol"] = "symbol";
38
+ return NonPrimitiveType2;
39
+ })(NonPrimitiveType || {});
40
+ var TYPE_CONSTANT = "type";
41
+ var VALUE_CONSTANT = "value";
42
+ var SERIALIZED_PREFIX = "serialized:";
19
43
 
20
44
  // src/utils/es2022-rewire-class-members.ts
21
45
  var reWireGetterSetter = (instance, hostRef) => {
@@ -69,106 +93,7 @@ var escapeRegExpSpecialCharacters = (text) => {
69
93
  return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
70
94
  };
71
95
 
72
- // src/utils/result.ts
73
- var result_exports = {};
74
- __export(result_exports, {
75
- err: () => err,
76
- map: () => map,
77
- ok: () => ok,
78
- unwrap: () => unwrap,
79
- unwrapErr: () => unwrapErr
80
- });
81
- var ok = (value) => ({
82
- isOk: true,
83
- isErr: false,
84
- value
85
- });
86
- var err = (value) => ({
87
- isOk: false,
88
- isErr: true,
89
- value
90
- });
91
- function map(result, fn) {
92
- if (result.isOk) {
93
- const val = fn(result.value);
94
- if (val instanceof Promise) {
95
- return val.then((newVal) => ok(newVal));
96
- } else {
97
- return ok(val);
98
- }
99
- }
100
- if (result.isErr) {
101
- const value = result.value;
102
- return err(value);
103
- }
104
- throw "should never get here";
105
- }
106
- var unwrap = (result) => {
107
- if (result.isOk) {
108
- return result.value;
109
- } else {
110
- throw result.value;
111
- }
112
- };
113
- var unwrapErr = (result) => {
114
- if (result.isErr) {
115
- return result.value;
116
- } else {
117
- throw result.value;
118
- }
119
- };
120
-
121
- // src/utils/util.ts
122
- var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
123
- var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
124
- var isTsFile = lowerPathParam(
125
- (p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
126
- );
127
- var isTsxFile = lowerPathParam(
128
- (p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
129
- );
130
- var isJsxFile = lowerPathParam(
131
- (p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
132
- );
133
- var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
134
-
135
- // src/runtime/connected-callback.ts
136
- import { BUILD as BUILD18 } from "@stencil/core/internal/app-data";
137
-
138
- // src/runtime/client-hydrate.ts
139
- import { BUILD as BUILD6 } from "@stencil/core/internal/app-data";
140
-
141
- // src/hydrate/runner/serialize.ts
142
- var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
143
- PrimitiveType2["Undefined"] = "undefined";
144
- PrimitiveType2["Null"] = "null";
145
- PrimitiveType2["String"] = "string";
146
- PrimitiveType2["Number"] = "number";
147
- PrimitiveType2["SpecialNumber"] = "number";
148
- PrimitiveType2["Boolean"] = "boolean";
149
- PrimitiveType2["BigInt"] = "bigint";
150
- return PrimitiveType2;
151
- })(PrimitiveType || {});
152
- var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
153
- NonPrimitiveType2["Array"] = "array";
154
- NonPrimitiveType2["Date"] = "date";
155
- NonPrimitiveType2["Map"] = "map";
156
- NonPrimitiveType2["Object"] = "object";
157
- NonPrimitiveType2["RegularExpression"] = "regexp";
158
- NonPrimitiveType2["Set"] = "set";
159
- NonPrimitiveType2["Channel"] = "channel";
160
- NonPrimitiveType2["Symbol"] = "symbol";
161
- return NonPrimitiveType2;
162
- })(NonPrimitiveType || {});
163
- var TYPE_CONSTANT = "type";
164
- var VALUE_CONSTANT = "value";
165
- var SERIALIZED_PREFIX = "serialized:";
166
- function deserializeProperty(value) {
167
- if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
168
- return value;
169
- }
170
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
171
- }
96
+ // src/utils/remote-value.ts
172
97
  var RemoteValue = class _RemoteValue {
173
98
  /**
174
99
  * Deserializes a LocalValue serialized object back to its original JavaScript representation
@@ -263,6 +188,83 @@ var RemoteValue = class _RemoteValue {
263
188
  }
264
189
  };
265
190
 
191
+ // src/utils/result.ts
192
+ var result_exports = {};
193
+ __export(result_exports, {
194
+ err: () => err,
195
+ map: () => map,
196
+ ok: () => ok,
197
+ unwrap: () => unwrap,
198
+ unwrapErr: () => unwrapErr
199
+ });
200
+ var ok = (value) => ({
201
+ isOk: true,
202
+ isErr: false,
203
+ value
204
+ });
205
+ var err = (value) => ({
206
+ isOk: false,
207
+ isErr: true,
208
+ value
209
+ });
210
+ function map(result, fn) {
211
+ if (result.isOk) {
212
+ const val = fn(result.value);
213
+ if (val instanceof Promise) {
214
+ return val.then((newVal) => ok(newVal));
215
+ } else {
216
+ return ok(val);
217
+ }
218
+ }
219
+ if (result.isErr) {
220
+ const value = result.value;
221
+ return err(value);
222
+ }
223
+ throw "should never get here";
224
+ }
225
+ var unwrap = (result) => {
226
+ if (result.isOk) {
227
+ return result.value;
228
+ } else {
229
+ throw result.value;
230
+ }
231
+ };
232
+ var unwrapErr = (result) => {
233
+ if (result.isErr) {
234
+ return result.value;
235
+ } else {
236
+ throw result.value;
237
+ }
238
+ };
239
+
240
+ // src/utils/serialize.ts
241
+ function deserializeProperty(value) {
242
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
243
+ return value;
244
+ }
245
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
246
+ }
247
+
248
+ // src/utils/util.ts
249
+ var lowerPathParam = (fn) => (p) => fn(p.toLowerCase());
250
+ var isDtsFile = lowerPathParam((p) => p.endsWith(".d.ts") || p.endsWith(".d.mts") || p.endsWith(".d.cts"));
251
+ var isTsFile = lowerPathParam(
252
+ (p) => !isDtsFile(p) && (p.endsWith(".ts") || p.endsWith(".mts") || p.endsWith(".cts"))
253
+ );
254
+ var isTsxFile = lowerPathParam(
255
+ (p) => p.endsWith(".tsx") || p.endsWith(".mtsx") || p.endsWith(".ctsx")
256
+ );
257
+ var isJsxFile = lowerPathParam(
258
+ (p) => p.endsWith(".jsx") || p.endsWith(".mjsx") || p.endsWith(".cjsx")
259
+ );
260
+ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") || p.endsWith(".cjs"));
261
+
262
+ // src/runtime/connected-callback.ts
263
+ import { BUILD as BUILD18 } from "@stencil/core/internal/app-data";
264
+
265
+ // src/runtime/client-hydrate.ts
266
+ import { BUILD as BUILD6 } from "@stencil/core/internal/app-data";
267
+
266
268
  // src/runtime/dom-extras.ts
267
269
  import { BUILD as BUILD3 } from "@stencil/core/internal/app-data";
268
270
 
@@ -1046,26 +1048,17 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1046
1048
  const shadowRootNodes = BUILD6.shadowDom && shadowRoot ? [] : null;
1047
1049
  const vnode = newVNode(tagName, null);
1048
1050
  vnode.$elm$ = hostElm;
1049
- let attributes;
1051
+ vnode.$attrs$ = {};
1050
1052
  const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1051
1053
  members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1054
+ var _a2;
1052
1055
  if (!(memberFlags & 31 /* Prop */)) {
1053
1056
  return;
1054
1057
  }
1055
1058
  const attributeName = metaAttributeName || memberName;
1056
- let attrValue = hostElm.getAttribute(attributeName);
1057
- if ((attrValue == null ? void 0 : attrValue.startsWith("{")) && attrValue.endsWith("}") || (attrValue == null ? void 0 : attrValue.startsWith("[")) && attrValue.endsWith("]")) {
1058
- try {
1059
- attrValue = JSON.parse(attrValue);
1060
- } catch (e) {
1061
- }
1062
- } else if (attrValue == null ? void 0 : attrValue.startsWith(SERIALIZED_PREFIX)) {
1063
- attrValue = deserializeProperty(attrValue);
1064
- }
1065
- if (!attributes) {
1066
- attributes = {};
1067
- }
1068
- hostRef.$instanceValues$.set(memberName, attrValue);
1059
+ const attrPropVal = parsePropertyValue(hostElm.getAttribute(attributeName), memberFlags);
1060
+ vnode.$attrs$[memberName] = attrPropVal;
1061
+ (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1069
1062
  });
1070
1063
  let scopeId2;
1071
1064
  if (BUILD6.scoped) {
@@ -1819,17 +1812,25 @@ import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
1819
1812
  // src/runtime/parse-property-value.ts
1820
1813
  import { BUILD as BUILD7 } from "@stencil/core/internal/app-data";
1821
1814
  var parsePropertyValue = (propValue, propType) => {
1815
+ if (BUILD7.hydrateClientSide && isComplexType(propValue) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
1816
+ try {
1817
+ return JSON.parse(propValue);
1818
+ } catch (e) {
1819
+ }
1820
+ }
1821
+ if (BUILD7.hydrateClientSide && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1822
+ return deserializeProperty(propValue);
1823
+ }
1822
1824
  if (propValue != null && !isComplexType(propValue)) {
1823
1825
  if (BUILD7.propBoolean && propType & 4 /* Boolean */) {
1824
1826
  return propValue === "false" ? false : propValue === "" || !!propValue;
1825
1827
  }
1826
1828
  if (BUILD7.propNumber && propType & 2 /* Number */) {
1827
- return parseFloat(propValue);
1829
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
1828
1830
  }
1829
1831
  if (BUILD7.propString && propType & 1 /* String */) {
1830
1832
  return String(propValue);
1831
1833
  }
1832
- return propValue;
1833
1834
  }
1834
1835
  return propValue;
1835
1836
  };
@@ -2599,8 +2600,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2599
2600
  const hostElm = hostRef.$hostElement$;
2600
2601
  const cmpMeta = hostRef.$cmpMeta$;
2601
2602
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
2602
- const isHostElem = isHost(renderFnResults);
2603
- const rootVnode = isHostElem ? renderFnResults : h(null, null, renderFnResults);
2603
+ const isHostElement = isHost(renderFnResults);
2604
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
2605
+ if (!isHostElement) {
2606
+ rootVnode.$attrs$ = oldVNode.$attrs$;
2607
+ }
2604
2608
  hostTagName = hostElm.tagName;
2605
2609
  if (BUILD13.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
2606
2610
  throw new Error(`The <Host> must be the single root component.
@@ -4026,25 +4030,13 @@ function proxyHostElement(elm, cstr) {
4026
4030
  var _a;
4027
4031
  if (memberFlags & 31 /* Prop */) {
4028
4032
  const attributeName = metaAttributeName || memberName;
4029
- let attrValue = elm.getAttribute(attributeName);
4030
- if ((attrValue == null ? void 0 : attrValue.startsWith("{")) && attrValue.endsWith("}") || (attrValue == null ? void 0 : attrValue.startsWith("[")) && attrValue.endsWith("]")) {
4031
- try {
4032
- attrValue = JSON.parse(attrValue);
4033
- } catch (e) {
4034
- }
4035
- } else if (attrValue == null ? void 0 : attrValue.startsWith(SERIALIZED_PREFIX)) {
4036
- attrValue = deserializeProperty(attrValue);
4037
- }
4038
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(cstr.prototype, memberName) || {};
4039
- let attrPropVal;
4040
- if (typeof attrValue !== "undefined") {
4041
- attrPropVal = parsePropertyValue(attrValue, memberFlags);
4042
- }
4033
+ let attrPropVal = parsePropertyValue(elm.getAttribute(attributeName), memberFlags);
4043
4034
  const ownValue = elm[memberName];
4044
4035
  if (ownValue !== void 0) {
4045
4036
  attrPropVal = ownValue;
4046
4037
  delete elm[memberName];
4047
4038
  }
4039
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(cstr.prototype, memberName) || {};
4048
4040
  if (attrPropVal !== void 0) {
4049
4041
  if (origSetter) {
4050
4042
  origSetter.apply(elm, [attrPropVal]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/hydrate",
3
- "version": "4.28.2-dev.1742328872.ce86124",
3
+ "version": "4.28.2-dev.1742410675.302a004",
4
4
  "description": "Stencil internal hydrate 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