@lwc/engine-core 9.0.4-alpha.2 → 9.1.1-alpha.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.
@@ -1,20 +1,17 @@
1
1
  import type { LightningElement } from '../base-lightning-element';
2
- import type { ConfigValue, ContextValue, ReplaceReactiveValues, WireAdapterConstructor } from '../wiring';
2
+ import type { ConfigValue, ConfigWithReactiveProps, WireAdapterConstructor } from '../wiring';
3
3
  /**
4
4
  * The decorator returned by `@wire()`; not the `wire` function.
5
- *
6
- * For TypeScript users:
7
- * - If you are seeing an unclear error message, ensure that both the type of the decorated prop and
8
- * the config used match the types expected by the wire adapter.
9
- * - String literal types in the config are resolved to the corresponding prop on the component.
10
- * For example, a component with `id = 555` and `@wire(getBook, {id: "$id"} as const) book` will
11
- * have `"$id"` resolve to type `number`.
12
5
  */
13
6
  interface WireDecorator<Value, Class> {
14
7
  (target: unknown, context: ClassFieldDecoratorContext<Class, Value | undefined> | ClassMethodDecoratorContext<Class, Value extends (value: any) => any ? Value : (this: Class, value: Value) => void> | ClassGetterDecoratorContext<Class, Value | undefined> | ClassSetterDecoratorContext<Class, Value>): void;
15
8
  }
16
9
  /**
17
10
  * Decorator factory to wire a property or method to a wire adapter data source.
11
+ *
12
+ * TypeScript users: Due to limitations of the type system, some edge cases are
13
+ * not fully type checked. See the type definition for {@linkcode ConfigWithReactiveProps}
14
+ * for details.
18
15
  * @param adapter the adapter used to provision data
19
16
  * @param config configuration object for the adapter
20
17
  * @returns A decorator function
@@ -24,9 +21,9 @@ interface WireDecorator<Value, Class> {
24
21
  * \@wire(getBook, { id: '$bookId'}) book;
25
22
  * }
26
23
  */
27
- export default function wire<ReactiveConfig extends ConfigValue = ConfigValue, Value = any, Context extends ContextValue = ContextValue, Class = LightningElement>(adapter: WireAdapterConstructor<ReplaceReactiveValues<ReactiveConfig, Class>, Value, Context> | {
28
- adapter: WireAdapterConstructor<ReplaceReactiveValues<ReactiveConfig, Class>, Value, Context>;
29
- }, config?: ReactiveConfig): WireDecorator<Value, Class>;
24
+ export default function wire<const Config extends ConfigValue = ConfigValue, const Value = any, const Class = LightningElement>(adapter: WireAdapterConstructor<Config, Value> | {
25
+ adapter: WireAdapterConstructor<Config, Value>;
26
+ }, config?: ConfigWithReactiveProps<Config, Class>): WireDecorator<Value, Class>;
30
27
  export declare function internalWireFieldDecorator(key: string): PropertyDescriptor;
31
28
  export {};
32
29
  //# sourceMappingURL=wire.d.ts.map
@@ -18,11 +18,13 @@ 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';
21
22
  export type { RendererAPI, LifecycleCallback } from './renderer';
22
23
  export type { Template } from './template';
23
24
  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';
24
25
  export type { FormRestoreState, FormRestoreReason } from './vm';
25
26
  export { LightningElement } from './base-lightning-element';
27
+ export { Mosaic } from './mosaic';
26
28
  export { default as api } from './decorators/api';
27
29
  export { default as track } from './decorators/track';
28
30
  export { default as wire } from './decorators/wire';
@@ -0,0 +1,52 @@
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
@@ -1,4 +1,4 @@
1
1
  export { createContextProviderWithRegister, createContextWatcher } from './context';
2
- export { ConfigCallback, ConfigValue, ContextConsumer, ContextProvider, ContextProviderOptions, ContextValue, DataCallback, ReplaceReactiveValues, WireAdapter, WireAdapterConstructor, WireAdapterSchemaValue, WireContextSubscriptionPayload, WireContextSubscriptionCallback, } from './types';
2
+ export type { ConfigCallback, ConfigValue, ConfigWithReactiveProps, ContextConsumer, ContextProvider, ContextProviderOptions, ContextValue, DataCallback, WireAdapter, WireAdapterConstructor, WireAdapterSchemaValue, WireContextSubscriptionPayload, WireContextSubscriptionCallback, } from './types';
3
3
  export { connectWireAdapters, disconnectWireAdapters, installWireAdapters, storeWiredFieldMeta, storeWiredMethodMeta, } from './wiring';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -50,19 +50,84 @@ export interface ContextProviderOptions {
50
50
  }
51
51
  export type ContextProvider = (elmOrComponent: EventTarget, options: ContextProviderOptions) => void;
52
52
  export type RegisterContextProviderFn = (element: HostElement, adapterContextToken: string, onContextSubscription: WireContextSubscriptionCallback) => void;
53
- /** Resolves a property chain to the corresponding value on the target type. */
54
- type ResolveReactiveValue<
55
- /** The object to search for properties; initially the component. */
56
- Target,
57
- /** A string representing a chain of of property keys, e.g. "data.user.name". */
58
- Keys extends string> = Keys extends `${infer FirstKey}.${infer Rest}` ? FirstKey extends keyof Target ? ResolveReactiveValue<Target[FirstKey], Rest> : undefined : Keys extends keyof Target ? Target[Keys] : undefined;
59
53
  /**
60
- * Detects if the `Value` type is a property chain starting with "$". If so, it resolves the
61
- * properties to the corresponding value on the target type.
54
+ * Gets the property keys that can be used in a reactive string. Excludes symbols and string props
55
+ * with `.` (`$foo.bar` maps to `Class["foo"]["bar"]`; `Class["foo.bar"]` can never be used).
62
56
  */
63
- type ResolveValueIfReactive<Value, Target> = Value extends string ? string extends Value ? any : Value extends `$${infer Keys}` ? ResolveReactiveValue<Target, Keys> : Value : Value;
64
- export type ReplaceReactiveValues<Config extends ConfigValue, Component> = {
65
- [K in keyof Config]: ResolveValueIfReactive<Config[K], Component>;
57
+ type ReactivePropsOnly<K extends PropertyKey> = Exclude<K, symbol | `${string}.${string}`>;
58
+ /** The string keys of an object that match the target type. */
59
+ type PropsOfType<Class, Target> = ReactivePropsOnly<{
60
+ [K in keyof Class]-?: NonNullable<Class[K]> extends Target ? K : never;
61
+ }[keyof Class]>;
62
+ /** Gets the property keys that can be used in a reactive property chain. */
63
+ type ChainableObjectProps<Class> = ReactivePropsOnly<{
64
+ [K in keyof Class]-?: NonNullable<Class[K]> extends object ? keyof NonNullable<Class[K]> extends never ? never : K : never;
65
+ }[keyof Class]>;
66
+ /**
67
+ * Extends a given wire adapter config with reactive property strings
68
+ * (for example, `$prop`) for values on the given class that match the config.
69
+ *
70
+ * Due to limitations of the type system, and to limit the size of the
71
+ * resulting type union, a number of restrictions apply to this type that can
72
+ * result in false positives or false negatives.
73
+ *
74
+ * - Config values with a `string` type inherently permit _any_ string,
75
+ * even reactive strings that resolve to the wrong type.
76
+ * - Only top-level props are validated. Type checking is _not_ done on nested
77
+ * property chains.
78
+ * - Property chains are allowed only if the top-level property is an object.
79
+ * - Property chains from `LightningElement` props are excluded.
80
+ *
81
+ * For property chains, a getter can be used to avoid incorrect error reporting,
82
+ * as top-level properties are always validated. Alternatively, a type assertion
83
+ * can be used to suppress the error.
84
+ *
85
+ * @example
86
+ * // Wire adapter with a required number prop and optional string prop
87
+ * declare const Adapter: WireAdapterConstructor<{ num: number; str?: string }>;
88
+ * declare class Component extends LightningElement {
89
+ * numberProp = 6_7;
90
+ * stringProp = '🙌';
91
+ * objectProp?: { nestedStringProp: string };
92
+
93
+ * \@wire(Adapter, { num: 123 }) validNumberValue?: unknown;
94
+ * \@wire(Adapter, { num: "$numberProp" }) validNumberProp?: unknown;
95
+ * \@wire(Adapter, { num: "bad value" }) invalidNumberValue?: unknown;
96
+ * \@wire(Adapter, { num: "$stringProp" }) invalidNumberProp?: unknown;
97
+ *
98
+ * \@wire(Adapter, { str: "valid string", num: 0 }) validStringValue?: unknown;
99
+ * \@wire(Adapter, { str: "$stringProp", num: 0 }) validStringProp?: unknown;
100
+
101
+ * // `"$numberProp"` is a string, and therefore satisfies the type,
102
+ * // despite resolving to a number at runtime
103
+ * \@wire(Adapter, { str: "$numberProp", num: 0 }) falseNegativeString?: unknown;
104
+ *
105
+ * // Nested props aren't checked to avoid crashing on recursive types
106
+ * \@wire(Adapter, { num: "$objectProp.nestedStringProp" }) falseNegativeNested?: unknown;
107
+ *
108
+ * // Any value can have properties accessed at runtime, but property chains using
109
+ * // non-objects are uncommon, and are excluded for simplicity
110
+ * \@wire(Adapter, { num: "$stringProp.length" }) falsePositiveString?: unknown;
111
+ *
112
+ * // Using props inherited from `LightningElement` for property chains is uncommon,
113
+ * // and are excluded for simplicity
114
+ * \@wire(Adapter, { num: "$hostElement.childElementCount" }) falsePositiveLightningElement?: unknown;
115
+ *
116
+ * get propertyChainWorkaround(): string {
117
+ * return this.objectProp.nestedStringProp;
118
+ * }
119
+ *
120
+ * // Top-level prop is type checked and correctly reports an error
121
+ * \@wire(Adapter, { num: "$propertyChainWorkaround" }) truePositiveGetter?: unknown;
122
+ *
123
+ * // Type assertion is used and correctly reports an error
124
+ * \@wire(Adapter, {
125
+ * num: "$objectProp.nestedStringProp" as unknown as Component["objectProp"]["nestedStringProp"]
126
+ * }) truePositiveTypeAssertion?: unknown;
127
+ * }
128
+ */
129
+ export type ConfigWithReactiveProps<Config extends ConfigValue, Class> = {
130
+ [K in keyof Config]: Config[K] | `$${PropsOfType<Class, Config[K]>}` | `$${ChainableObjectProps<Class>}.${string}`;
66
131
  };
67
132
  export {};
68
133
  //# sourceMappingURL=types.d.ts.map
@@ -2455,10 +2455,7 @@ function api$1(
2455
2455
  value,
2456
2456
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2457
2457
  context) {
2458
- if (process.env.NODE_ENV !== 'production') {
2459
- shared.assert.fail(`@api decorator can only be used as a decorator function.`);
2460
- }
2461
- throw new Error();
2458
+ shared.assert.fail(`@api decorator can only be used as a decorator function.`);
2462
2459
  }
2463
2460
  function createPublicPropertyDescriptor(key) {
2464
2461
  return {
@@ -2538,10 +2535,7 @@ context) {
2538
2535
  if (arguments.length === 1) {
2539
2536
  return getReactiveProxy(target);
2540
2537
  }
2541
- if (process.env.NODE_ENV !== 'production') {
2542
- shared.assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
2543
- }
2544
- throw new Error();
2538
+ shared.assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
2545
2539
  }
2546
2540
  function internalTrackDecorator(key) {
2547
2541
  return {
@@ -2581,6 +2575,10 @@ function internalTrackDecorator(key) {
2581
2575
  */
2582
2576
  /**
2583
2577
  * Decorator factory to wire a property or method to a wire adapter data source.
2578
+ *
2579
+ * TypeScript users: Due to limitations of the type system, some edge cases are
2580
+ * not fully type checked. See the type definition for {@linkcode ConfigWithReactiveProps}
2581
+ * for details.
2584
2582
  * @param adapter the adapter used to provision data
2585
2583
  * @param config configuration object for the adapter
2586
2584
  * @returns A decorator function
@@ -2595,10 +2593,7 @@ function wire(
2595
2593
  adapter,
2596
2594
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2597
2595
  config) {
2598
- if (process.env.NODE_ENV !== 'production') {
2599
- shared.assert.fail('@wire(adapter, config?) may only be used as a decorator.');
2600
- }
2601
- throw new Error();
2596
+ shared.assert.fail('@wire(adapter, config?) may only be used as a decorator.');
2602
2597
  }
2603
2598
  function internalWireFieldDecorator(key) {
2604
2599
  return {
@@ -2644,7 +2639,7 @@ function validateObservedField(Ctor, fieldName, descriptor) {
2644
2639
  if (!shared.isUndefined(descriptor)) {
2645
2640
  const type = getClassDescriptorType(descriptor);
2646
2641
  const message = `Invalid observed ${fieldName} field. Found a duplicate ${type} with the same name.`;
2647
- // TODO [#3408]: this should throw, not log
2642
+ // TODO [#4450]: this should throw, not log
2648
2643
  logError(message);
2649
2644
  }
2650
2645
  }
@@ -2652,7 +2647,7 @@ function validateFieldDecoratedWithTrack(Ctor, fieldName, descriptor) {
2652
2647
  assertNotProd(); // this method should never leak to prod
2653
2648
  if (!shared.isUndefined(descriptor)) {
2654
2649
  const type = getClassDescriptorType(descriptor);
2655
- // TODO [#3408]: this should throw, not log
2650
+ // TODO [#4450]: this should throw, not log
2656
2651
  logError(`Invalid @track ${fieldName} field. Found a duplicate ${type} with the same name.`);
2657
2652
  }
2658
2653
  }
@@ -2660,14 +2655,14 @@ function validateFieldDecoratedWithWire(Ctor, fieldName, descriptor) {
2660
2655
  assertNotProd(); // this method should never leak to prod
2661
2656
  if (!shared.isUndefined(descriptor)) {
2662
2657
  const type = getClassDescriptorType(descriptor);
2663
- // TODO [#3408]: this should throw, not log
2658
+ // TODO [#4450]: this should throw, not log
2664
2659
  logError(`Invalid @wire ${fieldName} field. Found a duplicate ${type} with the same name.`);
2665
2660
  }
2666
2661
  }
2667
2662
  function validateMethodDecoratedWithWire(Ctor, methodName, descriptor) {
2668
2663
  assertNotProd(); // this method should never leak to prod
2669
2664
  if (shared.isUndefined(descriptor) || !shared.isFunction(descriptor.value) || shared.isFalse(descriptor.writable)) {
2670
- // TODO [#3441]: This line of code does not seem possible to reach.
2665
+ // TODO [#4450]: This line of code does not seem possible to reach.
2671
2666
  logError(`Invalid @wire ${methodName} field. The field should have a valid writable descriptor.`);
2672
2667
  }
2673
2668
  }
@@ -2676,7 +2671,7 @@ function validateFieldDecoratedWithApi(Ctor, fieldName, descriptor) {
2676
2671
  if (!shared.isUndefined(descriptor)) {
2677
2672
  const type = getClassDescriptorType(descriptor);
2678
2673
  const message = `Invalid @api ${fieldName} field. Found a duplicate ${type} with the same name.`;
2679
- // TODO [#3408]: this should throw, not log
2674
+ // TODO [#4450]: this should throw, not log
2680
2675
  logError(message);
2681
2676
  }
2682
2677
  }
@@ -2684,7 +2679,7 @@ function validateAccessorDecoratedWithApi(Ctor, fieldName, descriptor) {
2684
2679
  assertNotProd(); // this method should never leak to prod
2685
2680
  if (shared.isFunction(descriptor.set)) {
2686
2681
  if (!shared.isFunction(descriptor.get)) {
2687
- // TODO [#3441]: This line of code does not seem possible to reach.
2682
+ // TODO [#4450]: This line of code does not seem possible to reach.
2688
2683
  logError(`Missing getter for property ${fieldName} decorated with @api in ${Ctor}. You cannot have a setter without the corresponding getter.`);
2689
2684
  }
2690
2685
  }
@@ -2770,7 +2765,7 @@ function registerDecorators(Ctor, meta) {
2770
2765
  if (method === 1) {
2771
2766
  if (process.env.NODE_ENV !== 'production') {
2772
2767
  if (!adapter) {
2773
- // TODO [#3408]: this should throw, not log
2768
+ // TODO [#4450]: this should throw, not log
2774
2769
  logError(`@wire on method "${fieldOrMethodName}": adapter id must be truthy.`);
2775
2770
  }
2776
2771
  validateMethodDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
@@ -2784,7 +2779,7 @@ function registerDecorators(Ctor, meta) {
2784
2779
  else {
2785
2780
  if (process.env.NODE_ENV !== 'production') {
2786
2781
  if (!adapter) {
2787
- // TODO [#3408]: this should throw, not log
2782
+ // TODO [#4450]: this should throw, not log
2788
2783
  logError(`@wire on field "${fieldOrMethodName}": adapter id must be truthy.`);
2789
2784
  }
2790
2785
  validateFieldDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
@@ -5225,7 +5220,6 @@ function hasDynamicChildren(children) {
5225
5220
  }
5226
5221
  function createKeyToOldIdx(children, beginIdx, endIdx) {
5227
5222
  const map = {};
5228
- // TODO [#1637]: simplify this by assuming that all vnodes has keys
5229
5223
  for (let j = beginIdx; j <= endIdx; ++j) {
5230
5224
  const ch = children[j];
5231
5225
  if (isVNode(ch)) {
@@ -5647,20 +5641,19 @@ function c(sel, Ctor, data, children = EmptyArray) {
5647
5641
  }
5648
5642
  }
5649
5643
  const { key, slotAssignment } = data;
5650
- let elm, aChildren, vm;
5651
5644
  const vnode = {
5652
5645
  type: 3 /* VNodeType.CustomElement */,
5653
5646
  sel,
5654
5647
  data,
5655
5648
  children,
5656
- elm,
5649
+ elm: undefined,
5657
5650
  key,
5658
5651
  slotAssignment,
5659
5652
  ctor: Ctor,
5660
5653
  owner: vmBeingRendered,
5661
5654
  mode: 'open', // TODO [#1294]: this should be defined in Ctor
5662
- aChildren,
5663
- vm,
5655
+ aChildren: undefined,
5656
+ vm: undefined,
5664
5657
  };
5665
5658
  addVNodeToChildLWC(vnode);
5666
5659
  return vnode;
@@ -5762,25 +5755,23 @@ function f(items) {
5762
5755
  }
5763
5756
  // [t]ext node
5764
5757
  function t(text) {
5765
- let key, elm;
5766
5758
  return {
5767
5759
  type: 0 /* VNodeType.Text */,
5768
5760
  sel: '__text__',
5769
5761
  text,
5770
- elm,
5771
- key,
5762
+ elm: undefined,
5763
+ key: undefined,
5772
5764
  owner: getVMBeingRendered(),
5773
5765
  };
5774
5766
  }
5775
5767
  // [co]mment node
5776
5768
  function co(text) {
5777
- let elm, key;
5778
5769
  return {
5779
5770
  type: 1 /* VNodeType.Comment */,
5780
5771
  sel: '__comment__',
5781
5772
  text,
5782
- elm,
5783
- key,
5773
+ elm: undefined,
5774
+ key: undefined,
5784
5775
  owner: getVMBeingRendered(),
5785
5776
  };
5786
5777
  }
@@ -8734,6 +8725,15 @@ function getComponentConstructor(elm) {
8734
8725
  return ctor;
8735
8726
  }
8736
8727
 
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
8737
  /*
8738
8738
  * Copyright (c) 2018, salesforce.com, inc.
8739
8739
  * All rights reserved.
@@ -8794,6 +8794,7 @@ Object.defineProperty(exports, "SignalBaseClass", {
8794
8794
  });
8795
8795
  exports.BaseBridgeElement = BaseBridgeElement;
8796
8796
  exports.LightningElement = LightningElement;
8797
+ exports.Mosaic = Mosaic;
8797
8798
  exports.__unstable__ProfilerControl = profilerControl;
8798
8799
  exports.__unstable__ReportingControl = reportingControl;
8799
8800
  exports.api = api$1;
@@ -8828,5 +8829,5 @@ exports.swapTemplate = swapTemplate;
8828
8829
  exports.track = track;
8829
8830
  exports.unwrap = unwrap;
8830
8831
  exports.wire = wire;
8831
- /** version: 9.0.4-alpha.2 */
8832
- //# sourceMappingURL=index.cjs.js.map
8832
+ /** version: 9.1.1-alpha.0 */
8833
+ //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -2452,10 +2452,7 @@ function api$1(
2452
2452
  value,
2453
2453
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2454
2454
  context) {
2455
- if (process.env.NODE_ENV !== 'production') {
2456
- assert.fail(`@api decorator can only be used as a decorator function.`);
2457
- }
2458
- throw new Error();
2455
+ assert.fail(`@api decorator can only be used as a decorator function.`);
2459
2456
  }
2460
2457
  function createPublicPropertyDescriptor(key) {
2461
2458
  return {
@@ -2535,10 +2532,7 @@ context) {
2535
2532
  if (arguments.length === 1) {
2536
2533
  return getReactiveProxy(target);
2537
2534
  }
2538
- if (process.env.NODE_ENV !== 'production') {
2539
- assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
2540
- }
2541
- throw new Error();
2535
+ assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
2542
2536
  }
2543
2537
  function internalTrackDecorator(key) {
2544
2538
  return {
@@ -2578,6 +2572,10 @@ function internalTrackDecorator(key) {
2578
2572
  */
2579
2573
  /**
2580
2574
  * Decorator factory to wire a property or method to a wire adapter data source.
2575
+ *
2576
+ * TypeScript users: Due to limitations of the type system, some edge cases are
2577
+ * not fully type checked. See the type definition for {@linkcode ConfigWithReactiveProps}
2578
+ * for details.
2581
2579
  * @param adapter the adapter used to provision data
2582
2580
  * @param config configuration object for the adapter
2583
2581
  * @returns A decorator function
@@ -2592,10 +2590,7 @@ function wire(
2592
2590
  adapter,
2593
2591
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2594
2592
  config) {
2595
- if (process.env.NODE_ENV !== 'production') {
2596
- assert.fail('@wire(adapter, config?) may only be used as a decorator.');
2597
- }
2598
- throw new Error();
2593
+ assert.fail('@wire(adapter, config?) may only be used as a decorator.');
2599
2594
  }
2600
2595
  function internalWireFieldDecorator(key) {
2601
2596
  return {
@@ -2641,7 +2636,7 @@ function validateObservedField(Ctor, fieldName, descriptor) {
2641
2636
  if (!isUndefined$1(descriptor)) {
2642
2637
  const type = getClassDescriptorType(descriptor);
2643
2638
  const message = `Invalid observed ${fieldName} field. Found a duplicate ${type} with the same name.`;
2644
- // TODO [#3408]: this should throw, not log
2639
+ // TODO [#4450]: this should throw, not log
2645
2640
  logError(message);
2646
2641
  }
2647
2642
  }
@@ -2649,7 +2644,7 @@ function validateFieldDecoratedWithTrack(Ctor, fieldName, descriptor) {
2649
2644
  assertNotProd(); // this method should never leak to prod
2650
2645
  if (!isUndefined$1(descriptor)) {
2651
2646
  const type = getClassDescriptorType(descriptor);
2652
- // TODO [#3408]: this should throw, not log
2647
+ // TODO [#4450]: this should throw, not log
2653
2648
  logError(`Invalid @track ${fieldName} field. Found a duplicate ${type} with the same name.`);
2654
2649
  }
2655
2650
  }
@@ -2657,14 +2652,14 @@ function validateFieldDecoratedWithWire(Ctor, fieldName, descriptor) {
2657
2652
  assertNotProd(); // this method should never leak to prod
2658
2653
  if (!isUndefined$1(descriptor)) {
2659
2654
  const type = getClassDescriptorType(descriptor);
2660
- // TODO [#3408]: this should throw, not log
2655
+ // TODO [#4450]: this should throw, not log
2661
2656
  logError(`Invalid @wire ${fieldName} field. Found a duplicate ${type} with the same name.`);
2662
2657
  }
2663
2658
  }
2664
2659
  function validateMethodDecoratedWithWire(Ctor, methodName, descriptor) {
2665
2660
  assertNotProd(); // this method should never leak to prod
2666
2661
  if (isUndefined$1(descriptor) || !isFunction$1(descriptor.value) || isFalse(descriptor.writable)) {
2667
- // TODO [#3441]: This line of code does not seem possible to reach.
2662
+ // TODO [#4450]: This line of code does not seem possible to reach.
2668
2663
  logError(`Invalid @wire ${methodName} field. The field should have a valid writable descriptor.`);
2669
2664
  }
2670
2665
  }
@@ -2673,7 +2668,7 @@ function validateFieldDecoratedWithApi(Ctor, fieldName, descriptor) {
2673
2668
  if (!isUndefined$1(descriptor)) {
2674
2669
  const type = getClassDescriptorType(descriptor);
2675
2670
  const message = `Invalid @api ${fieldName} field. Found a duplicate ${type} with the same name.`;
2676
- // TODO [#3408]: this should throw, not log
2671
+ // TODO [#4450]: this should throw, not log
2677
2672
  logError(message);
2678
2673
  }
2679
2674
  }
@@ -2681,7 +2676,7 @@ function validateAccessorDecoratedWithApi(Ctor, fieldName, descriptor) {
2681
2676
  assertNotProd(); // this method should never leak to prod
2682
2677
  if (isFunction$1(descriptor.set)) {
2683
2678
  if (!isFunction$1(descriptor.get)) {
2684
- // TODO [#3441]: This line of code does not seem possible to reach.
2679
+ // TODO [#4450]: This line of code does not seem possible to reach.
2685
2680
  logError(`Missing getter for property ${fieldName} decorated with @api in ${Ctor}. You cannot have a setter without the corresponding getter.`);
2686
2681
  }
2687
2682
  }
@@ -2767,7 +2762,7 @@ function registerDecorators(Ctor, meta) {
2767
2762
  if (method === 1) {
2768
2763
  if (process.env.NODE_ENV !== 'production') {
2769
2764
  if (!adapter) {
2770
- // TODO [#3408]: this should throw, not log
2765
+ // TODO [#4450]: this should throw, not log
2771
2766
  logError(`@wire on method "${fieldOrMethodName}": adapter id must be truthy.`);
2772
2767
  }
2773
2768
  validateMethodDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
@@ -2781,7 +2776,7 @@ function registerDecorators(Ctor, meta) {
2781
2776
  else {
2782
2777
  if (process.env.NODE_ENV !== 'production') {
2783
2778
  if (!adapter) {
2784
- // TODO [#3408]: this should throw, not log
2779
+ // TODO [#4450]: this should throw, not log
2785
2780
  logError(`@wire on field "${fieldOrMethodName}": adapter id must be truthy.`);
2786
2781
  }
2787
2782
  validateFieldDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
@@ -5222,7 +5217,6 @@ function hasDynamicChildren(children) {
5222
5217
  }
5223
5218
  function createKeyToOldIdx(children, beginIdx, endIdx) {
5224
5219
  const map = {};
5225
- // TODO [#1637]: simplify this by assuming that all vnodes has keys
5226
5220
  for (let j = beginIdx; j <= endIdx; ++j) {
5227
5221
  const ch = children[j];
5228
5222
  if (isVNode(ch)) {
@@ -5644,20 +5638,19 @@ function c(sel, Ctor, data, children = EmptyArray) {
5644
5638
  }
5645
5639
  }
5646
5640
  const { key, slotAssignment } = data;
5647
- let elm, aChildren, vm;
5648
5641
  const vnode = {
5649
5642
  type: 3 /* VNodeType.CustomElement */,
5650
5643
  sel,
5651
5644
  data,
5652
5645
  children,
5653
- elm,
5646
+ elm: undefined,
5654
5647
  key,
5655
5648
  slotAssignment,
5656
5649
  ctor: Ctor,
5657
5650
  owner: vmBeingRendered,
5658
5651
  mode: 'open', // TODO [#1294]: this should be defined in Ctor
5659
- aChildren,
5660
- vm,
5652
+ aChildren: undefined,
5653
+ vm: undefined,
5661
5654
  };
5662
5655
  addVNodeToChildLWC(vnode);
5663
5656
  return vnode;
@@ -5759,25 +5752,23 @@ function f(items) {
5759
5752
  }
5760
5753
  // [t]ext node
5761
5754
  function t(text) {
5762
- let key, elm;
5763
5755
  return {
5764
5756
  type: 0 /* VNodeType.Text */,
5765
5757
  sel: '__text__',
5766
5758
  text,
5767
- elm,
5768
- key,
5759
+ elm: undefined,
5760
+ key: undefined,
5769
5761
  owner: getVMBeingRendered(),
5770
5762
  };
5771
5763
  }
5772
5764
  // [co]mment node
5773
5765
  function co(text) {
5774
- let elm, key;
5775
5766
  return {
5776
5767
  type: 1 /* VNodeType.Comment */,
5777
5768
  sel: '__comment__',
5778
5769
  text,
5779
- elm,
5780
- key,
5770
+ elm: undefined,
5771
+ key: undefined,
5781
5772
  owner: getVMBeingRendered(),
5782
5773
  };
5783
5774
  }
@@ -8731,6 +8722,15 @@ function getComponentConstructor(elm) {
8731
8722
  return ctor;
8732
8723
  }
8733
8724
 
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
8734
  /*
8735
8735
  * Copyright (c) 2018, salesforce.com, inc.
8736
8736
  * All rights reserved.
@@ -8753,6 +8753,6 @@ function readonly(obj) {
8753
8753
  return getReadOnlyProxy(obj);
8754
8754
  }
8755
8755
 
8756
- 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 };
8757
- /** version: 9.0.4-alpha.2 */
8756
+ export { BaseBridgeElement, LightningElement, Mosaic, 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 };
8757
+ /** version: 9.1.1-alpha.0 */
8758
8758
  //# 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.0.4-alpha.2",
7
+ "version": "9.1.1-alpha.0",
8
8
  "description": "Core LWC engine APIs.",
9
9
  "keywords": [
10
10
  "lwc"
@@ -19,17 +19,22 @@
19
19
  "url": "https://github.com/salesforce/lwc/issues"
20
20
  },
21
21
  "license": "MIT",
22
+ "type": "module",
22
23
  "publishConfig": {
23
24
  "access": "public"
24
25
  },
26
+ "engines": {
27
+ "node": ">=16.6.0"
28
+ },
25
29
  "volta": {
26
30
  "extends": "../../../package.json"
27
31
  },
28
- "main": "dist/index.cjs.js",
32
+ "main": "dist/index.js",
29
33
  "module": "dist/index.js",
30
34
  "types": "dist/index.d.ts",
31
35
  "files": [
32
36
  "dist/**/*.js",
37
+ "dist/**/*.cjs",
33
38
  "dist/**/*.d.ts"
34
39
  ],
35
40
  "scripts": {
@@ -46,9 +51,9 @@
46
51
  }
47
52
  },
48
53
  "dependencies": {
49
- "@lwc/features": "9.0.4-alpha.2",
50
- "@lwc/shared": "9.0.4-alpha.2",
51
- "@lwc/signals": "9.0.4-alpha.2"
54
+ "@lwc/features": "9.1.1-alpha.0",
55
+ "@lwc/shared": "9.1.1-alpha.0",
56
+ "@lwc/signals": "9.1.1-alpha.0"
52
57
  },
53
58
  "devDependencies": {
54
59
  "observable-membrane": "2.0.0"