@nvidia-elements/core 2.22.5 → 2.23.1
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 +15 -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/bundle.d.ts +4 -0
- package/dist/bundles/index.d.ts +357 -1
- package/dist/bundles/index.js +14 -14
- 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 +6 -6
- package/dist/combobox/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements-jsx.d.ts +189 -0
- package/dist/custom-elements-vue.d.ts +189 -0
- package/dist/custom-elements.json +6561 -339
- package/dist/data.html.json +133 -0
- package/dist/date/date2.js +6 -6
- package/dist/datetime/datetime2.js +6 -6
- 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/forms/utils/layout.d.ts +0 -1
- package/dist/forms/utils/layout.js.map +1 -1
- package/dist/forms/utils/states.d.ts +0 -1
- package/dist/forms/utils/states.js.map +1 -1
- package/dist/gauge/gauge2.js +1 -1
- package/dist/ghost/define.d.ts +6 -0
- package/dist/ghost/define.js +6 -0
- package/dist/ghost/define.js.map +1 -0
- package/dist/ghost/ghost.d.ts +27 -0
- package/dist/ghost/ghost.examples.js +5 -0
- package/dist/ghost/ghost.examples.js.map +1 -0
- package/dist/ghost/ghost.examples.json +37 -0
- package/dist/ghost/ghost.js +5 -0
- package/dist/ghost/ghost.js.map +1 -0
- package/dist/ghost/ghost2.js +28 -0
- package/dist/ghost/ghost2.js.map +1 -0
- package/dist/ghost/index.d.ts +1 -0
- package/dist/ghost/index.js +1 -0
- 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 +2 -2
- package/dist/icon-button/icon-button2.js +1 -1
- package/dist/iframe/iframe2.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/controllers/keynav-spatial.controller.d.ts +0 -1
- package/dist/internal/controllers/keynav-spatial.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.utils.d.ts +0 -1
- package/dist/internal/controllers/type-native-popover.utils.js.map +1 -1
- package/dist/internal/index.d.ts +0 -1
- package/dist/internal/index.js +116 -128
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/types/index.d.ts +37 -3
- package/dist/internal/types/index.js.map +1 -1
- package/dist/internal/utils/audit-logs.d.ts +0 -1
- package/dist/internal/utils/audit-logs.js.map +1 -1
- package/dist/internal/utils/dom.d.ts +0 -5
- package/dist/internal/utils/dom.js +30 -46
- package/dist/internal/utils/dom.js.map +1 -1
- package/dist/internal/utils/events.d.ts +0 -1
- package/dist/internal/utils/events.js +4 -7
- package/dist/internal/utils/events.js.map +1 -1
- package/dist/internal/utils/keynav.d.ts +0 -1
- package/dist/internal/utils/keynav.js +2 -5
- package/dist/internal/utils/keynav.js.map +1 -1
- package/dist/internal/utils/objects.d.ts +0 -2
- package/dist/internal/utils/objects.js +2 -8
- package/dist/internal/utils/objects.js.map +1 -1
- package/dist/joystick/joystick2.js +5 -5
- 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 +6 -6
- 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 +6 -6
- package/dist/preferences-input/preferences-input2.js +5 -5
- 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 +5 -5
- package/dist/search/search2.js +6 -6
- 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 +6 -6
- 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 +5 -5
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +6 -6
- 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 +6 -6
- package/dist/workspace/controllers/workspace-command.controller.d.ts +34 -0
- package/dist/workspace/controllers/workspace-command.controller.js +87 -0
- package/dist/workspace/controllers/workspace-command.controller.js.map +1 -0
- package/dist/workspace/controllers/workspace-composition.controller.d.ts +54 -0
- package/dist/workspace/controllers/workspace-composition.controller.js +169 -0
- package/dist/workspace/controllers/workspace-composition.controller.js.map +1 -0
- package/dist/workspace/controllers/workspace-fullscreen.controller.d.ts +25 -0
- package/dist/workspace/controllers/workspace-fullscreen.controller.js +84 -0
- package/dist/workspace/controllers/workspace-fullscreen.controller.js.map +1 -0
- package/dist/workspace/controllers/workspace-measurement.controller.d.ts +19 -0
- package/dist/workspace/controllers/workspace-measurement.controller.js +188 -0
- package/dist/workspace/controllers/workspace-measurement.controller.js.map +1 -0
- package/dist/workspace/controllers/workspace-rearrange.controller.d.ts +40 -0
- package/dist/workspace/controllers/workspace-rearrange.controller.js +385 -0
- package/dist/workspace/controllers/workspace-rearrange.controller.js.map +1 -0
- package/dist/workspace/controllers/workspace-resize.controller.d.ts +43 -0
- package/dist/workspace/controllers/workspace-resize.controller.js +168 -0
- package/dist/workspace/controllers/workspace-resize.controller.js.map +1 -0
- package/dist/workspace/controllers/workspace-restoration.controller.d.ts +24 -0
- package/dist/workspace/controllers/workspace-restoration.controller.js +193 -0
- package/dist/workspace/controllers/workspace-restoration.controller.js.map +1 -0
- package/dist/workspace/define.d.ts +10 -0
- package/dist/workspace/define.js +9 -0
- package/dist/workspace/define.js.map +1 -0
- package/dist/workspace/index.d.ts +11 -0
- package/dist/workspace/index.js +6 -0
- package/dist/workspace/panel/panel.d.ts +48 -0
- package/dist/workspace/panel/panel.js +5 -0
- package/dist/workspace/panel/panel.js.map +1 -0
- package/dist/workspace/panel/panel2.js +53 -0
- package/dist/workspace/panel/panel2.js.map +1 -0
- package/dist/workspace/panel-content/panel-content.d.ts +20 -0
- package/dist/workspace/panel-content/panel-content.js +5 -0
- package/dist/workspace/panel-content/panel-content.js.map +1 -0
- package/dist/workspace/panel-content/panel-content2.js +22 -0
- package/dist/workspace/panel-content/panel-content2.js.map +1 -0
- package/dist/workspace/panel-footer/panel-footer.d.ts +24 -0
- package/dist/workspace/panel-footer/panel-footer.js +5 -0
- package/dist/workspace/panel-footer/panel-footer.js.map +1 -0
- package/dist/workspace/panel-footer/panel-footer2.js +28 -0
- package/dist/workspace/panel-footer/panel-footer2.js.map +1 -0
- package/dist/workspace/panel-header/panel-header.d.ts +61 -0
- package/dist/workspace/panel-header/panel-header.js +5 -0
- package/dist/workspace/panel-header/panel-header.js.map +1 -0
- package/dist/workspace/panel-header/panel-header2.js +102 -0
- package/dist/workspace/panel-header/panel-header2.js.map +1 -0
- package/dist/workspace/utils/evaluation.utils.d.ts +83 -0
- package/dist/workspace/utils/evaluation.utils.js +294 -0
- package/dist/workspace/utils/evaluation.utils.js.map +1 -0
- package/dist/workspace/utils/geometry/allocation.utils.d.ts +40 -0
- package/dist/workspace/utils/geometry/allocation.utils.js +73 -0
- package/dist/workspace/utils/geometry/allocation.utils.js.map +1 -0
- package/dist/workspace/utils/geometry/partition.utils.d.ts +10 -0
- package/dist/workspace/utils/geometry/partition.utils.js +40 -0
- package/dist/workspace/utils/geometry/partition.utils.js.map +1 -0
- package/dist/workspace/utils/geometry/sizing.utils.d.ts +35 -0
- package/dist/workspace/utils/geometry/sizing.utils.js +42 -0
- package/dist/workspace/utils/geometry/sizing.utils.js.map +1 -0
- package/dist/workspace/utils/interaction/boundary.utils.d.ts +40 -0
- package/dist/workspace/utils/interaction/boundary.utils.js +91 -0
- package/dist/workspace/utils/interaction/boundary.utils.js.map +1 -0
- package/dist/workspace/utils/interaction/command.utils.d.ts +74 -0
- package/dist/workspace/utils/interaction/command.utils.js +189 -0
- package/dist/workspace/utils/interaction/command.utils.js.map +1 -0
- package/dist/workspace/utils/interaction/drag-preview.utils.d.ts +79 -0
- package/dist/workspace/utils/interaction/drag-preview.utils.js +16 -0
- package/dist/workspace/utils/interaction/drag-preview.utils.js.map +1 -0
- package/dist/workspace/utils/interaction/insertion-offers.utils.d.ts +58 -0
- package/dist/workspace/utils/interaction/insertion-offers.utils.js +259 -0
- package/dist/workspace/utils/interaction/insertion-offers.utils.js.map +1 -0
- package/dist/workspace/utils/interaction/placement-decision.utils.d.ts +55 -0
- package/dist/workspace/utils/interaction/placement-decision.utils.js +242 -0
- package/dist/workspace/utils/interaction/placement-decision.utils.js.map +1 -0
- package/dist/workspace/utils/interaction/resize-input.utils.d.ts +1 -0
- package/dist/workspace/utils/interaction/resize-input.utils.js +17 -0
- package/dist/workspace/utils/interaction/resize-input.utils.js.map +1 -0
- package/dist/workspace/utils/model/layout.utils.d.ts +22 -0
- package/dist/workspace/utils/model/layout.utils.js +41 -0
- package/dist/workspace/utils/model/layout.utils.js.map +1 -0
- package/dist/workspace/utils/model/membership.utils.d.ts +14 -0
- package/dist/workspace/utils/model/membership.utils.js +17 -0
- package/dist/workspace/utils/model/membership.utils.js.map +1 -0
- package/dist/workspace/utils/model/operations.utils.d.ts +31 -0
- package/dist/workspace/utils/model/operations.utils.js +178 -0
- package/dist/workspace/utils/model/operations.utils.js.map +1 -0
- package/dist/workspace/utils/model/projection.utils.d.ts +7 -0
- package/dist/workspace/utils/model/projection.utils.js +87 -0
- package/dist/workspace/utils/model/projection.utils.js.map +1 -0
- package/dist/workspace/utils/model/value.utils.d.ts +5 -0
- package/dist/workspace/utils/model/value.utils.js +68 -0
- package/dist/workspace/utils/model/value.utils.js.map +1 -0
- package/dist/workspace/utils/placement/acquisition-sizing.utils.d.ts +32 -0
- package/dist/workspace/utils/placement/acquisition-sizing.utils.js +152 -0
- package/dist/workspace/utils/placement/acquisition-sizing.utils.js.map +1 -0
- package/dist/workspace/utils/placement/context.utils.d.ts +36 -0
- package/dist/workspace/utils/placement/context.utils.js +135 -0
- package/dist/workspace/utils/placement/context.utils.js.map +1 -0
- package/dist/workspace/utils/placement/group-insertion.utils.d.ts +26 -0
- package/dist/workspace/utils/placement/group-insertion.utils.js +171 -0
- package/dist/workspace/utils/placement/group-insertion.utils.js.map +1 -0
- package/dist/workspace/utils/placement/origin.utils.d.ts +13 -0
- package/dist/workspace/utils/placement/origin.utils.js +49 -0
- package/dist/workspace/utils/placement/origin.utils.js.map +1 -0
- package/dist/workspace/utils/placement/planner.utils.d.ts +22 -0
- package/dist/workspace/utils/placement/planner.utils.js +184 -0
- package/dist/workspace/utils/placement/planner.utils.js.map +1 -0
- package/dist/workspace/utils/placement/preparation.utils.d.ts +28 -0
- package/dist/workspace/utils/placement/preparation.utils.js +140 -0
- package/dist/workspace/utils/placement/preparation.utils.js.map +1 -0
- package/dist/workspace/utils/placement/region.utils.d.ts +15 -0
- package/dist/workspace/utils/placement/region.utils.js +111 -0
- package/dist/workspace/utils/placement/region.utils.js.map +1 -0
- package/dist/workspace/utils/placement/split-sizing.utils.d.ts +18 -0
- package/dist/workspace/utils/placement/split-sizing.utils.js +108 -0
- package/dist/workspace/utils/placement/split-sizing.utils.js.map +1 -0
- package/dist/workspace/utils/presentation/composition.utils.d.ts +17 -0
- package/dist/workspace/utils/presentation/composition.utils.js +95 -0
- package/dist/workspace/utils/presentation/composition.utils.js.map +1 -0
- package/dist/workspace/utils/presentation/groups.utils.d.ts +91 -0
- package/dist/workspace/utils/presentation/groups.utils.js +169 -0
- package/dist/workspace/utils/presentation/groups.utils.js.map +1 -0
- package/dist/workspace/utils/presentation/header-configuration.utils.d.ts +11 -0
- package/dist/workspace/utils/presentation/header-configuration.utils.js +7 -0
- package/dist/workspace/utils/presentation/header-configuration.utils.js.map +1 -0
- package/dist/workspace/utils/presentation/measurements.utils.d.ts +21 -0
- package/dist/workspace/utils/presentation/measurements.utils.js +28 -0
- package/dist/workspace/utils/presentation/measurements.utils.js.map +1 -0
- package/dist/workspace/utils/presentation/offers.utils.d.ts +43 -0
- package/dist/workspace/utils/presentation/offers.utils.js +137 -0
- package/dist/workspace/utils/presentation/offers.utils.js.map +1 -0
- package/dist/workspace/utils/presentation/preview.utils.d.ts +6 -0
- package/dist/workspace/utils/presentation/preview.utils.js +36 -0
- package/dist/workspace/utils/presentation/preview.utils.js.map +1 -0
- package/dist/workspace/workspace.d.ts +103 -0
- package/dist/workspace/workspace.examples.js +5 -0
- package/dist/workspace/workspace.examples.js.map +1 -0
- package/dist/workspace/workspace.examples.json +133 -0
- package/dist/workspace/workspace.js +5 -0
- package/dist/workspace/workspace.js.map +1 -0
- package/dist/workspace/workspace.types.d.ts +3 -0
- package/dist/workspace/workspace2.js +518 -0
- package/dist/workspace/workspace2.js.map +1 -0
- package/package.json +27 -3
- package/dist/internal/utils/supports.d.ts +0 -3
- package/dist/internal/utils/supports.js +0 -13
- package/dist/internal/utils/supports.js.map +0 -1
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import { matchesElementName as e } from "../internal/utils/dom.js";
|
|
2
|
+
import { scopedRegistry as t } from "../internal/decorators/scoped-registry.js";
|
|
3
|
+
import { useStyles as n } from "../internal/styles/index.js";
|
|
4
|
+
import r from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
5
|
+
import { Icon as i } from "../icon/icon2.js";
|
|
6
|
+
import { DragHandle as a } from "../drag-handle/drag-handle2.js";
|
|
7
|
+
import { Ghost as o } from "../ghost/ghost2.js";
|
|
8
|
+
import { IconButton as s } from "../icon-button/icon-button2.js";
|
|
9
|
+
import { ResizeHandle as c } from "../resize-handle/resize-handle2.js";
|
|
10
|
+
import { Tabs as l, TabsItem as u } from "../tabs/tabs2.js";
|
|
11
|
+
import { TabsItemGroup as d } from "../tabs/tabs-item-group2.js";
|
|
12
|
+
import { parseWorkspaceValue as f, sameSerializedWorkspaceLayout as p, serializeWorkspaceValue as m } from "./utils/model/value.utils.js";
|
|
13
|
+
import { closePanel as h, findGroup as g, openPanel as _, projectLayout as v, reconcilePanels as y, selectPanel as b } from "./utils/model/operations.utils.js";
|
|
14
|
+
import { WorkspaceCommandController as x } from "./controllers/workspace-command.controller.js";
|
|
15
|
+
import { WorkspacePanel as S } from "./panel/panel2.js";
|
|
16
|
+
import { focusWorkspacePanel as C, getPanelLabel as w, isWorkspaceCompositionMutation as T, shouldFocusAfterWorkspaceClose as E } from "./utils/presentation/composition.utils.js";
|
|
17
|
+
import { getAllocatedTabWidth as D, preserveRecipientSelection as O } from "./utils/presentation/groups.utils.js";
|
|
18
|
+
import { WorkspaceCompositionController as k } from "./controllers/workspace-composition.controller.js";
|
|
19
|
+
import { WorkspaceFullscreenController as A } from "./controllers/workspace-fullscreen.controller.js";
|
|
20
|
+
import { WorkspaceMeasurementController as j } from "./controllers/workspace-measurement.controller.js";
|
|
21
|
+
import { allocateContextProxies as M, getContextKey as N } from "./utils/placement/context.utils.js";
|
|
22
|
+
import { getAdmissiblePlacementLayout as P } from "./utils/placement/preparation.utils.js";
|
|
23
|
+
import { WorkspaceRearrangeController as F } from "./controllers/workspace-rearrange.controller.js";
|
|
24
|
+
import { WorkspaceResizeController as I } from "./controllers/workspace-resize.controller.js";
|
|
25
|
+
import { WorkspaceRestorationController as L } from "./controllers/workspace-restoration.controller.js";
|
|
26
|
+
import { getRegionCornerStyle as R, shouldEmphasizeReservedDestination as z } from "./utils/presentation/preview.utils.js";
|
|
27
|
+
import { WorkspaceEvaluation as B } from "./utils/evaluation.utils.js";
|
|
28
|
+
import V from "./workspace.js";
|
|
29
|
+
import { LitElement as H, html as U, isServer as W, svg as G } from "lit";
|
|
30
|
+
import { property as K } from "lit/decorators/property.js";
|
|
31
|
+
import { I18nController as q } from "@nvidia-elements/foundations/internal/i18n";
|
|
32
|
+
import { ifDefined as J } from "lit/directives/if-defined.js";
|
|
33
|
+
import { repeat as Y } from "lit/directives/repeat.js";
|
|
34
|
+
import { styleMap as X } from "lit/directives/style-map.js";
|
|
35
|
+
// src/workspace/workspace.ts
|
|
36
|
+
var Z = {
|
|
37
|
+
close: "close",
|
|
38
|
+
move: "move",
|
|
39
|
+
enterFullscreen: "enter full screen",
|
|
40
|
+
exitFullscreen: "exit full screen"
|
|
41
|
+
}, Q = class extends H {
|
|
42
|
+
constructor(...e) {
|
|
43
|
+
super(...e), this.#e = new q(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 L(this, {
|
|
44
|
+
getLayout: () => this.#t,
|
|
45
|
+
applyLayout: (e) => this.#A(e),
|
|
46
|
+
getTransitionTargets: () => this.#m.getTransitionTargets()
|
|
47
|
+
}), this.#o = new x(this, {
|
|
48
|
+
getState: () => ({
|
|
49
|
+
panels: this.#y,
|
|
50
|
+
layout: this.#t
|
|
51
|
+
}),
|
|
52
|
+
isRearrangementAllowed: () => !this.#s.active,
|
|
53
|
+
isPlacementAvailable: (e, t) => !!this.#H(e, t),
|
|
54
|
+
canEnterFullscreen: (e) => this.#s.canEnter(e),
|
|
55
|
+
canExitFullscreen: () => this.#s.canExit,
|
|
56
|
+
isFullscreenGroup: (e) => this.#s.isSelectedGroup(e),
|
|
57
|
+
enterFullscreen: (e) => this.#s.enter(e),
|
|
58
|
+
exitFullscreen: () => this.#s.exit(),
|
|
59
|
+
activatePanel: (e, t) => this.#P(e, t),
|
|
60
|
+
closePanel: (e) => this.#L(e),
|
|
61
|
+
placePanel: (e, t) => this.#I(e, t)
|
|
62
|
+
}), this.#s = new A(this, {
|
|
63
|
+
getGroup: (e) => g(this.#V(this.#v).root, e)?.panels ?? [],
|
|
64
|
+
cancelInteractions: () => {
|
|
65
|
+
this.#a.finish(), this.#c.cancel(), this.#f.cancel();
|
|
66
|
+
},
|
|
67
|
+
invalidateCommandAvailability: () => {
|
|
68
|
+
this.#o.invalidateAvailability(), this.#p.invalidate();
|
|
69
|
+
}
|
|
70
|
+
}), this.#c = new F(this, {
|
|
71
|
+
evaluateWithContext: (e) => this.#B(e),
|
|
72
|
+
isRearrangementAllowed: () => !this.#s.active && !this.#a.active,
|
|
73
|
+
getLayout: () => this.#t,
|
|
74
|
+
getMeasurements: () => this.#x,
|
|
75
|
+
getAvailablePanels: () => this.#b,
|
|
76
|
+
activateSource: (e, t) => this.#N(e, t),
|
|
77
|
+
applyPreview: (e) => {
|
|
78
|
+
this.#i = e, this.requestUpdate();
|
|
79
|
+
},
|
|
80
|
+
commitPlacement: (e, t, n) => this.#I(e, t, {
|
|
81
|
+
layout: n,
|
|
82
|
+
capabilities: this.#S,
|
|
83
|
+
focus: !1
|
|
84
|
+
})
|
|
85
|
+
}), this.#l = [], this.#u = [], this.#d = {
|
|
86
|
+
gap: 0,
|
|
87
|
+
headerHeight: 0,
|
|
88
|
+
gripWidth: 0,
|
|
89
|
+
actionWidth: 0,
|
|
90
|
+
groupActionWidth: 0,
|
|
91
|
+
tabWidth: 0,
|
|
92
|
+
tabMinWidth: 0,
|
|
93
|
+
width: 0,
|
|
94
|
+
height: 0
|
|
95
|
+
}, this.#f = new I(this, {
|
|
96
|
+
isEnabled: () => this.#w,
|
|
97
|
+
getLayout: () => this.#t,
|
|
98
|
+
getBoundaries: () => this.#u,
|
|
99
|
+
getAvailablePanels: () => this.#b,
|
|
100
|
+
getPresentation: () => ({
|
|
101
|
+
measurements: this.#x,
|
|
102
|
+
rearrangeable: this.#S.rearrangeable,
|
|
103
|
+
closable: this.closable,
|
|
104
|
+
fullscreenable: this.fullscreenable
|
|
105
|
+
}),
|
|
106
|
+
cancelForUser: () => this.#a.transition(() => this.#f.cancel()),
|
|
107
|
+
commitLayout: (e) => this.#M(e)
|
|
108
|
+
}), this.#p = new j(this, {
|
|
109
|
+
getPanels: () => this.#y,
|
|
110
|
+
isPresented: (e) => !this.#W(e) && this.#l.some((t) => t.panels.some((t) => t.id === e)),
|
|
111
|
+
isCarried: (e) => !this.#t?.closed.includes(e) && this.#W(e),
|
|
112
|
+
applyMeasurements: (e) => this.#O(e)
|
|
113
|
+
}), this.#m = new k(this, {
|
|
114
|
+
getPanels: () => this.#y,
|
|
115
|
+
getGroups: () => this.#l,
|
|
116
|
+
getLayout: () => this.#t,
|
|
117
|
+
getPreview: () => this.#i,
|
|
118
|
+
scrollChanged: () => this.#c.refresh()
|
|
119
|
+
}), this.#_ = {
|
|
120
|
+
getCurrentLayout: () => this.#v,
|
|
121
|
+
getCurrentMeasurements: () => this.#x,
|
|
122
|
+
getCurrentPreview: () => this.#i,
|
|
123
|
+
getFullscreenTarget: () => this.#s.targetPanelId,
|
|
124
|
+
getResizePreview: () => this.#f.preview
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
static {
|
|
128
|
+
this.styles = n([V]);
|
|
129
|
+
}
|
|
130
|
+
static {
|
|
131
|
+
this.metadata = {
|
|
132
|
+
tag: "nve-workspace",
|
|
133
|
+
version: "2.23.1",
|
|
134
|
+
children: ["nve-workspace-panel", "nve-dropdown-group"]
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static {
|
|
138
|
+
this.elementDefinitions = {
|
|
139
|
+
[a.metadata.tag]: a,
|
|
140
|
+
[o.metadata.tag]: o,
|
|
141
|
+
[i.metadata.tag]: i,
|
|
142
|
+
[s.metadata.tag]: s,
|
|
143
|
+
[c.metadata.tag]: c,
|
|
144
|
+
[l.metadata.tag]: l,
|
|
145
|
+
[u.metadata.tag]: u,
|
|
146
|
+
[d.metadata.tag]: d
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
#e;
|
|
150
|
+
get value() {
|
|
151
|
+
return this.#n;
|
|
152
|
+
}
|
|
153
|
+
set value(e) {
|
|
154
|
+
let t = f(e);
|
|
155
|
+
this.#a.finish(), this.#A(t);
|
|
156
|
+
}
|
|
157
|
+
#t;
|
|
158
|
+
#n;
|
|
159
|
+
#r;
|
|
160
|
+
#i;
|
|
161
|
+
#a;
|
|
162
|
+
#o;
|
|
163
|
+
#s;
|
|
164
|
+
#c;
|
|
165
|
+
#l;
|
|
166
|
+
#u;
|
|
167
|
+
#d;
|
|
168
|
+
#f;
|
|
169
|
+
#p;
|
|
170
|
+
#m;
|
|
171
|
+
#h;
|
|
172
|
+
#g;
|
|
173
|
+
#_;
|
|
174
|
+
connectedCallback() {
|
|
175
|
+
super.connectedCallback(), this.#h = new MutationObserver((e) => this.#E(e)), this.#h.observe(this, {
|
|
176
|
+
childList: !0,
|
|
177
|
+
characterData: !0,
|
|
178
|
+
attributes: !0,
|
|
179
|
+
subtree: !0,
|
|
180
|
+
attributeFilter: [
|
|
181
|
+
"id",
|
|
182
|
+
"min-width",
|
|
183
|
+
"min-height",
|
|
184
|
+
"slot"
|
|
185
|
+
]
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
disconnectedCallback() {
|
|
189
|
+
this.#c.cancel(), this.#h?.disconnect(), super.disconnectedCallback();
|
|
190
|
+
}
|
|
191
|
+
willUpdate(e) {
|
|
192
|
+
super.willUpdate(e), this.#m.captureFocus(), [
|
|
193
|
+
"value",
|
|
194
|
+
"fullscreenable",
|
|
195
|
+
"closable",
|
|
196
|
+
"rearrangeable",
|
|
197
|
+
"groupable",
|
|
198
|
+
"resizePolicy"
|
|
199
|
+
].some((t) => e.has(t)) && this.#o.invalidateAvailability(), [
|
|
200
|
+
"fullscreenable",
|
|
201
|
+
"closable",
|
|
202
|
+
"rearrangeable",
|
|
203
|
+
"groupable"
|
|
204
|
+
].some((t) => e.has(t)) && this.#p.invalidate(), this.#D(), this.#r = !1;
|
|
205
|
+
}
|
|
206
|
+
updated() {
|
|
207
|
+
this.#m.sync(), this.#o.flushAvailability();
|
|
208
|
+
}
|
|
209
|
+
animateTo(e, t = {}) {
|
|
210
|
+
let n = f(e);
|
|
211
|
+
this.#a.animateTo(n, t);
|
|
212
|
+
}
|
|
213
|
+
isCommandAvailable(e, t = {}) {
|
|
214
|
+
return this.#o.isCommandAvailable(e, t);
|
|
215
|
+
}
|
|
216
|
+
get #v() {
|
|
217
|
+
return this.#t ?? {
|
|
218
|
+
version: 1,
|
|
219
|
+
root: null,
|
|
220
|
+
closed: []
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
get #y() {
|
|
224
|
+
return this.#g ? this.#g.panels : W ? [] : [...this.children].filter((t) => e(t, S));
|
|
225
|
+
}
|
|
226
|
+
get #b() {
|
|
227
|
+
return this.#g?.available ?? this.#y.map((e) => e.id);
|
|
228
|
+
}
|
|
229
|
+
get #x() {
|
|
230
|
+
return this.#f.presentation?.measurements ?? this.#d;
|
|
231
|
+
}
|
|
232
|
+
get #S() {
|
|
233
|
+
return this.#c.capabilities ?? {
|
|
234
|
+
rearrangeable: this.rearrangeable,
|
|
235
|
+
groupable: this.groupable
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
get #C() {
|
|
239
|
+
return this.#f.presentation?.closable ?? this.closable;
|
|
240
|
+
}
|
|
241
|
+
get #w() {
|
|
242
|
+
return this.resizable && !this.#s.active;
|
|
243
|
+
}
|
|
244
|
+
get #T() {
|
|
245
|
+
return this.#w || this.#f.retainingHandles;
|
|
246
|
+
}
|
|
247
|
+
#E(t) {
|
|
248
|
+
let n = t.some((t) => t.target === this || t.type === "attributes" && e(t.target, S) && t.target.parentElement === this), r = t.some((e) => T(this, e));
|
|
249
|
+
n && (this.#a.finish(), this.#o.invalidateAvailability(), this.#f.cancel(), this.#c.cancel()), (n || r) && (this.#p.invalidate(), this.requestUpdate());
|
|
250
|
+
}
|
|
251
|
+
#D() {
|
|
252
|
+
let e = this.#b;
|
|
253
|
+
if (!e.every(Boolean) || new Set(e).size !== e.length) return;
|
|
254
|
+
if (!this.#t) {
|
|
255
|
+
e.length && this.#k({
|
|
256
|
+
version: 1,
|
|
257
|
+
root: {
|
|
258
|
+
type: "group",
|
|
259
|
+
panels: e,
|
|
260
|
+
active: e[0]
|
|
261
|
+
},
|
|
262
|
+
closed: []
|
|
263
|
+
});
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
let t = y(this.#t, e);
|
|
267
|
+
t !== this.#t && (this.#k(t), this.#r || this.#j());
|
|
268
|
+
}
|
|
269
|
+
#O(e) {
|
|
270
|
+
this.#d = e.measurements, this.#o.invalidateAvailability(), this.requestUpdate(), this.#f.handleMeasurementsChange(e), this.#a.handleMeasurementsChange(e), this.#c.handleMeasurementsChange(e);
|
|
271
|
+
}
|
|
272
|
+
#k(e) {
|
|
273
|
+
if (e === this.#t) return;
|
|
274
|
+
let t = m(e);
|
|
275
|
+
this.#t = e, this.#n = t;
|
|
276
|
+
}
|
|
277
|
+
#A(e) {
|
|
278
|
+
this.#c.cancel();
|
|
279
|
+
let t = this.value;
|
|
280
|
+
this.#f.resetForRestore(), this.#k(e), this.#r = !0, this.requestUpdate("value", t);
|
|
281
|
+
}
|
|
282
|
+
#j() {
|
|
283
|
+
this.#o.invalidateAvailability(), this.dispatchEvent(new Event("change", {
|
|
284
|
+
bubbles: !0,
|
|
285
|
+
composed: !0
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
288
|
+
#M(e) {
|
|
289
|
+
p(this.#t, e) ? this.requestUpdate() : (this.#k(e), this.#j());
|
|
290
|
+
}
|
|
291
|
+
#N(e, t) {
|
|
292
|
+
if (t) return;
|
|
293
|
+
let n = e.find((e) => !this.#t?.closed.includes(e) && this.#b.includes(e));
|
|
294
|
+
n && this.shadowRoot?.querySelector(`nve-tabs-item[data-panel="${CSS.escape(n)}"]`) && (this.#P(n, "select"), this.#z(n));
|
|
295
|
+
}
|
|
296
|
+
#P(e, t) {
|
|
297
|
+
if (this.#a.finish(), !this.#t || !this.#y.some((t) => t.id === e)) return;
|
|
298
|
+
let n = this.#t;
|
|
299
|
+
t === "open" && (n = _(this.#t, e) ?? this.#t);
|
|
300
|
+
let r = b(n, e);
|
|
301
|
+
r === void 0 && n !== this.#t && (r = n), r && (this.#c.cancel(), this.#f.cancel(), this.#k(r), this.#j());
|
|
302
|
+
}
|
|
303
|
+
#F(e) {
|
|
304
|
+
this.#c.suppressSelection || this.#P(e, "select");
|
|
305
|
+
}
|
|
306
|
+
#I(e, t, n = {}) {
|
|
307
|
+
let r = n.capabilities ?? {
|
|
308
|
+
rearrangeable: this.rearrangeable,
|
|
309
|
+
groupable: this.groupable
|
|
310
|
+
};
|
|
311
|
+
if (!r.rearrangeable || this.#s.active) return !1;
|
|
312
|
+
let i = this.#H(e, t, {
|
|
313
|
+
candidate: n.layout,
|
|
314
|
+
groupable: r.groupable
|
|
315
|
+
});
|
|
316
|
+
return i ? (this.#a.finish(), this.#c.cancel(), this.#f.cancel(), this.#k(i), this.#j(), this.#R(e, n), !0) : !1;
|
|
317
|
+
}
|
|
318
|
+
#L(e) {
|
|
319
|
+
if (this.#a.finish(), !this.closable || !this.#t) return;
|
|
320
|
+
let t = h(this.#t, e);
|
|
321
|
+
if (!t) return;
|
|
322
|
+
let n = E(this, e);
|
|
323
|
+
this.#c.cancel(), this.#f.cancel(), this.#k(t), this.#j();
|
|
324
|
+
let r = this.#l.find((t) => t.panels.some((t) => t.id === e));
|
|
325
|
+
n && this.#z(r?.panels.find((t) => t.id !== e)?.id);
|
|
326
|
+
}
|
|
327
|
+
#R(e, t) {
|
|
328
|
+
t.focus !== !1 && this.#z(e.find((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)));
|
|
329
|
+
}
|
|
330
|
+
#z(e) {
|
|
331
|
+
C(this, { id: e });
|
|
332
|
+
}
|
|
333
|
+
#B(e) {
|
|
334
|
+
if (this.#g) return e(this.#g);
|
|
335
|
+
this.#g = new B(this, {
|
|
336
|
+
panels: this.#y,
|
|
337
|
+
layout: this.#v,
|
|
338
|
+
source: this.#i?.source ?? [],
|
|
339
|
+
measurements: this.#x,
|
|
340
|
+
policy: this.#f.policy,
|
|
341
|
+
strip: (e) => this.#m.findTabStrip(e)
|
|
342
|
+
}, this.#_);
|
|
343
|
+
try {
|
|
344
|
+
return e(this.#g);
|
|
345
|
+
} finally {
|
|
346
|
+
this.#g = void 0;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
#V(e) {
|
|
350
|
+
return this.#g ? this.#g.project(e) : v(e, this.#b);
|
|
351
|
+
}
|
|
352
|
+
#H(e, t, n = {}) {
|
|
353
|
+
if (this.#t) return this.#B((r) => P({
|
|
354
|
+
evaluation: r,
|
|
355
|
+
layout: this.#v,
|
|
356
|
+
measurements: this.#x,
|
|
357
|
+
source: e,
|
|
358
|
+
intent: t,
|
|
359
|
+
groupable: n.groupable ?? this.groupable,
|
|
360
|
+
candidate: n.candidate
|
|
361
|
+
}));
|
|
362
|
+
}
|
|
363
|
+
#U(e) {
|
|
364
|
+
let t = e.filter((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)), n = g(this.#t?.root ?? null, t[0])?.active, r = n && t.includes(n) ? n : t[0];
|
|
365
|
+
return {
|
|
366
|
+
title: r ? w(this.#y, r) : "",
|
|
367
|
+
layers: Math.min(t.length, 3)
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
#W(e) {
|
|
371
|
+
return this.#i?.source.includes(e) ?? !1;
|
|
372
|
+
}
|
|
373
|
+
#G(e = this.#i) {
|
|
374
|
+
return !!e && "allocation" in e && e.allocation !== "overlay";
|
|
375
|
+
}
|
|
376
|
+
render() {
|
|
377
|
+
return this.#B((e) => this.#K(e));
|
|
378
|
+
}
|
|
379
|
+
#K(e) {
|
|
380
|
+
let t = this.#i, n = e.presentationGeometry();
|
|
381
|
+
this.#l = O(n.groups, this.#t?.root ?? null, this.#i?.source), this.#u = n.boundaries;
|
|
382
|
+
let r = this.#q(n.regions, e);
|
|
383
|
+
return this.#m.applyPresentation({
|
|
384
|
+
groups: this.#l,
|
|
385
|
+
extent: n,
|
|
386
|
+
container: this.container,
|
|
387
|
+
measurements: this.#x,
|
|
388
|
+
closable: this.#C,
|
|
389
|
+
animate: !!t,
|
|
390
|
+
source: t?.source ?? [],
|
|
391
|
+
scroll: (t) => e.scroll(t)
|
|
392
|
+
}), U`<div internal-host ?data-resizing="${this.#f.resizing}" ?data-fullscreen="${this.#s.active}" ?data-rearranging="${!!t}" data-preview-allocation="${J(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`}">${Y(this.#l, (e) => this.#m.getGroupIdentity(e), (e) => this.#$(e))}<slot @slotchange="${() => this.requestUpdate()}"></slot>${this.#ae()}<div class="preview-layer" data-drag-phase="${J(this.#i?.phase)}">${r}</div></div></div>${this.#se()}</div>`;
|
|
393
|
+
}
|
|
394
|
+
#q(e, t) {
|
|
395
|
+
let n = this.#i;
|
|
396
|
+
if (!n) return null;
|
|
397
|
+
let { x: r, y: i } = t.client({
|
|
398
|
+
x: 0,
|
|
399
|
+
y: 0,
|
|
400
|
+
width: 0,
|
|
401
|
+
height: 0
|
|
402
|
+
}), { title: a, layers: o } = this.#U(n.source), s = this.#t ?? {
|
|
403
|
+
version: 1,
|
|
404
|
+
root: null,
|
|
405
|
+
closed: []
|
|
406
|
+
}, c = t.geometry(t.project(s)).regions, l = M({
|
|
407
|
+
catalog: c,
|
|
408
|
+
allocation: e,
|
|
409
|
+
source: n.source
|
|
410
|
+
}), u = t.bounds(), d = this.#c.getPreviewHint(n, t), { rect: f, kind: p } = n.cue, m = {
|
|
411
|
+
...f,
|
|
412
|
+
x: f.x - r,
|
|
413
|
+
y: f.y - i
|
|
414
|
+
}, h = n.point;
|
|
415
|
+
return U`${this.#J(d, r, i)}${Y(l, (e) => e.key, (t) => U`<div class="context-boundary" data-context-boundary="${t.key}" ?data-active="${n.context && t.key === N(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;${R(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="${z(n)}" style="${`transform:translate(${f.x - r}px,${f.y - i}px);width:${f.width}px;height:${f.height}px;${R(m, e)}`}">${n.blocked ? U`<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
|
+
point: h,
|
|
417
|
+
x: r,
|
|
418
|
+
y: i,
|
|
419
|
+
bounds: u,
|
|
420
|
+
title: a,
|
|
421
|
+
layers: o
|
|
422
|
+
}) : null}`;
|
|
423
|
+
}
|
|
424
|
+
#J(e, t, n) {
|
|
425
|
+
return e ? U`<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
|
+
}
|
|
427
|
+
#Y(e) {
|
|
428
|
+
if (!e || e.phase !== "detached" || e.blocked || !e.seams) return null;
|
|
429
|
+
let { kind: t, edges: n } = e.seams;
|
|
430
|
+
return U`${n.map((e) => {
|
|
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
|
+
right: 0,
|
|
433
|
+
bottom: 90,
|
|
434
|
+
left: 180,
|
|
435
|
+
top: 270
|
|
436
|
+
}[e.side];
|
|
437
|
+
return U`<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
|
+
})}`;
|
|
439
|
+
}
|
|
440
|
+
#X() {
|
|
441
|
+
return G`<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
|
+
}
|
|
443
|
+
#Z() {
|
|
444
|
+
return G`<rect x="2" y="7" width="7" height="10" rx="1" fill="currentColor" fill-opacity=".2"></rect><path d="M22 4h-9v16h9"></path>`;
|
|
445
|
+
}
|
|
446
|
+
#Q(e) {
|
|
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 U`<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
|
+
}
|
|
450
|
+
#$(e) {
|
|
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 U`<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="${J(r ? "true" : void 0)}" style="${`height:${n}px`}">${this.#ee(e)} ${this.#te(e, o)} ${a ? this.#ie(e, i) : null}</div></div>`;
|
|
453
|
+
}
|
|
454
|
+
#ee(e) {
|
|
455
|
+
return (this.#f.presentation?.rearrangeable ?? this.#S.rearrangeable) && !this.#s.active && e.gripWidth > 0 ? U`<nve-drag-handle part="drag-handle" data-drag-group="${e.panels[0]?.id ?? ""}" draggable="false" aria-label="${J(this.i18n.move)}" @click="${(e) => e.preventDefault()}"></nve-drag-handle>` : null;
|
|
456
|
+
}
|
|
457
|
+
#te(e, t) {
|
|
458
|
+
let n = D(e, this.#x), r = this.#x.panels?.[e.active]?.suffixWidth ?? 0;
|
|
459
|
+
return U`<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
|
+
}
|
|
461
|
+
#ne(e, t) {
|
|
462
|
+
let n = Y(e.panels, (e) => e.id, (n, r) => this.#re(e, n, {
|
|
463
|
+
left: r * t,
|
|
464
|
+
width: t
|
|
465
|
+
}));
|
|
466
|
+
return e.tabbed ? U`<nve-tabs part="tabs" class="tab-track" @nve-key-change="${(e) => {
|
|
467
|
+
let t = e.detail.activeItem.dataset.panel;
|
|
468
|
+
t && this.#F(t);
|
|
469
|
+
}}" style="${`width:${e.panels.length * t}px`}">${n}</nve-tabs>` : U`<div class="tab-track" style="${`width:${e.panels.length * t}px`}">${n}</div>`;
|
|
470
|
+
}
|
|
471
|
+
#re(e, t, n) {
|
|
472
|
+
let r = X({
|
|
473
|
+
left: `${n.left}px`,
|
|
474
|
+
width: `${n.width}px`,
|
|
475
|
+
"--height": `${this.#x.headerHeight}px`
|
|
476
|
+
}), i = this.#W(t.id), a = t.querySelector(":scope > nve-workspace-panel-header") ? null : U`<span class="fallback-title">${t.id}</span>`, o = this.#C ? U`<nve-icon-button slot="${J(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} ${w(this.#y, t.id)}`}" @click="${() => this.#L(t.id)}"></nve-icon-button>` : null;
|
|
477
|
+
return e.tabbed ? U`<nve-tabs-item-group part="tabs-item-group" class="tab-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${J(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>` : U`<div class="tab-entry panel-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${J(i ? "true" : void 0)}" style="${r}"><div class="panel-title" data-panel="${t.id}" aria-hidden="true">${a}</div>${o}</div>`;
|
|
478
|
+
}
|
|
479
|
+
#ie(e, t) {
|
|
480
|
+
let n = this.#x.panels?.[e.active]?.suffixWidth ?? 0, r = !this.isCommandAvailable("--toggle-fullscreen", { value: e.active });
|
|
481
|
+
return U`<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="${J(t ? this.i18n.exitFullscreen : this.i18n.enterFullscreen)}"></nve-icon-button></div>`;
|
|
482
|
+
}
|
|
483
|
+
#ae() {
|
|
484
|
+
return this.#T ? Y(this.#u, (e) => e.key, (e) => this.#oe(e)) : null;
|
|
485
|
+
}
|
|
486
|
+
#oe(e) {
|
|
487
|
+
return U`<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
|
+
}
|
|
489
|
+
#se() {
|
|
490
|
+
let { rearrangeable: e } = this.#S, t = this.fullscreenable || this.#l.some((e) => this.#s.isSelectedGroup(e.active));
|
|
491
|
+
return U`<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 ? U`<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 ? U`<nve-drag-handle part="drag-handle" draggable="false"></nve-drag-handle>` : null}${t ? U`<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
|
+
}
|
|
493
|
+
};
|
|
494
|
+
r([K({
|
|
495
|
+
type: Object,
|
|
496
|
+
attribute: !1
|
|
497
|
+
})], Q.prototype, "i18n", void 0), r([K({
|
|
498
|
+
type: Boolean,
|
|
499
|
+
reflect: !0
|
|
500
|
+
})], Q.prototype, "resizable", void 0), r([K({
|
|
501
|
+
type: Boolean,
|
|
502
|
+
reflect: !0
|
|
503
|
+
})], Q.prototype, "rearrangeable", void 0), r([K({
|
|
504
|
+
type: Boolean,
|
|
505
|
+
reflect: !0
|
|
506
|
+
})], Q.prototype, "groupable", void 0), r([K({
|
|
507
|
+
type: Boolean,
|
|
508
|
+
reflect: !0
|
|
509
|
+
})], Q.prototype, "fullscreenable", void 0), r([K({
|
|
510
|
+
type: Number,
|
|
511
|
+
attribute: "detach-threshold"
|
|
512
|
+
})], Q.prototype, "detachThreshold", void 0), r([K({
|
|
513
|
+
type: Boolean,
|
|
514
|
+
reflect: !0
|
|
515
|
+
})], Q.prototype, "closable", void 0), r([K({ attribute: "resize-policy" })], Q.prototype, "resizePolicy", void 0), r([K({ reflect: !0 })], Q.prototype, "container", void 0), r([K({ type: String })], Q.prototype, "value", null), Q = r([t()], Q);
|
|
516
|
+
export { Q as Workspace };
|
|
517
|
+
|
|
518
|
+
//# sourceMappingURL=workspace2.js.map
|