@lwc/engine-core 9.1.1-alpha.0 → 9.1.1
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/framework/invoker.d.ts +1 -1
- package/dist/framework/main.d.ts +0 -2
- package/dist/index.cjs +6 -21
- package/dist/index.js +7 -21
- package/package.json +4 -4
- package/dist/framework/mosaic.d.ts +0 -52
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LightningElement } from './base-lightning-element';
|
|
1
|
+
import { type LightningElement } from './base-lightning-element';
|
|
2
2
|
import type { VM } from './vm';
|
|
3
3
|
import type { LightningElementConstructor } from './base-lightning-element';
|
|
4
4
|
import type { VNodes } from './vnodes';
|
package/dist/framework/main.d.ts
CHANGED
|
@@ -18,13 +18,11 @@ export { freezeTemplate } from './freeze-template';
|
|
|
18
18
|
export { getComponentAPIVersion } from './component';
|
|
19
19
|
export { shouldBeFormAssociated } from './utils';
|
|
20
20
|
export { getComponentConstructor } from './get-component-constructor';
|
|
21
|
-
export type { MIR, MIRNode, MIRAction, MIRAttributes, MosaicAction, MosaicActionParams, } from './mosaic';
|
|
22
21
|
export type { RendererAPI, LifecycleCallback } from './renderer';
|
|
23
22
|
export type { Template } from './template';
|
|
24
23
|
export type { ConfigValue as WireConfigValue, ContextConsumer as WireContextConsumer, ContextProvider as WireContextProvider, ContextProviderOptions as WireContextProviderOptions, ContextValue as WireContextValue, DataCallback as WireDataCallback, WireAdapter, WireAdapterConstructor, WireAdapterSchemaValue, WireContextSubscriptionPayload, WireContextSubscriptionCallback, } from './wiring';
|
|
25
24
|
export type { FormRestoreState, FormRestoreReason } from './vm';
|
|
26
25
|
export { LightningElement } from './base-lightning-element';
|
|
27
|
-
export { Mosaic } from './mosaic';
|
|
28
26
|
export { default as api } from './decorators/api';
|
|
29
27
|
export { default as track } from './decorators/track';
|
|
30
28
|
export { default as wire } from './decorators/wire';
|
package/dist/index.cjs
CHANGED
|
@@ -6602,16 +6602,11 @@ function invokeComponentConstructor(vm, Ctor) {
|
|
|
6602
6602
|
try {
|
|
6603
6603
|
// job
|
|
6604
6604
|
const result = new Ctor();
|
|
6605
|
-
//
|
|
6606
|
-
//
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
// then the instanceof LightningElement can be used.
|
|
6611
|
-
const useLegacyConstructorCheck = !lwcRuntimeFlags.DISABLE_LEGACY_VALIDATION || lwcRuntimeFlags.LEGACY_LOCKER_ENABLED;
|
|
6612
|
-
const isInvalidConstructor = useLegacyConstructorCheck
|
|
6613
|
-
? vmBeingConstructed.component !== result
|
|
6614
|
-
: !(result instanceof LightningElement);
|
|
6605
|
+
// When strict, reject when the constructor returns a *native* HTMLElement — that is,
|
|
6606
|
+
// result instanceof HTMLElement.
|
|
6607
|
+
const useStrictValidation = !lwcRuntimeFlags.DISABLE_STRICT_VALIDATION && process.env.IS_BROWSER;
|
|
6608
|
+
const isMismatchedConstructor = vmBeingConstructed.component !== result;
|
|
6609
|
+
const isInvalidConstructor = isMismatchedConstructor || (useStrictValidation && result instanceof HTMLElement);
|
|
6615
6610
|
if (isInvalidConstructor) {
|
|
6616
6611
|
throw new TypeError('Invalid component constructor, the class should extend LightningElement.');
|
|
6617
6612
|
}
|
|
@@ -8725,15 +8720,6 @@ function getComponentConstructor(elm) {
|
|
|
8725
8720
|
return ctor;
|
|
8726
8721
|
}
|
|
8727
8722
|
|
|
8728
|
-
/*
|
|
8729
|
-
* Copyright (c) 2026, Salesforce, Inc.
|
|
8730
|
-
* All rights reserved.
|
|
8731
|
-
* SPDX-License-Identifier: MIT
|
|
8732
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
8733
|
-
*/
|
|
8734
|
-
class Mosaic {
|
|
8735
|
-
}
|
|
8736
|
-
|
|
8737
8723
|
/*
|
|
8738
8724
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
8739
8725
|
* All rights reserved.
|
|
@@ -8794,7 +8780,6 @@ Object.defineProperty(exports, "SignalBaseClass", {
|
|
|
8794
8780
|
});
|
|
8795
8781
|
exports.BaseBridgeElement = BaseBridgeElement;
|
|
8796
8782
|
exports.LightningElement = LightningElement;
|
|
8797
|
-
exports.Mosaic = Mosaic;
|
|
8798
8783
|
exports.__unstable__ProfilerControl = profilerControl;
|
|
8799
8784
|
exports.__unstable__ReportingControl = reportingControl;
|
|
8800
8785
|
exports.api = api$1;
|
|
@@ -8829,5 +8814,5 @@ exports.swapTemplate = swapTemplate;
|
|
|
8829
8814
|
exports.track = track;
|
|
8830
8815
|
exports.unwrap = unwrap;
|
|
8831
8816
|
exports.wire = wire;
|
|
8832
|
-
/** version: 9.1.1
|
|
8817
|
+
/** version: 9.1.1 */
|
|
8833
8818
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -6599,16 +6599,11 @@ function invokeComponentConstructor(vm, Ctor) {
|
|
|
6599
6599
|
try {
|
|
6600
6600
|
// job
|
|
6601
6601
|
const result = new Ctor();
|
|
6602
|
-
//
|
|
6603
|
-
//
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
// then the instanceof LightningElement can be used.
|
|
6608
|
-
const useLegacyConstructorCheck = !lwcRuntimeFlags.DISABLE_LEGACY_VALIDATION || lwcRuntimeFlags.LEGACY_LOCKER_ENABLED;
|
|
6609
|
-
const isInvalidConstructor = useLegacyConstructorCheck
|
|
6610
|
-
? vmBeingConstructed.component !== result
|
|
6611
|
-
: !(result instanceof LightningElement);
|
|
6602
|
+
// When strict, reject when the constructor returns a *native* HTMLElement — that is,
|
|
6603
|
+
// result instanceof HTMLElement.
|
|
6604
|
+
const useStrictValidation = !lwcRuntimeFlags.DISABLE_STRICT_VALIDATION && process.env.IS_BROWSER;
|
|
6605
|
+
const isMismatchedConstructor = vmBeingConstructed.component !== result;
|
|
6606
|
+
const isInvalidConstructor = isMismatchedConstructor || (useStrictValidation && result instanceof HTMLElement);
|
|
6612
6607
|
if (isInvalidConstructor) {
|
|
6613
6608
|
throw new TypeError('Invalid component constructor, the class should extend LightningElement.');
|
|
6614
6609
|
}
|
|
@@ -8722,15 +8717,6 @@ function getComponentConstructor(elm) {
|
|
|
8722
8717
|
return ctor;
|
|
8723
8718
|
}
|
|
8724
8719
|
|
|
8725
|
-
/*
|
|
8726
|
-
* Copyright (c) 2026, Salesforce, Inc.
|
|
8727
|
-
* All rights reserved.
|
|
8728
|
-
* SPDX-License-Identifier: MIT
|
|
8729
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
8730
|
-
*/
|
|
8731
|
-
class Mosaic {
|
|
8732
|
-
}
|
|
8733
|
-
|
|
8734
8720
|
/*
|
|
8735
8721
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
8736
8722
|
* All rights reserved.
|
|
@@ -8753,6 +8739,6 @@ function readonly(obj) {
|
|
|
8753
8739
|
return getReadOnlyProxy(obj);
|
|
8754
8740
|
}
|
|
8755
8741
|
|
|
8756
|
-
export { BaseBridgeElement, LightningElement,
|
|
8757
|
-
/** version: 9.1.1
|
|
8742
|
+
export { BaseBridgeElement, LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, computeShadowAndRenderMode, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, runFormAssociatedCallback, runFormDisabledCallback, runFormResetCallback, runFormStateRestoreCallback, sanitizeAttribute, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
8743
|
+
/** version: 9.1.1 */
|
|
8758
8744
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
|
|
5
5
|
],
|
|
6
6
|
"name": "@lwc/engine-core",
|
|
7
|
-
"version": "9.1.1
|
|
7
|
+
"version": "9.1.1",
|
|
8
8
|
"description": "Core LWC engine APIs.",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"lwc"
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@lwc/features": "9.1.1
|
|
55
|
-
"@lwc/shared": "9.1.1
|
|
56
|
-
"@lwc/signals": "9.1.1
|
|
54
|
+
"@lwc/features": "9.1.1",
|
|
55
|
+
"@lwc/shared": "9.1.1",
|
|
56
|
+
"@lwc/signals": "9.1.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"observable-membrane": "2.0.0"
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mosaic Intermediate Representation (MIR) and JSON serialization types
|
|
3
|
-
*/
|
|
4
|
-
type JSONPrimitive = string | number | boolean | null | undefined;
|
|
5
|
-
type JSONValue = JSONPrimitive | JSONObject | JSONArray;
|
|
6
|
-
type JSONObject = {
|
|
7
|
-
[key: string]: JSONValue;
|
|
8
|
-
};
|
|
9
|
-
type JSONArray = JSONValue[];
|
|
10
|
-
export interface MIRAction extends JSONObject {
|
|
11
|
-
name: string;
|
|
12
|
-
params?: JSONObject;
|
|
13
|
-
}
|
|
14
|
-
export interface MIRAttributes {
|
|
15
|
-
action?: MIRAction;
|
|
16
|
-
[key: string]: JSONValue;
|
|
17
|
-
}
|
|
18
|
-
export interface MIR {
|
|
19
|
-
definition: string;
|
|
20
|
-
children?: MIRNode[];
|
|
21
|
-
}
|
|
22
|
-
export interface MIRNode extends MIR {
|
|
23
|
-
attributes?: MIRAttributes;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Mosaic class definition and types
|
|
27
|
-
*/
|
|
28
|
-
type TargetHint = 'modal' | 'panel' | 'toast' | 'pip';
|
|
29
|
-
export interface MosaicActionParams {
|
|
30
|
-
action: {
|
|
31
|
-
value?: JSONObject;
|
|
32
|
-
};
|
|
33
|
-
client: {
|
|
34
|
-
views: {
|
|
35
|
-
update(args: {
|
|
36
|
-
componentRef?: string;
|
|
37
|
-
props?: JSONObject;
|
|
38
|
-
}): void;
|
|
39
|
-
push(args: {
|
|
40
|
-
componentRef: string;
|
|
41
|
-
props?: JSONObject;
|
|
42
|
-
target?: TargetHint;
|
|
43
|
-
}): void;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export type MosaicAction = (params: MosaicActionParams) => void;
|
|
48
|
-
export declare abstract class Mosaic {
|
|
49
|
-
abstract render(): MIR;
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
52
|
-
//# sourceMappingURL=mosaic.d.ts.map
|