@nvidia-elements/core 0.0.3 → 0.0.5
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.
- package/CHANGELOG.md +20 -17
- package/NOTICE.md +119 -0
- package/dist/accordion/accordion2.js +4 -4
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert.examples.js.map +1 -1
- package/dist/alert/alert.examples.json +1 -1
- package/dist/alert/alert2.js +1 -1
- package/dist/alert/define.js +1 -2
- package/dist/alert/define.js.map +1 -1
- package/dist/alert/index.d.ts +0 -1
- package/dist/alert/index.js +1 -2
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge2.js +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundle.d.ts +2 -0
- package/dist/bundles/index.d.ts +176 -3
- package/dist/bundles/index.js +4 -4
- package/dist/button/button.examples.js.map +1 -1
- package/dist/button/button.examples.json +3 -3
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group2.js +1 -1
- package/dist/card/card2.js +4 -4
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/checkbox/checkbox-group2.js +1 -1
- package/dist/checkbox/checkbox2.js +1 -1
- package/dist/color/color2.js +1 -1
- package/dist/combobox/combobox.d.ts +4 -0
- package/dist/combobox/combobox.examples.js.map +1 -1
- package/dist/combobox/combobox.examples.json +12 -1
- package/dist/combobox/combobox.js +1 -1
- package/dist/combobox/combobox.js.map +1 -1
- package/dist/combobox/combobox2.js +90 -62
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements-jsx.d.ts +117 -69
- package/dist/custom-elements-vue.d.ts +117 -69
- package/dist/custom-elements.json +2284 -1630
- package/dist/data.html.json +202 -71
- package/dist/data.snippets.json +9 -0
- package/dist/date/date2.js +1 -1
- package/dist/datetime/datetime2.js +1 -1
- package/dist/dialog/dialog-footer2.js +1 -1
- package/dist/dialog/dialog-header2.js +1 -1
- package/dist/dialog/dialog2.js +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drawer/drawer-content2.js +1 -1
- package/dist/drawer/drawer-footer2.js +1 -1
- package/dist/drawer/drawer-header2.js +1 -1
- package/dist/drawer/drawer2.js +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +1 -1
- package/dist/dropdown/dropdown2.js +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone.examples.js.map +1 -1
- package/dist/dropzone/dropzone.examples.json +3 -1
- package/dist/dropzone/dropzone2.js +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-datetime/define.d.ts +6 -0
- package/dist/format-datetime/define.js +7 -0
- package/dist/format-datetime/define.js.map +1 -0
- package/dist/format-datetime/format-datetime.d.ts +74 -0
- package/dist/format-datetime/format-datetime.examples.js +6 -0
- package/dist/format-datetime/format-datetime.examples.js.map +1 -0
- package/dist/format-datetime/format-datetime.examples.json +87 -0
- package/dist/format-datetime/format-datetime.js +6 -0
- package/dist/format-datetime/format-datetime.js.map +1 -0
- package/dist/format-datetime/format-datetime2.js +77 -0
- package/dist/format-datetime/format-datetime2.js.map +1 -0
- package/dist/format-datetime/index.d.ts +1 -0
- package/dist/format-datetime/index.js +2 -0
- package/dist/format-relative-time/define.d.ts +6 -0
- package/dist/format-relative-time/define.js +7 -0
- package/dist/format-relative-time/define.js.map +1 -0
- package/dist/format-relative-time/format-relative-time.d.ts +47 -0
- package/dist/format-relative-time/format-relative-time.examples.js +6 -0
- package/dist/format-relative-time/format-relative-time.examples.js.map +1 -0
- package/dist/format-relative-time/format-relative-time.examples.json +69 -0
- package/dist/format-relative-time/format-relative-time.js +6 -0
- package/dist/format-relative-time/format-relative-time.js.map +1 -0
- package/dist/format-relative-time/format-relative-time2.js +118 -0
- package/dist/format-relative-time/format-relative-time2.js.map +1 -0
- package/dist/format-relative-time/index.d.ts +1 -0
- package/dist/format-relative-time/index.js +2 -0
- package/dist/forms/control/control2.js +1 -1
- package/dist/forms/control-group/control-group2.js +1 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/forms/forms.examples.js.map +1 -1
- package/dist/forms/forms.examples.json +4 -2
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column2.js +1 -1
- package/dist/grid/footer/footer2.js +1 -1
- package/dist/grid/grid.examples.js.map +1 -1
- package/dist/grid/grid.examples.json +1 -1
- package/dist/grid/grid2.js +1 -1
- package/dist/grid/header/header2.js +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +1 -1
- package/dist/icon/define.js +1 -33
- package/dist/icon/define.js.map +1 -1
- package/dist/icon/icon.d.ts +1 -1
- package/dist/icon/icon.js +1 -1
- package/dist/icon/icon.js.map +1 -1
- package/dist/icon/icon2.js +2 -2
- package/dist/icon/icon2.js.map +1 -1
- package/dist/icon/icons.d.ts +0 -2
- package/dist/icon/icons.js.map +1 -1
- package/dist/icon-button/icon-button.js +1 -1
- package/dist/icon-button/icon-button.js.map +1 -1
- package/dist/icon-button/icon-button2.js +1 -1
- package/dist/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/index.js +40 -40
- package/dist/internal/services/global.service.js +1 -1
- package/dist/internal/services/global.service.js.map +1 -1
- package/dist/internal/services/i18n.service.d.ts +1 -0
- package/dist/internal/services/i18n.service.js +2 -1
- package/dist/internal/services/i18n.service.js.map +1 -1
- package/dist/internal/types/index.d.ts +0 -2
- package/dist/internal/types/index.js.map +1 -1
- package/dist/internal/utils/dom.d.ts +8 -0
- package/dist/internal/utils/dom.js +7 -1
- package/dist/internal/utils/dom.js.map +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu2.js +1 -1
- package/dist/month/month2.js +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +1 -1
- package/dist/page/page-panel/page-panel-header2.js +1 -1
- package/dist/page/page-panel/page-panel2.js +1 -1
- package/dist/page/page.examples.js.map +1 -1
- package/dist/page/page.examples.json +0 -11
- package/dist/page/page2.js +1 -1
- package/dist/page-header/page-header.examples.js.map +1 -1
- package/dist/page-header/page-header.examples.json +2 -2
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader2.js +1 -1
- package/dist/pagination/pagination2.js +1 -1
- package/dist/panel/panel2.js +4 -4
- package/dist/password/password2.js +1 -1
- package/dist/preferences-input/preferences-input2.js +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-ring/progress-ring2.js +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
- package/dist/pulse/pulse2.js +1 -1
- package/dist/radio/radio-group2.js +1 -1
- package/dist/radio/radio2.js +1 -1
- package/dist/range/range2.js +1 -1
- package/dist/resize-handle/resize-handle.examples.js.map +1 -1
- package/dist/resize-handle/resize-handle.examples.json +3 -1
- package/dist/resize-handle/resize-handle2.js +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +1 -1
- package/dist/skeleton/skeleton.examples.js.map +1 -1
- package/dist/skeleton/skeleton.examples.json +3 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +1 -1
- package/dist/sparkline/sparkline.examples.js.map +1 -1
- package/dist/sparkline/sparkline.examples.json +3 -1
- package/dist/sparkline/sparkline2.js +1 -1
- package/dist/star-rating/star-rating2.js +1 -1
- package/dist/steps/steps2.js +2 -2
- package/dist/switch/switch-group2.js +1 -1
- package/dist/switch/switch2.js +1 -1
- package/dist/tabs/define.d.ts +2 -1
- package/dist/tabs/define.js +2 -1
- package/dist/tabs/define.js.map +1 -1
- package/dist/tabs/index.d.ts +1 -0
- package/dist/tabs/index.js +2 -1
- package/dist/tabs/tabs-group.d.ts +51 -0
- package/dist/tabs/tabs-group.js +6 -0
- package/dist/tabs/tabs-group.js.map +1 -0
- package/dist/tabs/tabs-group2.js +144 -0
- package/dist/tabs/tabs-group2.js.map +1 -0
- package/dist/tabs/tabs.examples.js.map +1 -1
- package/dist/tabs/tabs.examples.json +38 -2
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tag/tag2.js +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +1 -1
- package/dist/toast/toast2.js +1 -1
- package/dist/toggletip/toggletip-footer2.js +1 -1
- package/dist/toggletip/toggletip-header2.js +1 -1
- package/dist/toggletip/toggletip2.js +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node.d.ts +1 -1
- package/dist/tree/tree-node.js +1 -1
- package/dist/tree/tree-node.js.map +1 -1
- package/dist/tree/tree-node2.js +1 -1
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree.examples.js.map +1 -1
- package/dist/tree/tree.examples.json +1 -10
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +43 -23
- package/dist/alert/alert-banner.d.ts +0 -22
- package/dist/alert/alert-banner.js +0 -6
- package/dist/alert/alert-banner.js.map +0 -1
- package/dist/alert/alert-banner2.js +0 -20
- package/dist/alert/alert-banner2.js.map +0 -1
- package/dist/scoped/index.d.ts +0 -11
- package/dist/scoped/index.js +0 -16
- package/dist/scoped/index.js.map +0 -1
- package/dist/test/demo.d.ts +0 -41
- package/dist/test/demo.js +0 -244
- package/dist/test/demo.js.map +0 -1
- package/dist/test/index.d.ts +0 -26
- package/dist/test/index.js +0 -36
- package/dist/test/index.js.map +0 -1
- package/dist/test/setup.d.ts +0 -1
|
@@ -172,7 +172,13 @@ function R(e, t) {
|
|
|
172
172
|
function z(e, t) {
|
|
173
173
|
e.style.anchorName = Array.from(new Set([...L(e), t])).join(",");
|
|
174
174
|
}
|
|
175
|
+
function B(e, t) {
|
|
176
|
+
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
177
|
+
}
|
|
178
|
+
function V(e) {
|
|
179
|
+
return Array.from(new Set(Array.from(e).filter((e) => typeof e == "string" && e.length > 0)));
|
|
180
|
+
}
|
|
175
181
|
//#endregion
|
|
176
|
-
export { y as KeynavCode, z as appendAnchorName, o as appendRootNodeStyle, j as applySlotContentStates, u as clickOutsideElementBounds, F as createGhostElement, m as define, p as defineElement, E as endOfScrollBox, r as generateId, L as getAnchorNames, i as getAttributeChanges, a as getAttributeListChanges, n as getChildren, M as getDisplayValue, l as getElementUpdate, _ as getFlattenedDOMTree, g as getFlattenedFocusableItems, c as getPropertyChanges, O as getThemeTokens, T as hasHorizontalScrollBar, x as hasInvalidDOMGrid, w as hasScrollBar, h as isContextMenuClick, P as matchesElementName, D as openEyeDropper, d as parseTokenNumber, R as removeAnchorName, k as removeEmptySlotWhitespace, S as removeEmptyTextNode, I as sameRenderRoot, C as scrollBarWidth, A as slotContainsOnlyWhitespace, s as styleSheetToString, f as supportsScopedRegistry, N as tagSelector, v as validKeyNavigationCode };
|
|
182
|
+
export { y as KeynavCode, z as appendAnchorName, o as appendRootNodeStyle, j as applySlotContentStates, u as clickOutsideElementBounds, F as createGhostElement, m as define, p as defineElement, E as endOfScrollBox, r as generateId, L as getAnchorNames, i as getAttributeChanges, a as getAttributeListChanges, n as getChildren, M as getDisplayValue, l as getElementUpdate, _ as getFlattenedDOMTree, g as getFlattenedFocusableItems, c as getPropertyChanges, O as getThemeTokens, T as hasHorizontalScrollBar, x as hasInvalidDOMGrid, w as hasScrollBar, h as isContextMenuClick, P as matchesElementName, D as openEyeDropper, d as parseTokenNumber, R as removeAnchorName, k as removeEmptySlotWhitespace, S as removeEmptyTextNode, B as sameOrderedStringArray, I as sameRenderRoot, C as scrollBarWidth, A as slotContainsOnlyWhitespace, s as styleSheetToString, f as supportsScopedRegistry, N as tagSelector, V as uniqueNonEmptyStrings, v as validKeyNavigationCode };
|
|
177
183
|
|
|
178
184
|
//# sourceMappingURL=dom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.js","names":[],"sources":["../../../src/internal/utils/dom.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { GlobalStateService } from '../services/global.service.js';\nimport type { ElementDefinition } from '../types/index.js';\nimport { isFocusable } from './focus.js';\n\nexport function getChildren(node: Document | Node | HTMLElement): Element[] {\n if (node instanceof Document && node.documentElement) {\n return Array.from(node.documentElement.children); // root document children\n } else if (node instanceof HTMLElement && node.shadowRoot) {\n return Array.from(node.shadowRoot.children); // shadow root direct children\n } else if (node instanceof HTMLSlotElement && node.assignedElements) {\n const slotted = node.assignedElements(); // slotted elements\n return slotted.length ? slotted : Array.from(node.children); // slot fallback\n } else {\n return Array.from((node as HTMLElement).children); // light DOM direct children\n }\n}\n\nexport function generateId() {\n const uint32 = self.crypto.getRandomValues(new Uint32Array(1))[0]!;\n return `_${uint32.toString(16)}`;\n}\n\nexport function getAttributeChanges(element: HTMLElement, attr: string, fn: (attrValue: string | null) => void) {\n fn(element.getAttribute(attr));\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName === attr) {\n fn((mutation.target as HTMLElement).getAttribute(attr));\n }\n });\n });\n observer.observe(element, { attributes: true, subtree: true });\n return observer;\n}\n\nexport function getAttributeListChanges(element: HTMLElement, attrs: string[], fn: (mutation: MutationRecord) => void) {\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName && attrs.includes(mutation.attributeName)) {\n fn(mutation);\n }\n });\n });\n observer.observe(element, { attributes: true, subtree: true });\n return observer;\n}\n\n/**\n * Appends styles to the render root of a given element. This is useful for\n * styles that apply outside the scope of the element's shadow\n * root such as UA styles --webkit-* that won't work in a ::slotted selector\n */\nexport function appendRootNodeStyle(host: HTMLElement, styles: string) {\n const stylesheet = new CSSStyleSheet();\n stylesheet.replaceSync(styles);\n const root = host.getRootNode() as Document | ShadowRoot;\n if (root.adoptedStyleSheets) {\n const hasStyleSheet = root.adoptedStyleSheets\n .map(s => styleSheetToString(s))\n .find(s => s === styleSheetToString(stylesheet));\n if (!hasStyleSheet) {\n root.adoptedStyleSheets = [...Array.from(root.adoptedStyleSheets), stylesheet];\n }\n }\n return stylesheet;\n}\n\nexport function styleSheetToString(stylesheet: CSSStyleSheet) {\n return stylesheet.cssRules\n ? Array.from(stylesheet.cssRules)\n .map(rule => rule.cssText || '')\n .join('\\n')\n : '';\n}\n\n/** Intercepts a property setter on an element so `callback` fires on every assignment. Does not use a MutationObserver. */\nexport function getPropertyChanges(element: HTMLElement, key: string, callback: (value: unknown) => void) {\n const proto = Object.getPrototypeOf(element);\n const descriptor = Object.getOwnPropertyDescriptor(proto, key);\n if (!descriptor) return;\n const own = Object.getOwnPropertyDescriptor(element, key);\n if (own && own.configurable === false) return;\n Object.defineProperty(element, key, {\n configurable: true,\n get: descriptor.get,\n set: (val: unknown) => {\n descriptor.set!.call(element, val);\n callback(val);\n }\n });\n}\n\n/* used for cases of needing to know a property update outside of lit, example a native input value prop change */\nexport function getElementUpdate(element: HTMLElement, key: string, callback: (value: unknown) => void) {\n if (element.hasAttribute(key)) {\n callback(element.getAttribute(key));\n } else if ((element as unknown as Record<string, unknown>)[key] !== undefined) {\n callback((element as unknown as Record<string, unknown>)[key]);\n }\n\n getPropertyChanges(element, key, callback);\n return getAttributeChanges(element, key, val => callback(val));\n}\n\nexport function clickOutsideElementBounds(event: PointerEvent | MouseEvent, element: HTMLElement) {\n const { left, right, top, bottom } = element.getBoundingClientRect();\n return event.clientX < left || event.clientX > right || event.clientY < top || event.clientY > bottom;\n}\n\n/** parses number out of basic calc generated by the design tokens */\nexport function parseTokenNumber(value: string) {\n return parseInt(value.includes('calc') ? value.split('*')[1]!.replace('px)', '').trim() : value, 10) || 0;\n}\n\n/** true if the browser supports scoped custom element registries */\nexport const supportsScopedRegistry =\n globalThis.CustomElementRegistry && 'initialize' in CustomElementRegistry.prototype;\n\n/** defines an element with the given custom element registry */\nexport function defineElement(element: ElementDefinition, customElementRegistry: CustomElementRegistry) {\n Object.entries(element.elementDefinitions ?? {})\n .filter(([_tag, e]) => !customElementRegistry.get(e.metadata.tag))\n .forEach(([_tag, e]) => {\n defineElement(e, customElementRegistry);\n });\n\n if (!customElementRegistry.get(element.metadata.tag)) {\n customElementRegistry.define(element.metadata.tag, element);\n\n if (customElementRegistry === customElements) {\n GlobalStateService.dispatch('NVE_ELEMENT_DEFINE', {\n elementRegistry: { [element.metadata.tag]: element.metadata.version }\n });\n }\n }\n}\n\n/** defines an element with the global custom element registry */\nexport function define(element: ElementDefinition) {\n const { version } = element.metadata;\n\n // if scoped registry supported, register only the root element to global registry\n if (supportsScopedRegistry && !customElements.get(element.metadata.tag)) {\n customElements.define(element.metadata.tag, element);\n GlobalStateService.dispatch('NVE_ELEMENT_DEFINE', {\n elementRegistry: { [element.metadata.tag]: element.metadata.version }\n });\n } else {\n // if scoped registry not supported, register the element and all its children to the global registry\n defineElement(element, customElements);\n }\n\n // warn on duplicate version\n if (\n GlobalStateService.state.elementRegistry[element.metadata.tag] !== version &&\n globalThis?.location?.hostname === 'localhost'\n ) {\n void import('./audit-logs.js').then(m =>\n console.warn(m.getDuplicatePackageVersionWarning(element.metadata.tag, version))\n );\n }\n}\n\nexport function isContextMenuClick(event: MouseEvent) {\n return (event.buttons === 2 && !event.ctrlKey) || (event.buttons === 1 && event.ctrlKey);\n}\n\nexport function getFlattenedFocusableItems(element: Node, depth = 10) {\n return getFlattenedDOMTree(element, depth).filter((e: HTMLElement) => isFocusable(e)) as HTMLElement[];\n}\n\n/**\n * Preserves visual DOM ordering when using slots within Shadow DOM\n * See more information/resources on Shadow DOM linear traversal\n * https://nolanlawson.com/2021/02/13/managing-focus-in-the-shadow-dom/\n * https://www.abeautifulsite.net/posts/querying-through-shadow-roots/\n */\nexport function getFlattenedDOMTree(node: Node, depth = 10): HTMLElement[] {\n return (\n Array.from(getChildren(node)).reduce(\n (p: unknown[], n: Node) => [\n ...p,\n [n, [...Array.from(getChildren(n)).map(i => [i, getFlattenedDOMTree(i, depth)])]]\n ],\n []\n ) as unknown as HTMLElement[]\n ).flat(depth);\n}\n\nexport function validKeyNavigationCode(e: KeyboardEvent) {\n return keynavCodes.has(e.code);\n}\n\nexport enum KeynavCode {\n End = 'End',\n Home = 'Home',\n PageUp = 'PageUp',\n PageDown = 'PageDown',\n ArrowUp = 'ArrowUp',\n ArrowDown = 'ArrowDown',\n ArrowLeft = 'ArrowLeft',\n ArrowRight = 'ArrowRight'\n}\n\nconst keynavCodes: Set<string> = new Set(Object.values(KeynavCode));\n\nexport function hasInvalidDOMGrid(rows: HTMLElement[]) {\n return rows.some(row => row.children.length !== rows[0]!.children.length);\n}\n\nexport function removeEmptyTextNode(node: Node) {\n if ((node as Text)?.wholeText?.trim() === '') {\n (node as Text).remove();\n }\n}\n\nexport function scrollBarWidth() {\n const div = globalThis.document.createElement('div');\n div.style.setProperty('width', '100px');\n div.style.setProperty('height', '100px');\n div.style.setProperty('overflow', 'scroll');\n div.style.setProperty('position', 'absolute');\n div.style.setProperty('top', '-9999px');\n globalThis.document.body.appendChild(div);\n const width = div.offsetWidth - div.clientWidth;\n globalThis.document.body.removeChild(div);\n return width;\n}\n\nexport function hasScrollBar(el: HTMLElement) {\n return el.scrollHeight > el.clientHeight;\n}\n\nexport function hasHorizontalScrollBar(el: HTMLElement) {\n return el.scrollWidth > el.clientWidth;\n}\n\nexport function endOfScrollBox(element: HTMLElement, offset = 0) {\n return element.scrollTop + element.offsetHeight + offset >= element.scrollHeight;\n}\n\nexport async function openEyeDropper(): Promise<string> {\n return await new (\n globalThis as unknown as { EyeDropper: new () => { open: () => Promise<{ sRGBHex: string }> } }\n ).EyeDropper()\n .open()\n .then((color: { sRGBHex: string }) => color.sRGBHex);\n}\n\n/**\n * provides a object with key/value of the currently applied design tokens\n */\nexport function getThemeTokens(element = globalThis.document.querySelector(':root')!) {\n // default root or provided element\n const styles = getComputedStyle(element);\n let parent: CSSStyleSheet[] = [];\n\n // check for parent iframe, same domain iframes change how the browser accesses style sheets\n try {\n parent = Array.from(globalThis.parent.document.styleSheets);\n } catch {\n // if not accessible, skip\n }\n\n return [...parent, ...Array.from(globalThis.document.styleSheets)]\n .reduce((finalArr: string[][], sheet) => {\n let rules: CSSRule[] = [];\n try {\n rules = [...sheet.cssRules];\n } catch {\n // if the style sheet is not accessible, skip\n }\n return finalArr.concat(\n rules\n .filter(rule => rule.type === 1)\n .reduce((propValArr: string[][], rule) => {\n const props = [...(rule as CSSStyleRule).style]\n .filter((p: string) => p.trim().includes('--nve'))\n .map((propName: string) => [\n propName.trim(),\n (rule as CSSStyleRule).style.getPropertyValue(propName).trim()\n ]);\n return [...propValArr, ...props];\n }, [])\n );\n }, [])\n .reduce(\n (p: Record<string, string>, token: string[]) => ({ ...p, [token[0]!]: styles.getPropertyValue(token[0]!) }),\n {}\n );\n}\n\nexport function removeEmptySlotWhitespace(slot: HTMLSlotElement) {\n if (slotContainsOnlyWhitespace(slot)) {\n slot.assignedNodes().forEach((node: Node) => node.parentNode?.removeChild(node));\n }\n}\n\nexport function slotContainsOnlyWhitespace(slot: HTMLSlotElement) {\n const hasNoElements = !slot.assignedNodes().find(i => i.nodeType !== Node.TEXT_NODE);\n const hasOnlyEmptyTextNodes = !slot\n .assignedNodes()\n .find(i => i.nodeType === Node.TEXT_NODE && (i.textContent ?? '').trim() !== '');\n return hasNoElements && hasOnlyEmptyTextNodes;\n}\n\nexport function applySlotContentStates(slot: HTMLSlotElement, element: HTMLElement & { _internals: ElementInternals }) {\n const nodes = slot.assignedNodes();\n const name = slot.name ?? 'slot';\n\n if (nodes.length) {\n element._internals.states.add(`has-${name}`);\n } else {\n element._internals.states.delete(`has-${name}`);\n }\n}\n\nexport function getDisplayValue(option?: { label?: string; value?: string }): string {\n return option?.label || option?.value || '';\n}\n\n/** returns a combination of nve and mlv for a prefixed tag selector */\nexport function tagSelector(selector: string) {\n return `${selector.replaceAll('nve-', 'nve-')}, ${selector.replaceAll('nve-', 'nve-')}`;\n}\n\n/** determines if HTML element matches the given component tag */\nexport function matchesElementName(element: Partial<HTMLElement>, component: { metadata: { tag: string } }) {\n return (\n element.localName === component.metadata.tag.replace('nve-', 'nve-') ||\n element.localName === component.metadata.tag.replace('nve-', 'nve-')\n );\n}\n\nexport function createGhostElement(sourceElement: HTMLElement) {\n const ghost = globalThis.document.createElement('div');\n const { width } = sourceElement.getBoundingClientRect();\n ghost.setAttribute('nve-ghost', '');\n ghost.style.minWidth = `${width}px`;\n ghost.style.maxWidth = `${width}px`;\n ghost.style.height = '1px';\n ghost.slot = sourceElement.slot;\n return ghost;\n}\n\nexport function sameRenderRoot(element1: HTMLElement, element2: HTMLElement) {\n const root1 = element1.getRootNode();\n const root2 = element2.getRootNode();\n const sameShadowRoot = root1 instanceof ShadowRoot && root2 instanceof ShadowRoot && root1 === root2;\n const sameDocumentRoot = root1 === globalThis.document && root2 === globalThis.document;\n const sameUnattachedRoot = root1 === root2;\n return sameShadowRoot || sameDocumentRoot || sameUnattachedRoot;\n}\n\nexport function getAnchorNames(element: HTMLElement): string[] {\n return (\n element.style.anchorName\n ?.split(',')\n ?.map(name => name.trim())\n ?.filter(name => name !== 'none' && name !== '') ?? []\n );\n}\n\nexport function removeAnchorName(element: HTMLElement, name: string) {\n const anchorNames = getAnchorNames(element);\n element.style.anchorName = anchorNames.filter(i => i !== name).join(',');\n}\n\nexport function appendAnchorName(element: HTMLElement, name: string) {\n element.style.anchorName = Array.from(new Set([...getAnchorNames(element), name])).join(',');\n}\n"],"mappings":";;;AAOA,SAAgB,EAAY,GAAgD;AAC1E,KAAI,aAAgB,YAAY,EAAK,gBACnC,QAAO,MAAM,KAAK,EAAK,gBAAgB,SAAS;KACvC,aAAgB,eAAe,EAAK,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SAAgB,EAAiB,GAAsB,GAAc;AACnE,GAAQ,MAAM,aAAa,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,EAAe,EAAQ,EAAE,EAAK,CAAC,CAAC,CAAC,KAAK,IAAI"}
|
|
1
|
+
{"version":3,"file":"dom.js","names":[],"sources":["../../../src/internal/utils/dom.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { GlobalStateService } from '../services/global.service.js';\nimport type { ElementDefinition } from '../types/index.js';\nimport { isFocusable } from './focus.js';\n\nexport function getChildren(node: Document | Node | HTMLElement): Element[] {\n if (node instanceof Document && node.documentElement) {\n return Array.from(node.documentElement.children); // root document children\n } else if (node instanceof HTMLElement && node.shadowRoot) {\n return Array.from(node.shadowRoot.children); // shadow root direct children\n } else if (node instanceof HTMLSlotElement && node.assignedElements) {\n const slotted = node.assignedElements(); // slotted elements\n return slotted.length ? slotted : Array.from(node.children); // slot fallback\n } else {\n return Array.from((node as HTMLElement).children); // light DOM direct children\n }\n}\n\nexport function generateId() {\n const uint32 = self.crypto.getRandomValues(new Uint32Array(1))[0]!;\n return `_${uint32.toString(16)}`;\n}\n\nexport function getAttributeChanges(element: HTMLElement, attr: string, fn: (attrValue: string | null) => void) {\n fn(element.getAttribute(attr));\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName === attr) {\n fn((mutation.target as HTMLElement).getAttribute(attr));\n }\n });\n });\n observer.observe(element, { attributes: true, subtree: true });\n return observer;\n}\n\nexport function getAttributeListChanges(element: HTMLElement, attrs: string[], fn: (mutation: MutationRecord) => void) {\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName && attrs.includes(mutation.attributeName)) {\n fn(mutation);\n }\n });\n });\n observer.observe(element, { attributes: true, subtree: true });\n return observer;\n}\n\n/**\n * Appends styles to the render root of a given element. This is useful for\n * styles that apply outside the scope of the element's shadow\n * root such as UA styles --webkit-* that won't work in a ::slotted selector\n */\nexport function appendRootNodeStyle(host: HTMLElement, styles: string) {\n const stylesheet = new CSSStyleSheet();\n stylesheet.replaceSync(styles);\n const root = host.getRootNode() as Document | ShadowRoot;\n if (root.adoptedStyleSheets) {\n const hasStyleSheet = root.adoptedStyleSheets\n .map(s => styleSheetToString(s))\n .find(s => s === styleSheetToString(stylesheet));\n if (!hasStyleSheet) {\n root.adoptedStyleSheets = [...Array.from(root.adoptedStyleSheets), stylesheet];\n }\n }\n return stylesheet;\n}\n\nexport function styleSheetToString(stylesheet: CSSStyleSheet) {\n return stylesheet.cssRules\n ? Array.from(stylesheet.cssRules)\n .map(rule => rule.cssText || '')\n .join('\\n')\n : '';\n}\n\n/** Intercepts a property setter on an element so `callback` fires on every assignment. Does not use a MutationObserver. */\nexport function getPropertyChanges(element: HTMLElement, key: string, callback: (value: unknown) => void) {\n const proto = Object.getPrototypeOf(element);\n const descriptor = Object.getOwnPropertyDescriptor(proto, key);\n if (!descriptor) return;\n const own = Object.getOwnPropertyDescriptor(element, key);\n if (own && own.configurable === false) return;\n Object.defineProperty(element, key, {\n configurable: true,\n get: descriptor.get,\n set: (val: unknown) => {\n descriptor.set!.call(element, val);\n callback(val);\n }\n });\n}\n\n/* used for cases of needing to know a property update outside of lit, example a native input value prop change */\nexport function getElementUpdate(element: HTMLElement, key: string, callback: (value: unknown) => void) {\n if (element.hasAttribute(key)) {\n callback(element.getAttribute(key));\n } else if ((element as unknown as Record<string, unknown>)[key] !== undefined) {\n callback((element as unknown as Record<string, unknown>)[key]);\n }\n\n getPropertyChanges(element, key, callback);\n return getAttributeChanges(element, key, val => callback(val));\n}\n\nexport function clickOutsideElementBounds(event: PointerEvent | MouseEvent, element: HTMLElement) {\n const { left, right, top, bottom } = element.getBoundingClientRect();\n return event.clientX < left || event.clientX > right || event.clientY < top || event.clientY > bottom;\n}\n\n/** parses number out of basic calc generated by the design tokens */\nexport function parseTokenNumber(value: string) {\n return parseInt(value.includes('calc') ? value.split('*')[1]!.replace('px)', '').trim() : value, 10) || 0;\n}\n\n/** true if the browser supports scoped custom element registries */\nexport const supportsScopedRegistry =\n globalThis.CustomElementRegistry && 'initialize' in CustomElementRegistry.prototype;\n\n/** defines an element with the given custom element registry */\nexport function defineElement(element: ElementDefinition, customElementRegistry: CustomElementRegistry) {\n Object.entries(element.elementDefinitions ?? {})\n .filter(([_tag, e]) => !customElementRegistry.get(e.metadata.tag))\n .forEach(([_tag, e]) => {\n defineElement(e, customElementRegistry);\n });\n\n if (!customElementRegistry.get(element.metadata.tag)) {\n customElementRegistry.define(element.metadata.tag, element);\n\n if (customElementRegistry === customElements) {\n GlobalStateService.dispatch('NVE_ELEMENT_DEFINE', {\n elementRegistry: { [element.metadata.tag]: element.metadata.version }\n });\n }\n }\n}\n\n/** defines an element with the global custom element registry */\nexport function define(element: ElementDefinition) {\n const { version } = element.metadata;\n\n // if scoped registry supported, register only the root element to global registry\n if (supportsScopedRegistry && !customElements.get(element.metadata.tag)) {\n customElements.define(element.metadata.tag, element);\n GlobalStateService.dispatch('NVE_ELEMENT_DEFINE', {\n elementRegistry: { [element.metadata.tag]: element.metadata.version }\n });\n } else {\n // if scoped registry not supported, register the element and all its children to the global registry\n defineElement(element, customElements);\n }\n\n // warn on duplicate version\n if (\n GlobalStateService.state.elementRegistry[element.metadata.tag] !== version &&\n globalThis?.location?.hostname === 'localhost'\n ) {\n void import('./audit-logs.js').then(m =>\n console.warn(m.getDuplicatePackageVersionWarning(element.metadata.tag, version))\n );\n }\n}\n\nexport function isContextMenuClick(event: MouseEvent) {\n return (event.buttons === 2 && !event.ctrlKey) || (event.buttons === 1 && event.ctrlKey);\n}\n\nexport function getFlattenedFocusableItems(element: Node, depth = 10) {\n return getFlattenedDOMTree(element, depth).filter((e: HTMLElement) => isFocusable(e)) as HTMLElement[];\n}\n\n/**\n * Preserves visual DOM ordering when using slots within Shadow DOM\n * See more information/resources on Shadow DOM linear traversal\n * https://nolanlawson.com/2021/02/13/managing-focus-in-the-shadow-dom/\n * https://www.abeautifulsite.net/posts/querying-through-shadow-roots/\n */\nexport function getFlattenedDOMTree(node: Node, depth = 10): HTMLElement[] {\n return (\n Array.from(getChildren(node)).reduce(\n (p: unknown[], n: Node) => [\n ...p,\n [n, [...Array.from(getChildren(n)).map(i => [i, getFlattenedDOMTree(i, depth)])]]\n ],\n []\n ) as unknown as HTMLElement[]\n ).flat(depth);\n}\n\nexport function validKeyNavigationCode(e: KeyboardEvent) {\n return keynavCodes.has(e.code);\n}\n\nexport enum KeynavCode {\n End = 'End',\n Home = 'Home',\n PageUp = 'PageUp',\n PageDown = 'PageDown',\n ArrowUp = 'ArrowUp',\n ArrowDown = 'ArrowDown',\n ArrowLeft = 'ArrowLeft',\n ArrowRight = 'ArrowRight'\n}\n\nconst keynavCodes: Set<string> = new Set(Object.values(KeynavCode));\n\nexport function hasInvalidDOMGrid(rows: HTMLElement[]) {\n return rows.some(row => row.children.length !== rows[0]!.children.length);\n}\n\nexport function removeEmptyTextNode(node: Node) {\n if ((node as Text)?.wholeText?.trim() === '') {\n (node as Text).remove();\n }\n}\n\nexport function scrollBarWidth() {\n const div = globalThis.document.createElement('div');\n div.style.setProperty('width', '100px');\n div.style.setProperty('height', '100px');\n div.style.setProperty('overflow', 'scroll');\n div.style.setProperty('position', 'absolute');\n div.style.setProperty('top', '-9999px');\n globalThis.document.body.appendChild(div);\n const width = div.offsetWidth - div.clientWidth;\n globalThis.document.body.removeChild(div);\n return width;\n}\n\nexport function hasScrollBar(el: HTMLElement) {\n return el.scrollHeight > el.clientHeight;\n}\n\nexport function hasHorizontalScrollBar(el: HTMLElement) {\n return el.scrollWidth > el.clientWidth;\n}\n\nexport function endOfScrollBox(element: HTMLElement, offset = 0) {\n return element.scrollTop + element.offsetHeight + offset >= element.scrollHeight;\n}\n\nexport async function openEyeDropper(): Promise<string> {\n return await new (\n globalThis as unknown as { EyeDropper: new () => { open: () => Promise<{ sRGBHex: string }> } }\n ).EyeDropper()\n .open()\n .then((color: { sRGBHex: string }) => color.sRGBHex);\n}\n\n/**\n * provides a object with key/value of the currently applied design tokens\n */\nexport function getThemeTokens(element = globalThis.document.querySelector(':root')!) {\n // default root or provided element\n const styles = getComputedStyle(element);\n let parent: CSSStyleSheet[] = [];\n\n // check for parent iframe, same domain iframes change how the browser accesses style sheets\n try {\n parent = Array.from(globalThis.parent.document.styleSheets);\n } catch {\n // if not accessible, skip\n }\n\n return [...parent, ...Array.from(globalThis.document.styleSheets)]\n .reduce((finalArr: string[][], sheet) => {\n let rules: CSSRule[] = [];\n try {\n rules = [...sheet.cssRules];\n } catch {\n // if the style sheet is not accessible, skip\n }\n return finalArr.concat(\n rules\n .filter(rule => rule.type === 1)\n .reduce((propValArr: string[][], rule) => {\n const props = [...(rule as CSSStyleRule).style]\n .filter((p: string) => p.trim().includes('--nve'))\n .map((propName: string) => [\n propName.trim(),\n (rule as CSSStyleRule).style.getPropertyValue(propName).trim()\n ]);\n return [...propValArr, ...props];\n }, [])\n );\n }, [])\n .reduce(\n (p: Record<string, string>, token: string[]) => ({ ...p, [token[0]!]: styles.getPropertyValue(token[0]!) }),\n {}\n );\n}\n\nexport function removeEmptySlotWhitespace(slot: HTMLSlotElement) {\n if (slotContainsOnlyWhitespace(slot)) {\n slot.assignedNodes().forEach((node: Node) => node.parentNode?.removeChild(node));\n }\n}\n\nexport function slotContainsOnlyWhitespace(slot: HTMLSlotElement) {\n const hasNoElements = !slot.assignedNodes().find(i => i.nodeType !== Node.TEXT_NODE);\n const hasOnlyEmptyTextNodes = !slot\n .assignedNodes()\n .find(i => i.nodeType === Node.TEXT_NODE && (i.textContent ?? '').trim() !== '');\n return hasNoElements && hasOnlyEmptyTextNodes;\n}\n\nexport function applySlotContentStates(slot: HTMLSlotElement, element: HTMLElement & { _internals: ElementInternals }) {\n const nodes = slot.assignedNodes();\n const name = slot.name ?? 'slot';\n\n if (nodes.length) {\n element._internals.states.add(`has-${name}`);\n } else {\n element._internals.states.delete(`has-${name}`);\n }\n}\n\nexport function getDisplayValue(option?: { label?: string; value?: string }): string {\n return option?.label || option?.value || '';\n}\n\n/** returns a combination of nve and mlv for a prefixed tag selector */\nexport function tagSelector(selector: string) {\n return `${selector.replaceAll('nve-', 'nve-')}, ${selector.replaceAll('nve-', 'nve-')}`;\n}\n\n/** determines if HTML element matches the given component tag */\nexport function matchesElementName(element: Partial<HTMLElement>, component: { metadata: { tag: string } }) {\n return (\n element.localName === component.metadata.tag.replace('nve-', 'nve-') ||\n element.localName === component.metadata.tag.replace('nve-', 'nve-')\n );\n}\n\nexport function createGhostElement(sourceElement: HTMLElement) {\n const ghost = globalThis.document.createElement('div');\n const { width } = sourceElement.getBoundingClientRect();\n ghost.setAttribute('nve-ghost', '');\n ghost.style.minWidth = `${width}px`;\n ghost.style.maxWidth = `${width}px`;\n ghost.style.height = '1px';\n ghost.slot = sourceElement.slot;\n return ghost;\n}\n\nexport function sameRenderRoot(element1: HTMLElement, element2: HTMLElement) {\n const root1 = element1.getRootNode();\n const root2 = element2.getRootNode();\n const sameShadowRoot = root1 instanceof ShadowRoot && root2 instanceof ShadowRoot && root1 === root2;\n const sameDocumentRoot = root1 === globalThis.document && root2 === globalThis.document;\n const sameUnattachedRoot = root1 === root2;\n return sameShadowRoot || sameDocumentRoot || sameUnattachedRoot;\n}\n\nexport function getAnchorNames(element: HTMLElement): string[] {\n return (\n element.style.anchorName\n ?.split(',')\n ?.map(name => name.trim())\n ?.filter(name => name !== 'none' && name !== '') ?? []\n );\n}\n\nexport function removeAnchorName(element: HTMLElement, name: string) {\n const anchorNames = getAnchorNames(element);\n element.style.anchorName = anchorNames.filter(i => i !== name).join(',');\n}\n\nexport function appendAnchorName(element: HTMLElement, name: string) {\n element.style.anchorName = Array.from(new Set([...getAnchorNames(element), name])).join(',');\n}\n\n/**\n * Returns true when both arrays have the same length and each index is strictly equal (`===`).\n */\nexport function sameOrderedStringArray(a: readonly string[], b: readonly string[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\n\n/**\n * Returns unique non-empty strings in first-seen order (insertion order of a `Set` over the filtered list).\n */\nexport function uniqueNonEmptyStrings(values: Iterable<string | null | undefined>): string[] {\n return Array.from(\n new Set(Array.from(values).filter((value): value is string => typeof value === 'string' && value.length > 0))\n );\n}\n"],"mappings":";;;AAOA,SAAgB,EAAY,GAAgD;AAC1E,KAAI,aAAgB,YAAY,EAAK,gBACnC,QAAO,MAAM,KAAK,EAAK,gBAAgB,SAAS;KACvC,aAAgB,eAAe,EAAK,WAC7C,QAAO,MAAM,KAAK,EAAK,WAAW,SAAS;KAClC,aAAgB,mBAAmB,EAAK,kBAAkB;EACnE,IAAM,IAAU,EAAK,kBAAkB;AACvC,SAAO,EAAQ,SAAS,IAAU,MAAM,KAAK,EAAK,SAAS;OAE3D,QAAO,MAAM,KAAM,EAAqB,SAAS;;AAIrD,SAAgB,IAAa;AAE3B,QAAO,IADQ,KAAK,OAAO,gBAAgB,IAAI,YAAY,EAAE,CAAC,CAAC,GAC7C,SAAS,GAAG;;AAGhC,SAAgB,EAAoB,GAAsB,GAAc,GAAwC;AAC9G,GAAG,EAAQ,aAAa,EAAK,CAAC;CAC9B,IAAM,IAAW,IAAI,kBAAiB,MAAa;AACjD,IAAU,SAAQ,MAAY;AAC5B,GAAI,EAAS,kBAAkB,KAC7B,EAAI,EAAS,OAAuB,aAAa,EAAK,CAAC;IAEzD;GACF;AAEF,QADA,EAAS,QAAQ,GAAS;EAAE,YAAY;EAAM,SAAS;EAAM,CAAC,EACvD;;AAGT,SAAgB,EAAwB,GAAsB,GAAiB,GAAwC;CACrH,IAAM,IAAW,IAAI,kBAAiB,MAAa;AACjD,IAAU,SAAQ,MAAY;AAC5B,GAAI,EAAS,iBAAiB,EAAM,SAAS,EAAS,cAAc,IAClE,EAAG,EAAS;IAEd;GACF;AAEF,QADA,EAAS,QAAQ,GAAS;EAAE,YAAY;EAAM,SAAS;EAAM,CAAC,EACvD;;AAQT,SAAg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