@stencil/core 4.18.2-dev.1716440554.5f4fcfa → 4.18.2-dev.1716526899.56c60d4

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 Hydrate Runner v4.18.2-dev.1716440554.5f4fcfa | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Runner v4.18.2-dev.1716526899.56c60d4 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -12329,67 +12329,75 @@ var MockUListElement = class extends MockHTMLElement {
12329
12329
  super(ownerDocument, "ul");
12330
12330
  }
12331
12331
  };
12332
+ var CanvasRenderingContext = class {
12333
+ constructor(context, contextAttributes) {
12334
+ this.context = context;
12335
+ this.contextAttributes = contextAttributes;
12336
+ }
12337
+ fillRect() {
12338
+ return;
12339
+ }
12340
+ clearRect() {
12341
+ }
12342
+ getImageData(_, __, w, h) {
12343
+ return {
12344
+ data: new Array(w * h * 4)
12345
+ };
12346
+ }
12347
+ toDataURL() {
12348
+ return "data:,";
12349
+ }
12350
+ putImageData() {
12351
+ }
12352
+ createImageData() {
12353
+ return {};
12354
+ }
12355
+ setTransform() {
12356
+ }
12357
+ drawImage() {
12358
+ }
12359
+ save() {
12360
+ }
12361
+ fillText() {
12362
+ }
12363
+ restore() {
12364
+ }
12365
+ beginPath() {
12366
+ }
12367
+ moveTo() {
12368
+ }
12369
+ lineTo() {
12370
+ }
12371
+ closePath() {
12372
+ }
12373
+ stroke() {
12374
+ }
12375
+ translate() {
12376
+ }
12377
+ scale() {
12378
+ }
12379
+ rotate() {
12380
+ }
12381
+ arc() {
12382
+ }
12383
+ fill() {
12384
+ }
12385
+ measureText() {
12386
+ return { width: 0 };
12387
+ }
12388
+ transform() {
12389
+ }
12390
+ rect() {
12391
+ }
12392
+ clip() {
12393
+ }
12394
+ };
12332
12395
  var MockCanvasElement = class extends MockHTMLElement {
12333
12396
  constructor(ownerDocument) {
12334
12397
  super(ownerDocument, "canvas");
12335
12398
  }
12336
- getContext() {
12337
- return {
12338
- fillRect() {
12339
- return;
12340
- },
12341
- clearRect() {
12342
- },
12343
- getImageData: function(_, __, w, h) {
12344
- return {
12345
- data: new Array(w * h * 4)
12346
- };
12347
- },
12348
- putImageData() {
12349
- },
12350
- createImageData: function() {
12351
- return [];
12352
- },
12353
- setTransform() {
12354
- },
12355
- drawImage() {
12356
- },
12357
- save() {
12358
- },
12359
- fillText() {
12360
- },
12361
- restore() {
12362
- },
12363
- beginPath() {
12364
- },
12365
- moveTo() {
12366
- },
12367
- lineTo() {
12368
- },
12369
- closePath() {
12370
- },
12371
- stroke() {
12372
- },
12373
- translate() {
12374
- },
12375
- scale() {
12376
- },
12377
- rotate() {
12378
- },
12379
- arc() {
12380
- },
12381
- fill() {
12382
- },
12383
- measureText() {
12384
- return { width: 0 };
12385
- },
12386
- transform() {
12387
- },
12388
- rect() {
12389
- },
12390
- clip() {
12391
- }
12392
- };
12399
+ getContext(context, contextAttributes) {
12400
+ return new CanvasRenderingContext(context, contextAttributes);
12393
12401
  }
12394
12402
  };
12395
12403
  function fullUrl(elm, attrName) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.18.2-dev.1716440554.5f4fcfa",
3
+ "version": "4.18.2-dev.1716526899.56c60d4",
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",
@@ -964,11 +964,11 @@ export interface HostElement extends HTMLElement {
964
964
  */
965
965
  ['s-sc']?: string;
966
966
  /**
967
- * Root Scope Id
968
- * The scope id of the root component when using scoped css encapsulation
967
+ * Scope Ids
968
+ * All the possible scope ids of this component when using scoped css encapsulation
969
969
  * or using shadow dom but the browser doesn't support it
970
970
  */
971
- ['s-rsc']?: string;
971
+ ['s-scs']?: string[];
972
972
  /**
973
973
  * Hot Module Replacement, dev mode only
974
974
  *
@@ -979,6 +979,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
979
979
  if ((import_app_data10.BUILD.shadowDom || import_app_data10.BUILD.scoped) && isDef(scopeId) && elm["s-si"] !== scopeId) {
980
980
  elm.classList.add(elm["s-si"] = scopeId);
981
981
  }
982
+ if (import_app_data10.BUILD.scoped) {
983
+ updateElementScopeIds(elm, parentElm);
984
+ }
982
985
  if (newVNode2.$children$) {
983
986
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
984
987
  childNode = createElm(oldParentVNode, newVNode2, i2, elm);
@@ -1340,22 +1343,33 @@ var nullifyVNodeRefs = (vNode) => {
1340
1343
  var insertBefore = (parent, newNode, reference) => {
1341
1344
  const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1342
1345
  if (import_app_data10.BUILD.scoped) {
1343
- setParentScopeIdAsClassName(newNode, parent);
1346
+ updateElementScopeIds(newNode, parent);
1344
1347
  }
1345
1348
  return inserted;
1346
1349
  };
1347
- var findParentScopeId = (element) => {
1348
- return element ? element["s-rsc"] || element["s-si"] || element["s-sc"] || findParentScopeId(element.parentElement) : void 0;
1350
+ var findScopeIds = (element) => {
1351
+ const scopeIds = [];
1352
+ if (element) {
1353
+ scopeIds.push(
1354
+ ...element["s-scs"] || [],
1355
+ element["s-si"],
1356
+ element["s-sc"],
1357
+ ...findScopeIds(element.parentElement)
1358
+ );
1359
+ }
1360
+ return scopeIds;
1349
1361
  };
1350
- var setParentScopeIdAsClassName = (element, parent) => {
1351
- var _a, _b, _c;
1352
- if (element && parent) {
1353
- const oldRootScopeId = element["s-rsc"];
1354
- const newRootScopeId = findParentScopeId(parent);
1355
- oldRootScopeId && ((_a = element.classList) == null ? void 0 : _a.contains(oldRootScopeId)) && element.classList.remove(oldRootScopeId);
1356
- if (newRootScopeId) {
1357
- element["s-rsc"] = newRootScopeId;
1358
- !((_b = element.classList) == null ? void 0 : _b.contains(newRootScopeId)) && ((_c = element.classList) == null ? void 0 : _c.add(newRootScopeId));
1362
+ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1363
+ var _a;
1364
+ if (element && parent && element.nodeType === 1 /* ElementNode */) {
1365
+ const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1366
+ if (scopeIds.size) {
1367
+ (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1368
+ if (element["s-ol"] || iterateChildNodes) {
1369
+ for (const childNode of Array.from(element.childNodes)) {
1370
+ updateElementScopeIds(childNode, element, true);
1371
+ }
1372
+ }
1359
1373
  }
1360
1374
  }
1361
1375
  };
@@ -2169,7 +2183,7 @@ var patchCloneNode = (HostElementPrototype) => {
2169
2183
  "s-nr",
2170
2184
  "s-si",
2171
2185
  "s-rf",
2172
- "s-rsc"
2186
+ "s-scs"
2173
2187
  ];
2174
2188
  for (; i2 < srcNode.childNodes.length; i2++) {
2175
2189
  slotted = srcNode.childNodes[i2]["s-nr"];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.18.2-dev.1716440554.5f4fcfa",
3
+ "version": "4.18.2-dev.1716526899.56c60d4",
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.18.2-dev.1716440554.5f4fcfa | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc (CommonJS) v4.18.2-dev.1716526899.56c60d4 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
@@ -8202,67 +8202,75 @@ var MockUListElement = class extends MockHTMLElement {
8202
8202
  super(ownerDocument, "ul");
8203
8203
  }
8204
8204
  };
8205
+ var CanvasRenderingContext = class {
8206
+ constructor(context, contextAttributes) {
8207
+ this.context = context;
8208
+ this.contextAttributes = contextAttributes;
8209
+ }
8210
+ fillRect() {
8211
+ return;
8212
+ }
8213
+ clearRect() {
8214
+ }
8215
+ getImageData(_, __, w, h) {
8216
+ return {
8217
+ data: new Array(w * h * 4)
8218
+ };
8219
+ }
8220
+ toDataURL() {
8221
+ return "data:,";
8222
+ }
8223
+ putImageData() {
8224
+ }
8225
+ createImageData() {
8226
+ return {};
8227
+ }
8228
+ setTransform() {
8229
+ }
8230
+ drawImage() {
8231
+ }
8232
+ save() {
8233
+ }
8234
+ fillText() {
8235
+ }
8236
+ restore() {
8237
+ }
8238
+ beginPath() {
8239
+ }
8240
+ moveTo() {
8241
+ }
8242
+ lineTo() {
8243
+ }
8244
+ closePath() {
8245
+ }
8246
+ stroke() {
8247
+ }
8248
+ translate() {
8249
+ }
8250
+ scale() {
8251
+ }
8252
+ rotate() {
8253
+ }
8254
+ arc() {
8255
+ }
8256
+ fill() {
8257
+ }
8258
+ measureText() {
8259
+ return { width: 0 };
8260
+ }
8261
+ transform() {
8262
+ }
8263
+ rect() {
8264
+ }
8265
+ clip() {
8266
+ }
8267
+ };
8205
8268
  var MockCanvasElement = class extends MockHTMLElement {
8206
8269
  constructor(ownerDocument) {
8207
8270
  super(ownerDocument, "canvas");
8208
8271
  }
8209
- getContext() {
8210
- return {
8211
- fillRect() {
8212
- return;
8213
- },
8214
- clearRect() {
8215
- },
8216
- getImageData: function(_, __, w, h) {
8217
- return {
8218
- data: new Array(w * h * 4)
8219
- };
8220
- },
8221
- putImageData() {
8222
- },
8223
- createImageData: function() {
8224
- return [];
8225
- },
8226
- setTransform() {
8227
- },
8228
- drawImage() {
8229
- },
8230
- save() {
8231
- },
8232
- fillText() {
8233
- },
8234
- restore() {
8235
- },
8236
- beginPath() {
8237
- },
8238
- moveTo() {
8239
- },
8240
- lineTo() {
8241
- },
8242
- closePath() {
8243
- },
8244
- stroke() {
8245
- },
8246
- translate() {
8247
- },
8248
- scale() {
8249
- },
8250
- rotate() {
8251
- },
8252
- arc() {
8253
- },
8254
- fill() {
8255
- },
8256
- measureText() {
8257
- return { width: 0 };
8258
- },
8259
- transform() {
8260
- },
8261
- rect() {
8262
- },
8263
- clip() {
8264
- }
8265
- };
8272
+ getContext(context, contextAttributes) {
8273
+ return new CanvasRenderingContext(context, contextAttributes);
8266
8274
  }
8267
8275
  };
8268
8276
  function fullUrl(elm, attrName) {
@@ -312,38 +312,44 @@ declare class MockTitleElement extends MockHTMLElement {
312
312
  declare class MockUListElement extends MockHTMLElement {
313
313
  constructor(ownerDocument: any);
314
314
  }
315
+ type CanvasContext = '2d' | 'webgl' | 'webgl2' | 'bitmaprenderer';
316
+ declare class CanvasRenderingContext {
317
+ context: CanvasContext;
318
+ contextAttributes: WebGLContextAttributes;
319
+ constructor(context: CanvasContext, contextAttributes?: WebGLContextAttributes);
320
+ fillRect(): void;
321
+ clearRect(): void;
322
+ getImageData(_: number, __: number, w: number, h: number): {
323
+ data: any[];
324
+ };
325
+ toDataURL(): string;
326
+ putImageData(): void;
327
+ createImageData(): ImageData;
328
+ setTransform(): void;
329
+ drawImage(): void;
330
+ save(): void;
331
+ fillText(): void;
332
+ restore(): void;
333
+ beginPath(): void;
334
+ moveTo(): void;
335
+ lineTo(): void;
336
+ closePath(): void;
337
+ stroke(): void;
338
+ translate(): void;
339
+ scale(): void;
340
+ rotate(): void;
341
+ arc(): void;
342
+ fill(): void;
343
+ measureText(): {
344
+ width: number;
345
+ };
346
+ transform(): void;
347
+ rect(): void;
348
+ clip(): void;
349
+ }
315
350
  declare class MockCanvasElement extends MockHTMLElement {
316
351
  constructor(ownerDocument: any);
317
- getContext(): {
318
- fillRect(): void;
319
- clearRect(): void;
320
- getImageData: (_: number, __: number, w: number, h: number) => {
321
- data: any[];
322
- };
323
- putImageData(): void;
324
- createImageData: () => any[];
325
- setTransform(): void;
326
- drawImage(): void;
327
- save(): void;
328
- fillText(): void;
329
- restore(): void;
330
- beginPath(): void;
331
- moveTo(): void;
332
- lineTo(): void;
333
- closePath(): void;
334
- stroke(): void;
335
- translate(): void;
336
- scale(): void;
337
- rotate(): void;
338
- arc(): void;
339
- fill(): void;
340
- measureText(): {
341
- width: number;
342
- };
343
- transform(): void;
344
- rect(): void;
345
- clip(): void;
346
- };
352
+ getContext(context: CanvasContext, contextAttributes?: WebGLContextAttributes): CanvasRenderingContext;
347
353
  }
348
354
  declare class MockEvent {
349
355
  bubbles: boolean;
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.18.2-dev.1716440554.5f4fcfa | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.18.2-dev.1716526899.56c60d4 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/runtime/runtime-constants.ts
@@ -8149,67 +8149,75 @@ var MockUListElement = class extends MockHTMLElement {
8149
8149
  super(ownerDocument, "ul");
8150
8150
  }
8151
8151
  };
8152
+ var CanvasRenderingContext = class {
8153
+ constructor(context, contextAttributes) {
8154
+ this.context = context;
8155
+ this.contextAttributes = contextAttributes;
8156
+ }
8157
+ fillRect() {
8158
+ return;
8159
+ }
8160
+ clearRect() {
8161
+ }
8162
+ getImageData(_, __, w, h) {
8163
+ return {
8164
+ data: new Array(w * h * 4)
8165
+ };
8166
+ }
8167
+ toDataURL() {
8168
+ return "data:,";
8169
+ }
8170
+ putImageData() {
8171
+ }
8172
+ createImageData() {
8173
+ return {};
8174
+ }
8175
+ setTransform() {
8176
+ }
8177
+ drawImage() {
8178
+ }
8179
+ save() {
8180
+ }
8181
+ fillText() {
8182
+ }
8183
+ restore() {
8184
+ }
8185
+ beginPath() {
8186
+ }
8187
+ moveTo() {
8188
+ }
8189
+ lineTo() {
8190
+ }
8191
+ closePath() {
8192
+ }
8193
+ stroke() {
8194
+ }
8195
+ translate() {
8196
+ }
8197
+ scale() {
8198
+ }
8199
+ rotate() {
8200
+ }
8201
+ arc() {
8202
+ }
8203
+ fill() {
8204
+ }
8205
+ measureText() {
8206
+ return { width: 0 };
8207
+ }
8208
+ transform() {
8209
+ }
8210
+ rect() {
8211
+ }
8212
+ clip() {
8213
+ }
8214
+ };
8152
8215
  var MockCanvasElement = class extends MockHTMLElement {
8153
8216
  constructor(ownerDocument) {
8154
8217
  super(ownerDocument, "canvas");
8155
8218
  }
8156
- getContext() {
8157
- return {
8158
- fillRect() {
8159
- return;
8160
- },
8161
- clearRect() {
8162
- },
8163
- getImageData: function(_, __, w, h) {
8164
- return {
8165
- data: new Array(w * h * 4)
8166
- };
8167
- },
8168
- putImageData() {
8169
- },
8170
- createImageData: function() {
8171
- return [];
8172
- },
8173
- setTransform() {
8174
- },
8175
- drawImage() {
8176
- },
8177
- save() {
8178
- },
8179
- fillText() {
8180
- },
8181
- restore() {
8182
- },
8183
- beginPath() {
8184
- },
8185
- moveTo() {
8186
- },
8187
- lineTo() {
8188
- },
8189
- closePath() {
8190
- },
8191
- stroke() {
8192
- },
8193
- translate() {
8194
- },
8195
- scale() {
8196
- },
8197
- rotate() {
8198
- },
8199
- arc() {
8200
- },
8201
- fill() {
8202
- },
8203
- measureText() {
8204
- return { width: 0 };
8205
- },
8206
- transform() {
8207
- },
8208
- rect() {
8209
- },
8210
- clip() {
8211
- }
8212
- };
8219
+ getContext(context, contextAttributes) {
8220
+ return new CanvasRenderingContext(context, contextAttributes);
8213
8221
  }
8214
8222
  };
8215
8223
  function fullUrl(elm, attrName) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.18.2-dev.1716440554.5f4fcfa",
3
+ "version": "4.18.2-dev.1716526899.56c60d4",
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.18.2-dev.1716440554.5f4fcfa",
3
+ "version": "4.18.2-dev.1716526899.56c60d4",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -148,7 +148,7 @@
148
148
  ],
149
149
  "prettier": "@ionic/prettier-config",
150
150
  "volta": {
151
- "node": "22.1.0",
152
- "npm": "10.7.0"
151
+ "node": "22.2.0",
152
+ "npm": "10.8.0"
153
153
  }
154
154
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot v4.18.2-dev.1716440554.5f4fcfa | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.18.2-dev.1716526899.56c60d4 | 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.18.2-dev.1716440554.5f4fcfa",
3
+ "version": "4.18.2-dev.1716526899.56c60d4",
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.18.2-dev.1716440554.5f4fcfa | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.18.2-dev.1716526899.56c60d4 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;