@nvidia-elements/core 2.23.5 → 2.23.6
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 +6 -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.js +7 -7
- 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/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements.json +1000 -229
- 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/drag-handle/drag-handle2.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/dropzone2.js +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.js +1 -1
- package/dist/format-datetime/format-datetime2.js +1 -1
- package/dist/format-number/format-number2.js +1 -1
- package/dist/format-relative-time/format-relative-time2.js +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/ghost/ghost2.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 +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +1 -1
- package/dist/icon/icon2.js +1 -1
- 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/joystick/joystick2.js +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 +1 -1
- package/dist/page/page2.js +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 +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-node2.js +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/dist/workspace/controllers/workspace-composition.controller.d.ts +4 -1
- package/dist/workspace/controllers/workspace-composition.controller.js +69 -39
- package/dist/workspace/controllers/workspace-composition.controller.js.map +1 -1
- package/dist/workspace/controllers/workspace-rearrange.controller.js +27 -27
- package/dist/workspace/controllers/workspace-rearrange.controller.js.map +1 -1
- package/dist/workspace/controllers/workspace-restoration.controller.js +2 -2
- package/dist/workspace/controllers/workspace-restoration.controller.js.map +1 -1
- package/dist/workspace/panel/panel2.js +2 -2
- package/dist/workspace/panel/panel2.js.map +1 -1
- package/dist/workspace/panel-content/panel-content2.js +1 -1
- package/dist/workspace/panel-footer/panel-footer2.js +1 -1
- package/dist/workspace/panel-header/panel-header2.js +1 -1
- package/dist/workspace/utils/comparison.utils.d.ts +3 -0
- package/dist/workspace/utils/comparison.utils.js +13 -0
- package/dist/workspace/utils/comparison.utils.js.map +1 -0
- package/dist/workspace/utils/evaluation.utils.d.ts +65 -6
- package/dist/workspace/utils/evaluation.utils.js +334 -99
- package/dist/workspace/utils/evaluation.utils.js.map +1 -1
- package/dist/workspace/utils/geometry/allocation.utils.js +15 -13
- package/dist/workspace/utils/geometry/allocation.utils.js.map +1 -1
- package/dist/workspace/utils/geometry/sizing.utils.d.ts +2 -0
- package/dist/workspace/utils/geometry/sizing.utils.js +37 -17
- package/dist/workspace/utils/geometry/sizing.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/boundary.utils.d.ts +2 -2
- package/dist/workspace/utils/interaction/boundary.utils.js +2 -2
- package/dist/workspace/utils/interaction/boundary.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/drag-preview.utils.d.ts +3 -3
- package/dist/workspace/utils/interaction/drag-preview.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/insertion-offers.utils.d.ts +11 -9
- package/dist/workspace/utils/interaction/insertion-offers.utils.js +37 -43
- package/dist/workspace/utils/interaction/insertion-offers.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/placement-decision.utils.d.ts +6 -1
- package/dist/workspace/utils/interaction/placement-decision.utils.js +94 -87
- package/dist/workspace/utils/interaction/placement-decision.utils.js.map +1 -1
- package/dist/workspace/utils/model/layout.utils.d.ts +2 -1
- package/dist/workspace/utils/model/layout.utils.js +12 -10
- package/dist/workspace/utils/model/layout.utils.js.map +1 -1
- package/dist/workspace/utils/model/membership.utils.d.ts +4 -0
- package/dist/workspace/utils/model/membership.utils.js +13 -4
- package/dist/workspace/utils/model/membership.utils.js.map +1 -1
- package/dist/workspace/utils/model/operations.utils.d.ts +1 -0
- package/dist/workspace/utils/model/operations.utils.js +51 -46
- package/dist/workspace/utils/model/operations.utils.js.map +1 -1
- package/dist/workspace/utils/model/projection.utils.d.ts +4 -2
- package/dist/workspace/utils/model/projection.utils.js +49 -40
- package/dist/workspace/utils/model/projection.utils.js.map +1 -1
- package/dist/workspace/utils/model/value.utils.d.ts +4 -3
- package/dist/workspace/utils/model/value.utils.js +15 -50
- package/dist/workspace/utils/model/value.utils.js.map +1 -1
- package/dist/workspace/utils/placement/acquisition-sizing.utils.d.ts +2 -0
- package/dist/workspace/utils/placement/acquisition-sizing.utils.js +30 -22
- package/dist/workspace/utils/placement/acquisition-sizing.utils.js.map +1 -1
- package/dist/workspace/utils/placement/group-insertion.utils.d.ts +19 -13
- package/dist/workspace/utils/placement/group-insertion.utils.js +50 -47
- package/dist/workspace/utils/placement/group-insertion.utils.js.map +1 -1
- package/dist/workspace/utils/placement/planner.utils.d.ts +13 -2
- package/dist/workspace/utils/placement/planner.utils.js +79 -73
- package/dist/workspace/utils/placement/planner.utils.js.map +1 -1
- package/dist/workspace/utils/placement/preparation.utils.d.ts +5 -2
- package/dist/workspace/utils/placement/preparation.utils.js +45 -41
- package/dist/workspace/utils/placement/preparation.utils.js.map +1 -1
- package/dist/workspace/utils/placement/region.utils.js +32 -32
- package/dist/workspace/utils/placement/region.utils.js.map +1 -1
- package/dist/workspace/utils/placement/scope.utils.d.ts +34 -0
- package/dist/workspace/utils/placement/scope.utils.js +155 -0
- package/dist/workspace/utils/placement/scope.utils.js.map +1 -0
- package/dist/workspace/utils/placement/session.utils.d.ts +11 -0
- package/dist/workspace/utils/placement/session.utils.js +78 -0
- package/dist/workspace/utils/placement/session.utils.js.map +1 -0
- package/dist/workspace/utils/placement/split-sizing.utils.d.ts +2 -2
- package/dist/workspace/utils/placement/split-sizing.utils.js +19 -19
- package/dist/workspace/utils/placement/split-sizing.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/composition.utils.d.ts +1 -1
- package/dist/workspace/utils/presentation/composition.utils.js +4 -2
- package/dist/workspace/utils/presentation/composition.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/groups.utils.d.ts +3 -3
- package/dist/workspace/utils/presentation/groups.utils.js +40 -30
- package/dist/workspace/utils/presentation/groups.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/measurements.utils.d.ts +1 -0
- package/dist/workspace/utils/presentation/measurements.utils.js +6 -14
- package/dist/workspace/utils/presentation/measurements.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/offers.utils.d.ts +1 -1
- package/dist/workspace/utils/presentation/offers.utils.js +3 -3
- package/dist/workspace/utils/presentation/offers.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/preview.utils.d.ts +6 -0
- package/dist/workspace/utils/presentation/preview.utils.js +14 -3
- package/dist/workspace/utils/presentation/preview.utils.js.map +1 -1
- package/dist/workspace/workspace.examples.js.map +1 -1
- package/dist/workspace/workspace.examples.json +4 -4
- package/dist/workspace/workspace.js +1 -1
- package/dist/workspace/workspace.js.map +1 -1
- package/dist/workspace/workspace2.js +206 -212
- package/dist/workspace/workspace2.js.map +1 -1
- package/package.json +1 -1
- package/dist/workspace/utils/placement/context.utils.d.ts +0 -36
- package/dist/workspace/utils/placement/context.utils.js +0 -135
- package/dist/workspace/utils/placement/context.utils.js.map +0 -1
package/dist/pulse/pulse2.js
CHANGED
package/dist/radio/radio2.js
CHANGED
package/dist/range/range2.js
CHANGED
package/dist/search/search2.js
CHANGED
package/dist/select/select2.js
CHANGED
package/dist/steps/steps2.js
CHANGED
|
@@ -23,7 +23,7 @@ var v = class extends m(l) {
|
|
|
23
23
|
static {
|
|
24
24
|
this.metadata = {
|
|
25
25
|
tag: "nve-steps-item",
|
|
26
|
-
version: "2.23.
|
|
26
|
+
version: "2.23.6",
|
|
27
27
|
parents: ["nve-steps"]
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -69,7 +69,7 @@ var y = class extends l {
|
|
|
69
69
|
static {
|
|
70
70
|
this.metadata = {
|
|
71
71
|
tag: "nve-steps",
|
|
72
|
-
version: "2.23.
|
|
72
|
+
version: "2.23.6",
|
|
73
73
|
children: ["nve-steps-item"]
|
|
74
74
|
};
|
|
75
75
|
}
|
package/dist/switch/switch2.js
CHANGED
package/dist/tabs/tabs-group2.js
CHANGED
package/dist/tabs/tabs2.js
CHANGED
|
@@ -21,7 +21,7 @@ var y = class extends _(p) {
|
|
|
21
21
|
static {
|
|
22
22
|
this.metadata = {
|
|
23
23
|
tag: "nve-tabs-item",
|
|
24
|
-
version: "2.23.
|
|
24
|
+
version: "2.23.6",
|
|
25
25
|
parents: ["nve-tabs", "nve-tabs-item-group"]
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -65,7 +65,7 @@ var b = class extends p {
|
|
|
65
65
|
static {
|
|
66
66
|
this.metadata = {
|
|
67
67
|
tag: "nve-tabs",
|
|
68
|
-
version: "2.23.
|
|
68
|
+
version: "2.23.6",
|
|
69
69
|
children: ["nve-tabs-item", "nve-tabs-item-group"]
|
|
70
70
|
};
|
|
71
71
|
}
|
package/dist/tag/tag2.js
CHANGED
package/dist/time/time2.js
CHANGED
package/dist/toast/toast2.js
CHANGED
package/dist/toolbar/toolbar2.js
CHANGED
package/dist/tooltip/tooltip2.js
CHANGED
package/dist/tree/tree-node2.js
CHANGED
package/dist/tree/tree2.js
CHANGED
package/dist/week/week2.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ReactiveControllerHost } from 'lit';
|
|
2
|
+
import { WorkspacePanel } from '../panel/panel.js';
|
|
2
3
|
import type { WorkspaceDragPreview } from '../utils/interaction/drag-preview.utils.js';
|
|
3
4
|
import type { WorkspaceLayout } from '../utils/model/layout.utils.js';
|
|
4
5
|
import type { WorkspacePresentedGroup } from '../utils/presentation/groups.utils.js';
|
|
5
6
|
import type { WorkspaceMeasurements } from '../utils/presentation/measurements.utils.js';
|
|
6
7
|
import type { WorkspacePanelHeader } from '../panel-header/panel-header.js';
|
|
7
|
-
import type { WorkspacePanel } from '../panel/panel.js';
|
|
8
8
|
export interface WorkspacePanelTransitionTargets {
|
|
9
9
|
element: WorkspacePanel;
|
|
10
10
|
header: ReturnType<WorkspacePanelHeader['_getTransitionTargets']> | undefined;
|
|
@@ -23,6 +23,7 @@ interface WorkspaceCompositionDelegate {
|
|
|
23
23
|
readonly getLayout: () => WorkspaceLayout | undefined;
|
|
24
24
|
readonly getPreview: () => WorkspaceDragPreview | undefined;
|
|
25
25
|
readonly scrollChanged: () => void;
|
|
26
|
+
readonly contentChanged: (kind: 'panels' | 'chrome') => void;
|
|
26
27
|
}
|
|
27
28
|
interface WorkspaceCompositionPresentation {
|
|
28
29
|
groups: WorkspacePresentedGroup[];
|
|
@@ -42,6 +43,8 @@ export declare class WorkspaceCompositionController {
|
|
|
42
43
|
#private;
|
|
43
44
|
constructor(host: HTMLElement & ReactiveControllerHost, delegate: WorkspaceCompositionDelegate);
|
|
44
45
|
hostDisconnected(): void;
|
|
46
|
+
startObserving(): void;
|
|
47
|
+
stopObserving(): void;
|
|
45
48
|
captureFocus(): void;
|
|
46
49
|
applyPresentation(input: WorkspaceCompositionPresentation): void;
|
|
47
50
|
sync(): void;
|
|
@@ -1,40 +1,66 @@
|
|
|
1
1
|
import { getActiveElement as e } from "../../internal/utils/focus.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { matchesElementName as t } from "../../internal/utils/dom.js";
|
|
3
|
+
import { WorkspacePanel as n } from "../panel/panel2.js";
|
|
4
|
+
import { focusWorkspacePanel as r, getPanelLabel as i, isWorkspaceCompositionMutation as a } from "../utils/presentation/composition.utils.js";
|
|
5
|
+
import { createTabStripIdentityResolver as o, getAllocatedTabWidth as s } from "../utils/presentation/groups.utils.js";
|
|
4
6
|
// src/workspace/controllers/workspace-composition.controller.ts
|
|
5
|
-
var
|
|
7
|
+
var c = class {
|
|
6
8
|
#e;
|
|
7
9
|
#t;
|
|
8
10
|
#n;
|
|
11
|
+
#r;
|
|
12
|
+
#i;
|
|
9
13
|
constructor(e, t) {
|
|
10
14
|
this.#e = e, this.#t = t, e.addController(this);
|
|
11
15
|
}
|
|
12
16
|
hostDisconnected() {
|
|
13
|
-
this.#n = void 0;
|
|
17
|
+
this.#n = void 0, this.#r = void 0;
|
|
18
|
+
}
|
|
19
|
+
startObserving() {
|
|
20
|
+
this.#i = new MutationObserver((e) => this.#a(e)), this.#i.observe(this.#e, {
|
|
21
|
+
childList: !0,
|
|
22
|
+
characterData: !0,
|
|
23
|
+
attributes: !0,
|
|
24
|
+
subtree: !0,
|
|
25
|
+
attributeFilter: [
|
|
26
|
+
"id",
|
|
27
|
+
"min-width",
|
|
28
|
+
"min-height",
|
|
29
|
+
"slot"
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
stopObserving() {
|
|
34
|
+
this.#i?.disconnect(), this.#i = void 0;
|
|
35
|
+
}
|
|
36
|
+
#a(e) {
|
|
37
|
+
let r = e.some((e) => e.type === "childList" && e.target === this.#e || e.type === "attributes" && t(e.target, n) && e.target.parentElement === this.#e), i = e.some((e) => e.type === "attributes" && e.target === this.#e || a(this.#e, e));
|
|
38
|
+
(r || i) && this.#t.contentChanged(r ? "panels" : "chrome");
|
|
14
39
|
}
|
|
15
40
|
captureFocus() {
|
|
16
|
-
this.#n = this.#t.getPreview() ? void 0 :
|
|
41
|
+
this.#n = this.#t.getPreview() ? void 0 : f(this.#e);
|
|
17
42
|
}
|
|
18
43
|
applyPresentation(e) {
|
|
19
44
|
let t = e.groups.map((t) => ({
|
|
20
45
|
group: t,
|
|
21
46
|
scrollLeft: e.scroll(t)
|
|
22
47
|
}));
|
|
23
|
-
for (let { group: n, scrollLeft: r } of t)
|
|
48
|
+
for (let { group: n, scrollLeft: r } of t) l(e, n, r);
|
|
24
49
|
let n = new Set(e.groups.flatMap((e) => e.panels));
|
|
25
50
|
this.#t.getPanels().forEach((t) => {
|
|
26
51
|
t._present(n.has(t) && !e.source.includes(t.id));
|
|
27
52
|
});
|
|
28
53
|
}
|
|
29
54
|
sync() {
|
|
55
|
+
this.#r?.root !== (this.#t.getLayout()?.root ?? null) && (this.#r = void 0);
|
|
30
56
|
let e = this.#t.getPanels(), t = this.#t.getGroups(), n = this.#t.getPreview();
|
|
31
|
-
|
|
57
|
+
u(e, t.map((e) => ({
|
|
32
58
|
group: e,
|
|
33
59
|
strip: this.findTabStrip(e)
|
|
34
|
-
}))),
|
|
60
|
+
}))), d(this.#e, t, {
|
|
35
61
|
panels: e,
|
|
36
62
|
carried: (e) => n?.source.includes(e) ?? !1
|
|
37
|
-
}), n ||
|
|
63
|
+
}), n || p(this.#e, t, this.#n), this.#n = void 0;
|
|
38
64
|
}
|
|
39
65
|
getTransitionTargets() {
|
|
40
66
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -50,12 +76,16 @@ var a = class {
|
|
|
50
76
|
for (let e of this.#e.shadowRoot?.querySelectorAll("[data-boundary]") ?? []) e.parentElement && t.set(e.dataset.boundary, e.parentElement);
|
|
51
77
|
return {
|
|
52
78
|
panels: e,
|
|
53
|
-
groups:
|
|
79
|
+
groups: h(this.#e),
|
|
54
80
|
gutters: t
|
|
55
81
|
};
|
|
56
82
|
}
|
|
57
83
|
getGroupIdentity(e) {
|
|
58
|
-
|
|
84
|
+
let t = this.#t.getLayout()?.root ?? null;
|
|
85
|
+
return this.#r && this.#r.root === t || (this.#r = {
|
|
86
|
+
root: t,
|
|
87
|
+
resolve: o(t)
|
|
88
|
+
}), this.#r.resolve(e.panels.map((e) => e.id), this.#t.getPreview()?.source ?? []);
|
|
59
89
|
}
|
|
60
90
|
findTabStrip(e) {
|
|
61
91
|
return this.#e.shadowRoot?.querySelector(`[data-group="${CSS.escape(this.getGroupIdentity(e))}"]`);
|
|
@@ -71,31 +101,31 @@ var a = class {
|
|
|
71
101
|
this.#t.getPanels().find((t) => t.id === e)?.querySelector(":scope > nve-workspace-panel-header")?._hover(t);
|
|
72
102
|
}
|
|
73
103
|
};
|
|
74
|
-
function
|
|
75
|
-
let { headerHeight:
|
|
76
|
-
t.panels.forEach((
|
|
77
|
-
if (e.source.includes(
|
|
78
|
-
e.container &&
|
|
104
|
+
function l(e, t, n) {
|
|
105
|
+
let { headerHeight: r, actionWidth: i } = e.measurements, a = s(t, e.measurements), o = e.measurements.groupActionWidth ?? 0, c = (e.measurements.panels?.[t.active]?.suffixWidth ?? 0) + o;
|
|
106
|
+
t.panels.forEach((s, l) => {
|
|
107
|
+
if (e.source.includes(s.id)) return;
|
|
108
|
+
e.container && s.getAttribute("container") !== e.container ? s.setAttribute("container", e.container) : e.container || s.removeAttribute("container"), s.setAttribute("role", t.tabbed ? "tabpanel" : "group"), s.setAttribute("aria-hidden", String(t.active !== s.id));
|
|
79
109
|
let u = t.rect;
|
|
80
|
-
Object.assign(
|
|
110
|
+
Object.assign(s.style, {
|
|
81
111
|
left: `${u.x}px`,
|
|
82
112
|
top: `${u.y}px`,
|
|
83
113
|
width: `${u.width}px`,
|
|
84
114
|
height: `${u.height}px`
|
|
85
|
-
}),
|
|
86
|
-
selected: t.active ===
|
|
87
|
-
offset: t.gripWidth + l *
|
|
115
|
+
}), s.style.setProperty("--_workspace-border-right", e.measurements.gap === 0 && u.x + u.width < e.extent.width - 1e-6 ? "none" : "var(--border)"), s.style.setProperty("--_workspace-border-bottom", e.measurements.gap === 0 && u.y + u.height < e.extent.height - 1e-6 ? "none" : "var(--border)"), s._configure({
|
|
116
|
+
selected: t.active === s.id,
|
|
117
|
+
offset: t.gripWidth + l * a,
|
|
88
118
|
scrollLeft: n,
|
|
89
119
|
animate: e.animate,
|
|
90
|
-
tabWidth: Math.max(0,
|
|
91
|
-
headerHeight:
|
|
92
|
-
suffixEnd:
|
|
120
|
+
tabWidth: Math.max(0, a - i * Number(e.closable)),
|
|
121
|
+
headerHeight: r,
|
|
122
|
+
suffixEnd: o,
|
|
93
123
|
clipLeft: t.gripWidth,
|
|
94
124
|
clipWidth: Math.max(0, u.width - t.gripWidth - c)
|
|
95
125
|
});
|
|
96
126
|
});
|
|
97
127
|
}
|
|
98
|
-
function
|
|
128
|
+
function u(e, t) {
|
|
99
129
|
let n = /* @__PURE__ */ new Map();
|
|
100
130
|
for (let { group: e, strip: r } of t) {
|
|
101
131
|
if (!r || e.panels.length < 2) continue;
|
|
@@ -110,16 +140,16 @@ function s(e, t) {
|
|
|
110
140
|
t.querySelector(":scope > nve-workspace-panel-header")?._bindScroll(e?.source, e?.extent ?? 0);
|
|
111
141
|
}
|
|
112
142
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
143
|
+
function d(e, t, n) {
|
|
144
|
+
n.panels.forEach((e) => {
|
|
115
145
|
e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby");
|
|
116
|
-
}), t.forEach((t) => t.panels.forEach((
|
|
117
|
-
if (
|
|
118
|
-
let a = e.shadowRoot?.querySelector(`[data-panel="${CSS.escape(
|
|
119
|
-
|
|
146
|
+
}), t.forEach((t) => t.panels.forEach((r) => {
|
|
147
|
+
if (n.carried(r.id)) return;
|
|
148
|
+
let a = e.shadowRoot?.querySelector(`[data-panel="${CSS.escape(r.id)}"]`), o = i(r);
|
|
149
|
+
r.setAttribute("aria-label", o), t.tabbed && a?.localName === "nve-tabs-item" && (a.ariaControlsElements = [r], a.setAttribute("aria-label", o));
|
|
120
150
|
}));
|
|
121
151
|
}
|
|
122
|
-
function
|
|
152
|
+
function f(e) {
|
|
123
153
|
let t = e.shadowRoot?.activeElement;
|
|
124
154
|
if (!t || !(t instanceof HTMLElement) || !t.closest(".tabs")) return;
|
|
125
155
|
let n = t.dataset.panel ?? t.dataset.close ?? t.dataset.dragGroup;
|
|
@@ -130,17 +160,17 @@ function l(e) {
|
|
|
130
160
|
members: [...t.closest(".tabs")?.querySelectorAll("[data-panel]") ?? []].map((e) => e.dataset.panel)
|
|
131
161
|
};
|
|
132
162
|
}
|
|
133
|
-
function
|
|
134
|
-
if (!
|
|
135
|
-
let i =
|
|
163
|
+
function p(e, t, n) {
|
|
164
|
+
if (!n || !m(e, n)) return;
|
|
165
|
+
let i = t.find((e) => e.panels.some((e) => e.id === n.id)) ?? t.find((e) => e.panels.some((e) => n.members.includes(e.id)));
|
|
136
166
|
if (!i) return;
|
|
137
|
-
let a = i.panels.some((e) => e.id ===
|
|
138
|
-
o ? o.focus({ preventScroll: !0 }) :
|
|
167
|
+
let a = i.panels.some((e) => e.id === n.id) ? n.id : i.active, o = n.close && a === n.id ? e.shadowRoot?.querySelector(`[data-close="${CSS.escape(a)}"]`) : void 0;
|
|
168
|
+
o ? o.focus({ preventScroll: !0 }) : r(e, {
|
|
139
169
|
id: a,
|
|
140
170
|
preserveScroll: !0
|
|
141
171
|
});
|
|
142
172
|
}
|
|
143
|
-
function
|
|
173
|
+
function m(t, n) {
|
|
144
174
|
if (n.element.isConnected && !n.element.closest("[inert]")) return !1;
|
|
145
175
|
let r = e(t.ownerDocument);
|
|
146
176
|
return !r || [
|
|
@@ -149,7 +179,7 @@ function d(t, n) {
|
|
|
149
179
|
n.element
|
|
150
180
|
].some((e) => e === r) ? !0 : !(r.isConnected && !r.closest("[inert]"));
|
|
151
181
|
}
|
|
152
|
-
function
|
|
182
|
+
function h(e) {
|
|
153
183
|
let t = [];
|
|
154
184
|
for (let n of e.shadowRoot?.querySelectorAll(".group-chrome") ?? []) {
|
|
155
185
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -164,6 +194,6 @@ function f(e) {
|
|
|
164
194
|
}
|
|
165
195
|
return t;
|
|
166
196
|
}
|
|
167
|
-
export {
|
|
197
|
+
export { c as WorkspaceCompositionController };
|
|
168
198
|
|
|
169
199
|
//# sourceMappingURL=workspace-composition.controller.js.map
|