@lwc/ssr-runtime 8.1.2 → 8.2.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @lwc/ssr-runtime
2
+
3
+ This is an experimental package containing a runtime for server-side rendering components. It may break at any point.
@@ -0,0 +1,32 @@
1
+ import { LightningElement } from './lightning-element';
2
+ interface DOMTokenList {
3
+ readonly length: number;
4
+ value: string;
5
+ toString(): string;
6
+ add(...tokens: string[]): void;
7
+ contains(token: string): boolean;
8
+ item(index: number): string | null;
9
+ remove(...tokens: string[]): void;
10
+ replace(token: string, newToken: string): boolean;
11
+ supports(token: string): boolean;
12
+ toggle(token: string, force?: boolean): boolean;
13
+ forEach(callbackfn: (value: string, key: number, parent: DOMTokenList) => void, thisArg?: any): void;
14
+ [index: number]: string;
15
+ }
16
+ export declare class ClassList implements DOMTokenList {
17
+ el: LightningElement;
18
+ constructor(el: LightningElement);
19
+ add(...newClassNames: string[]): void;
20
+ contains(className: string): boolean;
21
+ remove(...classNamesToRemove: string[]): void;
22
+ replace(oldClassName: string, newClassName: string): boolean;
23
+ toggle(classNameToToggle: string, force?: boolean): boolean;
24
+ get value(): string;
25
+ toString(): string;
26
+ [index: number]: never;
27
+ item(_index: number): string | null;
28
+ supports(_token: string): boolean;
29
+ forEach(_callbackfn: (value: string, key: number, parent: DOMTokenList) => void, _thisArg?: any): void;
30
+ get length(): number;
31
+ }
32
+ export {};
package/dist/index.cjs.js CHANGED
@@ -5,8 +5,10 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
+ var shared = require('@lwc/shared');
9
+
8
10
  /*
9
- * Copyright (c) 2024, salesforce.com, inc.
11
+ * Copyright (c) 2024, Salesforce, Inc.
10
12
  * All rights reserved.
11
13
  * SPDX-License-Identifier: MIT
12
14
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -61,9 +63,94 @@ class ClassList {
61
63
  this.el.className = Array.from(set).join(' ');
62
64
  return set.has(classNameToToggle);
63
65
  }
66
+ get value() {
67
+ return this.el.className;
68
+ }
69
+ toString() {
70
+ return this.el.className;
71
+ }
72
+ item(_index) {
73
+ throw new Error('Method "item" not implemented.');
74
+ }
75
+ supports(_token) {
76
+ throw new Error('Method "supports" not implemented.');
77
+ }
78
+ forEach(_callbackfn, _thisArg) {
79
+ throw new Error('Method "forEach" not implemented.');
80
+ }
81
+ get length() {
82
+ throw new Error('Property "length" not implemented.');
83
+ }
64
84
  }
85
+
86
+ /******************************************************************************
87
+ Copyright (c) Microsoft Corporation.
88
+
89
+ Permission to use, copy, modify, and/or distribute this software for any
90
+ purpose with or without fee is hereby granted.
91
+
92
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
93
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
94
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
95
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
96
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
97
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
98
+ PERFORMANCE OF THIS SOFTWARE.
99
+ ***************************************************************************** */
100
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
101
+
102
+
103
+ function __classPrivateFieldGet(receiver, state, kind, f) {
104
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
105
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
106
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
107
+ }
108
+
109
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
110
+ var e = new Error(message);
111
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
112
+ };
113
+
114
+ /*
115
+ * Copyright (c) 2024, Salesforce, Inc.
116
+ * All rights reserved.
117
+ * SPDX-License-Identifier: MIT
118
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
119
+ */
120
+ class MutationTracker {
121
+ constructor() {
122
+ this.mutationMap = new WeakMap();
123
+ }
124
+ add(instance, attrName) {
125
+ let mutatedAttrs = this.mutationMap.get(instance);
126
+ if (!mutatedAttrs) {
127
+ mutatedAttrs = new Set();
128
+ this.mutationMap.set(instance, mutatedAttrs);
129
+ }
130
+ mutatedAttrs.add(attrName.toLowerCase());
131
+ }
132
+ renderMutatedAttrs(instance) {
133
+ const mutatedAttrs = this.mutationMap.get(instance);
134
+ if (mutatedAttrs) {
135
+ return ` data-lwc-host-mutated="${[...mutatedAttrs].sort().join(' ')}"`;
136
+ }
137
+ else {
138
+ return '';
139
+ }
140
+ }
141
+ }
142
+ const mutationTracker = new MutationTracker();
143
+
144
+ /*
145
+ * Copyright (c) 2024, salesforce.com, inc.
146
+ * All rights reserved.
147
+ * SPDX-License-Identifier: MIT
148
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
149
+ */
150
+ var _LightningElement_instances, _LightningElement_setAttribute;
65
151
  class LightningElement {
66
152
  constructor(propsAvailableAtConstruction) {
153
+ _LightningElement_instances.add(this);
67
154
  this.isConnected = false;
68
155
  this.className = '';
69
156
  this.__classList = null;
@@ -82,6 +169,7 @@ class LightningElement {
82
169
  },
83
170
  set(newValue) {
84
171
  props[reflectedPropName] = newValue;
172
+ mutationTracker.add(this, shared.htmlPropertyToAttribute(reflectedPropName));
85
173
  },
86
174
  enumerable: true,
87
175
  });
@@ -93,6 +181,7 @@ class LightningElement {
93
181
  set(newVal) {
94
182
  props.class = newVal;
95
183
  attrs.class = newVal;
184
+ mutationTracker.add(this, 'class');
96
185
  },
97
186
  });
98
187
  }
@@ -102,26 +191,131 @@ class LightningElement {
102
191
  }
103
192
  return (this.__classList = new ClassList(this));
104
193
  }
194
+ setAttribute(attrName, attrValue) {
195
+ __classPrivateFieldGet(this, _LightningElement_instances, "m", _LightningElement_setAttribute).call(this, attrName, String(attrValue));
196
+ }
105
197
  getAttribute(attrName) {
106
- const value = this.__attrs?.[attrName];
107
- return value === true ? '' : (value ?? null);
198
+ if (this.hasAttribute(attrName)) {
199
+ return this.__attrs[attrName];
200
+ }
201
+ return null;
202
+ }
203
+ hasAttribute(attrName) {
204
+ return typeof attrName === 'string' && typeof this.__attrs[attrName] === 'string';
205
+ }
206
+ removeAttribute(attrName) {
207
+ if (this.hasAttribute(attrName)) {
208
+ // Reflected attributes use accessor methods to update their
209
+ // corresponding properties so we can't simply `delete`. Instead,
210
+ // we use `null` when we want to remove.
211
+ __classPrivateFieldGet(this, _LightningElement_instances, "m", _LightningElement_setAttribute).call(this, attrName, null);
212
+ }
213
+ else {
214
+ // This interprets the removal of a non-existing attribute as an
215
+ // attribute mutation. We may want to revisit this.
216
+ mutationTracker.add(this, attrName);
217
+ }
218
+ }
219
+ addEventListener(_type, _listener, _options) {
220
+ // noop
221
+ }
222
+ removeEventListener(_type, _listener, _options) {
223
+ // noop
224
+ }
225
+ // ----------------------------------------------------------- //
226
+ // Props/methods explicitly not available in this environment //
227
+ // Getters are named "get*" for parity with @lwc/engine-server //
228
+ // ----------------------------------------------------------- //
229
+ get children() {
230
+ throw new TypeError('"getChildren" is not supported in this environment');
231
+ }
232
+ get childNodes() {
233
+ throw new TypeError('"getChildNodes" is not supported in this environment');
234
+ }
235
+ get firstChild() {
236
+ throw new TypeError('"getFirstChild" is not supported in this environment');
237
+ }
238
+ get firstElementChild() {
239
+ throw new TypeError('"getFirstElementChild" is not supported in this environment');
240
+ }
241
+ get hostElement() {
242
+ // Intentionally different to match @lwc/engine-*core*
243
+ throw new TypeError('this.hostElement is not supported in this environment');
244
+ }
245
+ get lastChild() {
246
+ throw new TypeError('"getLastChild" is not supported in this environment');
247
+ }
248
+ get lastElementChild() {
249
+ throw new TypeError('"getLastElementChild" is not supported in this environment');
250
+ }
251
+ get ownerDocument() {
252
+ // Intentionally not "get*" to match @lwc/engine-server
253
+ throw new TypeError('"ownerDocument" is not supported in this environment');
254
+ }
255
+ get style() {
256
+ // Intentionally not "get*" to match @lwc/engine-server
257
+ throw new TypeError('"style" is not supported in this environment');
258
+ }
259
+ attachInternals() {
260
+ throw new TypeError('"attachInternals" is not supported in this environment');
261
+ }
262
+ dispatchEvent(_event) {
263
+ throw new TypeError('"dispatchEvent" is not supported in this environment');
264
+ }
265
+ getBoundingClientRect() {
266
+ throw new TypeError('"getBoundingClientRect" is not supported in this environment');
267
+ }
268
+ getElementsByClassName(_classNames) {
269
+ throw new TypeError('"getElementsByClassName" is not supported in this environment');
270
+ }
271
+ getElementsByTagName(_qualifiedName) {
272
+ throw new TypeError('"getElementsByTagName" is not supported in this environment');
273
+ }
274
+ querySelector(_selectors) {
275
+ throw new TypeError('"querySelector" is not supported in this environment');
276
+ }
277
+ querySelectorAll(_selectors) {
278
+ throw new TypeError('"querySelectorAll" is not supported in this environment');
279
+ }
280
+ getAttributeNS(_namespace, _localName) {
281
+ throw new Error('Method "getAttributeNS" not implemented.');
282
+ }
283
+ hasAttributeNS(_namespace, _localName) {
284
+ throw new Error('Method "hasAttributeNS" not implemented.');
285
+ }
286
+ removeAttributeNS(_namespace, _localName) {
287
+ throw new Error('Method "removeAttributeNS" not implemented.');
288
+ }
289
+ setAttributeNS(_namespace, _qualifiedName, _value) {
290
+ throw new Error('Method "setAttributeNS" not implemented.');
108
291
  }
109
292
  }
293
+ _LightningElement_instances = new WeakSet(), _LightningElement_setAttribute = function _LightningElement_setAttribute(attrName, attrValue) {
294
+ this.__attrs[attrName] = attrValue;
295
+ mutationTracker.add(this, attrName);
296
+ };
297
+
298
+ /*
299
+ * Copyright (c) 2024, salesforce.com, inc.
300
+ * All rights reserved.
301
+ * SPDX-License-Identifier: MIT
302
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
303
+ */
110
304
  const escapeAttrVal = (attrVal) => attrVal.replaceAll('&', '&').replaceAll('"', '"');
111
- function* renderAttrs(attrs) {
305
+ function* renderAttrs(instance, attrs) {
112
306
  if (!attrs) {
113
307
  return;
114
308
  }
115
- for (const [key, val] of Object.entries(attrs)) {
116
- if (val) {
117
- if (typeof val === 'string') {
118
- yield ` ${key}="${escapeAttrVal(val)}"`;
119
- }
120
- else {
121
- yield ` ${key}`;
122
- }
309
+ for (const attrName of Object.getOwnPropertyNames(attrs)) {
310
+ const attrVal = attrs[attrName];
311
+ if (typeof attrVal === 'string') {
312
+ yield attrVal === '' ? ` ${attrName}` : ` ${attrName}="${escapeAttrVal(attrVal)}"`;
313
+ }
314
+ else if (attrVal === null) {
315
+ yield '';
123
316
  }
124
317
  }
318
+ yield mutationTracker.renderMutatedAttrs(instance);
125
319
  }
126
320
  function* fallbackTmpl(_props, _attrs, _slotted, Cmp, _instance) {
127
321
  if (Cmp.renderMode !== 'light') {
@@ -136,9 +330,99 @@ async function serverSideRenderComponent(tagName, compiledGenerateMarkup, props)
136
330
  return markup;
137
331
  }
138
332
 
333
+ /*
334
+ * Copyright (c) 2024, salesforce.com, inc.
335
+ * All rights reserved.
336
+ * SPDX-License-Identifier: MIT
337
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
338
+ */
339
+ /**
340
+ * Converts an iterable into one that emits the object used by the [`iterator` directive](
341
+ * https://lwc.dev/guide/html_templates#iterator).
342
+ */
343
+ function* toIteratorDirective(iterable) {
344
+ if (iterable === undefined || iterable === null)
345
+ return;
346
+ if (!iterable[Symbol.iterator]) {
347
+ throw new Error(
348
+ // Mimic error message from "[i]terable node" in engine-core's api.ts
349
+ `Invalid template iteration for value \`${iterable}\`. It must be an array-like object.`);
350
+ }
351
+ const iterator = iterable[Symbol.iterator]();
352
+ let next = iterator.next();
353
+ let index = 0;
354
+ let { value, done: last = false } = next;
355
+ while (last === false) {
356
+ // using a look-back approach because we need to know if the element is the last
357
+ next = iterator.next();
358
+ last = next.done ?? false;
359
+ yield {
360
+ value,
361
+ index,
362
+ first: index === 0,
363
+ last,
364
+ };
365
+ index += 1;
366
+ value = next.value;
367
+ }
368
+ }
369
+
370
+ /*
371
+ * Copyright (c) 2024, Salesforce, Inc.
372
+ * All rights reserved.
373
+ * SPDX-License-Identifier: MIT
374
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
375
+ */
376
+ /**
377
+ * Per the HTML spec on restrictions for "raw text elements" like `<style>`:
378
+ *
379
+ * > The text in raw text and escapable raw text elements must not contain any occurrences of the string
380
+ * > "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that case-insensitively match the tag name of
381
+ * > the element followed by one of:
382
+ * > - U+0009 CHARACTER TABULATION (tab)
383
+ * > - U+000A LINE FEED (LF)
384
+ * > - U+000C FORM FEED (FF)
385
+ * > - U+000D CARRIAGE RETURN (CR)
386
+ * > - U+0020 SPACE
387
+ * > - U+003E GREATER-THAN SIGN (>), or
388
+ * > - U+002F SOLIDUS (/)
389
+ * @see https://html.spec.whatwg.org/multipage/syntax.html#cdata-rcdata-restrictions
390
+ */
391
+ const INVALID_STYLE_CONTENT = /<\/style[\t\n\f\r >/]/i;
392
+ /**
393
+ * The text content inside `<style>` is a special case. It is _only_ rendered by the LWC engine itself; `<style>` tags
394
+ * are disallowed inside of HTML templates.
395
+ *
396
+ * The `<style>` tag is unusual in how it's defined in HTML. Like `<script>`, it is considered a "raw text element,"
397
+ * which means that it is parsed as raw text, but certain character sequences are disallowed, namely to avoid XSS
398
+ * attacks like `</style><script>alert("pwned")</script>`.
399
+ *
400
+ * This also means that we cannot use "normal" HTML escaping inside `<style>` tags, e.g. we cannot use `&lt;`,
401
+ * `&gt;`, etc., because these are treated as-is by the HTML parser.
402
+ *
403
+ *
404
+ * @param contents CSS source to validate
405
+ * @throws Throws if the contents provided are not valid.
406
+ * @see https://html.spec.whatwg.org/multipage/syntax.html#raw-text-elements
407
+ * @see https://github.com/salesforce/lwc/issues/3439
408
+ * @example
409
+ * validateStyleTextContents('div { color: red }') // Ok
410
+ * validateStyleTextContents('</style><script>alert("pwned")</script>') // Throws
411
+ */
412
+ function validateStyleTextContents(contents) {
413
+ if (INVALID_STYLE_CONTENT.test(contents)) {
414
+ throw new Error('CSS contains unsafe characters and cannot be serialized inside a style element');
415
+ }
416
+ }
417
+
418
+ exports.ClassList = ClassList;
139
419
  exports.LightningElement = LightningElement;
420
+ exports.MutationTracker = MutationTracker;
140
421
  exports.fallbackTmpl = fallbackTmpl;
141
422
  exports.renderAttrs = renderAttrs;
423
+ exports.renderComponent = serverSideRenderComponent;
142
424
  exports.serverSideRenderComponent = serverSideRenderComponent;
143
- /** version: 8.1.2 */
425
+ exports.toIteratorDirective = toIteratorDirective;
426
+ exports.validateStyleTextContents = validateStyleTextContents;
427
+ /** version: 8.2.0 */
144
428
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;AAKG;AAEH,MAAM,WAAW,GAAG,MAAM,CAAC;AAM3B,MAAM,SAAS,CAAA;AAGX,IAAA,WAAA,CAAY,EAAoB,EAAA;AAC5B,QAAA,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;KAChB;IAED,GAAG,CAAC,GAAG,aAAuB,EAAA;AAC1B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC;AACpC,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;AAClE,QAAA,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;AACtC,YAAA,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;SACzB;AACD,QAAA,IAAI,CAAC,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,I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,GAAG,EAAE,QAAQ,CAAC,CAAC;AAEhD,UAAE,WAAW,CAAC,KAAiB,EAAA;IAC1C,IAAI,CAAC,KAAK,EAAE;QACR,OAAO;KACV;AACD,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC5C,IAAI,GAAG,EAAE;AACL,YAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;gBACzB,MAAM,CAAA,CAAA,EAAI,GAAG,CAAK,EAAA,EAAA,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC;aAC3C;iBAAM;gBACH,MAAM,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE,CAAC;aACnB;SACJ;KACJ;AACL,CAAC;AAEc,UAAE,YAAY,CACzB,MAAe,EACf,MAAe,EACf,QAAiB,EACjB,GAAgC,EAChC,SAAkB,EAAA;AAElB,IAAA,IAAI,GAAG,CAAC,UAAU,KAAK,OAAO,EAAE;AAC5B,QAAA,MAAM,6CAA6C,CAAC;KACvD;AACL,CAAC;AASM,eAAe,yBAAyB,CAC3C,OAAe,EACf,sBAAwC,EACxC,KAA0B,EAAA;IAE1B,IAAI,MAAM,GAAG,EAAE,CAAC;AAEhB,IAAA,WAAW,MAAM,OAAO,IAAI,sBAAsB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;QAC5E,MAAM,IAAI,OAAO,CAAC;KACrB;AAED,IAAA,OAAO,MAAM,CAAC;AAClB;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/class-list.ts","../../../../node_modules/tslib/tslib.es6.js","../src/mutation-tracker.ts","../src/lightning-element.ts","../src/render.ts","../src/to-iterator-directive.ts","../src/validate-style-text-contents.ts"],"sourcesContent":[null,"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n",null,null,null,null,null],"names":["htmlPropertyToAttribute"],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AAIH,MAAM,WAAW,GAAG,MAAM,CAAC;MAqBd,SAAS,CAAA;AAGlB,IAAA,WAAA,CAAY,EAAoB,EAAA;AAC5B,QAAA,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;KAChB;IAED,GAAG,CAAC,GAAG,aAAuB,EAAA;AAC1B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC;AACpC,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;AAClE,QAAA,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;AACtC,YAAA,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;SACzB;AACD,QAAA,IAAI,CAAC,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACjD;AAED,IAAA,QAAQ,CAAC,SAAiB,EAAA;AACtB,QAAA,MAAM,mBAAmB,GAAG,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC;QAC9C,OAAO,mBAAmB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,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CA;;;;;AAKG;AAEH;;;;;;;;;;;;;;AAcG;AACH,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;AAmBG;AACG,SAAU,yBAAyB,CAAC,QAAgB,EAAA;AACtD,IAAA,IAAI,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;AACtC,QAAA,MAAM,IAAI,KAAK,CACX,gFAAgF,CACnF,CAAC;KACL;AACL;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
package/dist/index.d.ts CHANGED
@@ -1,27 +1,6 @@
1
- type Attributes = Record<string, string | true>;
2
- type LightningElementConstructor = typeof LightningElement;
3
- declare class ClassList {
4
- el: LightningElement;
5
- constructor(el: LightningElement);
6
- add(...newClassNames: string[]): void;
7
- contains(className: string): boolean;
8
- remove(...classNamesToRemove: string[]): void;
9
- replace(oldClassName: string, newClassName: string): boolean;
10
- toggle(classNameToToggle: string, force?: boolean): boolean;
11
- }
12
- export declare class LightningElement {
13
- static renderMode?: 'light' | 'shadow';
14
- isConnected: boolean;
15
- className: string;
16
- __attrs?: Attributes;
17
- __classList: ClassList | null;
18
- constructor(propsAvailableAtConstruction: Record<string, any>);
19
- __internal__setState(props: Record<string, any>, reflectedProps: string[], attrs: Record<string, any>): void;
20
- get classList(): ClassList;
21
- getAttribute(attrName: string): string | null;
22
- }
23
- export declare function renderAttrs(attrs: Attributes): Generator<string, void, unknown>;
24
- export declare function fallbackTmpl(_props: unknown, _attrs: unknown, _slotted: unknown, Cmp: LightningElementConstructor, _instance: unknown): Generator<string, void, unknown>;
25
- export type GenerateMarkupFn = (tagName: string, props: Record<string, any> | null, attrs: Attributes | null, slotted: Record<number | string, AsyncGenerator<string>> | null) => AsyncGenerator<string>;
26
- export declare function serverSideRenderComponent(tagName: string, compiledGenerateMarkup: GenerateMarkupFn, props: Record<string, any>): Promise<string>;
27
- export {};
1
+ export { ClassList } from './class-list';
2
+ export { LightningElement, LightningElementConstructor } from './lightning-element';
3
+ export { MutationTracker } from './mutation-tracker';
4
+ export { fallbackTmpl, GenerateMarkupFn, renderAttrs, serverSideRenderComponent, serverSideRenderComponent as renderComponent, } from './render';
5
+ export { toIteratorDirective } from './to-iterator-directive';
6
+ export { validateStyleTextContents } from './validate-style-text-contents';
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  /**
2
2
  * Copyright (c) 2024 Salesforce, Inc.
3
3
  */
4
+ import { htmlPropertyToAttribute } from '@lwc/shared';
5
+
4
6
  /*
5
- * Copyright (c) 2024, salesforce.com, inc.
7
+ * Copyright (c) 2024, Salesforce, Inc.
6
8
  * All rights reserved.
7
9
  * SPDX-License-Identifier: MIT
8
10
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -57,9 +59,94 @@ class ClassList {
57
59
  this.el.className = Array.from(set).join(' ');
58
60
  return set.has(classNameToToggle);
59
61
  }
62
+ get value() {
63
+ return this.el.className;
64
+ }
65
+ toString() {
66
+ return this.el.className;
67
+ }
68
+ item(_index) {
69
+ throw new Error('Method "item" not implemented.');
70
+ }
71
+ supports(_token) {
72
+ throw new Error('Method "supports" not implemented.');
73
+ }
74
+ forEach(_callbackfn, _thisArg) {
75
+ throw new Error('Method "forEach" not implemented.');
76
+ }
77
+ get length() {
78
+ throw new Error('Property "length" not implemented.');
79
+ }
60
80
  }
81
+
82
+ /******************************************************************************
83
+ Copyright (c) Microsoft Corporation.
84
+
85
+ Permission to use, copy, modify, and/or distribute this software for any
86
+ purpose with or without fee is hereby granted.
87
+
88
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
89
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
90
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
91
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
92
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
93
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
94
+ PERFORMANCE OF THIS SOFTWARE.
95
+ ***************************************************************************** */
96
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
97
+
98
+
99
+ function __classPrivateFieldGet(receiver, state, kind, f) {
100
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
101
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
102
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
103
+ }
104
+
105
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
106
+ var e = new Error(message);
107
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
108
+ };
109
+
110
+ /*
111
+ * Copyright (c) 2024, Salesforce, Inc.
112
+ * All rights reserved.
113
+ * SPDX-License-Identifier: MIT
114
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
115
+ */
116
+ class MutationTracker {
117
+ constructor() {
118
+ this.mutationMap = new WeakMap();
119
+ }
120
+ add(instance, attrName) {
121
+ let mutatedAttrs = this.mutationMap.get(instance);
122
+ if (!mutatedAttrs) {
123
+ mutatedAttrs = new Set();
124
+ this.mutationMap.set(instance, mutatedAttrs);
125
+ }
126
+ mutatedAttrs.add(attrName.toLowerCase());
127
+ }
128
+ renderMutatedAttrs(instance) {
129
+ const mutatedAttrs = this.mutationMap.get(instance);
130
+ if (mutatedAttrs) {
131
+ return ` data-lwc-host-mutated="${[...mutatedAttrs].sort().join(' ')}"`;
132
+ }
133
+ else {
134
+ return '';
135
+ }
136
+ }
137
+ }
138
+ const mutationTracker = new MutationTracker();
139
+
140
+ /*
141
+ * Copyright (c) 2024, salesforce.com, inc.
142
+ * All rights reserved.
143
+ * SPDX-License-Identifier: MIT
144
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
145
+ */
146
+ var _LightningElement_instances, _LightningElement_setAttribute;
61
147
  class LightningElement {
62
148
  constructor(propsAvailableAtConstruction) {
149
+ _LightningElement_instances.add(this);
63
150
  this.isConnected = false;
64
151
  this.className = '';
65
152
  this.__classList = null;
@@ -78,6 +165,7 @@ class LightningElement {
78
165
  },
79
166
  set(newValue) {
80
167
  props[reflectedPropName] = newValue;
168
+ mutationTracker.add(this, htmlPropertyToAttribute(reflectedPropName));
81
169
  },
82
170
  enumerable: true,
83
171
  });
@@ -89,6 +177,7 @@ class LightningElement {
89
177
  set(newVal) {
90
178
  props.class = newVal;
91
179
  attrs.class = newVal;
180
+ mutationTracker.add(this, 'class');
92
181
  },
93
182
  });
94
183
  }
@@ -98,26 +187,131 @@ class LightningElement {
98
187
  }
99
188
  return (this.__classList = new ClassList(this));
100
189
  }
190
+ setAttribute(attrName, attrValue) {
191
+ __classPrivateFieldGet(this, _LightningElement_instances, "m", _LightningElement_setAttribute).call(this, attrName, String(attrValue));
192
+ }
101
193
  getAttribute(attrName) {
102
- const value = this.__attrs?.[attrName];
103
- return value === true ? '' : (value ?? null);
194
+ if (this.hasAttribute(attrName)) {
195
+ return this.__attrs[attrName];
196
+ }
197
+ return null;
198
+ }
199
+ hasAttribute(attrName) {
200
+ return typeof attrName === 'string' && typeof this.__attrs[attrName] === 'string';
201
+ }
202
+ removeAttribute(attrName) {
203
+ if (this.hasAttribute(attrName)) {
204
+ // Reflected attributes use accessor methods to update their
205
+ // corresponding properties so we can't simply `delete`. Instead,
206
+ // we use `null` when we want to remove.
207
+ __classPrivateFieldGet(this, _LightningElement_instances, "m", _LightningElement_setAttribute).call(this, attrName, null);
208
+ }
209
+ else {
210
+ // This interprets the removal of a non-existing attribute as an
211
+ // attribute mutation. We may want to revisit this.
212
+ mutationTracker.add(this, attrName);
213
+ }
214
+ }
215
+ addEventListener(_type, _listener, _options) {
216
+ // noop
217
+ }
218
+ removeEventListener(_type, _listener, _options) {
219
+ // noop
220
+ }
221
+ // ----------------------------------------------------------- //
222
+ // Props/methods explicitly not available in this environment //
223
+ // Getters are named "get*" for parity with @lwc/engine-server //
224
+ // ----------------------------------------------------------- //
225
+ get children() {
226
+ throw new TypeError('"getChildren" is not supported in this environment');
227
+ }
228
+ get childNodes() {
229
+ throw new TypeError('"getChildNodes" is not supported in this environment');
230
+ }
231
+ get firstChild() {
232
+ throw new TypeError('"getFirstChild" is not supported in this environment');
233
+ }
234
+ get firstElementChild() {
235
+ throw new TypeError('"getFirstElementChild" is not supported in this environment');
236
+ }
237
+ get hostElement() {
238
+ // Intentionally different to match @lwc/engine-*core*
239
+ throw new TypeError('this.hostElement is not supported in this environment');
240
+ }
241
+ get lastChild() {
242
+ throw new TypeError('"getLastChild" is not supported in this environment');
243
+ }
244
+ get lastElementChild() {
245
+ throw new TypeError('"getLastElementChild" is not supported in this environment');
246
+ }
247
+ get ownerDocument() {
248
+ // Intentionally not "get*" to match @lwc/engine-server
249
+ throw new TypeError('"ownerDocument" is not supported in this environment');
250
+ }
251
+ get style() {
252
+ // Intentionally not "get*" to match @lwc/engine-server
253
+ throw new TypeError('"style" is not supported in this environment');
254
+ }
255
+ attachInternals() {
256
+ throw new TypeError('"attachInternals" is not supported in this environment');
257
+ }
258
+ dispatchEvent(_event) {
259
+ throw new TypeError('"dispatchEvent" is not supported in this environment');
260
+ }
261
+ getBoundingClientRect() {
262
+ throw new TypeError('"getBoundingClientRect" is not supported in this environment');
263
+ }
264
+ getElementsByClassName(_classNames) {
265
+ throw new TypeError('"getElementsByClassName" is not supported in this environment');
266
+ }
267
+ getElementsByTagName(_qualifiedName) {
268
+ throw new TypeError('"getElementsByTagName" is not supported in this environment');
269
+ }
270
+ querySelector(_selectors) {
271
+ throw new TypeError('"querySelector" is not supported in this environment');
272
+ }
273
+ querySelectorAll(_selectors) {
274
+ throw new TypeError('"querySelectorAll" is not supported in this environment');
275
+ }
276
+ getAttributeNS(_namespace, _localName) {
277
+ throw new Error('Method "getAttributeNS" not implemented.');
278
+ }
279
+ hasAttributeNS(_namespace, _localName) {
280
+ throw new Error('Method "hasAttributeNS" not implemented.');
281
+ }
282
+ removeAttributeNS(_namespace, _localName) {
283
+ throw new Error('Method "removeAttributeNS" not implemented.');
284
+ }
285
+ setAttributeNS(_namespace, _qualifiedName, _value) {
286
+ throw new Error('Method "setAttributeNS" not implemented.');
104
287
  }
105
288
  }
289
+ _LightningElement_instances = new WeakSet(), _LightningElement_setAttribute = function _LightningElement_setAttribute(attrName, attrValue) {
290
+ this.__attrs[attrName] = attrValue;
291
+ mutationTracker.add(this, attrName);
292
+ };
293
+
294
+ /*
295
+ * Copyright (c) 2024, salesforce.com, inc.
296
+ * All rights reserved.
297
+ * SPDX-License-Identifier: MIT
298
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
299
+ */
106
300
  const escapeAttrVal = (attrVal) => attrVal.replaceAll('&', '&amp;').replaceAll('"', '&quot;');
107
- function* renderAttrs(attrs) {
301
+ function* renderAttrs(instance, attrs) {
108
302
  if (!attrs) {
109
303
  return;
110
304
  }
111
- for (const [key, val] of Object.entries(attrs)) {
112
- if (val) {
113
- if (typeof val === 'string') {
114
- yield ` ${key}="${escapeAttrVal(val)}"`;
115
- }
116
- else {
117
- yield ` ${key}`;
118
- }
305
+ for (const attrName of Object.getOwnPropertyNames(attrs)) {
306
+ const attrVal = attrs[attrName];
307
+ if (typeof attrVal === 'string') {
308
+ yield attrVal === '' ? ` ${attrName}` : ` ${attrName}="${escapeAttrVal(attrVal)}"`;
309
+ }
310
+ else if (attrVal === null) {
311
+ yield '';
119
312
  }
120
313
  }
314
+ yield mutationTracker.renderMutatedAttrs(instance);
121
315
  }
122
316
  function* fallbackTmpl(_props, _attrs, _slotted, Cmp, _instance) {
123
317
  if (Cmp.renderMode !== 'light') {
@@ -132,6 +326,91 @@ async function serverSideRenderComponent(tagName, compiledGenerateMarkup, props)
132
326
  return markup;
133
327
  }
134
328
 
135
- export { LightningElement, fallbackTmpl, renderAttrs, serverSideRenderComponent };
136
- /** version: 8.1.2 */
329
+ /*
330
+ * Copyright (c) 2024, salesforce.com, inc.
331
+ * All rights reserved.
332
+ * SPDX-License-Identifier: MIT
333
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
334
+ */
335
+ /**
336
+ * Converts an iterable into one that emits the object used by the [`iterator` directive](
337
+ * https://lwc.dev/guide/html_templates#iterator).
338
+ */
339
+ function* toIteratorDirective(iterable) {
340
+ if (iterable === undefined || iterable === null)
341
+ return;
342
+ if (!iterable[Symbol.iterator]) {
343
+ throw new Error(
344
+ // Mimic error message from "[i]terable node" in engine-core's api.ts
345
+ `Invalid template iteration for value \`${iterable}\`. It must be an array-like object.`);
346
+ }
347
+ const iterator = iterable[Symbol.iterator]();
348
+ let next = iterator.next();
349
+ let index = 0;
350
+ let { value, done: last = false } = next;
351
+ while (last === false) {
352
+ // using a look-back approach because we need to know if the element is the last
353
+ next = iterator.next();
354
+ last = next.done ?? false;
355
+ yield {
356
+ value,
357
+ index,
358
+ first: index === 0,
359
+ last,
360
+ };
361
+ index += 1;
362
+ value = next.value;
363
+ }
364
+ }
365
+
366
+ /*
367
+ * Copyright (c) 2024, Salesforce, Inc.
368
+ * All rights reserved.
369
+ * SPDX-License-Identifier: MIT
370
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
371
+ */
372
+ /**
373
+ * Per the HTML spec on restrictions for "raw text elements" like `<style>`:
374
+ *
375
+ * > The text in raw text and escapable raw text elements must not contain any occurrences of the string
376
+ * > "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that case-insensitively match the tag name of
377
+ * > the element followed by one of:
378
+ * > - U+0009 CHARACTER TABULATION (tab)
379
+ * > - U+000A LINE FEED (LF)
380
+ * > - U+000C FORM FEED (FF)
381
+ * > - U+000D CARRIAGE RETURN (CR)
382
+ * > - U+0020 SPACE
383
+ * > - U+003E GREATER-THAN SIGN (>), or
384
+ * > - U+002F SOLIDUS (/)
385
+ * @see https://html.spec.whatwg.org/multipage/syntax.html#cdata-rcdata-restrictions
386
+ */
387
+ const INVALID_STYLE_CONTENT = /<\/style[\t\n\f\r >/]/i;
388
+ /**
389
+ * The text content inside `<style>` is a special case. It is _only_ rendered by the LWC engine itself; `<style>` tags
390
+ * are disallowed inside of HTML templates.
391
+ *
392
+ * The `<style>` tag is unusual in how it's defined in HTML. Like `<script>`, it is considered a "raw text element,"
393
+ * which means that it is parsed as raw text, but certain character sequences are disallowed, namely to avoid XSS
394
+ * attacks like `</style><script>alert("pwned")</script>`.
395
+ *
396
+ * This also means that we cannot use "normal" HTML escaping inside `<style>` tags, e.g. we cannot use `&lt;`,
397
+ * `&gt;`, etc., because these are treated as-is by the HTML parser.
398
+ *
399
+ *
400
+ * @param contents CSS source to validate
401
+ * @throws Throws if the contents provided are not valid.
402
+ * @see https://html.spec.whatwg.org/multipage/syntax.html#raw-text-elements
403
+ * @see https://github.com/salesforce/lwc/issues/3439
404
+ * @example
405
+ * validateStyleTextContents('div { color: red }') // Ok
406
+ * validateStyleTextContents('</style><script>alert("pwned")</script>') // Throws
407
+ */
408
+ function validateStyleTextContents(contents) {
409
+ if (INVALID_STYLE_CONTENT.test(contents)) {
410
+ throw new Error('CSS contains unsafe characters and cannot be serialized inside a style element');
411
+ }
412
+ }
413
+
414
+ export { ClassList, LightningElement, MutationTracker, fallbackTmpl, renderAttrs, serverSideRenderComponent as renderComponent, serverSideRenderComponent, toIteratorDirective, validateStyleTextContents };
415
+ /** version: 8.2.0 */
137
416
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;;;;AAKG;AAEH,MAAM,WAAW,GAAG,MAAM,CAAC;AAM3B,MAAM,SAAS,CAAA;AAGX,IAAA,WAAA,CAAY,EAAoB,EAAA;AAC5B,QAAA,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,MAAM,OAAO,IAAI,sBAAsB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;QAC5E,MAAM,IAAI,OAAO,CAAC;KACrB;AAED,IAAA,OAAO,MAAM,CAAC;AAClB;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/class-list.ts","../../../../node_modules/tslib/tslib.es6.js","../src/mutation-tracker.ts","../src/lightning-element.ts","../src/render.ts","../src/to-iterator-directive.ts","../src/validate-style-text-contents.ts"],"sourcesContent":[null,"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n",null,null,null,null,null],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAIH,MAAM,WAAW,GAAG,MAAM,CAAC;MAqBd,SAAS,CAAA;AAGlB,IAAA,WAAA,CAAY,EAAoB,EAAA;AAC5B,QAAA,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;KAChB;IAED,GAAG,CAAC,GAAG,aAAuB,EAAA;AAC1B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC;AACpC,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,OAAO,CAA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AK,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC;AAEzC,IAAA,OAAO,IAAI,KAAK,KAAK,EAAE;;AAEnB,QAAA,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;AACvB,QAAA,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC;QAE1B,MAAM;YACF,KAAK;YACL,KAAK;YACL,KAAK,EAAE,KAAK,KAAK,CAAC;YAClB,IAAI;SACP,CAAC;QAEF,KAAK,IAAI,CAAC,CAAC;AACX,QAAA,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;KACtB;AACL;;AC5CA;;;;;AAKG;AAEH;;;;;;;;;;;;;;AAcG;AACH,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;AAmBG;AACG,SAAU,yBAAyB,CAAC,QAAgB,EAAA;AACtD,IAAA,IAAI,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;AACtC,QAAA,MAAM,IAAI,KAAK,CACX,gFAAgF,CACnF,CAAC;KACL;AACL;;;;;;;","x_google_ignoreList":[1]}
@@ -0,0 +1,59 @@
1
+ /// <reference types="node" />
2
+ import { ClassList } from './class-list';
3
+ type EventListenerOrEventListenerObject = unknown;
4
+ type AddEventListenerOptions = unknown;
5
+ type EventListenerOptions = unknown;
6
+ type ShadowRoot = unknown;
7
+ export type LightningElementConstructor = typeof LightningElement;
8
+ interface PropsAvailableAtConstruction {
9
+ tagName: string;
10
+ }
11
+ export declare class LightningElement implements PropsAvailableAtConstruction {
12
+ #private;
13
+ static renderMode?: 'light' | 'shadow';
14
+ isConnected: boolean;
15
+ className: string;
16
+ private __attrs;
17
+ private __classList;
18
+ tagName: string;
19
+ constructor(propsAvailableAtConstruction: PropsAvailableAtConstruction & Record<string, unknown>);
20
+ private __internal__setState;
21
+ get classList(): ClassList;
22
+ setAttribute(attrName: string, attrValue: unknown): void;
23
+ getAttribute(attrName: unknown): string | null;
24
+ hasAttribute(attrName: unknown): boolean;
25
+ removeAttribute(attrName: string): void;
26
+ addEventListener(_type: string, _listener: EventListenerOrEventListenerObject, _options?: boolean | AddEventListenerOptions): void;
27
+ removeEventListener(_type: string, _listener: EventListenerOrEventListenerObject, _options?: boolean | EventListenerOptions): void;
28
+ get children(): never;
29
+ get childNodes(): never;
30
+ get firstChild(): never;
31
+ get firstElementChild(): never;
32
+ get hostElement(): never;
33
+ get lastChild(): never;
34
+ get lastElementChild(): never;
35
+ get ownerDocument(): never;
36
+ get style(): never;
37
+ attachInternals(): never;
38
+ dispatchEvent(_event: Event): never;
39
+ getBoundingClientRect(): never;
40
+ getElementsByClassName(_classNames: string): never;
41
+ getElementsByTagName(_qualifiedName: unknown): never;
42
+ querySelector(_selectors: string): never;
43
+ querySelectorAll(_selectors: string): never;
44
+ accessKey?: string;
45
+ dir?: string;
46
+ draggable?: boolean;
47
+ hidden?: boolean;
48
+ id?: string;
49
+ lang?: string;
50
+ shadowRoot?: ShadowRoot | null;
51
+ spellcheck?: boolean;
52
+ tabIndex?: number;
53
+ title?: string;
54
+ getAttributeNS(_namespace: string | null, _localName: string): string | null;
55
+ hasAttributeNS(_namespace: string | null, _localName: string): boolean;
56
+ removeAttributeNS(_namespace: string | null, _localName: string): void;
57
+ setAttributeNS(_namespace: string | null, _qualifiedName: string, _value: string): void;
58
+ }
59
+ export {};
@@ -0,0 +1,7 @@
1
+ import { LightningElement } from './lightning-element';
2
+ export declare class MutationTracker {
3
+ mutationMap: WeakMap<LightningElement, Set<string>>;
4
+ add(instance: LightningElement, attrName: string): void;
5
+ renderMutatedAttrs(instance: LightningElement): string;
6
+ }
7
+ export declare const mutationTracker: MutationTracker;
@@ -0,0 +1,6 @@
1
+ import { LightningElement, type LightningElementConstructor } from './lightning-element';
2
+ import type { Attributes } from './types';
3
+ export declare function renderAttrs(instance: LightningElement, attrs: Attributes): Generator<string, void, unknown>;
4
+ export declare function fallbackTmpl(_props: unknown, _attrs: unknown, _slotted: unknown, Cmp: LightningElementConstructor, _instance: unknown): Generator<string, void, unknown>;
5
+ export type GenerateMarkupFn = (tagName: string, props: Record<string, any> | null, attrs: Attributes | null, slotted: Record<number | string, AsyncGenerator<string>> | null) => AsyncGenerator<string>;
6
+ export declare function serverSideRenderComponent(tagName: string, compiledGenerateMarkup: GenerateMarkupFn, props: Record<string, any>): Promise<string>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Converts an iterable into one that emits the object used by the [`iterator` directive](
3
+ * https://lwc.dev/guide/html_templates#iterator).
4
+ */
5
+ export declare function toIteratorDirective<T>(iterable: Iterable<T>): Generator<{
6
+ value: T;
7
+ index: number;
8
+ first: boolean;
9
+ last: boolean;
10
+ }>;
@@ -0,0 +1 @@
1
+ export type Attributes = Record<string, string | null>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The text content inside `<style>` is a special case. It is _only_ rendered by the LWC engine itself; `<style>` tags
3
+ * are disallowed inside of HTML templates.
4
+ *
5
+ * The `<style>` tag is unusual in how it's defined in HTML. Like `<script>`, it is considered a "raw text element,"
6
+ * which means that it is parsed as raw text, but certain character sequences are disallowed, namely to avoid XSS
7
+ * attacks like `</style><script>alert("pwned")</script>`.
8
+ *
9
+ * This also means that we cannot use "normal" HTML escaping inside `<style>` tags, e.g. we cannot use `&lt;`,
10
+ * `&gt;`, etc., because these are treated as-is by the HTML parser.
11
+ *
12
+ *
13
+ * @param contents CSS source to validate
14
+ * @throws Throws if the contents provided are not valid.
15
+ * @see https://html.spec.whatwg.org/multipage/syntax.html#raw-text-elements
16
+ * @see https://github.com/salesforce/lwc/issues/3439
17
+ * @example
18
+ * validateStyleTextContents('div { color: red }') // Ok
19
+ * validateStyleTextContents('</style><script>alert("pwned")</script>') // Throws
20
+ */
21
+ export declare function validateStyleTextContents(contents: string): void;
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/ssr-runtime",
7
- "version": "8.1.2",
7
+ "version": "8.2.0",
8
8
  "description": "Runtime complement to @lwc/ssr-compiler",
9
9
  "keywords": [
10
10
  "lwc",
@@ -43,5 +43,7 @@
43
43
  }
44
44
  }
45
45
  },
46
- "dependencies": {}
46
+ "dependencies": {
47
+ "@lwc/shared": "8.2.0"
48
+ }
47
49
  }