@stencil/core 4.41.3 → 4.42.0
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/cli/index.cjs +3 -2
- package/cli/index.js +3 -2
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +527 -127
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +25 -2
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +25 -2
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-ext-modules.d.ts +1 -1
- package/internal/stencil-private.d.ts +32 -0
- package/internal/stencil-public-compiler.d.ts +17 -1
- package/internal/stencil-public-docs.d.ts +26 -0
- package/internal/stencil-public-runtime.d.ts +24 -1
- package/internal/testing/index.js +24 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +27 -27
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +20 -1
- package/testing/package.json +1 -1
|
@@ -125,8 +125,27 @@ export interface EventOptions {
|
|
|
125
125
|
*/
|
|
126
126
|
composed?: boolean;
|
|
127
127
|
}
|
|
128
|
+
export interface AttachInternalsOptions {
|
|
129
|
+
/**
|
|
130
|
+
* Initial custom states to set on the ElementInternals.states CustomStateSet.
|
|
131
|
+
* Each key is the state name and the value is the initial boolean state.
|
|
132
|
+
*
|
|
133
|
+
* These states can be targeted with the CSS `:state()` pseudo-class.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* @AttachInternals({ states: { open: true, active: false } })
|
|
138
|
+
* internals: ElementInternals;
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
|
|
142
|
+
*/
|
|
143
|
+
states?: {
|
|
144
|
+
[stateName: string]: boolean;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
128
147
|
export interface AttachInternalsDecorator {
|
|
129
|
-
(): PropertyDecorator;
|
|
148
|
+
(opts?: AttachInternalsOptions): PropertyDecorator;
|
|
130
149
|
}
|
|
131
150
|
export interface ListenDecorator {
|
|
132
151
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
@@ -1419,6 +1438,8 @@ export declare namespace JSXBase {
|
|
|
1419
1438
|
results?: number;
|
|
1420
1439
|
security?: string;
|
|
1421
1440
|
unselectable?: boolean;
|
|
1441
|
+
[key: `attr:${string}`]: string;
|
|
1442
|
+
[key: `prop:${string}`]: any;
|
|
1422
1443
|
}
|
|
1423
1444
|
interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
|
|
1424
1445
|
class?: string | {
|
|
@@ -1680,6 +1701,8 @@ export declare namespace JSXBase {
|
|
|
1680
1701
|
yChannelSelector?: string;
|
|
1681
1702
|
z?: number | string;
|
|
1682
1703
|
zoomAndPan?: string;
|
|
1704
|
+
[key: `attr:${string}`]: string;
|
|
1705
|
+
[key: `prop:${string}`]: any;
|
|
1683
1706
|
}
|
|
1684
1707
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1685
1708
|
interface ToggleEvent extends Event {
|
|
@@ -3063,6 +3063,12 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
3063
3063
|
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
|
|
3064
3064
|
}
|
|
3065
3065
|
appliedStyles.add(scopeId2);
|
|
3066
|
+
if (import_app_data7.BUILD.hydrateClientSide && "host" in styleContainerNode) {
|
|
3067
|
+
const ssrStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
3068
|
+
if (ssrStyleElm) {
|
|
3069
|
+
writeTask(() => ssrStyleElm.remove());
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3066
3072
|
}
|
|
3067
3073
|
}
|
|
3068
3074
|
}
|
|
@@ -4186,6 +4192,23 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
4186
4192
|
plt.ael(elm, memberName, newValue, capture);
|
|
4187
4193
|
}
|
|
4188
4194
|
}
|
|
4195
|
+
} else if (import_app_data11.BUILD.vdomPropOrAttr && memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
4196
|
+
const attrName = memberName.slice(5);
|
|
4197
|
+
if (newValue == null || newValue === false) {
|
|
4198
|
+
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
4199
|
+
elm.removeAttribute(attrName);
|
|
4200
|
+
}
|
|
4201
|
+
} else {
|
|
4202
|
+
elm.setAttribute(attrName, newValue === true ? "" : newValue);
|
|
4203
|
+
}
|
|
4204
|
+
return;
|
|
4205
|
+
} else if (import_app_data11.BUILD.vdomPropOrAttr && memberName[0] === "p" && memberName.startsWith("prop:")) {
|
|
4206
|
+
const propName = memberName.slice(5);
|
|
4207
|
+
try {
|
|
4208
|
+
elm[propName] = newValue;
|
|
4209
|
+
} catch (e) {
|
|
4210
|
+
}
|
|
4211
|
+
return;
|
|
4189
4212
|
} else if (import_app_data11.BUILD.vdomPropOrAttr) {
|
|
4190
4213
|
const isComplex = isComplexType(newValue);
|
|
4191
4214
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
@@ -4194,7 +4217,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
4194
4217
|
const n = newValue == null ? "" : newValue;
|
|
4195
4218
|
if (memberName === "list") {
|
|
4196
4219
|
isProp = false;
|
|
4197
|
-
} else if (oldValue == null || elm[memberName]
|
|
4220
|
+
} else if (oldValue == null || elm[memberName] !== n) {
|
|
4198
4221
|
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
4199
4222
|
elm[memberName] = n;
|
|
4200
4223
|
} else {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.42.0",
|
|
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
|
package/mock-doc/index.cjs
CHANGED
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Mock Doc v4.
|
|
2
|
+
Stencil Mock Doc v4.42.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED