@lwc/shared
Advanced tools
Comparing version 8.4.0 to 8.5.0
@@ -12,2 +12,3 @@ /** | ||
export declare function isGlobalHtmlAttribute(attrName: string): boolean; | ||
export declare const SPECIAL_PROPERTY_ATTRIBUTE_MAPPING: Map<string, string>; | ||
/** | ||
@@ -14,0 +15,0 @@ * |
@@ -79,2 +79,4 @@ /** | ||
freeze, | ||
/** Detached {@linkcode Object.fromEntries}; see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries MDN Reference}. */ | ||
fromEntries, | ||
/** Detached {@linkcode Object.getOwnPropertyDescriptor}; see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor MDN Reference}. */ | ||
@@ -757,3 +759,3 @@ getOwnPropertyDescriptor, | ||
// Increment whenever the LWC template compiler changes | ||
const LWC_VERSION = "8.4.0"; | ||
const LWC_VERSION = "8.5.0"; | ||
const LWC_VERSION_COMMENT = `LWC compiler v${LWC_VERSION}`; | ||
@@ -794,2 +796,14 @@ const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/; | ||
} | ||
function flattenStylesheets(stylesheets) { | ||
const list = []; | ||
for (const stylesheet of stylesheets) { | ||
if (!isArray(stylesheet)) { | ||
list.push(stylesheet); | ||
} | ||
else { | ||
list.push(...flattenStylesheets(stylesheet)); | ||
} | ||
} | ||
return list; | ||
} | ||
@@ -866,2 +880,3 @@ /* | ||
exports.MATHML_NAMESPACE = MATHML_NAMESPACE; | ||
exports.SPECIAL_PROPERTY_ATTRIBUTE_MAPPING = SPECIAL_PROPERTY_ATTRIBUTE_MAPPING; | ||
exports.SVG_NAMESPACE = SVG_NAMESPACE; | ||
@@ -886,4 +901,6 @@ exports.StringCharAt = StringCharAt; | ||
exports.entries = entries; | ||
exports.flattenStylesheets = flattenStylesheets; | ||
exports.forEach = forEach; | ||
exports.freeze = freeze; | ||
exports.fromEntries = fromEntries; | ||
exports.getAPIVersionFromNumber = getAPIVersionFromNumber; | ||
@@ -926,3 +943,3 @@ exports.getOwnPropertyDescriptor = getOwnPropertyDescriptor; | ||
exports.toString = toString; | ||
/** version: 8.4.0 */ | ||
/** version: 8.5.0 */ | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -75,2 +75,4 @@ /** | ||
freeze, | ||
/** Detached {@linkcode Object.fromEntries}; see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries MDN Reference}. */ | ||
fromEntries, | ||
/** Detached {@linkcode Object.getOwnPropertyDescriptor}; see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor MDN Reference}. */ | ||
@@ -753,3 +755,3 @@ getOwnPropertyDescriptor, | ||
// Increment whenever the LWC template compiler changes | ||
const LWC_VERSION = "8.4.0"; | ||
const LWC_VERSION = "8.5.0"; | ||
const LWC_VERSION_COMMENT = `LWC compiler v${LWC_VERSION}`; | ||
@@ -790,2 +792,14 @@ const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/; | ||
} | ||
function flattenStylesheets(stylesheets) { | ||
const list = []; | ||
for (const stylesheet of stylesheets) { | ||
if (!isArray(stylesheet)) { | ||
list.push(stylesheet); | ||
} | ||
else { | ||
list.push(...flattenStylesheets(stylesheet)); | ||
} | ||
} | ||
return list; | ||
} | ||
@@ -817,4 +831,4 @@ /* | ||
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, 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_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, SVG_NAMESPACE, StringCharAt, StringCharCodeAt, StringFromCharCode, StringReplace, StringSlice, StringSplit, StringToLowerCase, StringTrim, XLINK_NAMESPACE, XML_NAMESPACE, addTrustedSignal, arrayEvery, assert, assign, create, defineProperties, defineProperty, entries, forEach, freeze, 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, normalizeStyleAttribute, parseStyleText, reservedKeywords, seal, setPrototypeOf, setTrustedSignalSet, toString }; | ||
/** version: 8.4.0 */ | ||
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, 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_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, 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, 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, normalizeStyleAttribute, parseStyleText, reservedKeywords, seal, setPrototypeOf, setTrustedSignalSet, toString }; | ||
/** version: 8.5.0 */ | ||
//# sourceMappingURL=index.js.map |
@@ -33,2 +33,9 @@ declare const | ||
}, | ||
/** Detached {@linkcode Object.fromEntries}; see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries MDN Reference}. */ | ||
fromEntries: { | ||
<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { | ||
[k: string]: T; | ||
}; | ||
(entries: Iterable<readonly any[]>): any; | ||
}, | ||
/** Detached {@linkcode Object.getOwnPropertyDescriptor}; see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor MDN Reference}. */ | ||
@@ -211,3 +218,3 @@ getOwnPropertyDescriptor: (o: any, p: PropertyKey) => PropertyDescriptor | undefined, | ||
arrayEvery, // Not actually Array#every! | ||
assign, create, defineProperties, defineProperty, entries, freeze, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, isFrozen, keys, seal, setPrototypeOf, StringFromCharCode, | ||
assign, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, isFrozen, keys, seal, setPrototypeOf, StringFromCharCode, | ||
/** Unbound {@linkcode String.prototype.charAt}; see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt MDN Reference}. */ | ||
@@ -214,0 +221,0 @@ StringCharAt, |
export declare const IMPORTANT_FLAG: RegExp; | ||
/** | ||
* Function producing style based on a host and a shadow selector. This function is invoked by | ||
* the engine with different values depending on the mode that the component is running on. | ||
*/ | ||
export type Stylesheet = { | ||
/** | ||
* Function taking a stylesheet token (string), whether to render actual or "scoped" `:host()` pseudo-classes, | ||
* and whether to render actual or synthetic `:dir()` pseudo-classes and returning a CSS string. | ||
* This function signature should _not_ be considered a stable API surface - it is internal to the LWC engine. | ||
*/ | ||
(stylesheetToken: string | undefined, useActualHostSelector: boolean, useNativeDirPseudoclass: boolean): string; | ||
/** | ||
* True if this is a scoped style (e.g. `foo.scoped.css`) | ||
*/ | ||
$scoped$?: boolean; | ||
}; | ||
/** | ||
* The list of stylesheets associated with a template. Each entry is either a `Stylesheet` or | ||
* an array of stylesheets that a given stylesheet depends on via CSS `@import` declarations. | ||
*/ | ||
export type Stylesheets = Array<Stylesheet | Stylesheets>; | ||
export declare function parseStyleText(cssText: string): { | ||
@@ -6,1 +27,2 @@ [name: string]: string; | ||
export declare function normalizeStyleAttribute(style: string): string; | ||
export declare function flattenStylesheets(stylesheets: Stylesheets): Stylesheet[]; |
@@ -7,3 +7,3 @@ { | ||
"name": "@lwc/shared", | ||
"version": "8.4.0", | ||
"version": "8.5.0", | ||
"description": "Utilities and methods that are shared across packages", | ||
@@ -10,0 +10,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131486
2283