@stencil/core 5.0.0-alpha.34 → 5.0.0-alpha.35
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.
package/dist/compiler/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as buildId, a as createPrerenderer, b as versions, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as getScopeId, h as cmpMetaToDocsComponent, i as createSystem, l as createWorkerMessageHandler, m as generateManifest, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as vermoji, x as scopeCss, y as version } from "../compiler-
|
|
1
|
+
import { _ as buildId, a as createPrerenderer, b as versions, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as getScopeId, h as cmpMetaToDocsComponent, i as createSystem, l as createWorkerMessageHandler, m as generateManifest, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as vermoji, x as scopeCss, y as version } from "../compiler-Dvx_T9vu.mjs";
|
|
2
2
|
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-DQBayfoI.mjs";
|
|
3
3
|
export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, generateManifest, getScopeId, loadConfig, nodeRequire, optimizeCss, optimizeJs, scopeCss, transpile, transpileSync, ts, validateConfig, vermoji, version, versions };
|
|
@@ -460,9 +460,9 @@ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
|
|
460
460
|
};
|
|
461
461
|
//#endregion
|
|
462
462
|
//#region src/version.ts
|
|
463
|
-
const version = "5.0.0-alpha.
|
|
464
|
-
const buildId = "
|
|
465
|
-
const vermoji = "
|
|
463
|
+
const version = "5.0.0-alpha.35";
|
|
464
|
+
const buildId = "1787589757";
|
|
465
|
+
const vermoji = "🔭";
|
|
466
466
|
/**
|
|
467
467
|
* Get the installed version of a tool/dependency.
|
|
468
468
|
* Handles packages with exports maps that point to subdirectories.
|
|
@@ -7095,12 +7095,12 @@ function createCustomElement(customElements, ownerDocument, tagName) {
|
|
|
7095
7095
|
const host = new Proxy({}, {
|
|
7096
7096
|
get(obj, prop) {
|
|
7097
7097
|
const elm = proxyElements.get(host);
|
|
7098
|
-
if (elm != null) return elm
|
|
7098
|
+
if (elm != null) return Reflect.get(elm, prop, host);
|
|
7099
7099
|
return obj[prop];
|
|
7100
7100
|
},
|
|
7101
7101
|
set(obj, prop, val) {
|
|
7102
7102
|
const elm = proxyElements.get(host);
|
|
7103
|
-
if (elm != null) elm
|
|
7103
|
+
if (elm != null) Reflect.set(elm, prop, val, host);
|
|
7104
7104
|
else obj[prop] = val;
|
|
7105
7105
|
return true;
|
|
7106
7106
|
},
|
|
@@ -7108,6 +7108,26 @@ function createCustomElement(customElements, ownerDocument, tagName) {
|
|
|
7108
7108
|
if (prop in proxyElements.get(host)) return true;
|
|
7109
7109
|
if (prop in obj) return true;
|
|
7110
7110
|
return false;
|
|
7111
|
+
},
|
|
7112
|
+
defineProperty(obj, prop, descriptor) {
|
|
7113
|
+
const elm = proxyElements.get(host);
|
|
7114
|
+
return Reflect.defineProperty(elm != null ? elm : obj, prop, descriptor);
|
|
7115
|
+
},
|
|
7116
|
+
deleteProperty(obj, prop) {
|
|
7117
|
+
const elm = proxyElements.get(host);
|
|
7118
|
+
return Reflect.deleteProperty(elm != null ? elm : obj, prop);
|
|
7119
|
+
},
|
|
7120
|
+
getOwnPropertyDescriptor(obj, prop) {
|
|
7121
|
+
const elm = proxyElements.get(host);
|
|
7122
|
+
return Reflect.getOwnPropertyDescriptor(elm != null ? elm : obj, prop);
|
|
7123
|
+
},
|
|
7124
|
+
ownKeys(obj) {
|
|
7125
|
+
const elm = proxyElements.get(host);
|
|
7126
|
+
return Reflect.ownKeys(elm != null ? elm : obj);
|
|
7127
|
+
},
|
|
7128
|
+
getPrototypeOf(obj) {
|
|
7129
|
+
const elm = proxyElements.get(host);
|
|
7130
|
+
return Reflect.getPrototypeOf(elm != null ? elm : obj);
|
|
7111
7131
|
}
|
|
7112
7132
|
});
|
|
7113
7133
|
const elm = new MockHTMLElement(ownerDocument, tagName);
|
|
@@ -7304,9 +7324,18 @@ var MockFocusEvent = class extends MockUIEvent {
|
|
|
7304
7324
|
var MockEventListener = class {
|
|
7305
7325
|
type;
|
|
7306
7326
|
handler;
|
|
7307
|
-
|
|
7327
|
+
capture;
|
|
7328
|
+
once;
|
|
7329
|
+
constructor(type, handler, options) {
|
|
7308
7330
|
this.type = type;
|
|
7309
7331
|
this.handler = handler;
|
|
7332
|
+
if (typeof options === "boolean") {
|
|
7333
|
+
this.capture = options;
|
|
7334
|
+
this.once = false;
|
|
7335
|
+
} else {
|
|
7336
|
+
this.capture = options?.capture ?? false;
|
|
7337
|
+
this.once = options?.once ?? false;
|
|
7338
|
+
}
|
|
7310
7339
|
}
|
|
7311
7340
|
};
|
|
7312
7341
|
/**
|
|
@@ -7315,11 +7344,12 @@ var MockEventListener = class {
|
|
|
7315
7344
|
* @param elm - the element to add the listener to
|
|
7316
7345
|
* @param type - the event type to listen for
|
|
7317
7346
|
* @param handler - the event handler function
|
|
7347
|
+
* @param options - `capture` and `once` are supported; `passive` and `signal` are accepted but not implemented
|
|
7318
7348
|
*/
|
|
7319
|
-
function addEventListener(elm, type, handler) {
|
|
7349
|
+
function addEventListener(elm, type, handler, options) {
|
|
7320
7350
|
const target = elm;
|
|
7321
7351
|
if (target.__listeners == null) target.__listeners = [];
|
|
7322
|
-
target.__listeners.push(new MockEventListener(type, handler));
|
|
7352
|
+
target.__listeners.push(new MockEventListener(type, handler, options));
|
|
7323
7353
|
}
|
|
7324
7354
|
/**
|
|
7325
7355
|
* Remove an event listener from an element.
|
|
@@ -7327,11 +7357,13 @@ function addEventListener(elm, type, handler) {
|
|
|
7327
7357
|
* @param elm - the element to remove the listener from
|
|
7328
7358
|
* @param type - the event type to remove
|
|
7329
7359
|
* @param handler - the event handler function to remove
|
|
7360
|
+
* @param options - only `capture` is relevant here, since listeners are keyed by type + handler + capture
|
|
7330
7361
|
*/
|
|
7331
|
-
function removeEventListener(elm, type, handler) {
|
|
7362
|
+
function removeEventListener(elm, type, handler, options) {
|
|
7332
7363
|
const target = elm;
|
|
7364
|
+
const capture = typeof options === "boolean" ? options : options?.capture ?? false;
|
|
7333
7365
|
if (target != null && Array.isArray(target.__listeners) === true) {
|
|
7334
|
-
const elmListener = target.__listeners.find((e) => e.type === type && e.handler === handler);
|
|
7366
|
+
const elmListener = target.__listeners.find((e) => e.type === type && e.handler === handler && e.capture === capture);
|
|
7335
7367
|
if (elmListener != null) {
|
|
7336
7368
|
const index = target.__listeners.indexOf(elmListener);
|
|
7337
7369
|
target.__listeners.splice(index, 1);
|
|
@@ -7357,6 +7389,7 @@ function triggerEventListener(elm, ev) {
|
|
|
7357
7389
|
const target = elm;
|
|
7358
7390
|
ev.currentTarget = elm;
|
|
7359
7391
|
if (Array.isArray(target.__listeners) === true) target.__listeners.filter((e) => e.type === ev.type).forEach((listener) => {
|
|
7392
|
+
if (listener.once) removeEventListener(target, listener.type, listener.handler, { capture: listener.capture });
|
|
7360
7393
|
try {
|
|
7361
7394
|
listener.handler.call(target, ev);
|
|
7362
7395
|
} catch (err) {
|
|
@@ -8152,8 +8185,9 @@ var MockNode = class {
|
|
|
8152
8185
|
}
|
|
8153
8186
|
get nextSibling() {
|
|
8154
8187
|
if (this.parentNode != null) {
|
|
8155
|
-
const
|
|
8156
|
-
|
|
8188
|
+
const selfIndex = this.parentNode.childNodes.indexOf(this);
|
|
8189
|
+
if (selfIndex === -1) return null;
|
|
8190
|
+
return this.parentNode.childNodes[selfIndex + 1] || null;
|
|
8157
8191
|
}
|
|
8158
8192
|
return null;
|
|
8159
8193
|
}
|
|
@@ -8214,11 +8248,11 @@ var MockNode = class {
|
|
|
8214
8248
|
set textContent(value) {
|
|
8215
8249
|
this._nodeValue = String(value);
|
|
8216
8250
|
}
|
|
8217
|
-
addEventListener(type, handler) {
|
|
8218
|
-
addEventListener(this, type, handler);
|
|
8251
|
+
addEventListener(type, handler, options) {
|
|
8252
|
+
addEventListener(this, type, handler, options);
|
|
8219
8253
|
}
|
|
8220
|
-
removeEventListener(type, handler) {
|
|
8221
|
-
removeEventListener(this, type, handler);
|
|
8254
|
+
removeEventListener(type, handler, options) {
|
|
8255
|
+
removeEventListener(this, type, handler, options);
|
|
8222
8256
|
}
|
|
8223
8257
|
dispatchEvent(ev) {
|
|
8224
8258
|
return dispatchEvent(this, ev);
|
|
@@ -8263,8 +8297,8 @@ var MockElement = class extends MockNode {
|
|
|
8263
8297
|
this.__shadowRoot = null;
|
|
8264
8298
|
this.__attributeMap = null;
|
|
8265
8299
|
}
|
|
8266
|
-
addEventListener(type, handler) {
|
|
8267
|
-
addEventListener(this, type, handler);
|
|
8300
|
+
addEventListener(type, handler, options) {
|
|
8301
|
+
addEventListener(this, type, handler, options);
|
|
8268
8302
|
}
|
|
8269
8303
|
attachShadow(_opts) {
|
|
8270
8304
|
const shadowRoot = this.ownerDocument.createDocumentFragment();
|
|
@@ -8531,8 +8565,9 @@ var MockElement = class extends MockNode {
|
|
|
8531
8565
|
get nextElementSibling() {
|
|
8532
8566
|
const parentElement = this.parentElement;
|
|
8533
8567
|
if (parentElement != null && (parentElement.nodeType === 1 || parentElement.nodeType === 11 || parentElement.nodeType === 9)) {
|
|
8534
|
-
const
|
|
8535
|
-
|
|
8568
|
+
const selfIndex = parentElement.children.indexOf(this);
|
|
8569
|
+
if (selfIndex === -1) return null;
|
|
8570
|
+
return parentElement.children[selfIndex + 1] || null;
|
|
8536
8571
|
}
|
|
8537
8572
|
return null;
|
|
8538
8573
|
}
|
|
@@ -8546,8 +8581,9 @@ var MockElement = class extends MockNode {
|
|
|
8546
8581
|
get previousElementSibling() {
|
|
8547
8582
|
const parentElement = this.parentElement;
|
|
8548
8583
|
if (parentElement != null && (parentElement.nodeType === 1 || parentElement.nodeType === 11 || parentElement.nodeType === 9)) {
|
|
8549
|
-
const
|
|
8550
|
-
|
|
8584
|
+
const selfIndex = parentElement.children.indexOf(this);
|
|
8585
|
+
if (selfIndex === -1) return null;
|
|
8586
|
+
return parentElement.children[selfIndex - 1] || null;
|
|
8551
8587
|
}
|
|
8552
8588
|
return null;
|
|
8553
8589
|
}
|
|
@@ -8585,8 +8621,8 @@ var MockElement = class extends MockNode {
|
|
|
8585
8621
|
if (checkAttributeChanged(this) === true) attributeChanged(this, attrName, attr.value, null);
|
|
8586
8622
|
}
|
|
8587
8623
|
}
|
|
8588
|
-
removeEventListener(type, handler) {
|
|
8589
|
-
removeEventListener(this, type, handler);
|
|
8624
|
+
removeEventListener(type, handler, options) {
|
|
8625
|
+
removeEventListener(this, type, handler, options);
|
|
8590
8626
|
}
|
|
8591
8627
|
setAttribute(attrName, value) {
|
|
8592
8628
|
if (attrName === "style") this.style = value;
|
|
@@ -11211,6 +11247,7 @@ var MockIntersectionObserver = class {
|
|
|
11211
11247
|
}
|
|
11212
11248
|
unobserve() {}
|
|
11213
11249
|
};
|
|
11250
|
+
const DEFAULT_LOCATION_HREF = "http://localhost/";
|
|
11214
11251
|
var MockLocation = class {
|
|
11215
11252
|
ancestorOrigins = null;
|
|
11216
11253
|
protocol = "";
|
|
@@ -11241,6 +11278,9 @@ var MockLocation = class {
|
|
|
11241
11278
|
this.password = url.password;
|
|
11242
11279
|
this.origin = url.origin;
|
|
11243
11280
|
}
|
|
11281
|
+
constructor() {
|
|
11282
|
+
this.href = DEFAULT_LOCATION_HREF;
|
|
11283
|
+
}
|
|
11244
11284
|
assign(_url) {}
|
|
11245
11285
|
reload(_forcedReload) {}
|
|
11246
11286
|
replace(_url) {}
|
|
@@ -11442,8 +11482,8 @@ var MockWindow = class {
|
|
|
11442
11482
|
resetWindowDefaults(this);
|
|
11443
11483
|
resetWindowDimensions(this);
|
|
11444
11484
|
}
|
|
11445
|
-
addEventListener(type, handler) {
|
|
11446
|
-
addEventListener(this, type, handler);
|
|
11485
|
+
addEventListener(type, handler, options) {
|
|
11486
|
+
addEventListener(this, type, handler, options);
|
|
11447
11487
|
}
|
|
11448
11488
|
alert(msg) {
|
|
11449
11489
|
if (this.console) this.console.debug(msg);
|
|
@@ -11665,8 +11705,8 @@ var MockWindow = class {
|
|
|
11665
11705
|
get origin() {
|
|
11666
11706
|
return this.location.origin;
|
|
11667
11707
|
}
|
|
11668
|
-
removeEventListener(type, handler) {
|
|
11669
|
-
removeEventListener(this, type, handler);
|
|
11708
|
+
removeEventListener(type, handler, options) {
|
|
11709
|
+
removeEventListener(this, type, handler, options);
|
|
11670
11710
|
}
|
|
11671
11711
|
requestAnimationFrame(callback) {
|
|
11672
11712
|
return this.setTimeout(() => {
|
|
@@ -11976,7 +12016,8 @@ var MockDocument = class MockDocument extends MockHTMLElement {
|
|
|
11976
12016
|
this.#nwsapi = (0, import_nwsapi.default)({ document: this });
|
|
11977
12017
|
this.#nwsapi.configure({
|
|
11978
12018
|
LOGERRORS: false,
|
|
11979
|
-
VERBOSITY: false
|
|
12019
|
+
VERBOSITY: false,
|
|
12020
|
+
IDS_DUPES: false
|
|
11980
12021
|
});
|
|
11981
12022
|
}
|
|
11982
12023
|
return this.#nwsapi;
|
package/dist/sys/node/worker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as createWorkerMessageHandler } from "../../compiler-
|
|
1
|
+
import { l as createWorkerMessageHandler } from "../../compiler-Dvx_T9vu.mjs";
|
|
2
2
|
import { t as createNodeSys } from "../../node-DQBayfoI.mjs";
|
|
3
3
|
//#region src/sys/node/node-worker-thread.ts
|
|
4
4
|
/**
|
package/dist/testing/index.mjs
CHANGED
|
@@ -31,7 +31,7 @@ import "@rollup/pluginutils";
|
|
|
31
31
|
import { createHash } from "crypto";
|
|
32
32
|
import { afterAll, vi } from "vitest";
|
|
33
33
|
//#region src/version.ts
|
|
34
|
-
const version = "5.0.0-alpha.
|
|
34
|
+
const version = "5.0.0-alpha.35";
|
|
35
35
|
const MEMBER_FLAGS = {
|
|
36
36
|
String: 1,
|
|
37
37
|
Number: 2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.35",
|
|
4
4
|
"description": "A Compiler for Web Components and Progressive Web Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
"terser": "^5.50.0",
|
|
122
122
|
"tinyglobby": "^0.2.17",
|
|
123
123
|
"typescript": ">5.0.0 <7.0.0",
|
|
124
|
-
"@stencil/cli": "5.0.0-alpha.
|
|
125
|
-
"@stencil/mock-doc": "5.0.0-alpha.
|
|
126
|
-
"@stencil/dev-server": "5.0.0-alpha.
|
|
124
|
+
"@stencil/cli": "5.0.0-alpha.35",
|
|
125
|
+
"@stencil/mock-doc": "5.0.0-alpha.35",
|
|
126
|
+
"@stencil/dev-server": "5.0.0-alpha.35"
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
129
|
"@ionic/prettier-config": "^4.0.0",
|