@nvidia-elements/core 0.0.3 → 0.0.4
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-banner2.js +1 -1
- 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/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 -1
- package/dist/bundles/index.js +3 -3
- 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 -2
- package/dist/custom-elements-vue.d.ts +117 -2
- package/dist/custom-elements.json +1543 -51
- package/dist/data.html.json +202 -6
- 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/icon2.js +2 -2
- 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/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/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 -15
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
"id": "core-grid_panel-detail",
|
|
361
361
|
"name": "PanelDetail",
|
|
362
362
|
"template": "<nve-page id=\"grid-panel-demo\">\n <nve-page-header slot=\"header\">\n <nve-logo slot=\"prefix\" size=\"sm\"></nve-logo>\n <h2 nve-text=\"heading\" slot=\"prefix\">Infrastructure</h2>\n </nve-page-header>\n <section nve-layout=\"column gap:md pad:md full\">\n <nve-grid>\n <nve-grid-header>\n <nve-grid-column>column 0</nve-grid-column> <nve-grid-column>column 1</nve-grid-column>\n <nve-grid-column>column 2</nve-grid-column>\n <nve-grid-column width=\"max-content\" aria-label=\"details\"></nve-grid-column>\n </nve-grid-header>\n\n <nve-grid-row>\n <nve-grid-cell>cell 0-0</nve-grid-cell> <nve-grid-cell>cell 0-1</nve-grid-cell>\n <nve-grid-cell>cell 0-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"0\" aria-label=\"view 0\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row selected>\n <nve-grid-cell>cell 1-0</nve-grid-cell> <nve-grid-cell>cell 1-1</nve-grid-cell>\n <nve-grid-cell>cell 1-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"1\" aria-label=\"view 1\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row>\n <nve-grid-cell>cell 2-0</nve-grid-cell> <nve-grid-cell>cell 2-1</nve-grid-cell>\n <nve-grid-cell>cell 2-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"2\" aria-label=\"view 2\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row>\n <nve-grid-cell>cell 3-0</nve-grid-cell> <nve-grid-cell>cell 3-1</nve-grid-cell>\n <nve-grid-cell>cell 3-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"3\" aria-label=\"view 3\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row>\n <nve-grid-cell>cell 4-0</nve-grid-cell> <nve-grid-cell>cell 4-1</nve-grid-cell>\n <nve-grid-cell>cell 4-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"4\" aria-label=\"view 4\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row>\n <nve-grid-cell>cell 5-0</nve-grid-cell> <nve-grid-cell>cell 5-1</nve-grid-cell>\n <nve-grid-cell>cell 5-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"5\" aria-label=\"view 5\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row>\n <nve-grid-cell>cell 6-0</nve-grid-cell> <nve-grid-cell>cell 6-1</nve-grid-cell>\n <nve-grid-cell>cell 6-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"6\" aria-label=\"view 6\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row>\n <nve-grid-cell>cell 7-0</nve-grid-cell> <nve-grid-cell>cell 7-1</nve-grid-cell>\n <nve-grid-cell>cell 7-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"7\" aria-label=\"view 7\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row>\n <nve-grid-cell>cell 8-0</nve-grid-cell> <nve-grid-cell>cell 8-1</nve-grid-cell>\n <nve-grid-cell>cell 8-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"8\" aria-label=\"view 8\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n\n <nve-grid-row>\n <nve-grid-cell>cell 9-0</nve-grid-cell> <nve-grid-cell>cell 9-1</nve-grid-cell>\n <nve-grid-cell>cell 9-2</nve-grid-cell>\n <nve-grid-cell>\n <nve-icon-button container=\"flat\" icon-name=\"expand-details\" value=\"9\" aria-label=\"view 9\"></nve-icon-button>\n </nve-grid-cell>\n </nve-grid-row>\n </nve-grid>\n </section>\n <nve-page-panel slot=\"right\" size=\"sm\" expanded closable>\n <nve-page-panel-header>\n <h3 nve-text=\"heading medium sm\">Row 2 Details</h3>\n </nve-page-panel-header>\n <nve-page-panel-content>\n <div nve-layout=\"column gap:md\">\n <div nve-layout=\"column gap:xs\">\n <label nve-text=\"body sm muted\">Task</label>\n <p nve-text=\"eyebrow sm\">Workflow</p>\n </div>\n <div nve-layout=\"column gap:xs\">\n <label nve-text=\"body sm muted\">Status</label>\n <nve-badge status=\"success\">Complete</nve-badge>\n </div>\n <div nve-layout=\"column gap:xs\">\n <label nve-text=\"body sm muted\">Priority</label>\n <nve-badge status=\"pending\">P1</nve-badge>\n </div>\n </div>\n </nve-page-panel-content>\n </nve-page-panel>\n</nve-page>\n<script type=\"module\">\n const page = document.getElementById(\"grid-panel-demo\");\n const grid = page.querySelector(\"nve-grid\");\n const panel = page.querySelector(\"nve-page-panel\");\n const rows = grid.querySelectorAll(\"nve-grid-row\");\n const heading = page.querySelector(\"nve-page-panel-header h3\");\n panel.addEventListener(\"close\", () => {\n rows.forEach((row) => (row.selected = false));\n panel.hidden = true;\n });\n grid.addEventListener(\"click\", (e) => {\n if (e.target.localName === \"nve-icon-button\") {\n const row = e.target.closest(\"nve-grid-row\");\n rows.forEach((row) => (row.selected = false));\n panel.hidden = false;\n heading.textContent = \"Row \" + e.target.value + \" Details\";\n row.selected = !panel.hidden;\n }\n });\n</script>\n",
|
|
363
|
-
"summary": "Use a
|
|
363
|
+
"summary": "Use a nve-page-panel when displaying advanced filtering or display settings for the grid. Item detail panels should be open using a action button placed at the end of the grid row.",
|
|
364
364
|
"description": "",
|
|
365
365
|
"composition": true,
|
|
366
366
|
"tags": []
|
package/dist/grid/grid2.js
CHANGED
package/dist/grid/row/row2.js
CHANGED
package/dist/icon/icon2.js
CHANGED
|
@@ -16,7 +16,7 @@ var f = class e extends o {
|
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-icon",
|
|
19
|
-
version: "0.0.
|
|
19
|
+
version: "0.0.4"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
@@ -86,7 +86,7 @@ n([l({
|
|
|
86
86
|
})], f.prototype, "name", void 0), n([d()], f.prototype, "svg", void 0);
|
|
87
87
|
function p(t) {
|
|
88
88
|
if (typeof globalThis.customElements?.get == "function") {
|
|
89
|
-
let n = e(t.metadata.version), r = e("0.0.
|
|
89
|
+
let n = e(t.metadata.version), r = e("0.0.4");
|
|
90
90
|
n.minor <= r.minor && n.major <= r.major && (t._icons = {
|
|
91
91
|
...t._icons,
|
|
92
92
|
...i
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getThemeTokens as e } from "./internal/utils/dom.js";
|
|
|
2
2
|
import { I18nService as t } from "./internal/services/i18n.service.js";
|
|
3
3
|
import { statusIcons as n } from "./internal/types/index.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
|
-
var r = "0.0.
|
|
5
|
+
var r = "0.0.4", i = "@nvidia-elements";
|
|
6
6
|
//#endregion
|
|
7
7
|
export { t as I18nService, i as SCOPE, r as VERSION, e as getThemeTokens, n as statusIcons };
|
|
8
8
|
|
package/dist/input/input2.js
CHANGED
package/dist/internal/index.js
CHANGED
|
@@ -2,43 +2,43 @@ import { DOCS_URL as e, formatFileSize as t, shiftLeft as n } from "./utils/stri
|
|
|
2
2
|
import { deepMerge as r, formatStandardNumber as i, getDifference as a, isObject as o, isObjectLiteral as s, parseVersion as c } from "./utils/objects.js";
|
|
3
3
|
import { GlobalState as l, GlobalStateService as u } from "./services/global.service.js";
|
|
4
4
|
import { focusElement as d, focusElementTimeout as f, getActiveElement as p, initializeKeyListItems as m, isFocusable as h, isSimpleFocusable as g, onListboxActivate as _, setActiveKeyListItem as v } from "./utils/focus.js";
|
|
5
|
-
import { KeynavCode as y, appendAnchorName as b, appendRootNodeStyle as x, applySlotContentStates as S, clickOutsideElementBounds as C, createGhostElement as w, define as T, defineElement as E, endOfScrollBox as D, generateId as O, getAnchorNames as k, getAttributeChanges as A, getAttributeListChanges as j, getChildren as M, getDisplayValue as N, getElementUpdate as P, getFlattenedDOMTree as F, getFlattenedFocusableItems as I, getPropertyChanges as L, getThemeTokens as R, hasHorizontalScrollBar as z, hasInvalidDOMGrid as B, hasScrollBar as V, isContextMenuClick as H, matchesElementName as U, openEyeDropper as W, parseTokenNumber as G, removeAnchorName as K, removeEmptySlotWhitespace as q, removeEmptyTextNode as J,
|
|
6
|
-
import { associateAriaDescribedBy as
|
|
7
|
-
import { StateActiveController as
|
|
8
|
-
import { StateDisabledController as
|
|
9
|
-
import { StateExpandedController as
|
|
10
|
-
import { StatePressedController as
|
|
11
|
-
import { StateSelectedController as
|
|
12
|
-
import { TypeButtonController as
|
|
13
|
-
import { TypeAnchorController as
|
|
14
|
-
import { debounce as
|
|
15
|
-
import { createLightDismiss as
|
|
16
|
-
import { TypeSubmitController as
|
|
17
|
-
import { LogService as
|
|
18
|
-
import { TypeNativePopoverTriggerController as
|
|
19
|
-
import { StateCurrentController as
|
|
20
|
-
import { TypeCommandController as
|
|
21
|
-
import { TypeInterestController as
|
|
22
|
-
import { BaseButton as
|
|
23
|
-
import { auditParentElement as
|
|
24
|
-
import { AuditController as
|
|
25
|
-
import { I18nService as
|
|
26
|
-
import { I18nController as
|
|
27
|
-
import { KeyNavigationGridController as
|
|
28
|
-
import { KeyNavigationListController as
|
|
29
|
-
import { StateHighlightedController as
|
|
30
|
-
import { StateScrollController as
|
|
31
|
-
import { TypeClosableController as
|
|
32
|
-
import { TypeExpandableController as
|
|
33
|
-
import { TypeSelectableController as
|
|
34
|
-
import { TypeNativePopoverController as
|
|
35
|
-
import { TypeSSRController as
|
|
36
|
-
import { NveTouchEvent as
|
|
37
|
-
import { hostAttr as
|
|
38
|
-
import { scopedRegistry as
|
|
39
|
-
import { colorStateStyles as
|
|
40
|
-
import { supportsCSSLegacyInsetArea as
|
|
41
|
-
import { popoverStyles as
|
|
42
|
-
import { TransitionService as
|
|
43
|
-
import { statusIcons as
|
|
44
|
-
export {
|
|
5
|
+
import { KeynavCode as y, appendAnchorName as b, appendRootNodeStyle as x, applySlotContentStates as S, clickOutsideElementBounds as C, createGhostElement as w, define as T, defineElement as E, endOfScrollBox as D, generateId as O, getAnchorNames as k, getAttributeChanges as A, getAttributeListChanges as j, getChildren as M, getDisplayValue as N, getElementUpdate as P, getFlattenedDOMTree as F, getFlattenedFocusableItems as I, getPropertyChanges as L, getThemeTokens as R, hasHorizontalScrollBar as z, hasInvalidDOMGrid as B, hasScrollBar as V, isContextMenuClick as H, matchesElementName as U, openEyeDropper as W, parseTokenNumber as G, removeAnchorName as K, removeEmptySlotWhitespace as q, removeEmptyTextNode as J, sameOrderedStringArray as Y, sameRenderRoot as X, scrollBarWidth as Z, slotContainsOnlyWhitespace as Q, styleSheetToString as $, supportsScopedRegistry as ee, tagSelector as te, uniqueNonEmptyStrings as ne, validKeyNavigationCode as re } from "./utils/dom.js";
|
|
6
|
+
import { associateAriaDescribedBy as ie, associateAriaLabel as ae, associateControlGroup as oe, associateDataList as se, associateLabel as ce, attachInternals as le } from "./utils/a11y.js";
|
|
7
|
+
import { StateActiveController as ue, stateActive as de } from "./controllers/state-active.controller.js";
|
|
8
|
+
import { StateDisabledController as fe, stateDisabled as pe } from "./controllers/state-disabled.controller.js";
|
|
9
|
+
import { StateExpandedController as me, stateExpanded as he } from "./controllers/state-expanded.controller.js";
|
|
10
|
+
import { StatePressedController as ge, statePressed as _e } from "./controllers/state-pressed.controller.js";
|
|
11
|
+
import { StateSelectedController as ve, stateSelected as ye } from "./controllers/state-selected.controller.js";
|
|
12
|
+
import { TypeButtonController as be, typeButton as xe } from "./controllers/type-button.controller.js";
|
|
13
|
+
import { TypeAnchorController as Se, typeAnchor as Ce } from "./controllers/type-anchor.controller.js";
|
|
14
|
+
import { debounce as we, onChildListMutation as Te, stopEvent as Ee, throttle as De } from "./utils/events.js";
|
|
15
|
+
import { createLightDismiss as Oe, onKeys as ke } from "./utils/keynav.js";
|
|
16
|
+
import { TypeSubmitController as Ae, typeSubmit as je } from "./controllers/type-submit.controller.js";
|
|
17
|
+
import { LogService as Me } from "./services/log.service.js";
|
|
18
|
+
import { TypeNativePopoverTriggerController as Ne, typeNativePopoverTrigger as Pe } from "./controllers/type-native-popover-trigger.controller.js";
|
|
19
|
+
import { StateCurrentController as Fe, stateCurrent as Ie } from "./controllers/state-current.controller.js";
|
|
20
|
+
import { TypeCommandController as Le, typeCommand as Re } from "./controllers/type-command.controller.js";
|
|
21
|
+
import { TypeInterestController as ze, typeInterest as Be } from "./controllers/type-interest.controller.js";
|
|
22
|
+
import { BaseButton as Ve } from "./base/button.js";
|
|
23
|
+
import { auditParentElement as He, auditSlots as Ue } from "./utils/audit.js";
|
|
24
|
+
import { AuditController as We, audit as Ge, excessiveInstanceLimit as Ke } from "./controllers/audit.controller.js";
|
|
25
|
+
import { I18nService as qe, I18nService_ as Je } from "./services/i18n.service.js";
|
|
26
|
+
import { I18nController as Ye, i18n as Xe } from "./controllers/i18n.controller.js";
|
|
27
|
+
import { KeyNavigationGridController as Ze, getNextKeyGridItem as Qe, keyNavigationGrid as $e } from "./controllers/keynav-grid.controller.js";
|
|
28
|
+
import { KeyNavigationListController as et, getNextKeyListItem as tt, keyNavigationList as nt } from "./controllers/keynav-list.controller.js";
|
|
29
|
+
import { StateHighlightedController as rt, stateHighlighted as it } from "./controllers/state-highlighted.controller.js";
|
|
30
|
+
import { StateScrollController as at, stateScroll as ot } from "./controllers/state-scroll.controller.js";
|
|
31
|
+
import { TypeClosableController as st } from "./controllers/type-closable.controller.js";
|
|
32
|
+
import { TypeExpandableController as ct } from "./controllers/type-expandable.controller.js";
|
|
33
|
+
import { TypeSelectableController as lt } from "./controllers/type-selectable.controller.js";
|
|
34
|
+
import { TypeNativePopoverController as ut } from "./controllers/type-native-popover.controller.js";
|
|
35
|
+
import { TypeSSRController as dt, typeSSR as ft } from "./controllers/type-ssr.controller.js";
|
|
36
|
+
import { NveTouchEvent as pt, TypeTouchController as mt, typeTouch as ht } from "./controllers/type-touch.controller.js";
|
|
37
|
+
import { hostAttr as gt } from "./decorators/host-attr.js";
|
|
38
|
+
import { scopedRegistry as _t } from "./decorators/scoped-registry.js";
|
|
39
|
+
import { colorStateStyles as vt, statusStateStyles as yt, supportStateStyles as bt, useStyles as xt } from "./styles/index.js";
|
|
40
|
+
import { supportsCSSLegacyInsetArea as St, supportsCSSPositionArea as Ct, supportsNativeCSSAnchorPosition as wt } from "./utils/supports.js";
|
|
41
|
+
import { popoverStyles as Tt } from "./styles/popover2.js";
|
|
42
|
+
import { TransitionService as Et } from "./services/transition.service.js";
|
|
43
|
+
import { statusIcons as Dt } from "./types/index.js";
|
|
44
|
+
export { We as AuditController, Ve as BaseButton, e as DOCS_URL, l as GlobalState, u as GlobalStateService, Ye as I18nController, qe as I18nService, Je as I18nService_, Ze as KeyNavigationGridController, et as KeyNavigationListController, y as KeynavCode, Me as LogService, pt as NveTouchEvent, ue as StateActiveController, Fe as StateCurrentController, fe as StateDisabledController, me as StateExpandedController, rt as StateHighlightedController, ge as StatePressedController, at as StateScrollController, ve as StateSelectedController, Et as TransitionService, Se as TypeAnchorController, be as TypeButtonController, st as TypeClosableController, Le as TypeCommandController, ct as TypeExpandableController, ze as TypeInterestController, ut as TypeNativePopoverController, Ne as TypeNativePopoverTriggerController, dt as TypeSSRController, lt as TypeSelectableController, Ae as TypeSubmitController, mt as TypeTouchController, b as appendAnchorName, x as appendRootNodeStyle, S as applySlotContentStates, ie as associateAriaDescribedBy, ae as associateAriaLabel, oe as associateControlGroup, se as associateDataList, ce as associateLabel, le as attachInternals, Ge as audit, He as auditParentElement, Ue as auditSlots, C as clickOutsideElementBounds, vt as colorStateStyles, w as createGhostElement, Oe as createLightDismiss, we as debounce, r as deepMerge, T as define, E as defineElement, D as endOfScrollBox, Ke as excessiveInstanceLimit, d as focusElement, f as focusElementTimeout, t as formatFileSize, i as formatStandardNumber, O as generateId, p as getActiveElement, k as getAnchorNames, A as getAttributeChanges, j as getAttributeListChanges, M as getChildren, a as getDifference, N as getDisplayValue, P as getElementUpdate, F as getFlattenedDOMTree, I as getFlattenedFocusableItems, Qe as getNextKeyGridItem, tt as getNextKeyListItem, L as getPropertyChanges, R as getThemeTokens, z as hasHorizontalScrollBar, B as hasInvalidDOMGrid, V as hasScrollBar, gt as hostAttr, Xe as i18n, m as initializeKeyListItems, H as isContextMenuClick, h as isFocusable, o as isObject, s as isObjectLiteral, g as isSimpleFocusable, $e as keyNavigationGrid, nt as keyNavigationList, U as matchesElementName, Te as onChildListMutation, ke as onKeys, _ as onListboxActivate, W as openEyeDropper, G as parseTokenNumber, c as parseVersion, Tt as popoverStyles, K as removeAnchorName, q as removeEmptySlotWhitespace, J as removeEmptyTextNode, Y as sameOrderedStringArray, X as sameRenderRoot, _t as scopedRegistry, Z as scrollBarWidth, v as setActiveKeyListItem, n as shiftLeft, Q as slotContainsOnlyWhitespace, de as stateActive, Ie as stateCurrent, pe as stateDisabled, he as stateExpanded, it as stateHighlighted, _e as statePressed, ot as stateScroll, ye as stateSelected, Dt as statusIcons, yt as statusStateStyles, Ee as stopEvent, $ as styleSheetToString, bt as supportStateStyles, St as supportsCSSLegacyInsetArea, Ct as supportsCSSPositionArea, wt as supportsNativeCSSAnchorPosition, ee as supportsScopedRegistry, te as tagSelector, De as throttle, Ce as typeAnchor, xe as typeButton, Re as typeCommand, Be as typeInterest, Pe as typeNativePopoverTrigger, ft as typeSSR, je as typeSubmit, ht as typeTouch, ne as uniqueNonEmptyStrings, xt as useStyles, re as validKeyNavigationCode };
|
|
@@ -19,7 +19,7 @@ var a = class {
|
|
|
19
19
|
i18nRegistry: {},
|
|
20
20
|
audit: {}
|
|
21
21
|
}
|
|
22
|
-
}, globalThis.MLV_ELEMENTS = globalThis.NVE_ELEMENTS, globalThis.NVE_ELEMENTS.state.versions = Array.from(new Set([...globalThis.NVE_ELEMENTS.state.versions, "0.0.
|
|
22
|
+
}, globalThis.MLV_ELEMENTS = globalThis.NVE_ELEMENTS, globalThis.NVE_ELEMENTS.state.versions = Array.from(new Set([...globalThis.NVE_ELEMENTS.state.versions, "0.0.4"])), globalThis.NVE_ELEMENTS.state.scopedRegistry ??= {}, globalThis.NVE_ELEMENTS.state.scopedRegistry["0.0.4"] = i(), globalThis.NVE_ELEMENTS.state.versions.length > 1 && globalThis.NVE_ELEMENTS.state.env !== "production" && console.warn(e(), `\n\n${JSON.stringify(globalThis.NVE_ELEMENTS.state.versions, null, 2)}`);
|
|
23
23
|
}
|
|
24
24
|
get state() {
|
|
25
25
|
return globalThis.NVE_ELEMENTS.state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.service.js","names":[],"sources":["../../../src/internal/services/i18n.service.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { GlobalStateService } from './global.service.js';\n\nexport interface I18nStrings {\n close: string;\n copy: string;\n copied: string;\n expand: string;\n select: string;\n selected: string;\n sort: string;\n show: string;\n hide: string;\n loading: string;\n previous: string;\n next: string;\n start: string;\n end: string;\n currentPage: string;\n noResults: string;\n status: string;\n information: string;\n warning: string;\n success: string;\n danger: string;\n trend: string;\n down: string;\n up: string;\n neutral: string;\n of: string;\n theme: string;\n scale: string;\n reducedMotion: string;\n colorScheme: string;\n resize: string;\n or: string;\n files: string;\n dragAndDrop: string;\n browseFiles: string;\n maxFileSize: string;\n}\n\nconst i18nRegistry = {\n close: 'close',\n copy: 'copy',\n copied: 'copied',\n expand: 'expand',\n select: 'select',\n selected: 'selected',\n sort: 'sort',\n show: 'show',\n hide: 'hide',\n loading: 'loading',\n previous: 'previous',\n next: 'next',\n start: 'start',\n end: 'end',\n currentPage: 'current page',\n noResults: 'no results',\n status: 'status',\n information: 'information',\n warning: 'warning',\n success: 'success',\n danger: 'danger',\n trend: 'trend',\n down: 'down',\n up: 'up',\n neutral: 'neutral',\n of: 'of',\n theme: 'theme',\n scale: 'scale',\n reducedMotion: 'reduced motion',\n colorScheme: 'color scheme',\n resize: 'resize',\n or: 'or',\n files: 'files',\n dragAndDrop: 'drag & drop',\n browseFiles: 'browse files',\n maxFileSize: 'max file size'\n};\n\nexport class I18nService_ {\n get i18n(): Partial<I18nStrings> {\n return { ...GlobalStateService.state.i18nRegistry };\n }\n\n constructor() {\n if (Object.keys(GlobalStateService.state.i18nRegistry).length === 0) {\n GlobalStateService.dispatch('NVE_ELEMENTS_I18N_UPDATE', { i18nRegistry });\n }\n }\n\n update(i18nRegistry: Partial<typeof globalThis.NVE_ELEMENTS.state.i18nRegistry>) {\n GlobalStateService.dispatch('NVE_ELEMENTS_I18N_UPDATE', { i18nRegistry } as Partial<\n typeof globalThis.NVE_ELEMENTS.state\n >);\n }\n}\n\nexport const I18nService = new I18nService_();\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"i18n.service.js","names":[],"sources":["../../../src/internal/services/i18n.service.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { GlobalStateService } from './global.service.js';\n\nexport interface I18nStrings {\n close: string;\n copy: string;\n copied: string;\n expand: string;\n select: string;\n selected: string;\n sort: string;\n show: string;\n hide: string;\n loading: string;\n previous: string;\n next: string;\n start: string;\n end: string;\n currentPage: string;\n noResults: string;\n status: string;\n information: string;\n warning: string;\n success: string;\n danger: string;\n trend: string;\n down: string;\n up: string;\n neutral: string;\n of: string;\n theme: string;\n scale: string;\n reducedMotion: string;\n colorScheme: string;\n resize: string;\n or: string;\n files: string;\n dragAndDrop: string;\n browseFiles: string;\n maxFileSize: string;\n create: string;\n}\n\nconst i18nRegistry = {\n close: 'close',\n copy: 'copy',\n copied: 'copied',\n expand: 'expand',\n select: 'select',\n selected: 'selected',\n sort: 'sort',\n show: 'show',\n hide: 'hide',\n loading: 'loading',\n previous: 'previous',\n next: 'next',\n start: 'start',\n end: 'end',\n currentPage: 'current page',\n noResults: 'no results',\n status: 'status',\n information: 'information',\n warning: 'warning',\n success: 'success',\n danger: 'danger',\n trend: 'trend',\n down: 'down',\n up: 'up',\n neutral: 'neutral',\n of: 'of',\n theme: 'theme',\n scale: 'scale',\n reducedMotion: 'reduced motion',\n colorScheme: 'color scheme',\n resize: 'resize',\n or: 'or',\n files: 'files',\n dragAndDrop: 'drag & drop',\n browseFiles: 'browse files',\n maxFileSize: 'max file size',\n create: 'create'\n};\n\nexport class I18nService_ {\n get i18n(): Partial<I18nStrings> {\n return { ...GlobalStateService.state.i18nRegistry };\n }\n\n constructor() {\n if (Object.keys(GlobalStateService.state.i18nRegistry).length === 0) {\n GlobalStateService.dispatch('NVE_ELEMENTS_I18N_UPDATE', { i18nRegistry });\n }\n }\n\n update(i18nRegistry: Partial<typeof globalThis.NVE_ELEMENTS.state.i18nRegistry>) {\n GlobalStateService.dispatch('NVE_ELEMENTS_I18N_UPDATE', { i18nRegistry } as Partial<\n typeof globalThis.NVE_ELEMENTS.state\n >);\n }\n}\n\nexport const I18nService = new I18nService_();\n"],"mappings":";;AA6CA,IAAM,IAAe;CACnB,OAAO;CACP,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,MAAM;CACN,MAAM;CACN,MAAM;CACN,SAAS;CACT,UAAU;CACV,MAAM;CACN,OAAO;CACP,KAAK;CACL,aAAa;CACb,WAAW;CACX,QAAQ;CACR,aAAa;CACb,SAAS;CACT,SAAS;CACT,QAAQ;CACR,OAAO;CACP,MAAM;CACN,IAAI;CACJ,SAAS;CACT,IAAI;CACJ,OAAO;CACP,OAAO;CACP,eAAe;CACf,aAAa;CACb,QAAQ;CACR,IAAI;CACJ,OAAO;CACP,aAAa;CACb,aAAa;CACb,aAAa;CACb,QAAQ;CACT,EAEY,IAAb,MAA0B;CACxB,IAAI,OAA6B;AAC/B,SAAO,EAAE,GAAG,EAAmB,MAAM,cAAc;;CAGrD,cAAc;AACZ,EAAI,OAAO,KAAK,EAAmB,MAAM,aAAa,CAAC,WAAW,KAChE,EAAmB,SAAS,4BAA4B,EAAE,iBAAc,CAAC;;CAI7E,OAAO,GAA0E;AAC/E,IAAmB,SAAS,4BAA4B,EAAE,iBAAc,CAEtE;;GAIO,IAAc,IAAI,GAAc"}
|
|
@@ -77,3 +77,11 @@ export declare function sameRenderRoot(element1: HTMLElement, element2: HTMLElem
|
|
|
77
77
|
export declare function getAnchorNames(element: HTMLElement): string[];
|
|
78
78
|
export declare function removeAnchorName(element: HTMLElement, name: string): void;
|
|
79
79
|
export declare function appendAnchorName(element: HTMLElement, name: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Returns true when both arrays have the same length and each index is strictly equal (`===`).
|
|
82
|
+
*/
|
|
83
|
+
export declare function sameOrderedStringArray(a: readonly string[], b: readonly string[]): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Returns unique non-empty strings in first-seen order (insertion order of a `Set` over the filtered list).
|
|
86
|
+
*/
|
|
87
|
+
export declare function uniqueNonEmptyStrings(values: Iterable<string | null | undefined>): string[];
|
|
@@ -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([...get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AAG,IAAI,EAAE;;AAI5D,SAAgB,EAAiB,GAAsB,GAAc;CACnE,IAAM,IAAc,EAAe,EAAQ;AAC3C,GAAQ,MAAM,aAAa,EAAY,QAAO,MAAK,MAAM,EAAK,CAAC,KAAK,IAAI;;AAG1E,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,MAA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