@lwc/ssr-runtime 8.1.3 → 8.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,67 +5,14 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- /*
9
- * Copyright (c) 2024, Salesforce, Inc.
10
- * All rights reserved.
11
- * SPDX-License-Identifier: MIT
12
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
13
- */
14
- /**
15
- * Per the HTML spec on restrictions for "raw text elements" like `<style>`:
16
- *
17
- * > The text in raw text and escapable raw text elements must not contain any occurrences of the string
18
- * > "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that case-insensitively match the tag name of
19
- * > the element followed by one of:
20
- * > - U+0009 CHARACTER TABULATION (tab)
21
- * > - U+000A LINE FEED (LF)
22
- * > - U+000C FORM FEED (FF)
23
- * > - U+000D CARRIAGE RETURN (CR)
24
- * > - U+0020 SPACE
25
- * > - U+003E GREATER-THAN SIGN (>), or
26
- * > - U+002F SOLIDUS (/)
27
- * @see https://html.spec.whatwg.org/multipage/syntax.html#cdata-rcdata-restrictions
28
- */
29
- const INVALID_STYLE_CONTENT = /<\/style[\t\n\f\r >/]/i;
30
- /**
31
- * The text content inside `<style>` is a special case. It is _only_ rendered by the LWC engine itself; `<style>` tags
32
- * are disallowed inside of HTML templates.
33
- *
34
- * The `<style>` tag is unusual in how it's defined in HTML. Like `<script>`, it is considered a "raw text element,"
35
- * which means that it is parsed as raw text, but certain character sequences are disallowed, namely to avoid XSS
36
- * attacks like `</style><script>alert("pwned")</script>`.
37
- *
38
- * This also means that we cannot use "normal" HTML escaping inside `<style>` tags, e.g. we cannot use `&lt;`,
39
- * `&gt;`, etc., because these are treated as-is by the HTML parser.
40
- *
41
- *
42
- * @param contents CSS source to validate
43
- * @throws Throws if the contents provided are not valid.
44
- * @see https://html.spec.whatwg.org/multipage/syntax.html#raw-text-elements
45
- * @see https://github.com/salesforce/lwc/issues/3439
46
- * @example
47
- * validateStyleTextContents('div { color: red }') // Ok
48
- * validateStyleTextContents('</style><script>alert("pwned")</script>') // Throws
49
- */
50
- function validateStyleTextContents(contents) {
51
- if (INVALID_STYLE_CONTENT.test(contents)) {
52
- throw new Error('CSS contains unsafe characters and cannot be serialized inside a style element');
53
- }
54
- }
8
+ var shared = require('@lwc/shared');
55
9
 
56
10
  /*
57
- * Copyright (c) 2024, salesforce.com, inc.
11
+ * Copyright (c) 2024, Salesforce, Inc.
58
12
  * All rights reserved.
59
13
  * SPDX-License-Identifier: MIT
60
14
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
61
15
  */
62
- // At runtime, we don't have access to the DOM, so we don't want TypeScript to allow accessing DOM
63
- // globals. However, we're mimicking DOM functionality here, so we *do* want access to DOM types.
64
- // To access the real DOM types when writing new code, uncomment the line below and comment out the
65
- // stub types. Switch them back when you're done to validate that you're not accidentally using
66
- // DOM globals. IMPORTANT: The comment below is a "triple slash directive", it must start with ///
67
- // and be located before import statements.
68
- // /// <reference lib="dom" />
69
16
  const MULTI_SPACE = /\s+/g;
70
17
  class ClassList {
71
18
  constructor(el) {
@@ -135,8 +82,75 @@ class ClassList {
135
82
  throw new Error('Property "length" not implemented.');
136
83
  }
137
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;
138
151
  class LightningElement {
139
152
  constructor(propsAvailableAtConstruction) {
153
+ _LightningElement_instances.add(this);
140
154
  this.isConnected = false;
141
155
  this.className = '';
142
156
  this.__classList = null;
@@ -155,6 +169,7 @@ class LightningElement {
155
169
  },
156
170
  set(newValue) {
157
171
  props[reflectedPropName] = newValue;
172
+ mutationTracker.add(this, shared.htmlPropertyToAttribute(reflectedPropName));
158
173
  },
159
174
  enumerable: true,
160
175
  });
@@ -166,6 +181,7 @@ class LightningElement {
166
181
  set(newVal) {
167
182
  props.class = newVal;
168
183
  attrs.class = newVal;
184
+ mutationTracker.add(this, 'class');
169
185
  },
170
186
  });
171
187
  }
@@ -175,17 +191,30 @@ class LightningElement {
175
191
  }
176
192
  return (this.__classList = new ClassList(this));
177
193
  }
178
- getAttribute(attrName) {
179
- return this.__attrs[attrName] ?? null;
194
+ setAttribute(attrName, attrValue) {
195
+ __classPrivateFieldGet(this, _LightningElement_instances, "m", _LightningElement_setAttribute).call(this, attrName, String(attrValue));
180
196
  }
181
- setAttribute(attrName, value) {
182
- this.__attrs[attrName] = String(value);
197
+ getAttribute(attrName) {
198
+ if (this.hasAttribute(attrName)) {
199
+ return this.__attrs[attrName];
200
+ }
201
+ return null;
183
202
  }
184
203
  hasAttribute(attrName) {
185
- return Boolean(this.__attrs && attrName in this.__attrs);
204
+ return typeof attrName === 'string' && typeof this.__attrs[attrName] === 'string';
186
205
  }
187
206
  removeAttribute(attrName) {
188
- this.__attrs[attrName] = null;
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
+ }
189
218
  }
190
219
  addEventListener(_type, _listener, _options) {
191
220
  // noop
@@ -261,19 +290,32 @@ class LightningElement {
261
290
  throw new Error('Method "setAttributeNS" not implemented.');
262
291
  }
263
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
+ */
264
304
  const escapeAttrVal = (attrVal) => attrVal.replaceAll('&', '&amp;').replaceAll('"', '&quot;');
265
- function* renderAttrs(attrs) {
305
+ function* renderAttrs(instance, attrs) {
266
306
  if (!attrs) {
267
307
  return;
268
308
  }
269
- for (const [key, val] of Object.entries(attrs)) {
270
- if (typeof val === 'string') {
271
- yield val === '' ? ` ${key}` : ` ${key}="${escapeAttrVal(val)}"`;
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)}"`;
272
313
  }
273
- else if (val === null) {
274
- return '';
314
+ else if (attrVal === null) {
315
+ yield '';
275
316
  }
276
317
  }
318
+ yield mutationTracker.renderMutatedAttrs(instance);
277
319
  }
278
320
  function* fallbackTmpl(_props, _attrs, _slotted, Cmp, _instance) {
279
321
  if (Cmp.renderMode !== 'light') {
@@ -288,10 +330,99 @@ async function serverSideRenderComponent(tagName, compiledGenerateMarkup, props)
288
330
  return markup;
289
331
  }
290
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;
291
419
  exports.LightningElement = LightningElement;
420
+ exports.MutationTracker = MutationTracker;
292
421
  exports.fallbackTmpl = fallbackTmpl;
293
422
  exports.renderAttrs = renderAttrs;
423
+ exports.renderComponent = serverSideRenderComponent;
294
424
  exports.serverSideRenderComponent = serverSideRenderComponent;
425
+ exports.toIteratorDirective = toIteratorDirective;
295
426
  exports.validateStyleTextContents = validateStyleTextContents;
296
- /** version: 8.1.3 */
427
+ /** version: 8.2.0 */
297
428
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/validate-style-text-contents.ts","../src/index.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;;AAAA;;;;;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;;AClDA;;;;;AAKG;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,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,CAA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c,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,MAA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,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;AAC5B,QAAA,MAAM,IAAI,KAAK;;QAEX,CAA0C,uCAAA,EAAA,QAAQ,CAAsC,oCAAA,CAAA,CAC3F,CAAC;KACL;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC7C,IAAA,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,EAAE,KAAK,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]}
package/dist/index.d.ts CHANGED
@@ -1,78 +1,6 @@
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';
1
6
  export { validateStyleTextContents } from './validate-style-text-contents';
2
- type DOMTokenList = object;
3
- type EventListenerOrEventListenerObject = unknown;
4
- type AddEventListenerOptions = unknown;
5
- type EventListenerOptions = unknown;
6
- type ShadowRoot = unknown;
7
- type Attributes = Record<string, string | null>;
8
- type LightningElementConstructor = typeof LightningElement;
9
- declare class ClassList implements DOMTokenList {
10
- el: LightningElement;
11
- constructor(el: LightningElement);
12
- add(...newClassNames: string[]): void;
13
- contains(className: string): boolean;
14
- remove(...classNamesToRemove: string[]): void;
15
- replace(oldClassName: string, newClassName: string): boolean;
16
- toggle(classNameToToggle: string, force?: boolean): boolean;
17
- get value(): string;
18
- toString(): string;
19
- [index: number]: never;
20
- item(_index: number): string | null;
21
- supports(_token: string): boolean;
22
- forEach(_callbackfn: (value: string, key: number, parent: DOMTokenList) => void, _thisArg?: any): void;
23
- get length(): number;
24
- }
25
- interface PropsAvailableAtConstruction {
26
- tagName: string;
27
- }
28
- export declare class LightningElement implements PropsAvailableAtConstruction {
29
- static renderMode?: 'light' | 'shadow';
30
- isConnected: boolean;
31
- className: string;
32
- private __attrs;
33
- private __classList;
34
- tagName: string;
35
- constructor(propsAvailableAtConstruction: PropsAvailableAtConstruction & Record<string, unknown>);
36
- private __internal__setState;
37
- get classList(): ClassList;
38
- getAttribute(attrName: string): string | null;
39
- setAttribute(attrName: string, value: string | null): void;
40
- hasAttribute(attrName: string): boolean;
41
- removeAttribute(attrName: string): void;
42
- addEventListener(_type: string, _listener: EventListenerOrEventListenerObject, _options?: boolean | AddEventListenerOptions): void;
43
- removeEventListener(_type: string, _listener: EventListenerOrEventListenerObject, _options?: boolean | EventListenerOptions): void;
44
- get children(): never;
45
- get childNodes(): never;
46
- get firstChild(): never;
47
- get firstElementChild(): never;
48
- get hostElement(): never;
49
- get lastChild(): never;
50
- get lastElementChild(): never;
51
- get ownerDocument(): never;
52
- get style(): never;
53
- attachInternals(): never;
54
- dispatchEvent(_event: Event): never;
55
- getBoundingClientRect(): never;
56
- getElementsByClassName(_classNames: string): never;
57
- getElementsByTagName(_qualifiedName: unknown): never;
58
- querySelector(_selectors: string): never;
59
- querySelectorAll(_selectors: string): never;
60
- accessKey?: string;
61
- dir?: string;
62
- draggable?: boolean;
63
- hidden?: boolean;
64
- id?: string;
65
- lang?: string;
66
- shadowRoot?: ShadowRoot | null;
67
- spellcheck?: boolean;
68
- tabIndex?: number;
69
- title?: string;
70
- getAttributeNS(_namespace: string | null, _localName: string): string | null;
71
- hasAttributeNS(_namespace: string | null, _localName: string): boolean;
72
- removeAttributeNS(_namespace: string | null, _localName: string): void;
73
- setAttributeNS(_namespace: string | null, _qualifiedName: string, _value: string): void;
74
- }
75
- export declare function renderAttrs(attrs: Attributes): Generator<string, "" | undefined, unknown>;
76
- export declare function fallbackTmpl(_props: unknown, _attrs: unknown, _slotted: unknown, Cmp: LightningElementConstructor, _instance: unknown): Generator<string, void, unknown>;
77
- export type GenerateMarkupFn = (tagName: string, props: Record<string, any> | null, attrs: Attributes | null, slotted: Record<number | string, AsyncGenerator<string>> | null) => AsyncGenerator<string>;
78
- export declare function serverSideRenderComponent(tagName: string, compiledGenerateMarkup: GenerateMarkupFn, props: Record<string, any>): Promise<string>;
package/dist/index.js CHANGED
@@ -1,67 +1,14 @@
1
1
  /**
2
2
  * Copyright (c) 2024 Salesforce, Inc.
3
3
  */
4
- /*
5
- * Copyright (c) 2024, Salesforce, Inc.
6
- * All rights reserved.
7
- * SPDX-License-Identifier: MIT
8
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
9
- */
10
- /**
11
- * Per the HTML spec on restrictions for "raw text elements" like `<style>`:
12
- *
13
- * > The text in raw text and escapable raw text elements must not contain any occurrences of the string
14
- * > "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that case-insensitively match the tag name of
15
- * > the element followed by one of:
16
- * > - U+0009 CHARACTER TABULATION (tab)
17
- * > - U+000A LINE FEED (LF)
18
- * > - U+000C FORM FEED (FF)
19
- * > - U+000D CARRIAGE RETURN (CR)
20
- * > - U+0020 SPACE
21
- * > - U+003E GREATER-THAN SIGN (>), or
22
- * > - U+002F SOLIDUS (/)
23
- * @see https://html.spec.whatwg.org/multipage/syntax.html#cdata-rcdata-restrictions
24
- */
25
- const INVALID_STYLE_CONTENT = /<\/style[\t\n\f\r >/]/i;
26
- /**
27
- * The text content inside `<style>` is a special case. It is _only_ rendered by the LWC engine itself; `<style>` tags
28
- * are disallowed inside of HTML templates.
29
- *
30
- * The `<style>` tag is unusual in how it's defined in HTML. Like `<script>`, it is considered a "raw text element,"
31
- * which means that it is parsed as raw text, but certain character sequences are disallowed, namely to avoid XSS
32
- * attacks like `</style><script>alert("pwned")</script>`.
33
- *
34
- * This also means that we cannot use "normal" HTML escaping inside `<style>` tags, e.g. we cannot use `&lt;`,
35
- * `&gt;`, etc., because these are treated as-is by the HTML parser.
36
- *
37
- *
38
- * @param contents CSS source to validate
39
- * @throws Throws if the contents provided are not valid.
40
- * @see https://html.spec.whatwg.org/multipage/syntax.html#raw-text-elements
41
- * @see https://github.com/salesforce/lwc/issues/3439
42
- * @example
43
- * validateStyleTextContents('div { color: red }') // Ok
44
- * validateStyleTextContents('</style><script>alert("pwned")</script>') // Throws
45
- */
46
- function validateStyleTextContents(contents) {
47
- if (INVALID_STYLE_CONTENT.test(contents)) {
48
- throw new Error('CSS contains unsafe characters and cannot be serialized inside a style element');
49
- }
50
- }
4
+ import { htmlPropertyToAttribute } from '@lwc/shared';
51
5
 
52
6
  /*
53
- * Copyright (c) 2024, salesforce.com, inc.
7
+ * Copyright (c) 2024, Salesforce, Inc.
54
8
  * All rights reserved.
55
9
  * SPDX-License-Identifier: MIT
56
10
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
57
11
  */
58
- // At runtime, we don't have access to the DOM, so we don't want TypeScript to allow accessing DOM
59
- // globals. However, we're mimicking DOM functionality here, so we *do* want access to DOM types.
60
- // To access the real DOM types when writing new code, uncomment the line below and comment out the
61
- // stub types. Switch them back when you're done to validate that you're not accidentally using
62
- // DOM globals. IMPORTANT: The comment below is a "triple slash directive", it must start with ///
63
- // and be located before import statements.
64
- // /// <reference lib="dom" />
65
12
  const MULTI_SPACE = /\s+/g;
66
13
  class ClassList {
67
14
  constructor(el) {
@@ -131,8 +78,75 @@ class ClassList {
131
78
  throw new Error('Property "length" not implemented.');
132
79
  }
133
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;
134
147
  class LightningElement {
135
148
  constructor(propsAvailableAtConstruction) {
149
+ _LightningElement_instances.add(this);
136
150
  this.isConnected = false;
137
151
  this.className = '';
138
152
  this.__classList = null;
@@ -151,6 +165,7 @@ class LightningElement {
151
165
  },
152
166
  set(newValue) {
153
167
  props[reflectedPropName] = newValue;
168
+ mutationTracker.add(this, htmlPropertyToAttribute(reflectedPropName));
154
169
  },
155
170
  enumerable: true,
156
171
  });
@@ -162,6 +177,7 @@ class LightningElement {
162
177
  set(newVal) {
163
178
  props.class = newVal;
164
179
  attrs.class = newVal;
180
+ mutationTracker.add(this, 'class');
165
181
  },
166
182
  });
167
183
  }
@@ -171,17 +187,30 @@ class LightningElement {
171
187
  }
172
188
  return (this.__classList = new ClassList(this));
173
189
  }
174
- getAttribute(attrName) {
175
- return this.__attrs[attrName] ?? null;
190
+ setAttribute(attrName, attrValue) {
191
+ __classPrivateFieldGet(this, _LightningElement_instances, "m", _LightningElement_setAttribute).call(this, attrName, String(attrValue));
176
192
  }
177
- setAttribute(attrName, value) {
178
- this.__attrs[attrName] = String(value);
193
+ getAttribute(attrName) {
194
+ if (this.hasAttribute(attrName)) {
195
+ return this.__attrs[attrName];
196
+ }
197
+ return null;
179
198
  }
180
199
  hasAttribute(attrName) {
181
- return Boolean(this.__attrs && attrName in this.__attrs);
200
+ return typeof attrName === 'string' && typeof this.__attrs[attrName] === 'string';
182
201
  }
183
202
  removeAttribute(attrName) {
184
- this.__attrs[attrName] = null;
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
+ }
185
214
  }
186
215
  addEventListener(_type, _listener, _options) {
187
216
  // noop
@@ -257,19 +286,32 @@ class LightningElement {
257
286
  throw new Error('Method "setAttributeNS" not implemented.');
258
287
  }
259
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
+ */
260
300
  const escapeAttrVal = (attrVal) => attrVal.replaceAll('&', '&amp;').replaceAll('"', '&quot;');
261
- function* renderAttrs(attrs) {
301
+ function* renderAttrs(instance, attrs) {
262
302
  if (!attrs) {
263
303
  return;
264
304
  }
265
- for (const [key, val] of Object.entries(attrs)) {
266
- if (typeof val === 'string') {
267
- yield val === '' ? ` ${key}` : ` ${key}="${escapeAttrVal(val)}"`;
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)}"`;
268
309
  }
269
- else if (val === null) {
270
- return '';
310
+ else if (attrVal === null) {
311
+ yield '';
271
312
  }
272
313
  }
314
+ yield mutationTracker.renderMutatedAttrs(instance);
273
315
  }
274
316
  function* fallbackTmpl(_props, _attrs, _slotted, Cmp, _instance) {
275
317
  if (Cmp.renderMode !== 'light') {
@@ -284,6 +326,91 @@ async function serverSideRenderComponent(tagName, compiledGenerateMarkup, props)
284
326
  return markup;
285
327
  }
286
328
 
287
- export { LightningElement, fallbackTmpl, renderAttrs, serverSideRenderComponent, validateStyleTextContents };
288
- /** version: 8.1.3 */
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 */
289
416
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/validate-style-text-contents.ts","../src/index.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;AAAA;;;;;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;;AClDA;;;;;AAKG;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,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,CA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,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.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;AAC5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QAEX,CAA0C,uCAAA,EAAA,QAAQ,CAAsC,oCAAA,CAAA,CAC3F,CAAC;KACL;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC7C,IAAA,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,EAAE,KAAK,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>;
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.3",
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
  }