@nvidia-elements/core 2.23.3 → 2.23.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/accordion/accordion2.js +49 -49
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/alert/alert-group2.js +22 -21
- package/dist/alert/alert-group2.js.map +1 -1
- package/dist/alert/alert2.js +29 -28
- package/dist/alert/alert2.js.map +1 -1
- package/dist/avatar/avatar-group2.js +9 -9
- package/dist/avatar/avatar-group2.js.map +1 -1
- package/dist/avatar/avatar2.js +12 -11
- package/dist/avatar/avatar2.js.map +1 -1
- package/dist/badge/badge2.js +27 -26
- package/dist/badge/badge2.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +17 -17
- package/dist/breadcrumb/breadcrumb2.js.map +1 -1
- package/dist/bundles/index.js +6 -6
- package/dist/button/button2.js +12 -12
- package/dist/button/button2.js.map +1 -1
- package/dist/button-group/button-group2.js +18 -18
- package/dist/button-group/button-group2.js.map +1 -1
- package/dist/card/card2.js +28 -28
- package/dist/card/card2.js.map +1 -1
- package/dist/chat-message/chat-message2.js +15 -14
- package/dist/chat-message/chat-message2.js.map +1 -1
- package/dist/checkbox/checkbox-group2.js +8 -8
- package/dist/checkbox/checkbox-group2.js.map +1 -1
- package/dist/checkbox/checkbox2.js +8 -8
- package/dist/checkbox/checkbox2.js.map +1 -1
- package/dist/color/color2.js +21 -21
- package/dist/color/color2.js.map +1 -1
- package/dist/combobox/combobox2.js +37 -37
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/copy-button/copy-button.d.ts +1 -1
- package/dist/copy-button/copy-button2.js +21 -21
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/custom-elements.json +0 -76
- package/dist/data.snippets.json +27 -27
- package/dist/date/date2.js +19 -19
- package/dist/date/date2.js.map +1 -1
- package/dist/datetime/datetime2.js +19 -19
- package/dist/datetime/datetime2.js.map +1 -1
- package/dist/dialog/dialog-footer2.js +7 -7
- package/dist/dialog/dialog-footer2.js.map +1 -1
- package/dist/dialog/dialog-header2.js +7 -7
- package/dist/dialog/dialog-header2.js.map +1 -1
- package/dist/dialog/dialog.js +1 -1
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/dialog/dialog2.js +25 -25
- package/dist/dialog/dialog2.js.map +1 -1
- package/dist/divider/divider2.js +12 -12
- package/dist/divider/divider2.js.map +1 -1
- package/dist/dot/dot2.js +17 -16
- package/dist/dot/dot2.js.map +1 -1
- package/dist/drag-handle/drag-handle2.js +12 -12
- package/dist/drag-handle/drag-handle2.js.map +1 -1
- package/dist/drawer/drawer-content2.js +7 -7
- package/dist/drawer/drawer-content2.js.map +1 -1
- package/dist/drawer/drawer-footer2.js +7 -7
- package/dist/drawer/drawer-footer2.js.map +1 -1
- package/dist/drawer/drawer-header2.js +7 -7
- package/dist/drawer/drawer-header2.js.map +1 -1
- package/dist/drawer/drawer.js +1 -1
- package/dist/drawer/drawer.js.map +1 -1
- package/dist/drawer/drawer2.js +21 -21
- package/dist/drawer/drawer2.js.map +1 -1
- package/dist/dropdown/dropdown-footer2.js +7 -7
- package/dist/dropdown/dropdown-footer2.js.map +1 -1
- package/dist/dropdown/dropdown-header2.js +7 -7
- package/dist/dropdown/dropdown-header2.js.map +1 -1
- package/dist/dropdown/dropdown2.js +21 -21
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/dropdown-group.js +10 -10
- package/dist/dropdown-group/dropdown-group.js.map +1 -1
- package/dist/dropzone/dropzone2.js +19 -19
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +8 -8
- package/dist/file/file2.js.map +1 -1
- package/dist/format-bytes/format-bytes2.js +13 -13
- package/dist/format-bytes/format-bytes2.js.map +1 -1
- package/dist/format-datetime/format-datetime2.js +14 -14
- package/dist/format-datetime/format-datetime2.js.map +1 -1
- package/dist/format-number/format-number2.js +20 -20
- package/dist/format-number/format-number2.js.map +1 -1
- package/dist/format-relative-time/format-relative-time2.js +11 -11
- package/dist/format-relative-time/format-relative-time2.js.map +1 -1
- package/dist/format-truncate/format-truncate2.js +21 -21
- package/dist/format-truncate/format-truncate2.js.map +1 -1
- package/dist/forms/control/control2.js +30 -29
- package/dist/forms/control/control2.js.map +1 -1
- package/dist/forms/control-group/control-group2.js +19 -18
- package/dist/forms/control-group/control-group2.js.map +1 -1
- package/dist/forms/control-message/control-message2.js +15 -15
- package/dist/forms/control-message/control-message2.js.map +1 -1
- package/dist/gauge/gauge2.js +20 -20
- package/dist/gauge/gauge2.js.map +1 -1
- package/dist/ghost/ghost2.js +10 -10
- package/dist/ghost/ghost2.js.map +1 -1
- package/dist/grid/cell/cell2.js +9 -9
- package/dist/grid/cell/cell2.js.map +1 -1
- package/dist/grid/column/column2.js +16 -16
- package/dist/grid/column/column2.js.map +1 -1
- package/dist/grid/footer/footer2.js +12 -12
- package/dist/grid/footer/footer2.js.map +1 -1
- package/dist/grid/grid2.js +30 -30
- package/dist/grid/grid2.js.map +1 -1
- package/dist/grid/header/header2.js +20 -20
- package/dist/grid/header/header2.js.map +1 -1
- package/dist/grid/placeholder/placeholder2.js +9 -9
- package/dist/grid/placeholder/placeholder2.js.map +1 -1
- package/dist/grid/row/row2.js +15 -15
- package/dist/grid/row/row2.js.map +1 -1
- package/dist/icon/icon2.js +40 -40
- package/dist/icon/icon2.js.map +1 -1
- package/dist/icon-button/icon-button2.js +17 -17
- package/dist/icon-button/icon-button2.js.map +1 -1
- package/dist/iframe/iframe2.js +7 -7
- package/dist/iframe/iframe2.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/input/input-group2.js +8 -8
- package/dist/input/input-group2.js.map +1 -1
- package/dist/input/input2.js +10 -10
- package/dist/input/input2.js.map +1 -1
- package/dist/internal/controllers/state-expanded.controller.js +1 -1
- package/dist/internal/controllers/state-expanded.controller.js.map +1 -1
- package/dist/internal/controllers/state-highlighted.controller.js +1 -1
- package/dist/internal/controllers/state-highlighted.controller.js.map +1 -1
- package/dist/internal/controllers/state-scroll.controller.js +1 -1
- package/dist/internal/controllers/state-scroll.controller.js.map +1 -1
- package/dist/internal/controllers/state-selected.controller.js +1 -1
- package/dist/internal/controllers/state-selected.controller.js.map +1 -1
- package/dist/internal/controllers/type-anchor.controller.js +1 -1
- package/dist/internal/controllers/type-anchor.controller.js.map +1 -1
- package/dist/internal/controllers/type-closable.controller.js +1 -1
- package/dist/internal/controllers/type-closable.controller.js.map +1 -1
- package/dist/internal/controllers/type-expandable.controller.js +1 -1
- package/dist/internal/controllers/type-expandable.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.controller.js +6 -6
- package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
- package/dist/internal/controllers/type-popover.controller.examples.js.map +1 -1
- package/dist/internal/controllers/type-selectable.controller.js +1 -1
- package/dist/internal/controllers/type-selectable.controller.js.map +1 -1
- package/dist/internal/index.d.ts +0 -1
- package/dist/internal/index.js +57 -61
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/styles/index.d.ts +0 -1
- package/dist/internal/styles/index.js +5 -15
- package/dist/internal/styles/index.js.map +1 -1
- package/dist/internal/utils/a11y.d.ts +0 -3
- package/dist/internal/utils/a11y.js +6 -9
- package/dist/internal/utils/a11y.js.map +1 -1
- package/dist/joystick/joystick2.js +19 -19
- package/dist/joystick/joystick2.js.map +1 -1
- package/dist/logo/logo2.js +14 -13
- package/dist/logo/logo2.js.map +1 -1
- package/dist/menu/menu-group2.js +20 -20
- package/dist/menu/menu-group2.js.map +1 -1
- package/dist/menu/menu-item2.js +11 -11
- package/dist/menu/menu-item2.js.map +1 -1
- package/dist/menu/menu2.js +14 -14
- package/dist/menu/menu2.js.map +1 -1
- package/dist/month/month2.js +19 -19
- package/dist/month/month2.js.map +1 -1
- package/dist/notification/notification-group2.js +13 -13
- package/dist/notification/notification-group2.js.map +1 -1
- package/dist/notification/notification2.js +31 -31
- package/dist/notification/notification2.js.map +1 -1
- package/dist/page/page-panel/page-panel-content2.js +7 -7
- package/dist/page/page-panel/page-panel-content2.js.map +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +9 -9
- package/dist/page/page-panel/page-panel-footer2.js.map +1 -1
- package/dist/page/page-panel/page-panel-header2.js +9 -9
- package/dist/page/page-panel/page-panel-header2.js.map +1 -1
- package/dist/page/page-panel/page-panel2.js +15 -15
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page2.js +13 -13
- package/dist/page/page2.js.map +1 -1
- package/dist/page-header/page-header2.js +10 -10
- package/dist/page-header/page-header2.js.map +1 -1
- package/dist/page-loader/page-loader2.js +13 -13
- package/dist/page-loader/page-loader2.js.map +1 -1
- package/dist/pagination/pagination2.js +34 -34
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel2.js +36 -36
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/password2.js +19 -19
- package/dist/password/password2.js.map +1 -1
- package/dist/preferences-input/preferences-input.d.ts +1 -1
- package/dist/preferences-input/preferences-input2.js +25 -25
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar2.js +13 -13
- package/dist/progress-bar/progress-bar2.js.map +1 -1
- package/dist/progress-dot/progress-dot2.js +15 -15
- package/dist/progress-dot/progress-dot2.js.map +1 -1
- package/dist/progress-ring/progress-ring2.js +20 -20
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +28 -28
- package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +1 -1
- package/dist/pulse/pulse2.js +15 -15
- package/dist/pulse/pulse2.js.map +1 -1
- package/dist/radio/radio-group2.js +8 -8
- package/dist/radio/radio-group2.js.map +1 -1
- package/dist/radio/radio2.js +8 -8
- package/dist/radio/radio2.js.map +1 -1
- package/dist/range/range2.js +16 -16
- package/dist/range/range2.js.map +1 -1
- package/dist/resize-handle/resize-handle2.js +17 -17
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/search2.js +20 -20
- package/dist/search/search2.js.map +1 -1
- package/dist/select/select2.js +32 -32
- package/dist/select/select2.js.map +1 -1
- package/dist/skeleton/skeleton2.js +14 -14
- package/dist/skeleton/skeleton2.js.map +1 -1
- package/dist/sort-button/sort-button.d.ts +1 -1
- package/dist/sort-button/sort-button2.js +16 -16
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/sparkline2.js +45 -44
- package/dist/sparkline/sparkline2.js.map +1 -1
- package/dist/star-rating/star-rating2.js +14 -14
- package/dist/star-rating/star-rating2.js.map +1 -1
- package/dist/steps/steps2.js +32 -32
- package/dist/steps/steps2.js.map +1 -1
- package/dist/switch/switch-group2.js +8 -8
- package/dist/switch/switch-group2.js.map +1 -1
- package/dist/switch/switch2.js +8 -8
- package/dist/switch/switch2.js.map +1 -1
- package/dist/tabs/tabs-group2.js +18 -18
- package/dist/tabs/tabs-group2.js.map +1 -1
- package/dist/tabs/tabs-item-group2.js +9 -9
- package/dist/tabs/tabs-item-group2.js.map +1 -1
- package/dist/tabs/tabs2.js +28 -28
- package/dist/tabs/tabs2.js.map +1 -1
- package/dist/tag/tag2.js +19 -18
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +9 -9
- package/dist/textarea/textarea2.js.map +1 -1
- package/dist/time/time2.js +19 -19
- package/dist/time/time2.js.map +1 -1
- package/dist/toast/toast2.js +28 -28
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/toggletip-footer2.js +7 -7
- package/dist/toggletip/toggletip-footer2.js.map +1 -1
- package/dist/toggletip/toggletip-header2.js +7 -7
- package/dist/toggletip/toggletip-header2.js.map +1 -1
- package/dist/toggletip/toggletip2.js +23 -23
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/toolbar2.js +20 -19
- package/dist/toolbar/toolbar2.js.map +1 -1
- package/dist/tooltip/tooltip2.js +20 -20
- package/dist/tooltip/tooltip2.js.map +1 -1
- package/dist/tree/tree-node2.js +39 -39
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree2.js +20 -20
- package/dist/tree/tree2.js.map +1 -1
- package/dist/week/week2.js +19 -19
- package/dist/week/week2.js.map +1 -1
- package/dist/workspace/panel/panel2.js +14 -14
- package/dist/workspace/panel/panel2.js.map +1 -1
- package/dist/workspace/panel-content/panel-content2.js +7 -7
- package/dist/workspace/panel-content/panel-content2.js.map +1 -1
- package/dist/workspace/panel-footer/panel-footer2.js +9 -9
- package/dist/workspace/panel-footer/panel-footer2.js.map +1 -1
- package/dist/workspace/panel-header/panel-header2.js +16 -16
- package/dist/workspace/panel-header/panel-header2.js.map +1 -1
- package/dist/workspace/workspace2.js +97 -97
- package/dist/workspace/workspace2.js.map +1 -1
- package/package.json +2 -2
- package/dist/internal/decorators/scoped-registry.d.ts +0 -2
- package/dist/internal/decorators/scoped-registry.js +0 -36
- package/dist/internal/decorators/scoped-registry.js.map +0 -1
- package/dist/internal/styles/base.js +0 -5
- package/dist/internal/styles/base.js.map +0 -1
- package/dist/internal/styles/interaction-state.js +0 -5
- package/dist/internal/styles/interaction-state.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-footer2.js","names":["styles","_decorate","__decorate","panel_footer_default","WorkspacePanelFooter","LitElement","_args","useStyles","hostAttr"],"sources":["../../../src/workspace/panel-footer/panel-footer.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\n\nimport { hostAttr
|
|
1
|
+
{"version":3,"file":"panel-footer2.js","names":["styles","_decorate","__decorate","panel_footer_default","WorkspacePanelFooter","LitElement","_args","useStyles","hostAttr"],"sources":["../../../src/workspace/panel-footer/panel-footer.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\n\nimport { hostAttr } from '@nvidia-elements/core/internal';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\n\nimport styles from './panel-footer.css?inline';\n\n/**\n * @element nve-workspace-panel-footer\n * @description Provides workspace panel status and actions outside the scrolling body.\n * @documentation https://nvidia.github.io/elements/docs/elements/workspace/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/workspace\n * @slot - Status and actions.\n * @cssprop --padding\n * @cssprop --border-top\n * @cssprop --gap\n */\nexport class WorkspacePanelFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = { tag: 'nve-workspace-panel-footer', version: '0.0.0', parents: ['nve-workspace-panel'] };\n\n /** @private */\n @hostAttr() slot = 'footer';\n\n render() {\n return html`\n <div internal-host><slot></slot></div>\n `;\n }\n}\n"],"mappings":";;;;;;AAsBA,IAAaI,IAAb,cAA0CC,EAAW;;EAMhC,A,aAAA,KAAA,OAAA;;;EALH,KAAA,SAAAE,EAAU,CAACP,CAAM,CAAC;;;EAEP,KAAA,WAAA;GAAE,KAAK;GAA8B,SAAS;GAAS,SAAS,CAAC,qBAAqB;EAAE;;CAKnH,SAAS;EACP,OAAO,CAAI;CAGb;AACF;AAPGC,EAAA,CAAAO,EAAS,CAAA,GAAAJ,EAAA,WAAA,QAAA,KAAA,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import r from "
|
|
5
|
-
import {
|
|
6
|
-
import a from "
|
|
7
|
-
import {
|
|
1
|
+
import { hostAttr as e } from "../../internal/decorators/host-attr.js";
|
|
2
|
+
import t from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
3
|
+
import { sameHeaderConfiguration as n } from "../utils/presentation/header-configuration.utils.js";
|
|
4
|
+
import r from "./panel-header.js";
|
|
5
|
+
import { attachInternals as i } from "@nvidia-elements/foundations/internal/a11y";
|
|
6
|
+
import { LitElement as a, html as o, isServer as s } from "lit";
|
|
7
|
+
import { useStyles as c } from "@nvidia-elements/foundations/internal/styles";
|
|
8
8
|
import { state as l } from "lit/decorators/state.js";
|
|
9
9
|
// src/workspace/panel-header/panel-header.ts
|
|
10
|
-
var u = class extends
|
|
10
|
+
var u = class extends a {
|
|
11
11
|
constructor(...e) {
|
|
12
12
|
super(...e), this.slot = "header", this.configuration = {
|
|
13
13
|
selected: !1,
|
|
@@ -21,12 +21,12 @@ var u = class extends o {
|
|
|
21
21
|
}, this.#t = 0;
|
|
22
22
|
}
|
|
23
23
|
static {
|
|
24
|
-
this.styles =
|
|
24
|
+
this.styles = c([r]);
|
|
25
25
|
}
|
|
26
26
|
static {
|
|
27
27
|
this.metadata = {
|
|
28
28
|
tag: "nve-workspace-panel-header",
|
|
29
|
-
version: "2.23.
|
|
29
|
+
version: "2.23.5",
|
|
30
30
|
parents: ["nve-workspace-panel"]
|
|
31
31
|
};
|
|
32
32
|
}
|
|
@@ -34,7 +34,7 @@ var u = class extends o {
|
|
|
34
34
|
#t;
|
|
35
35
|
#n;
|
|
36
36
|
connectedCallback() {
|
|
37
|
-
super.connectedCallback(),
|
|
37
|
+
super.connectedCallback(), i(this);
|
|
38
38
|
}
|
|
39
39
|
disconnectedCallback() {
|
|
40
40
|
super.disconnectedCallback(), this._bindScroll(void 0, 0);
|
|
@@ -43,8 +43,8 @@ var u = class extends o {
|
|
|
43
43
|
this.#i();
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
let { selected: e, offset: t, animate: n, tabWidth: r, headerHeight: i, suffixEnd: a, clipLeft:
|
|
47
|
-
return
|
|
46
|
+
let { selected: e, offset: t, animate: n, tabWidth: r, headerHeight: i, suffixEnd: a, clipLeft: c, clipWidth: l } = this.configuration;
|
|
47
|
+
return o`<div internal-host><div class="label-viewport" aria-hidden="true" style="${`left:${c}px;width:${l}px;height:${i}px`}"><div class="label-track"><div class="label" ?data-animate="${n}" style="${`left:${t - c}px;width:${r}px;height:${i}px`}"><span class="label-content"><slot name="prefix" ?data-empty="${!s && !this.querySelector(":scope > [slot=\"prefix\"]")}" @slotchange="${() => this.requestUpdate()}"></slot><span class="title-content"><slot @slotchange="${() => this.requestUpdate()}"></slot>${this.#a() ? null : this.parentElement?.id}</span></span></div></div></div>${e ? o`<div class="separator" style="${`top:${i}px`}" aria-hidden="true"></div>` : null}<div class="suffix" ?data-group-actions="${a > 0}" style="${`height:${i}px;right:${a}px`}" aria-hidden="${!e}" ?inert="${!e}" ?data-inactive="${!e}" ?data-empty="${!s && !this.querySelector(":scope > [slot=\"suffix\"]")}"><div class="suffix-content"><slot name="suffix" @slotchange="${() => this.requestUpdate()}"></slot></div></div></div>`;
|
|
48
48
|
}
|
|
49
49
|
_getMeasurementTargets() {
|
|
50
50
|
return {
|
|
@@ -64,7 +64,7 @@ var u = class extends o {
|
|
|
64
64
|
e ? this._internals.states.add("tab-hover") : this._internals.states.delete("tab-hover");
|
|
65
65
|
}
|
|
66
66
|
_configure({ scrollLeft: e, ...t }) {
|
|
67
|
-
this._scroll(e), !
|
|
67
|
+
this._scroll(e), !n(this.configuration, t) && (t.selected ? this._internals.states.add("selected") : this._internals.states.delete("selected"), this.configuration = t);
|
|
68
68
|
}
|
|
69
69
|
_scroll(e) {
|
|
70
70
|
this.#n || this.style.setProperty("--_workspace-tab-scroll", `${-e}px`);
|
|
@@ -90,10 +90,10 @@ var u = class extends o {
|
|
|
90
90
|
}));
|
|
91
91
|
}
|
|
92
92
|
#a() {
|
|
93
|
-
return
|
|
93
|
+
return s ? !0 : [...this.childNodes].some((e) => (!(e instanceof Element) || !e.hasAttribute("slot")) && !!e.textContent?.trim());
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
|
|
96
|
+
t([e()], u.prototype, "slot", void 0), t([l()], u.prototype, "configuration", void 0);
|
|
97
97
|
function d(e) {
|
|
98
98
|
return [{ transform: "translateX(0px)" }, { transform: `translateX(${-e}px)` }];
|
|
99
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-header2.js","names":["styles","_decorate","__decorate","panel_header_default","WorkspacePanelHeader","LitElement","_args","#scrollExtent","useStyles","attachInternals","#bindScrollAnimation","clipLeft","clipWidth","headerHeight","animate","offset","tabWidth","isServer","#hasTitle","selected","suffixEnd","hovered","configuration","scrollLeft","#scrollAnimation","source","#scrollSource","extent","#updateScrollExtent","effect","scrollKeyframes","track","node","hostAttr","state"],"sources":["../../../src/workspace/panel-header/panel-header.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\nimport { state } from 'lit/decorators/state.js';\n\nimport { attachInternals, hostAttr, useStyles } from '@nvidia-elements/core/internal';\n\nimport { sameHeaderConfiguration } from '../utils/presentation/header-configuration.utils.js';\n\nimport type { WorkspaceHeaderConfiguration } from '../utils/presentation/header-configuration.utils.js';\n\nimport styles from './panel-header.css?inline';\n\n/**\n * @element nve-workspace-panel-header\n * @description Supplies a workspace panel title, decoration, and application controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/workspace/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/workspace\n * @slot - Noninteractive panel title.\n * @slot prefix - Noninteractive title decoration.\n * @slot suffix - Application controls for the selected panel.\n * @cssprop --min-height\n * @cssprop --padding - Padding around the title.\n * @cssprop --prefix-padding - Padding around title decoration.\n * @cssprop --prefix-border - Border after title decoration.\n * @cssprop --suffix-padding - Override the shared inset around header controls.\n * @cssprop --suffix-border - Border before header controls.\n * @cssprop --gap\n * @cssprop --border-bottom\n */\nexport class WorkspacePanelHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = { tag: 'nve-workspace-panel-header', version: '0.0.0', parents: ['nve-workspace-panel'] };\n\n /** @private */\n @hostAttr() slot = 'header';\n\n /** @private */\n declare _internals: ElementInternals;\n\n @state() private configuration: WorkspaceHeaderConfiguration = {\n selected: false,\n offset: 0,\n animate: false,\n tabWidth: 0,\n headerHeight: 0,\n suffixEnd: 0,\n clipLeft: 0,\n clipWidth: 0\n };\n\n #scrollSource?: HTMLElement;\n #scrollExtent = 0;\n #scrollAnimation?: Animation;\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._bindScroll(undefined, 0);\n }\n\n protected updated() {\n this.#bindScrollAnimation();\n }\n\n render() {\n const { selected, offset, animate, tabWidth, headerHeight, suffixEnd, clipLeft, clipWidth } = this.configuration;\n return html`\n <div internal-host>\n <div\n class=\"label-viewport\"\n aria-hidden=\"true\"\n style=${`left:${clipLeft}px;width:${clipWidth}px;height:${headerHeight}px`}>\n <div class=\"label-track\">\n <div\n class=\"label\"\n ?data-animate=${animate}\n style=${`left:${offset - clipLeft}px;width:${tabWidth}px;height:${headerHeight}px`}>\n <span class=\"label-content\">\n <slot\n name=\"prefix\"\n ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"prefix\"]')}\n @slotchange=${() => this.requestUpdate()}></slot>\n <span class=\"title-content\"><slot @slotchange=${() => this.requestUpdate()}></slot>${this.#hasTitle() ? null : this.parentElement?.id}</span>\n </span>\n </div>\n </div>\n </div>\n ${\n selected\n ? html`\n <div class=\"separator\" style=${`top:${headerHeight}px`} aria-hidden=\"true\"></div>\n `\n : null\n }\n <div\n class=\"suffix\"\n ?data-group-actions=${suffixEnd > 0}\n style=${`height:${headerHeight}px;right:${suffixEnd}px`}\n aria-hidden=${!selected}\n ?inert=${!selected}\n ?data-inactive=${!selected}\n ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"suffix\"]')}>\n <div class=\"suffix-content\"><slot name=\"suffix\" @slotchange=${() => this.requestUpdate()}></slot></div>\n </div>\n </div>\n `;\n }\n\n /** @internal */\n _getMeasurementTargets() {\n return {\n label: this.shadowRoot?.querySelector<HTMLElement>('.label-content') ?? null,\n suffix: this.shadowRoot?.querySelector<HTMLElement>('.suffix-content') ?? null\n };\n }\n\n /** @internal */\n _getTransitionTargets() {\n return {\n labelViewport: this.shadowRoot?.querySelector<HTMLElement>('.label-viewport') ?? null,\n labelTrack: this.shadowRoot?.querySelector<HTMLElement>('.label-track') ?? null,\n label: this.shadowRoot?.querySelector<HTMLElement>('.label') ?? null,\n suffix: this.shadowRoot?.querySelector<HTMLElement>('.suffix') ?? null\n };\n }\n\n /** @internal */\n _hover(hovered: boolean) {\n if (hovered) this._internals.states.add('tab-hover');\n else this._internals.states.delete('tab-hover');\n }\n\n /** @internal */\n _configure({ scrollLeft, ...configuration }: WorkspaceHeaderConfiguration & { scrollLeft: number }) {\n this._scroll(scrollLeft);\n if (sameHeaderConfiguration(this.configuration, configuration)) return;\n if (configuration.selected) this._internals.states.add('selected');\n else this._internals.states.delete('selected');\n this.configuration = configuration;\n }\n\n /** @internal */\n _scroll(scrollLeft: number) {\n // ScrollTimeline fallback; remove after wider adoption of Firefox 159.\n if (!this.#scrollAnimation) this.style.setProperty('--_workspace-tab-scroll', `${-scrollLeft}px`);\n }\n\n /** @internal */\n _bindScroll(source: HTMLElement | undefined, extent: number) {\n if (source === this.#scrollSource && extent === this.#scrollExtent) return;\n if (this.#updateScrollExtent(source, extent)) return;\n this.#scrollAnimation?.cancel();\n this.#scrollAnimation = undefined;\n this.#scrollSource = source;\n this.#scrollExtent = extent;\n this.#bindScrollAnimation();\n if (!this.#scrollAnimation) this._scroll(source?.scrollLeft ?? 0);\n }\n\n #updateScrollExtent(source: HTMLElement | undefined, extent: number) {\n if (source !== this.#scrollSource || extent <= 0) return false;\n const effect = this.#scrollAnimation?.effect;\n if (!(effect instanceof KeyframeEffect)) return false;\n this.#scrollExtent = extent;\n effect.setKeyframes(scrollKeyframes(extent));\n return true;\n }\n\n #bindScrollAnimation() {\n if (\n this.#scrollAnimation ||\n !this.#scrollSource ||\n this.#scrollExtent <= 0 ||\n typeof ScrollTimeline === 'undefined'\n )\n return;\n const track = this.shadowRoot?.querySelector<HTMLElement>('.label-track');\n if (!track) return;\n this.#scrollAnimation = track.animate(scrollKeyframes(this.#scrollExtent), {\n timeline: new ScrollTimeline({ source: this.#scrollSource, axis: 'x' }),\n fill: 'both',\n easing: 'linear'\n });\n }\n\n #hasTitle() {\n if (isServer) return true;\n return [...this.childNodes].some(\n node => (!(node instanceof Element) || !node.hasAttribute('slot')) && !!node.textContent?.trim()\n );\n }\n}\n\nfunction scrollKeyframes(extent: number) {\n return [{ transform: 'translateX(0px)' }, { transform: `translateX(${-extent}px)` }];\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAaI,IAAb,cAA0CC,EAAW;;EAuBnC,A,aAjBG,KAAA,OAAA,UAK4C,KAAA,gBAAA;GAC7D,UAAU;GACV,QAAQ;GACR,SAAS;GACT,UAAU;GACV,cAAc;GACd,WAAW;GACX,UAAU;GACV,WAAW;EACb,GAGgB,KAAAE,KAAA;;;EAtBA,KAAA,SAAAC,EAAU,CAACR,CAAM,CAAC;;;EAEP,KAAA,WAAA;GAAE,KAAK;GAA8B,SAAS;GAAS,SAAS,CAAC,qBAAqB;EAAE;;CAmBnH;CACA;CACA;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxBS,EAAgB,IAAI;CACtB;CAEA,uBAAuB;EAErB,AADA,MAAM,qBAAqB,GAC3B,KAAK,YAAY,KAAA,GAAW,CAAC;CAC/B;CAEA,UAAoB;EAClB,KAAKC,GAAqB;CAC5B;CAEA,SAAS;EACP,IAAM,EAAE,aAAU,WAAQ,YAAS,aAAU,iBAAc,cAAW,aAAU,iBAAc,KAAK;EACnG,OAAO,CAAI,4EAKG,QAAQC,EAAS,WAAWC,EAAU,YAAYC,EAAa,IAAI,+DAIvDC,EAAQ,WAChB,QAAQC,IAASJ,EAAS,WAAWK,EAAS,YAAYH,EAAa,IAAI,iEAIjE,CAACI,KAAY,CAAC,KAAK,cAAc,4BAA0B,EAAE,uBACvD,KAAK,cAAc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","WorkspacePanelHeader","LitElement","_args","#scrollExtent","useStyles","attachInternals","#bindScrollAnimation","clipLeft","clipWidth","headerHeight","animate","offset","tabWidth","isServer","#hasTitle","selected","suffixEnd","hovered","configuration","scrollLeft","#scrollAnimation","source","#scrollSource","extent","#updateScrollExtent","effect","scrollKeyframes","track","node","hostAttr","state"],"sources":["../../../src/workspace/panel-header/panel-header.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\nimport { state } from 'lit/decorators/state.js';\n\nimport { hostAttr } from '@nvidia-elements/core/internal';\nimport { attachInternals } from '@nvidia-elements/foundations/internal/a11y';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\n\nimport { sameHeaderConfiguration } from '../utils/presentation/header-configuration.utils.js';\n\nimport type { WorkspaceHeaderConfiguration } from '../utils/presentation/header-configuration.utils.js';\n\nimport styles from './panel-header.css?inline';\n\n/**\n * @element nve-workspace-panel-header\n * @description Supplies a workspace panel title, decoration, and application controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/workspace/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/workspace\n * @slot - Noninteractive panel title.\n * @slot prefix - Noninteractive title decoration.\n * @slot suffix - Application controls for the selected panel.\n * @cssprop --min-height\n * @cssprop --padding - Padding around the title.\n * @cssprop --prefix-padding - Padding around title decoration.\n * @cssprop --prefix-border - Border after title decoration.\n * @cssprop --suffix-padding - Override the shared inset around header controls.\n * @cssprop --suffix-border - Border before header controls.\n * @cssprop --gap\n * @cssprop --border-bottom\n */\nexport class WorkspacePanelHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = { tag: 'nve-workspace-panel-header', version: '0.0.0', parents: ['nve-workspace-panel'] };\n\n /** @private */\n @hostAttr() slot = 'header';\n\n /** @private */\n declare _internals: ElementInternals;\n\n @state() private configuration: WorkspaceHeaderConfiguration = {\n selected: false,\n offset: 0,\n animate: false,\n tabWidth: 0,\n headerHeight: 0,\n suffixEnd: 0,\n clipLeft: 0,\n clipWidth: 0\n };\n\n #scrollSource?: HTMLElement;\n #scrollExtent = 0;\n #scrollAnimation?: Animation;\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._bindScroll(undefined, 0);\n }\n\n protected updated() {\n this.#bindScrollAnimation();\n }\n\n render() {\n const { selected, offset, animate, tabWidth, headerHeight, suffixEnd, clipLeft, clipWidth } = this.configuration;\n return html`\n <div internal-host>\n <div\n class=\"label-viewport\"\n aria-hidden=\"true\"\n style=${`left:${clipLeft}px;width:${clipWidth}px;height:${headerHeight}px`}>\n <div class=\"label-track\">\n <div\n class=\"label\"\n ?data-animate=${animate}\n style=${`left:${offset - clipLeft}px;width:${tabWidth}px;height:${headerHeight}px`}>\n <span class=\"label-content\">\n <slot\n name=\"prefix\"\n ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"prefix\"]')}\n @slotchange=${() => this.requestUpdate()}></slot>\n <span class=\"title-content\"><slot @slotchange=${() => this.requestUpdate()}></slot>${this.#hasTitle() ? null : this.parentElement?.id}</span>\n </span>\n </div>\n </div>\n </div>\n ${\n selected\n ? html`\n <div class=\"separator\" style=${`top:${headerHeight}px`} aria-hidden=\"true\"></div>\n `\n : null\n }\n <div\n class=\"suffix\"\n ?data-group-actions=${suffixEnd > 0}\n style=${`height:${headerHeight}px;right:${suffixEnd}px`}\n aria-hidden=${!selected}\n ?inert=${!selected}\n ?data-inactive=${!selected}\n ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"suffix\"]')}>\n <div class=\"suffix-content\"><slot name=\"suffix\" @slotchange=${() => this.requestUpdate()}></slot></div>\n </div>\n </div>\n `;\n }\n\n /** @internal */\n _getMeasurementTargets() {\n return {\n label: this.shadowRoot?.querySelector<HTMLElement>('.label-content') ?? null,\n suffix: this.shadowRoot?.querySelector<HTMLElement>('.suffix-content') ?? null\n };\n }\n\n /** @internal */\n _getTransitionTargets() {\n return {\n labelViewport: this.shadowRoot?.querySelector<HTMLElement>('.label-viewport') ?? null,\n labelTrack: this.shadowRoot?.querySelector<HTMLElement>('.label-track') ?? null,\n label: this.shadowRoot?.querySelector<HTMLElement>('.label') ?? null,\n suffix: this.shadowRoot?.querySelector<HTMLElement>('.suffix') ?? null\n };\n }\n\n /** @internal */\n _hover(hovered: boolean) {\n if (hovered) this._internals.states.add('tab-hover');\n else this._internals.states.delete('tab-hover');\n }\n\n /** @internal */\n _configure({ scrollLeft, ...configuration }: WorkspaceHeaderConfiguration & { scrollLeft: number }) {\n this._scroll(scrollLeft);\n if (sameHeaderConfiguration(this.configuration, configuration)) return;\n if (configuration.selected) this._internals.states.add('selected');\n else this._internals.states.delete('selected');\n this.configuration = configuration;\n }\n\n /** @internal */\n _scroll(scrollLeft: number) {\n // ScrollTimeline fallback; remove after wider adoption of Firefox 159.\n if (!this.#scrollAnimation) this.style.setProperty('--_workspace-tab-scroll', `${-scrollLeft}px`);\n }\n\n /** @internal */\n _bindScroll(source: HTMLElement | undefined, extent: number) {\n if (source === this.#scrollSource && extent === this.#scrollExtent) return;\n if (this.#updateScrollExtent(source, extent)) return;\n this.#scrollAnimation?.cancel();\n this.#scrollAnimation = undefined;\n this.#scrollSource = source;\n this.#scrollExtent = extent;\n this.#bindScrollAnimation();\n if (!this.#scrollAnimation) this._scroll(source?.scrollLeft ?? 0);\n }\n\n #updateScrollExtent(source: HTMLElement | undefined, extent: number) {\n if (source !== this.#scrollSource || extent <= 0) return false;\n const effect = this.#scrollAnimation?.effect;\n if (!(effect instanceof KeyframeEffect)) return false;\n this.#scrollExtent = extent;\n effect.setKeyframes(scrollKeyframes(extent));\n return true;\n }\n\n #bindScrollAnimation() {\n if (\n this.#scrollAnimation ||\n !this.#scrollSource ||\n this.#scrollExtent <= 0 ||\n typeof ScrollTimeline === 'undefined'\n )\n return;\n const track = this.shadowRoot?.querySelector<HTMLElement>('.label-track');\n if (!track) return;\n this.#scrollAnimation = track.animate(scrollKeyframes(this.#scrollExtent), {\n timeline: new ScrollTimeline({ source: this.#scrollSource, axis: 'x' }),\n fill: 'both',\n easing: 'linear'\n });\n }\n\n #hasTitle() {\n if (isServer) return true;\n return [...this.childNodes].some(\n node => (!(node instanceof Element) || !node.hasAttribute('slot')) && !!node.textContent?.trim()\n );\n }\n}\n\nfunction scrollKeyframes(extent: number) {\n return [{ transform: 'translateX(0px)' }, { transform: `translateX(${-extent}px)` }];\n}\n"],"mappings":";;;;;;;;;AAmCA,IAAaI,IAAb,cAA0CC,EAAW;;EAuBnC,A,aAjBG,KAAA,OAAA,UAK4C,KAAA,gBAAA;GAC7D,UAAU;GACV,QAAQ;GACR,SAAS;GACT,UAAU;GACV,cAAc;GACd,WAAW;GACX,UAAU;GACV,WAAW;EACb,GAGgB,KAAAE,KAAA;;;EAtBA,KAAA,SAAAC,EAAU,CAACR,CAAM,CAAC;;;EAEP,KAAA,WAAA;GAAE,KAAK;GAA8B,SAAS;GAAS,SAAS,CAAC,qBAAqB;EAAE;;CAmBnH;CACA;CACA;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxBS,EAAgB,IAAI;CACtB;CAEA,uBAAuB;EAErB,AADA,MAAM,qBAAqB,GAC3B,KAAK,YAAY,KAAA,GAAW,CAAC;CAC/B;CAEA,UAAoB;EAClB,KAAKC,GAAqB;CAC5B;CAEA,SAAS;EACP,IAAM,EAAE,aAAU,WAAQ,YAAS,aAAU,iBAAc,cAAW,aAAU,iBAAc,KAAK;EACnG,OAAO,CAAI,4EAKG,QAAQC,EAAS,WAAWC,EAAU,YAAYC,EAAa,IAAI,+DAIvDC,EAAQ,WAChB,QAAQC,IAASJ,EAAS,WAAWK,EAAS,YAAYH,EAAa,IAAI,iEAIjE,CAACI,KAAY,CAAC,KAAK,cAAc,4BAA0B,EAAE,uBACvD,KAAK,cAAc,EAAE,gEACW,KAAK,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-
import
|
|
3
|
-
import {
|
|
4
|
-
import r from "../
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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 {
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
3
|
+
import { Icon as n } from "../icon/icon2.js";
|
|
4
|
+
import { DragHandle as r } from "../drag-handle/drag-handle2.js";
|
|
5
|
+
import { Ghost as i } from "../ghost/ghost2.js";
|
|
6
|
+
import { IconButton as a } from "../icon-button/icon-button2.js";
|
|
7
|
+
import { ResizeHandle as o } from "../resize-handle/resize-handle2.js";
|
|
8
|
+
import { Tabs as s, TabsItem as c } from "../tabs/tabs2.js";
|
|
9
|
+
import { TabsItemGroup as l } from "../tabs/tabs-item-group2.js";
|
|
10
|
+
import { parseWorkspaceValue as u, sameSerializedWorkspaceLayout as d, serializeWorkspaceValue as f } from "./utils/model/value.utils.js";
|
|
11
|
+
import { closePanel as p, findGroup as m, openPanel as h, projectLayout as g, reconcilePanels as _, selectPanel as v } from "./utils/model/operations.utils.js";
|
|
12
|
+
import { WorkspaceCommandController as y } from "./controllers/workspace-command.controller.js";
|
|
13
|
+
import { WorkspacePanel as b } from "./panel/panel2.js";
|
|
14
|
+
import { focusWorkspacePanel as x, getPanelLabel as S, isWorkspaceCompositionMutation as C, shouldFocusAfterWorkspaceClose as w } from "./utils/presentation/composition.utils.js";
|
|
15
|
+
import { getAllocatedTabWidth as T, preserveRecipientSelection as E } from "./utils/presentation/groups.utils.js";
|
|
16
|
+
import { WorkspaceCompositionController as D } from "./controllers/workspace-composition.controller.js";
|
|
17
|
+
import { WorkspaceFullscreenController as O } from "./controllers/workspace-fullscreen.controller.js";
|
|
18
|
+
import { WorkspaceMeasurementController as k } from "./controllers/workspace-measurement.controller.js";
|
|
19
|
+
import { allocateContextProxies as A, getContextKey as j } from "./utils/placement/context.utils.js";
|
|
20
|
+
import { getAdmissiblePlacementLayout as M } from "./utils/placement/preparation.utils.js";
|
|
21
|
+
import { WorkspaceRearrangeController as N } from "./controllers/workspace-rearrange.controller.js";
|
|
22
|
+
import { WorkspaceResizeController as P } from "./controllers/workspace-resize.controller.js";
|
|
23
|
+
import { WorkspaceRestorationController as F } from "./controllers/workspace-restoration.controller.js";
|
|
24
|
+
import { getRegionCornerStyle as I, shouldEmphasizeReservedDestination as L } from "./utils/presentation/preview.utils.js";
|
|
25
|
+
import { WorkspaceEvaluation as R } from "./utils/evaluation.utils.js";
|
|
26
|
+
import z from "./workspace.js";
|
|
27
|
+
import { LitElement as B, html as V, isServer as H, svg as U } from "lit";
|
|
28
|
+
import { property as W } from "lit/decorators/property.js";
|
|
29
|
+
import { I18nController as G } from "@nvidia-elements/foundations/internal/i18n";
|
|
30
|
+
import { ifDefined as K } from "lit/directives/if-defined.js";
|
|
31
|
+
import { repeat as q } from "lit/directives/repeat.js";
|
|
32
|
+
import { styleMap as J } from "lit/directives/style-map.js";
|
|
33
|
+
import { scopedRegistry as Y } from "@nvidia-elements/foundations/internal/decorators";
|
|
34
|
+
import { useStyles as X } from "@nvidia-elements/foundations/internal/styles";
|
|
35
35
|
// src/workspace/workspace.ts
|
|
36
36
|
var Z = {
|
|
37
37
|
close: "close",
|
|
38
38
|
move: "move",
|
|
39
39
|
enterFullscreen: "enter full screen",
|
|
40
40
|
exitFullscreen: "exit full screen"
|
|
41
|
-
}, Q = class extends
|
|
41
|
+
}, Q = class extends B {
|
|
42
42
|
constructor(...e) {
|
|
43
|
-
super(...e), this.#e = new
|
|
43
|
+
super(...e), this.#e = new G(this, Z), this.i18n = this.#e.i18n, this.resizable = !1, this.rearrangeable = !1, this.groupable = !1, this.fullscreenable = !1, this.detachThreshold = 48, this.closable = !1, this.resizePolicy = "stop", this.#n = "", this.#r = !1, this.#a = new F(this, {
|
|
44
44
|
getLayout: () => this.#t,
|
|
45
45
|
applyLayout: (e) => this.#A(e),
|
|
46
46
|
getTransitionTargets: () => this.#m.getTransitionTargets()
|
|
47
|
-
}), this.#o = new
|
|
47
|
+
}), this.#o = new y(this, {
|
|
48
48
|
getState: () => ({
|
|
49
49
|
panels: this.#y,
|
|
50
50
|
layout: this.#t
|
|
@@ -59,15 +59,15 @@ var Z = {
|
|
|
59
59
|
activatePanel: (e, t) => this.#P(e, t),
|
|
60
60
|
closePanel: (e) => this.#L(e),
|
|
61
61
|
placePanel: (e, t) => this.#I(e, t)
|
|
62
|
-
}), this.#s = new
|
|
63
|
-
getGroup: (e) =>
|
|
62
|
+
}), this.#s = new O(this, {
|
|
63
|
+
getGroup: (e) => m(this.#V(this.#v).root, e)?.panels ?? [],
|
|
64
64
|
cancelInteractions: () => {
|
|
65
65
|
this.#a.finish(), this.#c.cancel(), this.#f.cancel();
|
|
66
66
|
},
|
|
67
67
|
invalidateCommandAvailability: () => {
|
|
68
68
|
this.#o.invalidateAvailability(), this.#p.invalidate();
|
|
69
69
|
}
|
|
70
|
-
}), this.#c = new
|
|
70
|
+
}), this.#c = new N(this, {
|
|
71
71
|
evaluateWithContext: (e) => this.#B(e),
|
|
72
72
|
isRearrangementAllowed: () => !this.#s.active && !this.#a.active,
|
|
73
73
|
getLayout: () => this.#t,
|
|
@@ -92,7 +92,7 @@ var Z = {
|
|
|
92
92
|
tabMinWidth: 0,
|
|
93
93
|
width: 0,
|
|
94
94
|
height: 0
|
|
95
|
-
}, this.#f = new
|
|
95
|
+
}, this.#f = new P(this, {
|
|
96
96
|
isEnabled: () => this.#w,
|
|
97
97
|
getLayout: () => this.#t,
|
|
98
98
|
getBoundaries: () => this.#u,
|
|
@@ -105,12 +105,12 @@ var Z = {
|
|
|
105
105
|
}),
|
|
106
106
|
cancelForUser: () => this.#a.transition(() => this.#f.cancel()),
|
|
107
107
|
commitLayout: (e) => this.#M(e)
|
|
108
|
-
}), this.#p = new
|
|
108
|
+
}), this.#p = new k(this, {
|
|
109
109
|
getPanels: () => this.#y,
|
|
110
110
|
isPresented: (e) => !this.#W(e) && this.#l.some((t) => t.panels.some((t) => t.id === e)),
|
|
111
111
|
isCarried: (e) => !this.#t?.closed.includes(e) && this.#W(e),
|
|
112
112
|
applyMeasurements: (e) => this.#O(e)
|
|
113
|
-
}), this.#m = new
|
|
113
|
+
}), this.#m = new D(this, {
|
|
114
114
|
getPanels: () => this.#y,
|
|
115
115
|
getGroups: () => this.#l,
|
|
116
116
|
getLayout: () => this.#t,
|
|
@@ -125,25 +125,25 @@ var Z = {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
static {
|
|
128
|
-
this.styles =
|
|
128
|
+
this.styles = X([z]);
|
|
129
129
|
}
|
|
130
130
|
static {
|
|
131
131
|
this.metadata = {
|
|
132
132
|
tag: "nve-workspace",
|
|
133
|
-
version: "2.23.
|
|
133
|
+
version: "2.23.5",
|
|
134
134
|
children: ["nve-workspace-panel", "nve-dropdown-group"]
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
static {
|
|
138
138
|
this.elementDefinitions = {
|
|
139
|
+
[r.metadata.tag]: r,
|
|
140
|
+
[i.metadata.tag]: i,
|
|
141
|
+
[n.metadata.tag]: n,
|
|
139
142
|
[a.metadata.tag]: a,
|
|
140
143
|
[o.metadata.tag]: o,
|
|
141
|
-
[i.metadata.tag]: i,
|
|
142
144
|
[s.metadata.tag]: s,
|
|
143
145
|
[c.metadata.tag]: c,
|
|
144
|
-
[l.metadata.tag]: l
|
|
145
|
-
[u.metadata.tag]: u,
|
|
146
|
-
[d.metadata.tag]: d
|
|
146
|
+
[l.metadata.tag]: l
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
#e;
|
|
@@ -151,7 +151,7 @@ var Z = {
|
|
|
151
151
|
return this.#n;
|
|
152
152
|
}
|
|
153
153
|
set value(e) {
|
|
154
|
-
let t =
|
|
154
|
+
let t = u(e);
|
|
155
155
|
this.#a.finish(), this.#A(t);
|
|
156
156
|
}
|
|
157
157
|
#t;
|
|
@@ -207,7 +207,7 @@ var Z = {
|
|
|
207
207
|
this.#m.sync(), this.#o.flushAvailability();
|
|
208
208
|
}
|
|
209
209
|
animateTo(e, t = {}) {
|
|
210
|
-
let n =
|
|
210
|
+
let n = u(e);
|
|
211
211
|
this.#a.animateTo(n, t);
|
|
212
212
|
}
|
|
213
213
|
isCommandAvailable(e, t = {}) {
|
|
@@ -221,7 +221,7 @@ var Z = {
|
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
223
|
get #y() {
|
|
224
|
-
return this.#g ? this.#g.panels :
|
|
224
|
+
return this.#g ? this.#g.panels : H ? [] : [...this.children].filter((t) => e(t, b));
|
|
225
225
|
}
|
|
226
226
|
get #b() {
|
|
227
227
|
return this.#g?.available ?? this.#y.map((e) => e.id);
|
|
@@ -245,7 +245,7 @@ var Z = {
|
|
|
245
245
|
return this.#w || this.#f.retainingHandles;
|
|
246
246
|
}
|
|
247
247
|
#E(t) {
|
|
248
|
-
let n = t.some((t) => t.target === this || t.type === "attributes" && e(t.target,
|
|
248
|
+
let n = t.some((t) => t.target === this || t.type === "attributes" && e(t.target, b) && t.target.parentElement === this), r = t.some((e) => C(this, e));
|
|
249
249
|
n && (this.#a.finish(), this.#o.invalidateAvailability(), this.#f.cancel(), this.#c.cancel()), (n || r) && (this.#p.invalidate(), this.requestUpdate());
|
|
250
250
|
}
|
|
251
251
|
#D() {
|
|
@@ -263,7 +263,7 @@ var Z = {
|
|
|
263
263
|
});
|
|
264
264
|
return;
|
|
265
265
|
}
|
|
266
|
-
let t =
|
|
266
|
+
let t = _(this.#t, e);
|
|
267
267
|
t !== this.#t && (this.#k(t), this.#r || this.#j());
|
|
268
268
|
}
|
|
269
269
|
#O(e) {
|
|
@@ -271,7 +271,7 @@ var Z = {
|
|
|
271
271
|
}
|
|
272
272
|
#k(e) {
|
|
273
273
|
if (e === this.#t) return;
|
|
274
|
-
let t =
|
|
274
|
+
let t = f(e);
|
|
275
275
|
this.#t = e, this.#n = t;
|
|
276
276
|
}
|
|
277
277
|
#A(e) {
|
|
@@ -286,7 +286,7 @@ var Z = {
|
|
|
286
286
|
}));
|
|
287
287
|
}
|
|
288
288
|
#M(e) {
|
|
289
|
-
|
|
289
|
+
d(this.#t, e) ? this.requestUpdate() : (this.#k(e), this.#j());
|
|
290
290
|
}
|
|
291
291
|
#N(e, t) {
|
|
292
292
|
if (t) return;
|
|
@@ -296,8 +296,8 @@ var Z = {
|
|
|
296
296
|
#P(e, t) {
|
|
297
297
|
if (this.#a.finish(), !this.#t || !this.#y.some((t) => t.id === e)) return;
|
|
298
298
|
let n = this.#t;
|
|
299
|
-
t === "open" && (n =
|
|
300
|
-
let r =
|
|
299
|
+
t === "open" && (n = h(this.#t, e) ?? this.#t);
|
|
300
|
+
let r = v(n, e);
|
|
301
301
|
r === void 0 && n !== this.#t && (r = n), r && (this.#c.cancel(), this.#f.cancel(), this.#k(r), this.#j());
|
|
302
302
|
}
|
|
303
303
|
#F(e) {
|
|
@@ -317,9 +317,9 @@ var Z = {
|
|
|
317
317
|
}
|
|
318
318
|
#L(e) {
|
|
319
319
|
if (this.#a.finish(), !this.closable || !this.#t) return;
|
|
320
|
-
let t =
|
|
320
|
+
let t = p(this.#t, e);
|
|
321
321
|
if (!t) return;
|
|
322
|
-
let n =
|
|
322
|
+
let n = w(this, e);
|
|
323
323
|
this.#c.cancel(), this.#f.cancel(), this.#k(t), this.#j();
|
|
324
324
|
let r = this.#l.find((t) => t.panels.some((t) => t.id === e));
|
|
325
325
|
n && this.#z(r?.panels.find((t) => t.id !== e)?.id);
|
|
@@ -328,11 +328,11 @@ var Z = {
|
|
|
328
328
|
t.focus !== !1 && this.#z(e.find((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)));
|
|
329
329
|
}
|
|
330
330
|
#z(e) {
|
|
331
|
-
|
|
331
|
+
x(this, { id: e });
|
|
332
332
|
}
|
|
333
333
|
#B(e) {
|
|
334
334
|
if (this.#g) return e(this.#g);
|
|
335
|
-
this.#g = new
|
|
335
|
+
this.#g = new R(this, {
|
|
336
336
|
panels: this.#y,
|
|
337
337
|
layout: this.#v,
|
|
338
338
|
source: this.#i?.source ?? [],
|
|
@@ -347,10 +347,10 @@ var Z = {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
#V(e) {
|
|
350
|
-
return this.#g ? this.#g.project(e) :
|
|
350
|
+
return this.#g ? this.#g.project(e) : g(e, this.#b);
|
|
351
351
|
}
|
|
352
352
|
#H(e, t, n = {}) {
|
|
353
|
-
if (this.#t) return this.#B((r) =>
|
|
353
|
+
if (this.#t) return this.#B((r) => M({
|
|
354
354
|
evaluation: r,
|
|
355
355
|
layout: this.#v,
|
|
356
356
|
measurements: this.#x,
|
|
@@ -361,9 +361,9 @@ var Z = {
|
|
|
361
361
|
}));
|
|
362
362
|
}
|
|
363
363
|
#U(e) {
|
|
364
|
-
let t = e.filter((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)), n =
|
|
364
|
+
let t = e.filter((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)), n = m(this.#t?.root ?? null, t[0])?.active, r = n && t.includes(n) ? n : t[0];
|
|
365
365
|
return {
|
|
366
|
-
title: r ?
|
|
366
|
+
title: r ? S(this.#y, r) : "",
|
|
367
367
|
layers: Math.min(t.length, 3)
|
|
368
368
|
};
|
|
369
369
|
}
|
|
@@ -378,7 +378,7 @@ var Z = {
|
|
|
378
378
|
}
|
|
379
379
|
#K(e) {
|
|
380
380
|
let t = this.#i, n = e.presentationGeometry();
|
|
381
|
-
this.#l =
|
|
381
|
+
this.#l = E(n.groups, this.#t?.root ?? null, this.#i?.source), this.#u = n.boundaries;
|
|
382
382
|
let r = this.#q(n.regions, e);
|
|
383
383
|
return this.#m.applyPresentation({
|
|
384
384
|
groups: this.#l,
|
|
@@ -389,7 +389,7 @@ var Z = {
|
|
|
389
389
|
animate: !!t,
|
|
390
390
|
source: t?.source ?? [],
|
|
391
391
|
scroll: (t) => e.scroll(t)
|
|
392
|
-
}),
|
|
392
|
+
}), V`<div internal-host ?data-resizing="${this.#f.resizing}" ?data-fullscreen="${this.#s.active}" ?data-rearranging="${!!t}" data-preview-allocation="${K(t && "allocation" in t ? t.allocation : void 0)}" style="${`--_minimum-height:${e.minimum(e.project(this.#v).root).height}px`}"><div class="viewport" @scroll="${() => this.#c.refresh()}"><div class="canvas" style="${`min-width:${n.minimum.width}px;min-height:${n.minimum.height}px`}">${q(this.#l, (e) => this.#m.getGroupIdentity(e), (e) => this.#$(e))}<slot @slotchange="${() => this.requestUpdate()}"></slot>${this.#ae()}<div class="preview-layer" data-drag-phase="${K(this.#i?.phase)}">${r}</div></div></div>${this.#se()}</div>`;
|
|
393
393
|
}
|
|
394
394
|
#q(e, t) {
|
|
395
395
|
let n = this.#i;
|
|
@@ -403,7 +403,7 @@ var Z = {
|
|
|
403
403
|
version: 1,
|
|
404
404
|
root: null,
|
|
405
405
|
closed: []
|
|
406
|
-
}, c = t.geometry(t.project(s)).regions, l =
|
|
406
|
+
}, c = t.geometry(t.project(s)).regions, l = A({
|
|
407
407
|
catalog: c,
|
|
408
408
|
allocation: e,
|
|
409
409
|
source: n.source
|
|
@@ -412,7 +412,7 @@ var Z = {
|
|
|
412
412
|
x: f.x - r,
|
|
413
413
|
y: f.y - i
|
|
414
414
|
}, h = n.point;
|
|
415
|
-
return
|
|
415
|
+
return V`${this.#J(d, r, i)}${q(l, (e) => e.key, (t) => V`<div class="context-boundary" data-context-boundary="${t.key}" ?data-active="${n.context && t.key === j(n.context.members)}" inert aria-hidden="true" style="${`left:${t.rect.x}px;top:${t.rect.y}px;width:${t.rect.width}px;height:${t.rect.height}px;${I(t.rect, e)}`}"></div>`)}<nve-ghost class="destination" part="ghost destination-ghost" data-destination-ghost ?data-cue-clipped="${f.width <= 0 || f.height <= 0}" data-drag-phase="${n.phase}" ?data-drop-blocked="${n.blocked}" data-destination-kind="${p}" ?data-reserved-placement="${L(n)}" style="${`transform:translate(${f.x - r}px,${f.y - i}px);width:${f.width}px;height:${f.height}px;${I(m, e)}`}">${n.blocked ? V`<nve-icon part="icon blocked-icon" name="cancel" status="danger" size="lg" aria-hidden="true"></nve-icon>` : null}${this.#Y(n)}</nve-ghost>${h ? this.#Q({
|
|
416
416
|
point: h,
|
|
417
417
|
x: r,
|
|
418
418
|
y: i,
|
|
@@ -422,97 +422,97 @@ var Z = {
|
|
|
422
422
|
}) : null}`;
|
|
423
423
|
}
|
|
424
424
|
#J(e, t, n) {
|
|
425
|
-
return e ?
|
|
425
|
+
return e ? V`<div class="order-overlay" data-order-slot="${e.scope.index}" data-placement-hint="${e.kind}" inert aria-hidden="true" style="${`left:${e.rect.x - t}px;top:${e.rect.y - n}px;width:${e.rect.width}px;height:${e.rect.height}px`}"></div>` : null;
|
|
426
426
|
}
|
|
427
427
|
#Y(e) {
|
|
428
428
|
if (!e || e.phase !== "detached" || e.blocked || !e.seams) return null;
|
|
429
429
|
let { kind: t, edges: n } = e.seams;
|
|
430
|
-
return
|
|
430
|
+
return V`${n.map((e) => {
|
|
431
431
|
let n = e.side === "left" || e.side === "right", r = e.side === "left" || e.side === "top" ? `-${e.offset}px` : `calc(100% + ${e.offset}px)`, i = n ? `left:${r};top:${e.fraction * 100}%` : `left:${e.fraction * 100}%;top:${r}`, a = {
|
|
432
432
|
right: 0,
|
|
433
433
|
bottom: 90,
|
|
434
434
|
left: 180,
|
|
435
435
|
top: 270
|
|
436
436
|
}[e.side];
|
|
437
|
-
return
|
|
437
|
+
return V`<div class="seam-badge" data-seam-badge="${t}" data-seam-side="${e.side}" inert aria-hidden="true" style="${i}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="${`transform:rotate(${a}deg)`}">${t === "split" ? this.#X() : this.#Z()}</svg></div>`;
|
|
438
438
|
})}`;
|
|
439
439
|
}
|
|
440
440
|
#X() {
|
|
441
|
-
return
|
|
441
|
+
return U`<path d="M3 4h9v16H3z" fill="currentColor" fill-opacity=".2" stroke="none"></path><rect x="2" y="4" width="20" height="16" rx="1"></rect><path d="M12 4v16"></path>`;
|
|
442
442
|
}
|
|
443
443
|
#Z() {
|
|
444
|
-
return
|
|
444
|
+
return U`<rect x="2" y="7" width="7" height="10" rx="1" fill="currentColor" fill-opacity=".2"></rect><path d="M22 4h-9v16h9"></path>`;
|
|
445
445
|
}
|
|
446
446
|
#Q(e) {
|
|
447
447
|
let { point: t, x: n, y: r, bounds: i, title: a, layers: o } = e, s = i.x + i.width, c = i.y + i.height, l = Math.max(i.x, Math.min(t.x + 12, s)), u = Math.max(i.y, Math.min(t.y + 12, c));
|
|
448
|
-
return
|
|
448
|
+
return V`<nve-ghost class="carried" part="ghost carried-ghost" data-carried-ghost .layers="${o}" style="${`left:${l - n}px;top:${u - r}px;width:max-content;max-width:${Math.max(0, Math.min(240, i.width))}px;max-height:${i.height}px;transform:translate(min(0px,calc(${s - l}px - 100%)),min(0px,calc(${c - u}px - 100%)))`}">${a}</nve-ghost>`;
|
|
449
449
|
}
|
|
450
450
|
#$(e) {
|
|
451
451
|
let t = this.#x, { headerHeight: n } = t, r = this.#G() && e.panels.every((e) => this.#W(e.id)), i = this.#s.isSelectedGroup(e.active), a = (this.#f.presentation?.fullscreenable ?? this.fullscreenable) || i, o = a ? t.groupActionWidth ?? 0 : 0;
|
|
452
|
-
return
|
|
452
|
+
return V`<div class="group-chrome" style="${`left:${e.rect.x}px;top:${e.rect.y}px;width:${e.rect.width}px;height:${e.rect.height}px`}"><div class="tabs" ?data-carried-reservation="${r}" ?inert="${r}" aria-hidden="${K(r ? "true" : void 0)}" style="${`height:${n}px`}">${this.#ee(e)} ${this.#te(e, o)} ${a ? this.#ie(e, i) : null}</div></div>`;
|
|
453
453
|
}
|
|
454
454
|
#ee(e) {
|
|
455
|
-
return (this.#f.presentation?.rearrangeable ?? this.#S.rearrangeable) && !this.#s.active && e.gripWidth > 0 ?
|
|
455
|
+
return (this.#f.presentation?.rearrangeable ?? this.#S.rearrangeable) && !this.#s.active && e.gripWidth > 0 ? V`<nve-drag-handle part="drag-handle" data-drag-group="${e.panels[0]?.id ?? ""}" draggable="false" aria-label="${K(this.i18n.move)}" @click="${(e) => e.preventDefault()}"></nve-drag-handle>` : null;
|
|
456
456
|
}
|
|
457
457
|
#te(e, t) {
|
|
458
|
-
let n =
|
|
459
|
-
return
|
|
458
|
+
let n = T(e, this.#x), r = this.#x.panels?.[e.active]?.suffixWidth ?? 0;
|
|
459
|
+
return V`<div class="tablist" ?data-scrollable="${e.panels.length > 1}" style="${`width:${Math.max(0, e.rect.width - e.gripWidth - r - t)}px;margin-right:${r}px`}" data-group="${this.#m.getGroupIdentity(e)}" @scroll="${(t) => this.#m.handleScroll(e, t)}">${this.#ne(e, n)}</div>`;
|
|
460
460
|
}
|
|
461
461
|
#ne(e, t) {
|
|
462
|
-
let n =
|
|
462
|
+
let n = q(e.panels, (e) => e.id, (n, r) => this.#re(e, n, {
|
|
463
463
|
left: r * t,
|
|
464
464
|
width: t
|
|
465
465
|
}));
|
|
466
|
-
return e.tabbed ?
|
|
466
|
+
return e.tabbed ? V`<nve-tabs part="tabs" class="tab-track" @nve-key-change="${(e) => {
|
|
467
467
|
let t = e.detail.activeItem.dataset.panel;
|
|
468
468
|
t && this.#F(t);
|
|
469
|
-
}}" style="${`width:${e.panels.length * t}px`}">${n}</nve-tabs>` :
|
|
469
|
+
}}" style="${`width:${e.panels.length * t}px`}">${n}</nve-tabs>` : V`<div class="tab-track" style="${`width:${e.panels.length * t}px`}">${n}</div>`;
|
|
470
470
|
}
|
|
471
471
|
#re(e, t, n) {
|
|
472
|
-
let r =
|
|
472
|
+
let r = J({
|
|
473
473
|
left: `${n.left}px`,
|
|
474
474
|
width: `${n.width}px`,
|
|
475
475
|
"--height": `${this.#x.headerHeight}px`
|
|
476
|
-
}), i = this.#W(t.id), a = t.querySelector(":scope > nve-workspace-panel-header") ? null :
|
|
477
|
-
return e.tabbed ?
|
|
476
|
+
}), i = this.#W(t.id), a = t.querySelector(":scope > nve-workspace-panel-header") ? null : V`<span class="fallback-title">${t.id}</span>`, o = this.#C ? V`<nve-icon-button slot="${K(e.tabbed ? "suffix" : void 0)}" part="icon-button close-button" icon-name="cancel" container="flat" size="sm" data-close="${t.id}" aria-label="${`${this.i18n.close} ${S(this.#y, t.id)}`}" @click="${() => this.#L(t.id)}"></nve-icon-button>` : null;
|
|
477
|
+
return e.tabbed ? V`<nve-tabs-item-group part="tabs-item-group" class="tab-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${K(i ? "true" : void 0)}" style="${r}"><nve-tabs-item part="tabs-item tab" data-panel="${t.id}" ?selected="${e.active === t.id}" aria-label="${t.id}" @pointerenter="${() => this.#m.setHeaderHovered(t.id, !0)}" @pointerleave="${() => this.#m.setHeaderHovered(t.id, !1)}" @click="${() => this.#F(t.id)}">${a}</nve-tabs-item>${o}</nve-tabs-item-group>` : V`<div class="tab-entry panel-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${K(i ? "true" : void 0)}" style="${r}"><div class="panel-title" data-panel="${t.id}" aria-hidden="true">${a}</div>${o}</div>`;
|
|
478
478
|
}
|
|
479
479
|
#ie(e, t) {
|
|
480
480
|
let n = this.#x.panels?.[e.active]?.suffixWidth ?? 0, r = !this.isCommandAvailable("--toggle-fullscreen", { value: e.active });
|
|
481
|
-
return
|
|
481
|
+
return V`<div class="group-actions" ?data-authored-suffix="${n > 0}"><nve-icon-button part="icon-button fullscreen-button" icon-name="${t ? "minimize" : "maximize"}" container="flat" size="sm" command="--toggle-fullscreen" .commandForElement="${e.panels.find((t) => t.id === e.active) ?? null}" ?disabled="${r}" aria-label="${K(t ? this.i18n.exitFullscreen : this.i18n.enterFullscreen)}"></nve-icon-button></div>`;
|
|
482
482
|
}
|
|
483
483
|
#ae() {
|
|
484
|
-
return this.#T ?
|
|
484
|
+
return this.#T ? q(this.#u, (e) => e.key, (e) => this.#oe(e)) : null;
|
|
485
485
|
}
|
|
486
486
|
#oe(e) {
|
|
487
|
-
return
|
|
487
|
+
return V`<div class="gutter" style="${`left:${e.rect.x}px;top:${e.rect.y}px;width:${e.rect.width}px;height:${e.rect.height}px`}"><nve-resize-handle data-boundary="${e.key}" part="resize-handle" orientation="${e.branch.axis === "horizontal" ? "vertical" : "horizontal"}" .min="${e.min}" .max="${e.max}" .step="${10}" .value="${e.value}" @nve-gesture-input="${this.#f.gesture}" @toggle="${(e) => e.preventDefault()}" @input="${(t) => this.#f.input(t, e)}" @change="${(t) => this.#f.change(t, e)}"></nve-resize-handle></div>`;
|
|
488
488
|
}
|
|
489
489
|
#se() {
|
|
490
490
|
let { rearrangeable: e } = this.#S, t = this.fullscreenable || this.#l.some((e) => this.#s.isSelectedGroup(e.active));
|
|
491
|
-
return
|
|
491
|
+
return V`<div class="chrome" data-chrome inert aria-hidden="true"><div class="gap-probe"></div><div class="tab-min-probe"></div><div class="chrome-header"><nve-tabs part="tabs"><nve-tabs-item-group part="tabs-item-group" class="tab-entry tab-probe"><nve-tabs-item part="tabs-item tab" tabindex="-1"> </nve-tabs-item>${this.closable ? V`<nve-icon-button slot="suffix" part="icon-button close-button" icon-name="cancel" container="flat" size="sm" tabindex="-1"></nve-icon-button>` : null}</nve-tabs-item-group></nve-tabs>${e ? V`<nve-drag-handle part="drag-handle" draggable="false"></nve-drag-handle>` : null}${t ? V`<div class="group-actions"><nve-icon-button part="icon-button fullscreen-button" icon-name="maximize" container="flat" size="sm" tabindex="-1"></nve-icon-button></div>` : null}</div></div>`;
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
|
-
|
|
494
|
+
t([W({
|
|
495
495
|
type: Object,
|
|
496
496
|
attribute: !1
|
|
497
|
-
})], Q.prototype, "i18n", void 0),
|
|
497
|
+
})], Q.prototype, "i18n", void 0), t([W({
|
|
498
498
|
type: Boolean,
|
|
499
499
|
reflect: !0
|
|
500
|
-
})], Q.prototype, "resizable", void 0),
|
|
500
|
+
})], Q.prototype, "resizable", void 0), t([W({
|
|
501
501
|
type: Boolean,
|
|
502
502
|
reflect: !0
|
|
503
|
-
})], Q.prototype, "rearrangeable", void 0),
|
|
503
|
+
})], Q.prototype, "rearrangeable", void 0), t([W({
|
|
504
504
|
type: Boolean,
|
|
505
505
|
reflect: !0
|
|
506
|
-
})], Q.prototype, "groupable", void 0),
|
|
506
|
+
})], Q.prototype, "groupable", void 0), t([W({
|
|
507
507
|
type: Boolean,
|
|
508
508
|
reflect: !0
|
|
509
|
-
})], Q.prototype, "fullscreenable", void 0),
|
|
509
|
+
})], Q.prototype, "fullscreenable", void 0), t([W({
|
|
510
510
|
type: Number,
|
|
511
511
|
attribute: "detach-threshold"
|
|
512
|
-
})], Q.prototype, "detachThreshold", void 0),
|
|
512
|
+
})], Q.prototype, "detachThreshold", void 0), t([W({
|
|
513
513
|
type: Boolean,
|
|
514
514
|
reflect: !0
|
|
515
|
-
})], Q.prototype, "closable", void 0),
|
|
515
|
+
})], Q.prototype, "closable", void 0), t([W({ attribute: "resize-policy" })], Q.prototype, "resizePolicy", void 0), t([W({ reflect: !0 })], Q.prototype, "container", void 0), t([W({ type: String })], Q.prototype, "value", null), Q = t([Y()], Q);
|
|
516
516
|
export { Q as Workspace };
|
|
517
517
|
|
|
518
518
|
//# sourceMappingURL=workspace2.js.map
|