@lwc/shared 8.13.1 → 8.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,4 +21,18 @@ export declare function htmlPropertyToAttribute(propName: string): string;
21
21
  * @param attrName
22
22
  */
23
23
  export declare function kebabCaseToCamelCase(attrName: string): string;
24
+ /**
25
+ * This set is for attributes that have a camel cased property name
26
+ * For example, div.tabIndex.
27
+ * We do not want users to define `@api` properties with these names
28
+ * Because the template will never call them. It'll always call the camel
29
+ * cased version.
30
+ */
31
+ export declare const AMBIGUOUS_PROP_SET: Map<string, string>;
32
+ /**
33
+ * This set is for attributes that can never be defined
34
+ * by users on their components.
35
+ * We throw for these.
36
+ */
37
+ export declare const DISALLOWED_PROP_SET: Set<string>;
24
38
  //# sourceMappingURL=html-attributes.d.ts.map
package/dist/index.cjs.js CHANGED
@@ -684,6 +684,27 @@ function kebabCaseToCamelCase(attrName) {
684
684
  }
685
685
  return result;
686
686
  }
687
+ /**
688
+ * This set is for attributes that have a camel cased property name
689
+ * For example, div.tabIndex.
690
+ * We do not want users to define `@api` properties with these names
691
+ * Because the template will never call them. It'll always call the camel
692
+ * cased version.
693
+ */
694
+ const AMBIGUOUS_PROP_SET = /*@__PURE__@*/ new Map([
695
+ ['bgcolor', 'bgColor'],
696
+ ['accesskey', 'accessKey'],
697
+ ['contenteditable', 'contentEditable'],
698
+ ['tabindex', 'tabIndex'],
699
+ ['maxlength', 'maxLength'],
700
+ ['maxvalue', 'maxValue'],
701
+ ]);
702
+ /**
703
+ * This set is for attributes that can never be defined
704
+ * by users on their components.
705
+ * We throw for these.
706
+ */
707
+ const DISALLOWED_PROP_SET = /*@__PURE__@*/ new Set(['is', 'class', 'slot', 'style']);
687
708
 
688
709
  /*
689
710
  * Copyright (c) 2020, salesforce.com, inc.
@@ -715,7 +736,7 @@ function htmlEscape(str, attrMode = false) {
715
736
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
716
737
  */
717
738
  // Increment whenever the LWC template compiler changes
718
- const LWC_VERSION = "8.13.1";
739
+ const LWC_VERSION = "8.13.2";
719
740
  const LWC_VERSION_COMMENT = `LWC compiler v${LWC_VERSION}`;
720
741
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
721
742
 
@@ -896,6 +917,7 @@ function generateCustomElementTagName(namespace = '', name = '') {
896
917
  */
897
918
  const DEFAULT_SSR_MODE = 'sync';
898
919
 
920
+ exports.AMBIGUOUS_PROP_SET = AMBIGUOUS_PROP_SET;
899
921
  exports.AriaAttrNameToPropNameMap = AriaAttrNameToPropNameMap;
900
922
  exports.AriaPropNameToAttrNameMap = AriaPropNameToAttrNameMap;
901
923
  exports.ArrayConcat = ArrayConcat;
@@ -921,6 +943,7 @@ exports.ArraySort = ArraySort;
921
943
  exports.ArraySplice = ArraySplice;
922
944
  exports.ArrayUnshift = ArrayUnshift;
923
945
  exports.DEFAULT_SSR_MODE = DEFAULT_SSR_MODE;
946
+ exports.DISALLOWED_PROP_SET = DISALLOWED_PROP_SET;
924
947
  exports.HIGHEST_API_VERSION = HIGHEST_API_VERSION;
925
948
  exports.HTML_NAMESPACE = HTML_NAMESPACE;
926
949
  exports.ID_REFERENCING_ATTRIBUTES_SET = ID_REFERENCING_ATTRIBUTES_SET;
@@ -1007,5 +1030,5 @@ exports.setHooks = setHooks;
1007
1030
  exports.setPrototypeOf = setPrototypeOf;
1008
1031
  exports.setTrustedSignalSet = setTrustedSignalSet;
1009
1032
  exports.toString = toString;
1010
- /** version: 8.13.1 */
1033
+ /** version: 8.13.2 */
1011
1034
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.js CHANGED
@@ -680,6 +680,27 @@ function kebabCaseToCamelCase(attrName) {
680
680
  }
681
681
  return result;
682
682
  }
683
+ /**
684
+ * This set is for attributes that have a camel cased property name
685
+ * For example, div.tabIndex.
686
+ * We do not want users to define `@api` properties with these names
687
+ * Because the template will never call them. It'll always call the camel
688
+ * cased version.
689
+ */
690
+ const AMBIGUOUS_PROP_SET = /*@__PURE__@*/ new Map([
691
+ ['bgcolor', 'bgColor'],
692
+ ['accesskey', 'accessKey'],
693
+ ['contenteditable', 'contentEditable'],
694
+ ['tabindex', 'tabIndex'],
695
+ ['maxlength', 'maxLength'],
696
+ ['maxvalue', 'maxValue'],
697
+ ]);
698
+ /**
699
+ * This set is for attributes that can never be defined
700
+ * by users on their components.
701
+ * We throw for these.
702
+ */
703
+ const DISALLOWED_PROP_SET = /*@__PURE__@*/ new Set(['is', 'class', 'slot', 'style']);
683
704
 
684
705
  /*
685
706
  * Copyright (c) 2020, salesforce.com, inc.
@@ -711,7 +732,7 @@ function htmlEscape(str, attrMode = false) {
711
732
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
712
733
  */
713
734
  // Increment whenever the LWC template compiler changes
714
- const LWC_VERSION = "8.13.1";
735
+ const LWC_VERSION = "8.13.2";
715
736
  const LWC_VERSION_COMMENT = `LWC compiler v${LWC_VERSION}`;
716
737
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
717
738
 
@@ -892,6 +913,6 @@ function generateCustomElementTagName(namespace = '', name = '') {
892
913
  */
893
914
  const DEFAULT_SSR_MODE = 'sync';
894
915
 
895
- export { AriaAttrNameToPropNameMap, AriaPropNameToAttrNameMap, ArrayConcat, ArrayCopyWithin, ArrayEvery, ArrayFill, ArrayFilter, ArrayFind, ArrayFindIndex, ArrayFrom, ArrayIncludes, ArrayIndexOf, ArrayJoin, ArrayMap, ArrayPop, ArrayPush, ArrayReduce, ArrayReverse, ArrayShift, ArraySlice, ArraySome, ArraySort, ArraySplice, ArrayUnshift, DEFAULT_SSR_MODE, HIGHEST_API_VERSION, HTML_NAMESPACE, ID_REFERENCING_ATTRIBUTES_SET, IMPORTANT_FLAG, KEY__LEGACY_SHADOW_TOKEN, KEY__LEGACY_SHADOW_TOKEN_PRIVATE, KEY__NATIVE_GET_ELEMENT_BY_ID, KEY__NATIVE_ONLY_CSS, KEY__NATIVE_QUERY_SELECTOR_ALL, KEY__SCOPED_CSS, KEY__SHADOW_RESOLVER, KEY__SHADOW_RESOLVER_PRIVATE, KEY__SHADOW_STATIC, KEY__SHADOW_STATIC_PRIVATE, KEY__SHADOW_TOKEN, KEY__SHADOW_TOKEN_PRIVATE, KEY__SYNTHETIC_MODE, LOWEST_API_VERSION, LWC_VERSION, LWC_VERSION_COMMENT, LWC_VERSION_COMMENT_REGEX, MATHML_NAMESPACE, REFLECTIVE_GLOBAL_PROPERTY_SET, SPECIAL_PROPERTY_ATTRIBUTE_MAPPING, SVG_NAMESPACE, StringCharAt, StringCharCodeAt, StringFromCharCode, StringReplace, StringSlice, StringSplit, StringToLowerCase, StringTrim, XLINK_NAMESPACE, XML_NAMESPACE, addTrustedSignal, arrayEvery, assert, assign, create, defineProperties, defineProperty, entries, flattenStylesheets, forEach, freeze, fromEntries, generateCustomElementTagName, getAPIVersionFromNumber, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPropertyDescriptor, getPrototypeOf, hasOwnProperty, htmlEscape, htmlPropertyToAttribute, isAPIFeatureEnabled, isAriaAttribute, isArray, isBoolean, isBooleanAttribute, isFalse, isFrozen, isFunction, isGlobalHtmlAttribute, isNull, isNumber, isObject, isString, isTrue, isTrustedSignal, isUndefined, isVoidElement, kebabCaseToCamelCase, keys, noop, normalizeClass, normalizeStyleAttributeValue, parseStyleText, sanitizeHtmlContent, seal, setHooks, setPrototypeOf, setTrustedSignalSet, toString };
896
- /** version: 8.13.1 */
916
+ export { AMBIGUOUS_PROP_SET, AriaAttrNameToPropNameMap, AriaPropNameToAttrNameMap, ArrayConcat, ArrayCopyWithin, ArrayEvery, ArrayFill, ArrayFilter, ArrayFind, ArrayFindIndex, ArrayFrom, ArrayIncludes, ArrayIndexOf, ArrayJoin, ArrayMap, ArrayPop, ArrayPush, ArrayReduce, ArrayReverse, ArrayShift, ArraySlice, ArraySome, ArraySort, ArraySplice, ArrayUnshift, DEFAULT_SSR_MODE, DISALLOWED_PROP_SET, HIGHEST_API_VERSION, HTML_NAMESPACE, ID_REFERENCING_ATTRIBUTES_SET, IMPORTANT_FLAG, KEY__LEGACY_SHADOW_TOKEN, KEY__LEGACY_SHADOW_TOKEN_PRIVATE, KEY__NATIVE_GET_ELEMENT_BY_ID, KEY__NATIVE_ONLY_CSS, KEY__NATIVE_QUERY_SELECTOR_ALL, KEY__SCOPED_CSS, KEY__SHADOW_RESOLVER, KEY__SHADOW_RESOLVER_PRIVATE, KEY__SHADOW_STATIC, KEY__SHADOW_STATIC_PRIVATE, KEY__SHADOW_TOKEN, KEY__SHADOW_TOKEN_PRIVATE, KEY__SYNTHETIC_MODE, LOWEST_API_VERSION, LWC_VERSION, LWC_VERSION_COMMENT, LWC_VERSION_COMMENT_REGEX, MATHML_NAMESPACE, REFLECTIVE_GLOBAL_PROPERTY_SET, SPECIAL_PROPERTY_ATTRIBUTE_MAPPING, SVG_NAMESPACE, StringCharAt, StringCharCodeAt, StringFromCharCode, StringReplace, StringSlice, StringSplit, StringToLowerCase, StringTrim, XLINK_NAMESPACE, XML_NAMESPACE, addTrustedSignal, arrayEvery, assert, assign, create, defineProperties, defineProperty, entries, flattenStylesheets, forEach, freeze, fromEntries, generateCustomElementTagName, getAPIVersionFromNumber, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPropertyDescriptor, getPrototypeOf, hasOwnProperty, htmlEscape, htmlPropertyToAttribute, isAPIFeatureEnabled, isAriaAttribute, isArray, isBoolean, isBooleanAttribute, isFalse, isFrozen, isFunction, isGlobalHtmlAttribute, isNull, isNumber, isObject, isString, isTrue, isTrustedSignal, isUndefined, isVoidElement, kebabCaseToCamelCase, keys, noop, normalizeClass, normalizeStyleAttributeValue, parseStyleText, sanitizeHtmlContent, seal, setHooks, setPrototypeOf, setTrustedSignalSet, toString };
917
+ /** version: 8.13.2 */
897
918
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
5
5
  ],
6
6
  "name": "@lwc/shared",
7
- "version": "8.13.1",
7
+ "version": "8.13.2",
8
8
  "description": "Utilities and methods that are shared across packages",
9
9
  "keywords": [
10
10
  "lwc"