@nvidia-elements/core 2.18.1 → 2.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/accordion/accordion2.js +4 -4
- package/dist/alert/alert-group2.js +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/bundles/index.d.ts +3 -3
- package/dist/bundles/index.js +9 -9
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group.d.ts +1 -1
- package/dist/button-group/button-group2.js +4 -2
- package/dist/button-group/button-group2.js.map +1 -1
- package/dist/card/card2.js +7 -9
- package/dist/card/card2.js.map +1 -1
- 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/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements-jsx.d.ts +5 -5
- package/dist/custom-elements-vue.d.ts +5 -5
- package/dist/custom-elements.json +28 -50
- package/dist/data.html.json +3 -3
- package/dist/data.snippets.json +27 -27
- package/dist/date/date2.js +1 -1
- package/dist/datetime/datetime2.js +1 -1
- package/dist/dialog/dialog-footer2.js +8 -11
- package/dist/dialog/dialog-footer2.js.map +1 -1
- package/dist/dialog/dialog-header2.js +8 -11
- package/dist/dialog/dialog-header2.js.map +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/drag-handle/drag-handle2.js +1 -1
- package/dist/drawer/drawer-content2.js +8 -11
- package/dist/drawer/drawer-content2.js.map +1 -1
- package/dist/drawer/drawer-footer2.js +8 -11
- package/dist/drawer/drawer-footer2.js.map +1 -1
- package/dist/drawer/drawer-header2.js +8 -11
- package/dist/drawer/drawer-header2.js.map +1 -1
- package/dist/drawer/drawer2.js +1 -1
- package/dist/dropdown/dropdown-footer2.js +8 -11
- package/dist/dropdown/dropdown-footer2.js.map +1 -1
- package/dist/dropdown/dropdown-header2.js +8 -11
- package/dist/dropdown/dropdown-header2.js.map +1 -1
- package/dist/dropdown/dropdown2.js +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.js +49 -54
- package/dist/format-bytes/format-bytes2.js.map +1 -1
- package/dist/format-datetime/format-datetime2.js +26 -27
- package/dist/format-datetime/format-datetime2.js.map +1 -1
- package/dist/format-number/format-number.d.ts +2 -2
- package/dist/format-number/format-number2.js +37 -38
- package/dist/format-number/format-number2.js.map +1 -1
- package/dist/format-relative-time/format-relative-time2.js +27 -28
- package/dist/format-relative-time/format-relative-time2.js.map +1 -1
- package/dist/format-truncate/format-truncate2.js +1 -1
- 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/gauge/gauge2.js +1 -1
- 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/grid2.js +1 -1
- package/dist/grid/header/header2.js +7 -7
- 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/iframe/iframe2.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/controllers/audit.controller.d.ts +0 -2
- package/dist/internal/controllers/audit.controller.js +42 -52
- package/dist/internal/controllers/audit.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-grid.controller.js +11 -11
- package/dist/internal/index.js +28 -28
- package/dist/internal/services/global.service.js +1 -1
- package/dist/internal/utils/audit-logs.d.ts +1 -1
- package/dist/internal/utils/audit-logs.js +3 -3
- package/dist/internal/utils/audit-logs.js.map +1 -1
- package/dist/internal/utils/audit.d.ts +0 -8
- package/dist/internal/utils/audit.js +1 -5
- package/dist/internal/utils/audit.js.map +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-group2.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 +19 -20
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page2.js +2 -2
- package/dist/page/page2.js.map +1 -1
- 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-dot/progress-dot2.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-handle2.js +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +1 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +1 -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/tabs-group2.js +1 -1
- package/dist/tabs/tabs-item-group2.js +1 -1
- 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 +8 -11
- package/dist/toggletip/toggletip-footer2.js.map +1 -1
- package/dist/toggletip/toggletip-header2.js +8 -11
- package/dist/toggletip/toggletip-header2.js.map +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-node2.js +1 -1
- package/dist/tree/tree.examples.js.map +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +2 -2
package/dist/gauge/gauge2.js
CHANGED
package/dist/grid/cell/cell2.js
CHANGED
package/dist/grid/grid2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GlobalStateService as e } from "../../internal/services/global.service.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { LogService as t } from "../../internal/services/log.service.js";
|
|
3
|
+
import { audit as n } from "../../internal/controllers/audit.controller.js";
|
|
4
|
+
import { debounce as r } from "../../internal/utils/events.js";
|
|
5
5
|
import { attachInternals as i } from "../../internal/utils/a11y.js";
|
|
6
6
|
import { useStyles as a } from "../../internal/styles/index.js";
|
|
7
7
|
import o from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
@@ -19,7 +19,7 @@ var m = class extends d {
|
|
|
19
19
|
static {
|
|
20
20
|
this.metadata = {
|
|
21
21
|
tag: "nve-grid-header",
|
|
22
|
-
version: "2.18.
|
|
22
|
+
version: "2.18.2",
|
|
23
23
|
children: [c.metadata.tag]
|
|
24
24
|
};
|
|
25
25
|
}
|
|
@@ -30,7 +30,7 @@ var m = class extends d {
|
|
|
30
30
|
return f`<div internal-host><slot @slotchange="${() => this.#r()}"></slot></div>`;
|
|
31
31
|
}
|
|
32
32
|
connectedCallback() {
|
|
33
|
-
super.connectedCallback(), i(this), this._internals.role = "row", this.addEventListener("nve-grid-column-resize", this.#t), this.#n ??= new ResizeObserver(
|
|
33
|
+
super.connectedCallback(), i(this), this._internals.role = "row", this.addEventListener("nve-grid-column-resize", this.#t), this.#n ??= new ResizeObserver(r(() => this.#r(), 100)), this.#n.observe(this);
|
|
34
34
|
}
|
|
35
35
|
disconnectedCallback() {
|
|
36
36
|
super.disconnectedCallback(), this.removeEventListener("nve-grid-column-resize", this.#t), this.#n?.disconnect();
|
|
@@ -48,14 +48,14 @@ var m = class extends d {
|
|
|
48
48
|
#i() {
|
|
49
49
|
if (e.state.env !== "production") {
|
|
50
50
|
let e = this.#e.querySelector(u.metadata.tag)?.querySelectorAll(l.metadata.tag);
|
|
51
|
-
this.columns && e && this.columns.length !== e.length &&
|
|
51
|
+
this.columns && e && this.columns.length !== e.length && t.error(`grid-column (${this.columns.length}) and grid-cell (${e.length}) count mismatch`);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
o([p({
|
|
56
56
|
selector: c.metadata.tag,
|
|
57
57
|
flatten: !0
|
|
58
|
-
})], m.prototype, "columns", void 0), m = o([
|
|
58
|
+
})], m.prototype, "columns", void 0), m = o([n()], m);
|
|
59
59
|
//#endregion
|
|
60
60
|
export { m as GridHeader };
|
|
61
61
|
|
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: "2.18.
|
|
19
|
+
version: "2.18.2"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
@@ -103,7 +103,7 @@ a([l({
|
|
|
103
103
|
})], f.prototype, "name", void 0), a([d()], f.prototype, "svg", void 0);
|
|
104
104
|
function p(t) {
|
|
105
105
|
if (typeof globalThis.customElements?.get == "function") {
|
|
106
|
-
let n = e(t.metadata.version), i = e("2.18.
|
|
106
|
+
let n = e(t.metadata.version), i = e("2.18.2");
|
|
107
107
|
n.minor <= i.minor && n.major <= i.major && (t._icons = {
|
|
108
108
|
...t._icons,
|
|
109
109
|
...r
|
package/dist/iframe/iframe2.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { I18nService as e } from "./internal/services/i18n.service.js";
|
|
|
2
2
|
import { getThemeTokens as t } from "./internal/utils/dom.js";
|
|
3
3
|
import { statusIcons as n } from "./internal/types/index.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
|
-
var r = "2.18.
|
|
5
|
+
var r = "2.18.2", i = "@nvidia-elements";
|
|
6
6
|
//#endregion
|
|
7
7
|
export { e as I18nService, i as SCOPE, r as VERSION, t as getThemeTokens, n as statusIcons };
|
|
8
8
|
|
package/dist/input/input2.js
CHANGED
|
@@ -9,8 +9,6 @@ export interface AuditOptions {
|
|
|
9
9
|
}
|
|
10
10
|
export interface AuditMetadata {
|
|
11
11
|
parents?: string[];
|
|
12
|
-
children?: string[];
|
|
13
|
-
disallowedChildren?: string[];
|
|
14
12
|
}
|
|
15
13
|
export declare function audit<T extends Audit>(options?: AuditOptions): ClassDecorator;
|
|
16
14
|
export type Audit = ReactiveElement;
|
|
@@ -1,76 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getExcessiveInstanceLimitWarning as e, getInvalidParentWarning as t, getMultiplePageWarning as n } from "../utils/audit-logs.js";
|
|
2
|
+
import { GlobalStateService as r } from "../services/global.service.js";
|
|
3
|
+
import { LogService as i } from "../services/log.service.js";
|
|
4
|
+
import { auditParentElement as a } from "../utils/audit.js";
|
|
3
5
|
//#region src/internal/controllers/audit.controller.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t.warn(e);
|
|
6
|
+
var o = 50;
|
|
7
|
+
function s(e = {}) {
|
|
8
|
+
return (t) => t.addInitializer((t) => new c(t, e));
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
var o = class {
|
|
13
|
-
get #e() {
|
|
14
|
-
return e.state.audit[this.host.localName] ?? { count: 0 };
|
|
15
|
-
}
|
|
10
|
+
var c = class {
|
|
11
|
+
#e = !1;
|
|
16
12
|
get #t() {
|
|
17
|
-
return
|
|
13
|
+
return r.state.audit[this.host.localName] ?? { count: 0 };
|
|
18
14
|
}
|
|
19
15
|
get #n() {
|
|
16
|
+
return r.state.env === "production";
|
|
17
|
+
}
|
|
18
|
+
get #r() {
|
|
20
19
|
return this.host.constructor.metadata;
|
|
21
20
|
}
|
|
22
21
|
constructor(e, t) {
|
|
23
|
-
this.host = e, this.options = t, this.#
|
|
22
|
+
this.host = e, this.options = t, this.#n || (this.host.addController(this), this.#i());
|
|
24
23
|
}
|
|
25
24
|
async hostConnected() {
|
|
26
|
-
await this.host.updateComplete, this.#
|
|
25
|
+
this.#n || this.#a(), await this.host.updateComplete, !this.#n && this.host.isConnected && this.#c();
|
|
27
26
|
}
|
|
28
27
|
hostDisconnected() {
|
|
29
|
-
this.#
|
|
30
|
-
}
|
|
31
|
-
#r() {
|
|
32
|
-
e.state.audit[this.host.localName] || this.#o({ [this.host.localName]: { count: 0 } });
|
|
28
|
+
this.#o();
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (this.#e.count > this.options.excessiveInstanceLimit && !this.#e.excessiveInstanceLimitAudited) {
|
|
37
|
-
let { getExcessiveInstanceLimitWarning: e } = await import("../utils/audit-logs.js");
|
|
38
|
-
i(e(this.#e.count, this.host.localName)), this.#o({ [this.host.localName]: {
|
|
39
|
-
count: this.#e.count + 1,
|
|
40
|
-
excessiveInstanceLimitAudited: !0
|
|
41
|
-
} });
|
|
42
|
-
} else this.#o({ [this.host.localName]: { count: this.#e.count + 1 } });
|
|
43
|
-
}
|
|
30
|
+
#i() {
|
|
31
|
+
r.state.audit[this.host.localName] || this.#s({ [this.host.localName]: { count: 0 } });
|
|
44
32
|
}
|
|
45
33
|
#a() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
let t = this.options.excessiveInstanceLimit;
|
|
35
|
+
if (t === void 0 || this.#e) return;
|
|
36
|
+
this.#e = !0;
|
|
37
|
+
let r = (this.#t.count ?? 0) + 1, a = this.#t.excessiveInstanceLimitAudited ?? !1, o = r > t && !a;
|
|
38
|
+
this.#s({ [this.host.localName]: {
|
|
39
|
+
count: r,
|
|
40
|
+
excessiveInstanceLimitAudited: a || o
|
|
41
|
+
} }), o && this.#e && i.warn(this.host.localName === "nve-page" ? n(r) : e(r, this.host.localName));
|
|
50
42
|
}
|
|
51
|
-
#o(
|
|
52
|
-
e
|
|
43
|
+
#o() {
|
|
44
|
+
let e = this.options.excessiveInstanceLimit;
|
|
45
|
+
if (e === void 0 || !this.#e) return;
|
|
46
|
+
this.#e = !1;
|
|
47
|
+
let t = Math.max(0, (this.#t.count ?? 0) - 1);
|
|
48
|
+
this.#s({ [this.host.localName]: {
|
|
49
|
+
count: t,
|
|
50
|
+
excessiveInstanceLimitAudited: t > e && this.#t.excessiveInstanceLimitAudited
|
|
51
|
+
} });
|
|
53
52
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
let [e, t] = n(this.host);
|
|
57
|
-
if (e.length) {
|
|
58
|
-
let { getInvalidSlottedChildrenWarning: e } = await import("../utils/audit-logs.js");
|
|
59
|
-
i(e(this.host.localName, t));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
53
|
+
#s(e) {
|
|
54
|
+
r.dispatch("NVE_ELEMENTS_AUDIT_UPDATE", { audit: e });
|
|
62
55
|
}
|
|
63
|
-
|
|
64
|
-
if (this.#
|
|
65
|
-
let [e, n] =
|
|
66
|
-
|
|
67
|
-
let { getInvalidParentWarning: e } = await import("../utils/audit-logs.js");
|
|
68
|
-
i(e(this.host.localName, n.join(", ")));
|
|
69
|
-
}
|
|
56
|
+
#c() {
|
|
57
|
+
if (this.#r.parents) {
|
|
58
|
+
let [e, n] = a(this.host);
|
|
59
|
+
e || i.warn(t(this.host.localName, n.join(", ")));
|
|
70
60
|
}
|
|
71
61
|
}
|
|
72
62
|
};
|
|
73
63
|
//#endregion
|
|
74
|
-
export {
|
|
64
|
+
export { c as AuditController, s as audit, o as excessiveInstanceLimit };
|
|
75
65
|
|
|
76
66
|
//# sourceMappingURL=audit.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.controller.js","names":[],"sources":["../../../src/internal/controllers/audit.controller.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ReactiveController, ReactiveElement } from 'lit';\nimport type { LegacyDecoratorTarget } from '../types/index.js';\nimport { GlobalStateService } from '../services/global.service.js';\nimport {
|
|
1
|
+
{"version":3,"file":"audit.controller.js","names":[],"sources":["../../../src/internal/controllers/audit.controller.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ReactiveController, ReactiveElement } from 'lit';\nimport type { LegacyDecoratorTarget } from '../types/index.js';\nimport { GlobalStateService } from '../services/global.service.js';\nimport { LogService } from '../services/log.service.js';\nimport { auditParentElement } from '../utils/audit.js';\nimport {\n getExcessiveInstanceLimitWarning,\n getInvalidParentWarning,\n getMultiplePageWarning\n} from '../utils/audit-logs.js';\n\nexport const excessiveInstanceLimit = 50;\n\nexport interface AuditOptions {\n excessiveInstanceLimit?: number;\n alternates?: { name: string; use: string }[];\n}\n\nexport interface AuditMetadata {\n parents?: string[];\n}\n\ninterface AuditRegistry {\n [key: string]: {\n count?: number;\n excessiveInstanceLimitAudited?: boolean;\n };\n}\n\nexport function audit<T extends Audit>(options: AuditOptions = {}): ClassDecorator {\n return (target: LegacyDecoratorTarget) =>\n target.addInitializer!((instance: T) => new AuditController(instance, options));\n}\n\nexport type Audit = ReactiveElement;\n\nexport class AuditController<T extends Audit> implements ReactiveController {\n #counted = false;\n\n get #hostAuditState() {\n return GlobalStateService.state.audit[this.host.localName] ?? { count: 0 };\n }\n\n get #production() {\n return GlobalStateService.state.env === 'production';\n }\n\n get #hostMetadata() {\n return (this.host.constructor as unknown as { metadata: AuditMetadata }).metadata;\n }\n\n constructor(\n private host: T,\n private options: AuditOptions\n ) {\n if (!this.#production) {\n this.host.addController(this);\n this.#initializeAudit();\n }\n }\n\n async hostConnected() {\n if (!this.#production) this.#auditExcessiveInstanceLimit();\n await this.host.updateComplete;\n if (!this.#production && this.host.isConnected) {\n this.#auditParentElement();\n }\n }\n\n hostDisconnected() {\n this.#cleanupExcessiveInstanceLimit();\n }\n\n #initializeAudit() {\n if (!GlobalStateService.state.audit[this.host.localName]) {\n this.#update({ [this.host.localName]: { count: 0 } });\n }\n }\n\n #auditExcessiveInstanceLimit() {\n const limit = this.options.excessiveInstanceLimit;\n if (limit === undefined || this.#counted) return;\n\n this.#counted = true;\n const count = (this.#hostAuditState.count ?? 0) + 1;\n const audited = this.#hostAuditState.excessiveInstanceLimitAudited ?? false;\n const shouldWarn = count > limit && !audited;\n this.#update({ [this.host.localName]: { count, excessiveInstanceLimitAudited: audited || shouldWarn } });\n\n if (shouldWarn && this.#counted) {\n LogService.warn(\n this.host.localName === 'nve-page'\n ? getMultiplePageWarning(count)\n : getExcessiveInstanceLimitWarning(count, this.host.localName)\n );\n }\n }\n\n #cleanupExcessiveInstanceLimit() {\n const limit = this.options.excessiveInstanceLimit;\n if (limit === undefined || !this.#counted) return;\n\n this.#counted = false;\n const count = Math.max(0, (this.#hostAuditState.count ?? 0) - 1);\n this.#update({\n [this.host.localName]: {\n count,\n excessiveInstanceLimitAudited: count > limit && this.#hostAuditState.excessiveInstanceLimitAudited\n }\n });\n }\n\n #update(registry: AuditRegistry) {\n GlobalStateService.dispatch('NVE_ELEMENTS_AUDIT_UPDATE', { audit: registry } as Partial<\n typeof globalThis.NVE_ELEMENTS.state\n >);\n }\n\n #auditParentElement() {\n if (this.#hostMetadata.parents) {\n const [valid, validParents] = auditParentElement(this.host);\n if (!valid) {\n LogService.warn(getInvalidParentWarning(this.host.localName, validParents.join(', ')));\n }\n }\n }\n}\n"],"mappings":";;;;;AAcA,IAAa,IAAyB;AAkBtC,SAAgB,EAAuB,IAAwB,CAAC,GAAmB;CACjF,QAAQ,MACN,EAAO,gBAAiB,MAAgB,IAAI,EAAgB,GAAU,CAAO,CAAC;AAClF;AAIA,IAAa,IAAb,MAA4E;CAC1E,KAAW;CAEX,IAAI,KAAkB;EACpB,OAAO,EAAmB,MAAM,MAAM,KAAK,KAAK,cAAc,EAAE,OAAO,EAAE;CAC3E;CAEA,IAAI,KAAc;EAChB,OAAO,EAAmB,MAAM,QAAQ;CAC1C;CAEA,IAAI,KAAgB;EAClB,OAAQ,KAAK,KAAK,YAAuD;CAC3E;CAEA,YACE,GACA,GACA;EACA,AAHQ,KAAA,OAAA,GACA,KAAA,UAAA,GAEH,KAAK,OACR,KAAK,KAAK,cAAc,IAAI,GAC5B,KAAK,GAAiB;CAE1B;CAEA,MAAM,gBAAgB;EAGpB,AAFK,KAAK,MAAa,KAAK,GAA6B,GACzD,MAAM,KAAK,KAAK,gBACZ,CAAC,KAAK,MAAe,KAAK,KAAK,eACjC,KAAK,GAAoB;CAE7B;CAEA,mBAAmB;EACjB,KAAK,GAA+B;CACtC;CAEA,KAAmB;EACjB,AAAK,EAAmB,MAAM,MAAM,KAAK,KAAK,cAC5C,KAAK,GAAQ,GAAG,KAAK,KAAK,YAAY,EAAE,OAAO,EAAE,EAAE,CAAC;CAExD;CAEA,KAA+B;EAC7B,IAAM,IAAQ,KAAK,QAAQ;EAC3B,IAAI,MAAU,KAAA,KAAa,KAAK,IAAU;EAE1C,KAAK,KAAW;EAChB,IAAM,KAAS,KAAK,GAAgB,SAAS,KAAK,GAC5C,IAAU,KAAK,GAAgB,iCAAiC,IAChE,IAAa,IAAQ,KAAS,CAAC;EAGrC,AAFA,KAAK,GAAQ,GAAG,KAAK,KAAK,YAAY;GAAE;GAAO,+BAA+B,KAAW;EAAW,EAAE,CAAC,GAEnG,KAAc,KAAK,MACrB,EAAW,KACT,KAAK,KAAK,cAAc,aACpB,EAAuB,CAAK,IAC5B,EAAiC,GAAO,KAAK,KAAK,SAAS,CACjE;CAEJ;CAEA,KAAiC;EAC/B,IAAM,IAAQ,KAAK,QAAQ;EAC3B,IAAI,MAAU,KAAA,KAAa,CAAC,KAAK,IAAU;EAE3C,KAAK,KAAW;EAChB,IAAM,IAAQ,KAAK,IAAI,IAAI,KAAK,GAAgB,SAAS,KAAK,CAAC;EAC/D,KAAK,GAAQ,GACV,KAAK,KAAK,YAAY;GACrB;GACA,+BAA+B,IAAQ,KAAS,KAAK,GAAgB;EACvE,EACF,CAAC;CACH;CAEA,GAAQ,GAAyB;EAC/B,EAAmB,SAAS,6BAA6B,EAAE,OAAO,EAAS,CAE1E;CACH;CAEA,KAAsB;EACpB,IAAI,KAAK,GAAc,SAAS;GAC9B,IAAM,CAAC,GAAO,KAAgB,EAAmB,KAAK,IAAI;GAC1D,AAAK,KACH,EAAW,KAAK,EAAwB,KAAK,KAAK,WAAW,EAAa,KAAK,IAAI,CAAC,CAAC;EAEzF;CACF;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GlobalStateService as e } from "../services/global.service.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { LogService as t } from "../services/log.service.js";
|
|
3
|
+
import { throttle as n } from "../utils/events.js";
|
|
4
4
|
import { focusElement as r, getActiveElement as i, isSimpleFocusable as a, setActiveKeyListItem as o } from "../utils/focus.js";
|
|
5
5
|
import { KeynavCode as s, getFlattenedDOMTree as c, getFlattenedFocusableItems as l, hasInvalidDOMGrid as u, isContextMenuClick as d, validKeyNavigationCode as f } from "../utils/dom.js";
|
|
6
6
|
//#region src/internal/controllers/keynav-grid.controller.ts
|
|
@@ -12,7 +12,7 @@ var m = class {
|
|
|
12
12
|
#t;
|
|
13
13
|
#n;
|
|
14
14
|
#r = /* @__PURE__ */ new WeakSet();
|
|
15
|
-
#i =
|
|
15
|
+
#i = n(() => this.#c(), 500, { trailing: !0 });
|
|
16
16
|
get #a() {
|
|
17
17
|
return {
|
|
18
18
|
grid: this.host,
|
|
@@ -68,21 +68,21 @@ var m = class {
|
|
|
68
68
|
n && this.#p(e, n);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
#f = (
|
|
72
|
-
if (!f(
|
|
71
|
+
#f = (n) => {
|
|
72
|
+
if (!f(n)) return;
|
|
73
73
|
this.#u();
|
|
74
74
|
let r = Array.from(this.#o), o = Array.from(this.#s);
|
|
75
75
|
if (e.state.env !== "production" && u(r)) {
|
|
76
|
-
|
|
76
|
+
t.warn("Invalid grid structure, all rows must have the same number of cells");
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
if (a(i())) {
|
|
80
|
-
let { x: e, y:
|
|
81
|
-
code:
|
|
82
|
-
ctrlKey:
|
|
80
|
+
let { x: e, y: t } = _(o, r, {
|
|
81
|
+
code: n.code,
|
|
82
|
+
ctrlKey: n.ctrlKey,
|
|
83
83
|
dir: this.host.dir
|
|
84
|
-
}), i = Array.from(c(r[
|
|
85
|
-
this.#p(
|
|
84
|
+
}), i = Array.from(c(r[t])).filter((e) => !!o.find((t) => t === e))[e];
|
|
85
|
+
this.#p(n, i), n.preventDefault();
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
#p(e, t) {
|
package/dist/internal/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { DOCS_URL as e, formatFileSize as t, shiftLeft as n } from "./utils/strings.js";
|
|
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
|
-
import {
|
|
4
|
+
import { LogService as d } from "./services/log.service.js";
|
|
5
|
+
import { auditParentElement as f } from "./utils/audit.js";
|
|
5
6
|
import { AuditController as p, audit as m, excessiveInstanceLimit as h } from "./controllers/audit.controller.js";
|
|
6
7
|
import { GestureController as g } from "./controllers/gesture.controller.js";
|
|
7
8
|
import { I18nService as _, I18nService_ as v } from "./services/i18n.service.js";
|
|
8
9
|
import { I18nController as y, i18n as b } from "./controllers/i18n.controller.js";
|
|
9
10
|
import { KeyStateController as x } from "./controllers/key-state.controller.js";
|
|
10
11
|
import { debounce as S, onChildListMutation as C, stopEvent as w, throttle as T } from "./utils/events.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
export { p as AuditController, e as DOCS_URL, g as GestureController, l as GlobalState, u as GlobalStateService, y as I18nController, _ as I18nService, v as I18nService_, xe as KeyNavigationGridController, we as KeyNavigationListController, De as KeyNavigationSpatialController, x as KeyStateController, I as KeynavCode, E as LogService, Pe as StateExpandedController, Ie as StateHighlightedController, Re as StateScrollController, Be as StateSelectedController, ot as TransitionService, He as TypeAnchorController, We as TypeClosableController, Ge as TypeExpandableController, qe as TypeNativePopoverController, Je as TypeSSRController, Ke as TypeSelectableController, L as appendAnchorName, R as appendRootNodeStyle, z as applySlotContentStates, Oe as associateAriaDescribedBy, ke as associateAriaLabel, Ae as associateControlGroup, je as associateDataList, Me as associateLabel, Ne as attachInternals, m as audit, d as auditParentElement, f as auditSlots, B as clickOutsideElementBounds, Qe as colorStateStyles, V as createGhostElement, ct as createLightDismiss, S as debounce, r as deepMerge, H as define, U as defineElement, W as endOfScrollBox, h as excessiveInstanceLimit, ut as finiteOr, D as focusElement, O as focusElementTimeout, t as formatFileSize, i as formatStandardNumber, G as generateId, k as getActiveElement, K as getAnchorNames, q as getAttributeChanges, J as getAttributeListChanges, Y as getChildren, X as getCustomElementRegistry, a as getDifference, Z as getDisplayValue, Q as getElementUpdate, $ as getFlattenedDOMTree, ee as getFlattenedFocusableItems, Se as getNextKeyGridItem, Te as getNextKeyListItem, te as getPropertyChanges, ne as getThemeTokens, re as hasHorizontalScrollBar, ie as hasInvalidDOMGrid, ae as hasScrollBar, Xe as hostAttr, b as i18n, A as initializeKeyListItems, oe as isContextMenuClick, j as isFocusable, M as isImmediateRootActiveElement, o as isObject, s as isObjectLiteral, N as isSimpleFocusable, Ce as keyNavigationGrid, Ee as keyNavigationList, se as matchesElementName, dt as nonnegativeFiniteOr, C as onChildListMutation, lt as onKeys, P as onListboxActivate, ce as openEyeDropper, le as parseTokenNumber, c as parseVersion, at as popoverStyles, ft as positiveFiniteOr, ue as removeAnchorName, de as removeEmptySlotWhitespace, fe as removeEmptyTextNode, pe as sameOrderedStringArray, me as sameRenderRoot, Ze as scopedRegistry, he as scrollBarWidth, F as setActiveKeyListItem, n as shiftLeft, ge as slotContainsOnlyWhitespace, Fe as stateExpanded, Le as stateHighlighted, ze as stateScroll, Ve as stateSelected, st as statusIcons, $e as statusStateStyles, w as stopEvent, _e as styleSheetToString, et as supportStateStyles, nt as supportsCSSLegacyInsetArea, rt as supportsCSSPositionArea, it as supportsNativeCSSAnchorPosition, ve as supportsScopedRegistry, T as throttle, Ue as typeAnchor, Ye as typeSSR, ye as uniqueNonEmptyStrings, tt as useStyles, be as validKeyNavigationCode };
|
|
12
|
+
import { focusElement as E, focusElementTimeout as D, getActiveElement as O, initializeKeyListItems as k, isFocusable as A, isImmediateRootActiveElement as j, isSimpleFocusable as M, onListboxActivate as N, setActiveKeyListItem as P } from "./utils/focus.js";
|
|
13
|
+
import { KeynavCode as F, appendAnchorName as I, appendRootNodeStyle as L, applySlotContentStates as R, clickOutsideElementBounds as z, createGhostElement as B, define as V, defineElement as H, endOfScrollBox as U, generateId as W, getAnchorNames as G, getAttributeChanges as K, getAttributeListChanges as q, getChildren as J, getCustomElementRegistry as Y, getDisplayValue as X, getElementUpdate as Z, getFlattenedDOMTree as Q, getFlattenedFocusableItems as $, getPropertyChanges as ee, getThemeTokens as te, hasHorizontalScrollBar as ne, hasInvalidDOMGrid as re, hasScrollBar as ie, isContextMenuClick as ae, matchesElementName as oe, openEyeDropper as se, parseTokenNumber as ce, removeAnchorName as le, removeEmptySlotWhitespace as ue, removeEmptyTextNode as de, sameOrderedStringArray as fe, sameRenderRoot as pe, scrollBarWidth as me, slotContainsOnlyWhitespace as he, styleSheetToString as ge, supportsScopedRegistry as _e, uniqueNonEmptyStrings as ve, validKeyNavigationCode as ye } from "./utils/dom.js";
|
|
14
|
+
import { KeyNavigationGridController as be, getNextKeyGridItem as xe, keyNavigationGrid as Se } from "./controllers/keynav-grid.controller.js";
|
|
15
|
+
import { KeyNavigationListController as Ce, getNextKeyListItem as we, keyNavigationList as Te } from "./controllers/keynav-list.controller.js";
|
|
16
|
+
import { KeyNavigationSpatialController as Ee } from "./controllers/keynav-spatial.controller.js";
|
|
17
|
+
import { associateAriaDescribedBy as De, associateAriaLabel as Oe, associateControlGroup as ke, associateDataList as Ae, associateLabel as je, attachInternals as Me } from "./utils/a11y.js";
|
|
18
|
+
import { StateExpandedController as Ne, stateExpanded as Pe } from "./controllers/state-expanded.controller.js";
|
|
19
|
+
import { StateHighlightedController as Fe, stateHighlighted as Ie } from "./controllers/state-highlighted.controller.js";
|
|
20
|
+
import { StateScrollController as Le, stateScroll as Re } from "./controllers/state-scroll.controller.js";
|
|
21
|
+
import { StateSelectedController as ze, stateSelected as Be } from "./controllers/state-selected.controller.js";
|
|
22
|
+
import { TypeAnchorController as Ve, typeAnchor as He } from "./controllers/type-anchor.controller.js";
|
|
23
|
+
import { TypeClosableController as Ue } from "./controllers/type-closable.controller.js";
|
|
24
|
+
import { TypeExpandableController as We } from "./controllers/type-expandable.controller.js";
|
|
25
|
+
import { TypeSelectableController as Ge } from "./controllers/type-selectable.controller.js";
|
|
26
|
+
import { TypeNativePopoverController as Ke } from "./controllers/type-native-popover.controller.js";
|
|
27
|
+
import { TypeSSRController as qe, typeSSR as Je } from "./controllers/type-ssr.controller.js";
|
|
28
|
+
import { hostAttr as Ye } from "./decorators/host-attr.js";
|
|
29
|
+
import { scopedRegistry as Xe } from "./decorators/scoped-registry.js";
|
|
30
|
+
import { colorStateStyles as Ze, statusStateStyles as Qe, supportStateStyles as $e, useStyles as et } from "./styles/index.js";
|
|
31
|
+
import { supportsCSSLegacyInsetArea as tt, supportsCSSPositionArea as nt, supportsNativeCSSAnchorPosition as rt } from "./utils/supports.js";
|
|
32
|
+
import { popoverStyles as it } from "./styles/popover2.js";
|
|
33
|
+
import { TransitionService as at } from "./services/transition.service.js";
|
|
34
|
+
import { statusIcons as ot } from "./types/index.js";
|
|
35
|
+
import { createLightDismiss as st, onKeys as ct } from "./utils/keynav.js";
|
|
36
|
+
import { finiteOr as lt, nonnegativeFiniteOr as ut, positiveFiniteOr as dt } from "./utils/numeric.js";
|
|
37
|
+
export { p as AuditController, e as DOCS_URL, g as GestureController, l as GlobalState, u as GlobalStateService, y as I18nController, _ as I18nService, v as I18nService_, be as KeyNavigationGridController, Ce as KeyNavigationListController, Ee as KeyNavigationSpatialController, x as KeyStateController, F as KeynavCode, d as LogService, Ne as StateExpandedController, Fe as StateHighlightedController, Le as StateScrollController, ze as StateSelectedController, at as TransitionService, Ve as TypeAnchorController, Ue as TypeClosableController, We as TypeExpandableController, Ke as TypeNativePopoverController, qe as TypeSSRController, Ge as TypeSelectableController, I as appendAnchorName, L as appendRootNodeStyle, R as applySlotContentStates, De as associateAriaDescribedBy, Oe as associateAriaLabel, ke as associateControlGroup, Ae as associateDataList, je as associateLabel, Me as attachInternals, m as audit, f as auditParentElement, z as clickOutsideElementBounds, Ze as colorStateStyles, B as createGhostElement, st as createLightDismiss, S as debounce, r as deepMerge, V as define, H as defineElement, U as endOfScrollBox, h as excessiveInstanceLimit, lt as finiteOr, E as focusElement, D as focusElementTimeout, t as formatFileSize, i as formatStandardNumber, W as generateId, O as getActiveElement, G as getAnchorNames, K as getAttributeChanges, q as getAttributeListChanges, J as getChildren, Y as getCustomElementRegistry, a as getDifference, X as getDisplayValue, Z as getElementUpdate, Q as getFlattenedDOMTree, $ as getFlattenedFocusableItems, xe as getNextKeyGridItem, we as getNextKeyListItem, ee as getPropertyChanges, te as getThemeTokens, ne as hasHorizontalScrollBar, re as hasInvalidDOMGrid, ie as hasScrollBar, Ye as hostAttr, b as i18n, k as initializeKeyListItems, ae as isContextMenuClick, A as isFocusable, j as isImmediateRootActiveElement, o as isObject, s as isObjectLiteral, M as isSimpleFocusable, Se as keyNavigationGrid, Te as keyNavigationList, oe as matchesElementName, ut as nonnegativeFiniteOr, C as onChildListMutation, ct as onKeys, N as onListboxActivate, se as openEyeDropper, ce as parseTokenNumber, c as parseVersion, it as popoverStyles, dt as positiveFiniteOr, le as removeAnchorName, ue as removeEmptySlotWhitespace, de as removeEmptyTextNode, fe as sameOrderedStringArray, pe as sameRenderRoot, Xe as scopedRegistry, me as scrollBarWidth, P as setActiveKeyListItem, n as shiftLeft, he as slotContainsOnlyWhitespace, Pe as stateExpanded, Ie as stateHighlighted, Re as stateScroll, Be as stateSelected, ot as statusIcons, Qe as statusStateStyles, w as stopEvent, ge as styleSheetToString, $e as supportStateStyles, tt as supportsCSSLegacyInsetArea, nt as supportsCSSPositionArea, rt as supportsNativeCSSAnchorPosition, _e as supportsScopedRegistry, T as throttle, He as typeAnchor, Je as typeSSR, ve as uniqueNonEmptyStrings, et as useStyles, ye as validKeyNavigationCode };
|
|
@@ -19,7 +19,7 @@ var a = class {
|
|
|
19
19
|
i18nRegistry: {},
|
|
20
20
|
audit: {}
|
|
21
21
|
}
|
|
22
|
-
}, globalThis.NVE_ELEMENTS.state.versions = Array.from(/* @__PURE__ */ new Set([...globalThis.NVE_ELEMENTS.state.versions, "2.18.
|
|
22
|
+
}, globalThis.NVE_ELEMENTS.state.versions = Array.from(/* @__PURE__ */ new Set([...globalThis.NVE_ELEMENTS.state.versions, "2.18.2"])), globalThis.NVE_ELEMENTS.state.scopedRegistry ??= {}, globalThis.NVE_ELEMENTS.state.scopedRegistry["2.18.2"] = 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,6 +1,6 @@
|
|
|
1
1
|
export declare const DOCS_LOG_URL: string;
|
|
2
2
|
export declare function getExcessiveInstanceLimitWarning(count: number, localName: string): string;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function getMultiplePageWarning(count: number): string;
|
|
4
4
|
export declare function getInvalidParentWarning(localName: string, allowedParent: string): string;
|
|
5
5
|
export declare function getIdMatchNotFoundWarning(id: string): string;
|
|
6
6
|
export declare function getSSRMismatchWarning(localName: string): string;
|
|
@@ -4,8 +4,8 @@ var t = `${e}docs/api-design/logs/`;
|
|
|
4
4
|
function n(e, n) {
|
|
5
5
|
return `Excessive rendering of ${e} ${n} were detected in DOM. Recycle/reuse elements when possible to improve application performance. ${t}#excessive-instance-limit`;
|
|
6
6
|
}
|
|
7
|
-
function r(e
|
|
8
|
-
return `
|
|
7
|
+
function r(e) {
|
|
8
|
+
return `Detected ${e} nve-page elements. Use one nve-page as the application shell. ${t}#page-shell-count`;
|
|
9
9
|
}
|
|
10
10
|
function i(e, n) {
|
|
11
11
|
return `Element ${e} can only be used as a direct child of ${n}. ${t}#invalid-parent`;
|
|
@@ -23,6 +23,6 @@ function c() {
|
|
|
23
23
|
return `@nve: Multiple versions of Elements loaded, please check for duplicate package versions. ${t}#duplicate-package-version`;
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
|
-
export { t as DOCS_LOG_URL, c as getDuplicatePackageGlobalVersionWarning, s as getDuplicatePackageVersionWarning, n as getExcessiveInstanceLimitWarning, a as getIdMatchNotFoundWarning, i as getInvalidParentWarning, r as
|
|
26
|
+
export { t as DOCS_LOG_URL, c as getDuplicatePackageGlobalVersionWarning, s as getDuplicatePackageVersionWarning, n as getExcessiveInstanceLimitWarning, a as getIdMatchNotFoundWarning, i as getInvalidParentWarning, r as getMultiplePageWarning, o as getSSRMismatchWarning };
|
|
27
27
|
|
|
28
28
|
//# sourceMappingURL=audit-logs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.js","names":[],"sources":["../../../src/internal/utils/audit-logs.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { DOCS_URL } from './strings.js';\n\nexport const DOCS_LOG_URL = `${DOCS_URL}docs/api-design/logs/`;\n\nexport function getExcessiveInstanceLimitWarning(count: number, localName: string) {\n return `Excessive rendering of ${count} ${localName} were detected in DOM. Recycle/reuse elements when possible to improve application performance. ${DOCS_LOG_URL}#excessive-instance-limit`;\n}\n\nexport function
|
|
1
|
+
{"version":3,"file":"audit-logs.js","names":[],"sources":["../../../src/internal/utils/audit-logs.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { DOCS_URL } from './strings.js';\n\nexport const DOCS_LOG_URL = `${DOCS_URL}docs/api-design/logs/`;\n\nexport function getExcessiveInstanceLimitWarning(count: number, localName: string) {\n return `Excessive rendering of ${count} ${localName} were detected in DOM. Recycle/reuse elements when possible to improve application performance. ${DOCS_LOG_URL}#excessive-instance-limit`;\n}\n\nexport function getMultiplePageWarning(count: number) {\n return `Detected ${count} nve-page elements. Use one nve-page as the application shell. ${DOCS_LOG_URL}#page-shell-count`;\n}\n\nexport function getInvalidParentWarning(localName: string, allowedParent: string) {\n return `Element ${localName} can only be used as a direct child of ${allowedParent}. ${DOCS_LOG_URL}#invalid-parent`;\n}\n\nexport function getIdMatchNotFoundWarning(id: string) {\n return `Provided id \"${id}\" not found in DOM. ${DOCS_LOG_URL}#id-match-not-found`;\n}\n\nexport function getSSRMismatchWarning(localName: string) {\n return `${localName} rendered on the client with mismatched SSR content. ${DOCS_LOG_URL}#ssr-mismatch`;\n}\n\nexport function getCrossShadowRootAnchorWarning(localName: string) {\n return `(deprecated) ${localName} provided an anchor outside of its render root. ${DOCS_LOG_URL}#cross-shadow-root-anchor`;\n}\n\nexport function getDuplicatePackageVersionWarning(localName: string, version: string) {\n return `@nve: Element ${localName} version ${version} already defined, please check for duplicate package versions. ${DOCS_LOG_URL}#duplicate-package-version`;\n}\n\nexport function getDuplicatePackageGlobalVersionWarning() {\n return `@nve: Multiple versions of Elements loaded, please check for duplicate package versions. ${DOCS_LOG_URL}#duplicate-package-version`;\n}\n"],"mappings":";;AAKA,IAAa,IAAe,GAAG,EAAS;AAExC,SAAgB,EAAiC,GAAe,GAAmB;CACjF,OAAO,0BAA0B,EAAM,GAAG,EAAU,kGAAkG,EAAa;AACrK;AAEA,SAAgB,EAAuB,GAAe;CACpD,OAAO,YAAY,EAAM,iEAAiE,EAAa;AACzG;AAEA,SAAgB,EAAwB,GAAmB,GAAuB;CAChF,OAAO,WAAW,EAAU,yCAAyC,EAAc,IAAI,EAAa;AACtG;AAEA,SAAgB,EAA0B,GAAY;CACpD,OAAO,gBAAgB,EAAG,sBAAsB,EAAa;AAC/D;AAEA,SAAgB,EAAsB,GAAmB;CACvD,OAAO,GAAG,EAAU,uDAAuD,EAAa;AAC1F;AAMA,SAAgB,EAAkC,GAAmB,GAAiB;CACpF,OAAO,iBAAiB,EAAU,WAAW,EAAQ,iEAAiE,EAAa;AACrI;AAEA,SAAgB,IAA0C;CACxD,OAAO,4FAA4F,EAAa;AAClH"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export declare function auditSlots(host: HTMLElement & {
|
|
2
|
-
constructor: {
|
|
3
|
-
metadata?: {
|
|
4
|
-
children?: string[];
|
|
5
|
-
disallowedChildren?: string[];
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
}): [Element[], string[]];
|
|
9
1
|
export declare function auditParentElement(host: HTMLElement & {
|
|
10
2
|
constructor: {
|
|
11
3
|
metadata?: {
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
//#region src/internal/utils/audit.ts
|
|
2
2
|
function e(e) {
|
|
3
|
-
let t = ["template", ...e.constructor.metadata?.children ?? []].filter((e) => typeof e == "string");
|
|
4
|
-
return [Array.from(e.shadowRoot.querySelectorAll("slot")).filter((e) => e.name === "").flatMap((e) => e.assignedElements().filter((e) => !t.map((e) => e).includes(e.localName))), t];
|
|
5
|
-
}
|
|
6
|
-
function t(e) {
|
|
7
3
|
let t = e.constructor.metadata?.parents ?? [];
|
|
8
4
|
return t.length ? [!!t.find((t) => e.parentElement?.localName === t), t] : [!0, []];
|
|
9
5
|
}
|
|
10
6
|
//#endregion
|
|
11
|
-
export {
|
|
7
|
+
export { e as auditParentElement };
|
|
12
8
|
|
|
13
9
|
//# sourceMappingURL=audit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","names":[],"sources":["../../../src/internal/utils/audit.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function
|
|
1
|
+
{"version":3,"file":"audit.js","names":[],"sources":["../../../src/internal/utils/audit.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function auditParentElement(\n host: HTMLElement & { constructor: { metadata?: { parents?: string[] } } }\n): [boolean, string[]] {\n const validParentTags = host.constructor.metadata?.parents ?? [];\n return validParentTags.length\n ? [!!validParentTags.find(p => host.parentElement?.localName === p), validParentTags]\n : [true, []];\n}\n"],"mappings":";AAGA,SAAgB,EACd,GACqB;CACrB,IAAM,IAAkB,EAAK,YAAY,UAAU,WAAW,CAAC;CAC/D,OAAO,EAAgB,SACnB,CAAC,CAAC,CAAC,EAAgB,MAAK,MAAK,EAAK,eAAe,cAAc,CAAC,GAAG,CAAe,IAClF,CAAC,IAAM,CAAC,CAAC;AACf"}
|
package/dist/logo/logo2.js
CHANGED