@nvidia-elements/core 2.23.5 → 2.24.0
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 +19 -0
- package/dist/accordion/accordion-group.js.map +1 -1
- package/dist/accordion/accordion.js.map +1 -1
- 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 +2 -0
- package/dist/bundles/index.d.ts +323 -56
- package/dist/bundles/index.js +9 -9
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group2.js +1 -1
- package/dist/card/card2.js +4 -4
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/checkbox/checkbox-group2.js +1 -1
- package/dist/checkbox/checkbox2.js +1 -1
- package/dist/color/color2.js +1 -1
- package/dist/combobox/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements-jsx.d.ts +167 -1
- package/dist/custom-elements-vue.d.ts +161 -1
- package/dist/custom-elements.json +5017 -268
- package/dist/dashboard/controllers/arrangement.controller.d.ts +30 -0
- package/dist/dashboard/controllers/arrangement.controller.js +68 -0
- package/dist/dashboard/controllers/arrangement.controller.js.map +1 -0
- package/dist/dashboard/controllers/command.controller.d.ts +28 -0
- package/dist/dashboard/controllers/command.controller.js +69 -0
- package/dist/dashboard/controllers/command.controller.js.map +1 -0
- package/dist/dashboard/controllers/composition.controller.d.ts +61 -0
- package/dist/dashboard/controllers/composition.controller.js +285 -0
- package/dist/dashboard/controllers/composition.controller.js.map +1 -0
- package/dist/dashboard/controllers/fullscreen.controller.d.ts +23 -0
- package/dist/dashboard/controllers/fullscreen.controller.js +46 -0
- package/dist/dashboard/controllers/fullscreen.controller.js.map +1 -0
- package/dist/dashboard/controllers/interaction.controller.d.ts +53 -0
- package/dist/dashboard/controllers/interaction.controller.js +407 -0
- package/dist/dashboard/controllers/interaction.controller.js.map +1 -0
- package/dist/dashboard/controllers/measurement.controller.d.ts +28 -0
- package/dist/dashboard/controllers/measurement.controller.js +77 -0
- package/dist/dashboard/controllers/measurement.controller.js.map +1 -0
- package/dist/dashboard/dashboard.d.ts +83 -0
- package/dist/dashboard/dashboard.examples.js +5 -0
- package/dist/dashboard/dashboard.examples.js.map +1 -0
- package/dist/dashboard/dashboard.examples.json +138 -0
- package/dist/dashboard/dashboard.js +5 -0
- package/dist/dashboard/dashboard.js.map +1 -0
- package/dist/dashboard/dashboard.types.d.ts +33 -0
- package/dist/dashboard/dashboard2.js +352 -0
- package/dist/dashboard/dashboard2.js.map +1 -0
- package/dist/dashboard/define.d.ts +10 -0
- package/dist/dashboard/define.js +9 -0
- package/dist/dashboard/define.js.map +1 -0
- package/dist/dashboard/index.d.ts +8 -0
- package/dist/dashboard/index.js +6 -0
- package/dist/dashboard/panel/panel.d.ts +88 -0
- package/dist/dashboard/panel/panel.js +5 -0
- package/dist/dashboard/panel/panel.js.map +1 -0
- package/dist/dashboard/panel/panel2.js +110 -0
- package/dist/dashboard/panel/panel2.js.map +1 -0
- package/dist/dashboard/panel-content/panel-content.d.ts +20 -0
- package/dist/dashboard/panel-content/panel-content.js +5 -0
- package/dist/dashboard/panel-content/panel-content.js.map +1 -0
- package/dist/dashboard/panel-content/panel-content2.js +22 -0
- package/dist/dashboard/panel-content/panel-content2.js.map +1 -0
- package/dist/dashboard/panel-footer/panel-footer.d.ts +25 -0
- package/dist/dashboard/panel-footer/panel-footer.js +5 -0
- package/dist/dashboard/panel-footer/panel-footer.js.map +1 -0
- package/dist/dashboard/panel-footer/panel-footer2.js +28 -0
- package/dist/dashboard/panel-footer/panel-footer2.js.map +1 -0
- package/dist/dashboard/panel-header/panel-header.d.ts +27 -0
- package/dist/dashboard/panel-header/panel-header.js +5 -0
- package/dist/dashboard/panel-header/panel-header.js.map +1 -0
- package/dist/dashboard/panel-header/panel-header2.js +28 -0
- package/dist/dashboard/panel-header/panel-header2.js.map +1 -0
- package/dist/dashboard/utils/action.utils.d.ts +17 -0
- package/dist/dashboard/utils/action.utils.js +144 -0
- package/dist/dashboard/utils/action.utils.js.map +1 -0
- package/dist/dashboard/utils/geometry.utils.d.ts +110 -0
- package/dist/dashboard/utils/geometry.utils.js +208 -0
- package/dist/dashboard/utils/geometry.utils.js.map +1 -0
- package/dist/dashboard/utils/intent.types.d.ts +67 -0
- package/dist/dashboard/utils/layout.utils.d.ts +20 -0
- package/dist/dashboard/utils/layout.utils.js +224 -0
- package/dist/dashboard/utils/layout.utils.js.map +1 -0
- package/dist/dashboard/utils/movement.utils.d.ts +7 -0
- package/dist/dashboard/utils/movement.utils.js +15 -0
- package/dist/dashboard/utils/movement.utils.js.map +1 -0
- package/dist/dashboard/utils/mutation.utils.d.ts +2 -0
- package/dist/dashboard/utils/mutation.utils.js +19 -0
- package/dist/dashboard/utils/mutation.utils.js.map +1 -0
- package/dist/dashboard/utils/packing.utils.d.ts +13 -0
- package/dist/dashboard/utils/packing.utils.js +421 -0
- package/dist/dashboard/utils/packing.utils.js.map +1 -0
- package/dist/data.html.json +141 -1
- package/dist/date/date2.js +1 -1
- package/dist/datetime/datetime2.js +1 -1
- package/dist/dialog/dialog-footer2.js +1 -1
- package/dist/dialog/dialog-header2.js +1 -1
- package/dist/dialog/dialog2.js +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drag-handle/drag-handle2.js +1 -1
- package/dist/drawer/drawer-content2.js +1 -1
- package/dist/drawer/drawer-footer2.js +1 -1
- package/dist/drawer/drawer-header2.js +1 -1
- package/dist/drawer/drawer2.js +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +1 -1
- package/dist/dropdown/dropdown.examples.js.map +1 -1
- package/dist/dropdown/dropdown2.js +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.js +1 -1
- package/dist/format-datetime/format-datetime2.js +1 -1
- package/dist/format-number/format-number2.js +1 -1
- package/dist/format-relative-time/format-relative-time2.js +1 -1
- package/dist/format-truncate/format-truncate2.js +1 -1
- package/dist/forms/control/control2.js +1 -1
- package/dist/forms/control-group/control-group2.js +1 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/gauge/gauge2.js +1 -1
- package/dist/ghost/ghost2.js +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column2.js +1 -1
- package/dist/grid/footer/footer2.js +1 -1
- package/dist/grid/grid.js.map +1 -1
- package/dist/grid/grid2.js +1 -1
- package/dist/grid/header/header2.js +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +1 -1
- package/dist/icon/icon2.js +1 -1
- package/dist/icon-button/icon-button2.js +1 -1
- package/dist/iframe/iframe2.js +1 -1
- package/dist/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/controllers/native-fullscreen.controller.d.ts +13 -0
- package/dist/internal/controllers/native-fullscreen.controller.js +73 -0
- package/dist/internal/controllers/native-fullscreen.controller.js.map +1 -0
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.js +59 -57
- package/dist/internal/index.js.map +1 -1
- package/dist/joystick/joystick2.js +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-group2.js +1 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu2.js +1 -1
- package/dist/month/month2.js +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +1 -1
- package/dist/page/page-panel/page-panel-header2.js +1 -1
- package/dist/page/page-panel/page-panel2.js +1 -1
- package/dist/page/page2.js +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader2.js +1 -1
- package/dist/pagination/pagination2.js +1 -1
- package/dist/panel/panel2.js +4 -4
- package/dist/password/password2.js +1 -1
- package/dist/preferences-input/preferences-input2.js +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-dot/progress-dot2.js +1 -1
- package/dist/progress-ring/progress-ring2.js +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
- package/dist/pulse/pulse2.js +1 -1
- package/dist/radio/radio-group2.js +1 -1
- package/dist/radio/radio2.js +1 -1
- package/dist/range/range2.js +1 -1
- package/dist/resize-handle/resize-handle2.js +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +1 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +1 -1
- package/dist/sparkline/sparkline2.js +1 -1
- package/dist/star-rating/star-rating2.js +1 -1
- package/dist/steps/steps2.js +2 -2
- package/dist/switch/switch-group2.js +1 -1
- package/dist/switch/switch2.js +1 -1
- package/dist/tabs/tabs-group2.js +1 -1
- package/dist/tabs/tabs-item-group2.js +1 -1
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tag/tag2.js +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +1 -1
- package/dist/toast/toast2.js +1 -1
- package/dist/toggletip/toggletip-footer2.js +1 -1
- package/dist/toggletip/toggletip-header2.js +1 -1
- package/dist/toggletip/toggletip2.js +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node2.js +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/dist/workspace/controllers/workspace-composition.controller.d.ts +4 -1
- package/dist/workspace/controllers/workspace-composition.controller.js +69 -39
- package/dist/workspace/controllers/workspace-composition.controller.js.map +1 -1
- package/dist/workspace/controllers/workspace-fullscreen.controller.d.ts +2 -4
- package/dist/workspace/controllers/workspace-fullscreen.controller.js +17 -47
- package/dist/workspace/controllers/workspace-fullscreen.controller.js.map +1 -1
- package/dist/workspace/controllers/workspace-rearrange.controller.js +27 -27
- package/dist/workspace/controllers/workspace-rearrange.controller.js.map +1 -1
- package/dist/workspace/controllers/workspace-restoration.controller.js +2 -2
- package/dist/workspace/controllers/workspace-restoration.controller.js.map +1 -1
- package/dist/workspace/panel/panel2.js +2 -2
- package/dist/workspace/panel/panel2.js.map +1 -1
- package/dist/workspace/panel-content/panel-content2.js +1 -1
- package/dist/workspace/panel-footer/panel-footer2.js +1 -1
- package/dist/workspace/panel-header/panel-header2.js +1 -1
- package/dist/workspace/utils/comparison.utils.d.ts +3 -0
- package/dist/workspace/utils/comparison.utils.js +13 -0
- package/dist/workspace/utils/comparison.utils.js.map +1 -0
- package/dist/workspace/utils/evaluation.utils.d.ts +65 -6
- package/dist/workspace/utils/evaluation.utils.js +334 -99
- package/dist/workspace/utils/evaluation.utils.js.map +1 -1
- package/dist/workspace/utils/geometry/allocation.utils.js +15 -13
- package/dist/workspace/utils/geometry/allocation.utils.js.map +1 -1
- package/dist/workspace/utils/geometry/sizing.utils.d.ts +2 -0
- package/dist/workspace/utils/geometry/sizing.utils.js +37 -17
- package/dist/workspace/utils/geometry/sizing.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/boundary.utils.d.ts +2 -2
- package/dist/workspace/utils/interaction/boundary.utils.js +2 -2
- package/dist/workspace/utils/interaction/boundary.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/drag-preview.utils.d.ts +3 -3
- package/dist/workspace/utils/interaction/drag-preview.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/insertion-offers.utils.d.ts +11 -9
- package/dist/workspace/utils/interaction/insertion-offers.utils.js +37 -43
- package/dist/workspace/utils/interaction/insertion-offers.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/placement-decision.utils.d.ts +6 -1
- package/dist/workspace/utils/interaction/placement-decision.utils.js +94 -87
- package/dist/workspace/utils/interaction/placement-decision.utils.js.map +1 -1
- package/dist/workspace/utils/model/layout.utils.d.ts +2 -1
- package/dist/workspace/utils/model/layout.utils.js +12 -10
- package/dist/workspace/utils/model/layout.utils.js.map +1 -1
- package/dist/workspace/utils/model/membership.utils.d.ts +4 -0
- package/dist/workspace/utils/model/membership.utils.js +13 -4
- package/dist/workspace/utils/model/membership.utils.js.map +1 -1
- package/dist/workspace/utils/model/operations.utils.d.ts +1 -0
- package/dist/workspace/utils/model/operations.utils.js +51 -46
- package/dist/workspace/utils/model/operations.utils.js.map +1 -1
- package/dist/workspace/utils/model/projection.utils.d.ts +4 -2
- package/dist/workspace/utils/model/projection.utils.js +49 -40
- package/dist/workspace/utils/model/projection.utils.js.map +1 -1
- package/dist/workspace/utils/model/value.utils.d.ts +4 -3
- package/dist/workspace/utils/model/value.utils.js +15 -50
- package/dist/workspace/utils/model/value.utils.js.map +1 -1
- package/dist/workspace/utils/placement/acquisition-sizing.utils.d.ts +2 -0
- package/dist/workspace/utils/placement/acquisition-sizing.utils.js +30 -22
- package/dist/workspace/utils/placement/acquisition-sizing.utils.js.map +1 -1
- package/dist/workspace/utils/placement/group-insertion.utils.d.ts +19 -13
- package/dist/workspace/utils/placement/group-insertion.utils.js +50 -47
- package/dist/workspace/utils/placement/group-insertion.utils.js.map +1 -1
- package/dist/workspace/utils/placement/planner.utils.d.ts +13 -2
- package/dist/workspace/utils/placement/planner.utils.js +79 -73
- package/dist/workspace/utils/placement/planner.utils.js.map +1 -1
- package/dist/workspace/utils/placement/preparation.utils.d.ts +5 -2
- package/dist/workspace/utils/placement/preparation.utils.js +45 -41
- package/dist/workspace/utils/placement/preparation.utils.js.map +1 -1
- package/dist/workspace/utils/placement/region.utils.js +32 -32
- package/dist/workspace/utils/placement/region.utils.js.map +1 -1
- package/dist/workspace/utils/placement/scope.utils.d.ts +34 -0
- package/dist/workspace/utils/placement/scope.utils.js +155 -0
- package/dist/workspace/utils/placement/scope.utils.js.map +1 -0
- package/dist/workspace/utils/placement/session.utils.d.ts +11 -0
- package/dist/workspace/utils/placement/session.utils.js +78 -0
- package/dist/workspace/utils/placement/session.utils.js.map +1 -0
- package/dist/workspace/utils/placement/split-sizing.utils.d.ts +2 -2
- package/dist/workspace/utils/placement/split-sizing.utils.js +19 -19
- package/dist/workspace/utils/placement/split-sizing.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/composition.utils.d.ts +1 -1
- package/dist/workspace/utils/presentation/composition.utils.js +4 -2
- package/dist/workspace/utils/presentation/composition.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/groups.utils.d.ts +3 -3
- package/dist/workspace/utils/presentation/groups.utils.js +40 -30
- package/dist/workspace/utils/presentation/groups.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/measurements.utils.d.ts +1 -0
- package/dist/workspace/utils/presentation/measurements.utils.js +6 -14
- package/dist/workspace/utils/presentation/measurements.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/offers.utils.d.ts +1 -1
- package/dist/workspace/utils/presentation/offers.utils.js +3 -3
- package/dist/workspace/utils/presentation/offers.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/preview.utils.d.ts +6 -0
- package/dist/workspace/utils/presentation/preview.utils.js +14 -3
- package/dist/workspace/utils/presentation/preview.utils.js.map +1 -1
- package/dist/workspace/workspace.examples.js.map +1 -1
- package/dist/workspace/workspace.examples.json +4 -4
- package/dist/workspace/workspace.js +1 -1
- package/dist/workspace/workspace.js.map +1 -1
- package/dist/workspace/workspace2.js +206 -212
- package/dist/workspace/workspace2.js.map +1 -1
- package/package.json +16 -4
- package/dist/workspace/utils/placement/context.utils.d.ts +0 -36
- package/dist/workspace/utils/placement/context.utils.js +0 -135
- package/dist/workspace/utils/placement/context.utils.js.map +0 -1
|
@@ -7,82 +7,82 @@ import { IconButton as a } from "../icon-button/icon-button2.js";
|
|
|
7
7
|
import { ResizeHandle as o } from "../resize-handle/resize-handle2.js";
|
|
8
8
|
import { Tabs as s, TabsItem as c } from "../tabs/tabs2.js";
|
|
9
9
|
import { TabsItemGroup as l } from "../tabs/tabs-item-group2.js";
|
|
10
|
-
import { parseWorkspaceValue as u,
|
|
10
|
+
import { parseWorkspaceValue as u, sameWorkspaceLayout as d, serializeWorkspaceValue as f } from "./utils/model/value.utils.js";
|
|
11
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
12
|
import { WorkspaceCommandController as y } from "./controllers/workspace-command.controller.js";
|
|
13
13
|
import { WorkspacePanel as b } from "./panel/panel2.js";
|
|
14
|
-
import { focusWorkspacePanel as x, getPanelLabel as S,
|
|
14
|
+
import { focusWorkspacePanel as x, getPanelLabel as S, shouldFocusAfterWorkspaceClose as C } from "./utils/presentation/composition.utils.js";
|
|
15
|
+
import { getPanelMembershipKey as w } from "./utils/model/membership.utils.js";
|
|
15
16
|
import { getAllocatedTabWidth as T, preserveRecipientSelection as E } from "./utils/presentation/groups.utils.js";
|
|
16
17
|
import { WorkspaceCompositionController as D } from "./controllers/workspace-composition.controller.js";
|
|
17
18
|
import { WorkspaceFullscreenController as O } from "./controllers/workspace-fullscreen.controller.js";
|
|
18
19
|
import { WorkspaceMeasurementController as k } from "./controllers/workspace-measurement.controller.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import z from "
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { useStyles as X } from "@nvidia-elements/foundations/internal/styles";
|
|
20
|
+
import { getAdmissiblePlacementLayout as A } from "./utils/placement/preparation.utils.js";
|
|
21
|
+
import { WorkspaceRearrangeController as j } from "./controllers/workspace-rearrange.controller.js";
|
|
22
|
+
import { WorkspaceResizeController as M } from "./controllers/workspace-resize.controller.js";
|
|
23
|
+
import { WorkspaceRestorationController as N } from "./controllers/workspace-restoration.controller.js";
|
|
24
|
+
import { getRegionCornerStyle as P, preparePreviewBoundaries as F, shouldEmphasizeReservedDestination as I } from "./utils/presentation/preview.utils.js";
|
|
25
|
+
import { WorkspaceEvaluationCache as L } from "./utils/evaluation.utils.js";
|
|
26
|
+
import R from "./workspace.js";
|
|
27
|
+
import { LitElement as z, html as B, isServer as V, svg as H } from "lit";
|
|
28
|
+
import { property as U } from "lit/decorators/property.js";
|
|
29
|
+
import { I18nController as W } from "@nvidia-elements/foundations/internal/i18n";
|
|
30
|
+
import { ifDefined as G } from "lit/directives/if-defined.js";
|
|
31
|
+
import { repeat as K } from "lit/directives/repeat.js";
|
|
32
|
+
import { styleMap as q } from "lit/directives/style-map.js";
|
|
33
|
+
import { scopedRegistry as J } from "@nvidia-elements/foundations/internal/decorators";
|
|
34
|
+
import { useStyles as Y } from "@nvidia-elements/foundations/internal/styles";
|
|
35
35
|
// src/workspace/workspace.ts
|
|
36
|
-
var
|
|
36
|
+
var X = {
|
|
37
37
|
close: "close",
|
|
38
38
|
move: "move",
|
|
39
39
|
enterFullscreen: "enter full screen",
|
|
40
40
|
exitFullscreen: "exit full screen"
|
|
41
|
-
},
|
|
41
|
+
}, Z = class extends z {
|
|
42
42
|
constructor(...e) {
|
|
43
|
-
super(...e), this.#e = new
|
|
43
|
+
super(...e), this.#e = new W(this, X), 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.#o = new L(this), this.#s = new N(this, {
|
|
44
44
|
getLayout: () => this.#t,
|
|
45
|
-
applyLayout: (e) => this.#
|
|
46
|
-
getTransitionTargets: () => this.#
|
|
47
|
-
}), this.#
|
|
45
|
+
applyLayout: (e) => this.#k(e),
|
|
46
|
+
getTransitionTargets: () => this.#g.getTransitionTargets()
|
|
47
|
+
}), this.#c = new y(this, {
|
|
48
48
|
getState: () => ({
|
|
49
49
|
panels: this.#y,
|
|
50
50
|
layout: this.#t
|
|
51
51
|
}),
|
|
52
|
-
isRearrangementAllowed: () => !this.#
|
|
53
|
-
isPlacementAvailable: (e, t) => !!this.#
|
|
54
|
-
canEnterFullscreen: (e) => this.#
|
|
55
|
-
canExitFullscreen: () => this.#
|
|
56
|
-
isFullscreenGroup: (e) => this.#
|
|
57
|
-
enterFullscreen: (e) => this.#
|
|
58
|
-
exitFullscreen: () => this.#
|
|
59
|
-
activatePanel: (e, t) => this.#
|
|
60
|
-
closePanel: (e) => this.#
|
|
61
|
-
placePanel: (e, t) => this.#
|
|
62
|
-
}), this.#
|
|
63
|
-
getGroup: (e) => m(this.#
|
|
52
|
+
isRearrangementAllowed: () => !this.#l.active,
|
|
53
|
+
isPlacementAvailable: (e, t) => !!this.#V(e, t),
|
|
54
|
+
canEnterFullscreen: (e) => this.#l.canEnter(e),
|
|
55
|
+
canExitFullscreen: () => this.#l.canExit,
|
|
56
|
+
isFullscreenGroup: (e) => this.#l.isSelectedGroup(e),
|
|
57
|
+
enterFullscreen: (e) => this.#l.enter(e),
|
|
58
|
+
exitFullscreen: () => this.#l.exit(),
|
|
59
|
+
activatePanel: (e, t) => this.#N(e, t),
|
|
60
|
+
closePanel: (e) => this.#I(e),
|
|
61
|
+
placePanel: (e, t) => this.#F(e, t)
|
|
62
|
+
}), this.#l = new O(this, {
|
|
63
|
+
getGroup: (e) => m(this.#B(this.#v).root, e)?.panels ?? [],
|
|
64
64
|
cancelInteractions: () => {
|
|
65
|
-
this.#
|
|
65
|
+
this.#s.finish(), this.#u.cancel(), this.#m.cancel();
|
|
66
66
|
},
|
|
67
67
|
invalidateCommandAvailability: () => {
|
|
68
|
-
this.#
|
|
68
|
+
this.#c.invalidateAvailability(), this.#h.invalidate();
|
|
69
69
|
}
|
|
70
|
-
}), this.#
|
|
71
|
-
evaluateWithContext: (e) => this.#
|
|
72
|
-
isRearrangementAllowed: () => !this.#
|
|
70
|
+
}), this.#u = new j(this, {
|
|
71
|
+
evaluateWithContext: (e) => this.#z(e),
|
|
72
|
+
isRearrangementAllowed: () => !this.#l.active && !this.#s.active,
|
|
73
73
|
getLayout: () => this.#t,
|
|
74
74
|
getMeasurements: () => this.#x,
|
|
75
75
|
getAvailablePanels: () => this.#b,
|
|
76
|
-
activateSource: (e, t) => this.#
|
|
76
|
+
activateSource: (e, t) => this.#M(e, t),
|
|
77
77
|
applyPreview: (e) => {
|
|
78
|
-
this.#i = e, this.requestUpdate();
|
|
78
|
+
e?.phase !== "detached" && (this.#o.clear(), this.#a = void 0), this.#i = e, this.requestUpdate();
|
|
79
79
|
},
|
|
80
|
-
commitPlacement: (e, t, n) => this.#
|
|
80
|
+
commitPlacement: (e, t, n) => this.#F(e, t, {
|
|
81
81
|
layout: n,
|
|
82
82
|
capabilities: this.#S,
|
|
83
83
|
focus: !1
|
|
84
84
|
})
|
|
85
|
-
}), this.#
|
|
85
|
+
}), this.#d = [], this.#f = [], this.#p = {
|
|
86
86
|
gap: 0,
|
|
87
87
|
headerHeight: 0,
|
|
88
88
|
gripWidth: 0,
|
|
@@ -92,10 +92,10 @@ var Z = {
|
|
|
92
92
|
tabMinWidth: 0,
|
|
93
93
|
width: 0,
|
|
94
94
|
height: 0
|
|
95
|
-
}, this.#
|
|
95
|
+
}, this.#m = new M(this, {
|
|
96
96
|
isEnabled: () => this.#w,
|
|
97
97
|
getLayout: () => this.#t,
|
|
98
|
-
getBoundaries: () => this.#
|
|
98
|
+
getBoundaries: () => this.#f,
|
|
99
99
|
getAvailablePanels: () => this.#b,
|
|
100
100
|
getPresentation: () => ({
|
|
101
101
|
measurements: this.#x,
|
|
@@ -103,34 +103,37 @@ var Z = {
|
|
|
103
103
|
closable: this.closable,
|
|
104
104
|
fullscreenable: this.fullscreenable
|
|
105
105
|
}),
|
|
106
|
-
cancelForUser: () => this.#
|
|
107
|
-
commitLayout: (e) => this.#
|
|
108
|
-
}), this.#
|
|
106
|
+
cancelForUser: () => this.#s.transition(() => this.#m.cancel()),
|
|
107
|
+
commitLayout: (e) => this.#j(e)
|
|
108
|
+
}), this.#h = new k(this, {
|
|
109
109
|
getPanels: () => this.#y,
|
|
110
|
-
isPresented: (e) => !this.#
|
|
111
|
-
isCarried: (e) => !this.#t?.closed.includes(e) && this.#
|
|
112
|
-
applyMeasurements: (e) => this.#
|
|
113
|
-
}), this.#
|
|
110
|
+
isPresented: (e) => !this.#U(e) && this.#d.some((t) => t.panels.some((t) => t.id === e)),
|
|
111
|
+
isCarried: (e) => !this.#t?.closed.includes(e) && this.#U(e),
|
|
112
|
+
applyMeasurements: (e) => this.#D(e)
|
|
113
|
+
}), this.#g = new D(this, {
|
|
114
114
|
getPanels: () => this.#y,
|
|
115
|
-
getGroups: () => this.#
|
|
115
|
+
getGroups: () => this.#d,
|
|
116
116
|
getLayout: () => this.#t,
|
|
117
117
|
getPreview: () => this.#i,
|
|
118
|
-
scrollChanged: () => this.#
|
|
118
|
+
scrollChanged: () => this.#u.refresh(),
|
|
119
|
+
contentChanged: (e) => {
|
|
120
|
+
e === "panels" && (this.#s.finish(), this.#c.invalidateAvailability(), this.#m.cancel(), this.#u.cancel()), this.#h.invalidate(), this.requestUpdate();
|
|
121
|
+
}
|
|
119
122
|
}), this.#_ = {
|
|
120
123
|
getCurrentLayout: () => this.#v,
|
|
121
124
|
getCurrentMeasurements: () => this.#x,
|
|
122
125
|
getCurrentPreview: () => this.#i,
|
|
123
|
-
getFullscreenTarget: () => this.#
|
|
124
|
-
getResizePreview: () => this.#
|
|
126
|
+
getFullscreenTarget: () => this.#l.targetPanelId,
|
|
127
|
+
getResizePreview: () => this.#m.preview
|
|
125
128
|
};
|
|
126
129
|
}
|
|
127
130
|
static {
|
|
128
|
-
this.styles =
|
|
131
|
+
this.styles = Y([R]);
|
|
129
132
|
}
|
|
130
133
|
static {
|
|
131
134
|
this.metadata = {
|
|
132
135
|
tag: "nve-workspace",
|
|
133
|
-
version: "2.
|
|
136
|
+
version: "2.24.0",
|
|
134
137
|
children: ["nve-workspace-panel", "nve-dropdown-group"]
|
|
135
138
|
};
|
|
136
139
|
}
|
|
@@ -152,7 +155,7 @@ var Z = {
|
|
|
152
155
|
}
|
|
153
156
|
set value(e) {
|
|
154
157
|
let t = u(e);
|
|
155
|
-
this.#
|
|
158
|
+
this.#s.finish(), this.#k(t);
|
|
156
159
|
}
|
|
157
160
|
#t;
|
|
158
161
|
#n;
|
|
@@ -172,46 +175,35 @@ var Z = {
|
|
|
172
175
|
#g;
|
|
173
176
|
#_;
|
|
174
177
|
connectedCallback() {
|
|
175
|
-
super.connectedCallback(), 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
|
-
});
|
|
178
|
+
super.connectedCallback(), this.#g.startObserving();
|
|
187
179
|
}
|
|
188
180
|
disconnectedCallback() {
|
|
189
|
-
this.#
|
|
181
|
+
this.#o.clear(), this.#a = void 0, this.#u.cancel(), this.#g.stopObserving(), super.disconnectedCallback();
|
|
190
182
|
}
|
|
191
183
|
willUpdate(e) {
|
|
192
|
-
super.willUpdate(e), this.#
|
|
184
|
+
super.willUpdate(e), this.#g.captureFocus(), [
|
|
193
185
|
"value",
|
|
194
186
|
"fullscreenable",
|
|
195
187
|
"closable",
|
|
196
188
|
"rearrangeable",
|
|
197
189
|
"groupable",
|
|
198
190
|
"resizePolicy"
|
|
199
|
-
].some((t) => e.has(t)) && this.#
|
|
191
|
+
].some((t) => e.has(t)) && this.#c.invalidateAvailability(), [
|
|
200
192
|
"fullscreenable",
|
|
201
193
|
"closable",
|
|
202
194
|
"rearrangeable",
|
|
203
195
|
"groupable"
|
|
204
|
-
].some((t) => e.has(t)) && this.#
|
|
196
|
+
].some((t) => e.has(t)) && this.#h.invalidate(), this.#E(), this.#r = !1;
|
|
205
197
|
}
|
|
206
198
|
updated() {
|
|
207
|
-
this.#
|
|
199
|
+
this.#g.sync(), this.#c.flushAvailability();
|
|
208
200
|
}
|
|
209
201
|
animateTo(e, t = {}) {
|
|
210
202
|
let n = u(e);
|
|
211
|
-
this.#
|
|
203
|
+
this.#s.animateTo(n, t);
|
|
212
204
|
}
|
|
213
205
|
isCommandAvailable(e, t = {}) {
|
|
214
|
-
return this.#
|
|
206
|
+
return this.#c.isCommandAvailable(e, t);
|
|
215
207
|
}
|
|
216
208
|
get #v() {
|
|
217
209
|
return this.#t ?? {
|
|
@@ -221,38 +213,35 @@ var Z = {
|
|
|
221
213
|
};
|
|
222
214
|
}
|
|
223
215
|
get #y() {
|
|
224
|
-
|
|
216
|
+
let t = this.#o.current;
|
|
217
|
+
return t ? t.panels : V ? [] : [...this.children].filter((t) => e(t, b));
|
|
225
218
|
}
|
|
226
219
|
get #b() {
|
|
227
|
-
return this.#
|
|
220
|
+
return this.#o.current?.available ?? this.#y.map((e) => e.id);
|
|
228
221
|
}
|
|
229
222
|
get #x() {
|
|
230
|
-
return this.#
|
|
223
|
+
return this.#m.presentation?.measurements ?? this.#p;
|
|
231
224
|
}
|
|
232
225
|
get #S() {
|
|
233
|
-
return this.#
|
|
226
|
+
return this.#u.capabilities ?? {
|
|
234
227
|
rearrangeable: this.rearrangeable,
|
|
235
228
|
groupable: this.groupable
|
|
236
229
|
};
|
|
237
230
|
}
|
|
238
231
|
get #C() {
|
|
239
|
-
return this.#
|
|
232
|
+
return this.#m.presentation?.closable ?? this.closable;
|
|
240
233
|
}
|
|
241
234
|
get #w() {
|
|
242
|
-
return this.resizable && !this.#
|
|
235
|
+
return this.resizable && !this.#l.active;
|
|
243
236
|
}
|
|
244
237
|
get #T() {
|
|
245
|
-
return this.#w || this.#
|
|
238
|
+
return this.#w || this.#m.retainingHandles;
|
|
246
239
|
}
|
|
247
|
-
#E(
|
|
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
|
-
n && (this.#a.finish(), this.#o.invalidateAvailability(), this.#f.cancel(), this.#c.cancel()), (n || r) && (this.#p.invalidate(), this.requestUpdate());
|
|
250
|
-
}
|
|
251
|
-
#D() {
|
|
240
|
+
#E() {
|
|
252
241
|
let e = this.#b;
|
|
253
242
|
if (!e.every(Boolean) || new Set(e).size !== e.length) return;
|
|
254
243
|
if (!this.#t) {
|
|
255
|
-
e.length && this.#
|
|
244
|
+
e.length && this.#O({
|
|
256
245
|
version: 1,
|
|
257
246
|
root: {
|
|
258
247
|
type: "group",
|
|
@@ -264,93 +253,90 @@ var Z = {
|
|
|
264
253
|
return;
|
|
265
254
|
}
|
|
266
255
|
let t = _(this.#t, e);
|
|
267
|
-
t !== this.#t && (this.#
|
|
256
|
+
t !== this.#t && (this.#O(t), this.#r || this.#A());
|
|
268
257
|
}
|
|
269
|
-
#
|
|
270
|
-
this.#
|
|
258
|
+
#D(e) {
|
|
259
|
+
this.#p = e.measurements, this.#c.invalidateAvailability(), this.requestUpdate(), this.#m.handleMeasurementsChange(e), this.#s.handleMeasurementsChange(e), this.#u.handleMeasurementsChange(e);
|
|
271
260
|
}
|
|
272
|
-
#
|
|
261
|
+
#O(e) {
|
|
273
262
|
if (e === this.#t) return;
|
|
274
263
|
let t = f(e);
|
|
275
264
|
this.#t = e, this.#n = t;
|
|
276
265
|
}
|
|
277
|
-
#
|
|
278
|
-
this.#
|
|
266
|
+
#k(e) {
|
|
267
|
+
this.#u.cancel();
|
|
279
268
|
let t = this.value;
|
|
280
|
-
this.#
|
|
269
|
+
this.#m.resetForRestore(), this.#O(e), this.#r = !0, this.requestUpdate("value", t);
|
|
281
270
|
}
|
|
282
|
-
#
|
|
283
|
-
this.#
|
|
271
|
+
#A() {
|
|
272
|
+
this.#c.invalidateAvailability(), this.dispatchEvent(new Event("change", {
|
|
284
273
|
bubbles: !0,
|
|
285
274
|
composed: !0
|
|
286
275
|
}));
|
|
287
276
|
}
|
|
288
|
-
#
|
|
289
|
-
d(this.#t, e) ? this.requestUpdate() : (this.#
|
|
277
|
+
#j(e) {
|
|
278
|
+
d(this.#t, e) ? this.requestUpdate() : (this.#O(e), this.#A());
|
|
290
279
|
}
|
|
291
|
-
#
|
|
280
|
+
#M(e, t) {
|
|
292
281
|
if (t) return;
|
|
293
282
|
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.#
|
|
283
|
+
n && this.shadowRoot?.querySelector(`nve-tabs-item[data-panel="${CSS.escape(n)}"]`) && (this.#N(n, "select"), this.#R(n));
|
|
295
284
|
}
|
|
296
|
-
#
|
|
297
|
-
if (this.#
|
|
285
|
+
#N(e, t) {
|
|
286
|
+
if (this.#s.finish(), !this.#t || !this.#y.some((t) => t.id === e)) return;
|
|
298
287
|
let n = this.#t;
|
|
299
288
|
t === "open" && (n = h(this.#t, e) ?? this.#t);
|
|
300
289
|
let r = v(n, e);
|
|
301
|
-
r === void 0 && n !== this.#t && (r = n), r && (this.#
|
|
290
|
+
r === void 0 && n !== this.#t && (r = n), r && (this.#u.cancel(), this.#m.cancel(), this.#O(r), this.#A());
|
|
302
291
|
}
|
|
303
|
-
#
|
|
304
|
-
this.#
|
|
292
|
+
#P(e) {
|
|
293
|
+
this.#u.suppressSelection || this.#N(e, "select");
|
|
305
294
|
}
|
|
306
|
-
#
|
|
295
|
+
#F(e, t, n = {}) {
|
|
307
296
|
let r = n.capabilities ?? {
|
|
308
297
|
rearrangeable: this.rearrangeable,
|
|
309
298
|
groupable: this.groupable
|
|
310
299
|
};
|
|
311
|
-
if (!r.rearrangeable || this.#
|
|
312
|
-
let i = this.#
|
|
300
|
+
if (!r.rearrangeable || this.#l.active) return !1;
|
|
301
|
+
let i = this.#V(e, t, {
|
|
313
302
|
candidate: n.layout,
|
|
314
303
|
groupable: r.groupable
|
|
315
304
|
});
|
|
316
|
-
return i ? (this.#
|
|
305
|
+
return i ? (this.#s.finish(), this.#u.cancel(), this.#m.cancel(), this.#O(i), this.#A(), this.#L(e, n), !0) : !1;
|
|
317
306
|
}
|
|
318
|
-
#
|
|
319
|
-
if (this.#
|
|
307
|
+
#I(e) {
|
|
308
|
+
if (this.#s.finish(), !this.closable || !this.#t) return;
|
|
320
309
|
let t = p(this.#t, e);
|
|
321
310
|
if (!t) return;
|
|
322
|
-
let n =
|
|
323
|
-
this.#
|
|
324
|
-
let r = this.#
|
|
325
|
-
n && this.#
|
|
311
|
+
let n = C(this, e);
|
|
312
|
+
this.#u.cancel(), this.#m.cancel(), this.#O(t), this.#A();
|
|
313
|
+
let r = this.#d.find((t) => t.panels.some((t) => t.id === e));
|
|
314
|
+
n && this.#R(r?.panels.find((t) => t.id !== e)?.id);
|
|
326
315
|
}
|
|
327
|
-
#
|
|
328
|
-
t.focus !== !1 && this.#
|
|
316
|
+
#L(e, t) {
|
|
317
|
+
t.focus !== !1 && this.#R(e.find((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)));
|
|
329
318
|
}
|
|
330
|
-
#
|
|
319
|
+
#R(e) {
|
|
331
320
|
x(this, { id: e });
|
|
332
321
|
}
|
|
333
|
-
#
|
|
334
|
-
|
|
335
|
-
|
|
322
|
+
#z(e) {
|
|
323
|
+
let t = this.#o.current;
|
|
324
|
+
if (t) return e(t);
|
|
325
|
+
let n = {
|
|
336
326
|
panels: this.#y,
|
|
337
327
|
layout: this.#v,
|
|
338
328
|
source: this.#i?.source ?? [],
|
|
339
329
|
measurements: this.#x,
|
|
340
|
-
policy: this.#
|
|
341
|
-
strip: (e) => this.#
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
return e(this.#g);
|
|
345
|
-
} finally {
|
|
346
|
-
this.#g = void 0;
|
|
347
|
-
}
|
|
330
|
+
policy: this.#m.policy,
|
|
331
|
+
strip: (e) => this.#g.findTabStrip(e)
|
|
332
|
+
};
|
|
333
|
+
return this.#o.run(n, this.#_, e);
|
|
348
334
|
}
|
|
349
|
-
#
|
|
350
|
-
return this.#
|
|
335
|
+
#B(e) {
|
|
336
|
+
return this.#o.current?.project(e) ?? g(e, this.#b);
|
|
351
337
|
}
|
|
352
|
-
#
|
|
353
|
-
if (this.#t) return this.#
|
|
338
|
+
#V(e, t, n = {}) {
|
|
339
|
+
if (this.#t) return this.#z((r) => A({
|
|
354
340
|
evaluation: r,
|
|
355
341
|
layout: this.#v,
|
|
356
342
|
measurements: this.#x,
|
|
@@ -360,28 +346,28 @@ var Z = {
|
|
|
360
346
|
candidate: n.candidate
|
|
361
347
|
}));
|
|
362
348
|
}
|
|
363
|
-
#
|
|
364
|
-
let t = e.filter((e) => !this.#t?.closed.includes(e) &&
|
|
349
|
+
#H(e) {
|
|
350
|
+
let t = this.#y, n = e.filter((e) => !this.#t?.closed.includes(e) && t.some((t) => t.id === e)), r = m(this.#t?.root ?? null, n[0])?.active, i = r && n.includes(r) ? r : n[0], a = i ? t.find((e) => e.id === i) : void 0;
|
|
365
351
|
return {
|
|
366
|
-
title:
|
|
367
|
-
layers: Math.min(
|
|
352
|
+
title: a ? S(a) : i ?? "",
|
|
353
|
+
layers: Math.min(n.length, 3)
|
|
368
354
|
};
|
|
369
355
|
}
|
|
370
|
-
#
|
|
356
|
+
#U(e) {
|
|
371
357
|
return this.#i?.source.includes(e) ?? !1;
|
|
372
358
|
}
|
|
373
|
-
#
|
|
359
|
+
#W(e = this.#i) {
|
|
374
360
|
return !!e && "allocation" in e && e.allocation !== "overlay";
|
|
375
361
|
}
|
|
376
362
|
render() {
|
|
377
|
-
return this.#
|
|
363
|
+
return this.#z((e) => this.#G(e));
|
|
378
364
|
}
|
|
379
|
-
#
|
|
365
|
+
#G(e) {
|
|
380
366
|
let t = this.#i, n = e.presentationGeometry();
|
|
381
|
-
this.#
|
|
382
|
-
let r = this.#
|
|
383
|
-
return this.#
|
|
384
|
-
groups: this.#
|
|
367
|
+
this.#d = E(n.groups, this.#t?.root ?? null, this.#i?.source), this.#f = n.boundaries;
|
|
368
|
+
let r = this.#J(n.regions, e);
|
|
369
|
+
return this.#g.applyPresentation({
|
|
370
|
+
groups: this.#d,
|
|
385
371
|
extent: n,
|
|
386
372
|
container: this.container,
|
|
387
373
|
measurements: this.#x,
|
|
@@ -389,9 +375,25 @@ var Z = {
|
|
|
389
375
|
animate: !!t,
|
|
390
376
|
source: t?.source ?? [],
|
|
391
377
|
scroll: (t) => e.scroll(t)
|
|
392
|
-
}),
|
|
378
|
+
}), B`<div internal-host ?data-resizing="${this.#m.resizing}" ?data-fullscreen="${this.#l.active}" ?data-rearranging="${!!t}" data-preview-allocation="${G(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.#u.refresh()}"><div class="canvas" style="${`min-width:${n.minimum.width}px;min-height:${n.minimum.height}px`}">${K(this.#d, (e) => this.#g.getGroupIdentity(e), (e) => this.#ee(e))}<slot @slotchange="${() => this.requestUpdate()}"></slot>${this.#oe()}<div class="preview-layer" data-drag-phase="${G(this.#i?.phase)}">${r}</div></div></div>${this.#ce()}</div>`;
|
|
379
|
+
}
|
|
380
|
+
#K(e, t, n) {
|
|
381
|
+
let r = this.isConnected && this.#i?.phase === "detached", i = this.#a;
|
|
382
|
+
if (r && i && i.catalogRegions === e && i.placedRegions === t && i.sourcePanelIds.length === n.length && i.sourcePanelIds.every((e, t) => e === n[t])) return i.boundaries;
|
|
383
|
+
this.#a = void 0;
|
|
384
|
+
let a = F(e, t, n);
|
|
385
|
+
return r && (this.#a = {
|
|
386
|
+
catalogRegions: e,
|
|
387
|
+
placedRegions: t,
|
|
388
|
+
sourcePanelIds: n.slice(),
|
|
389
|
+
boundaries: a
|
|
390
|
+
}), a;
|
|
393
391
|
}
|
|
394
392
|
#q(e, t) {
|
|
393
|
+
let n = t.scope && w(t.scope.members);
|
|
394
|
+
return K(e, (e) => e.key, (e) => B`<div class="scope-boundary" data-scope-boundary="${e.key}" ?data-active="${e.key === n}" inert aria-hidden="true" style="${e.style}"></div>`);
|
|
395
|
+
}
|
|
396
|
+
#J(e, t) {
|
|
395
397
|
let n = this.#i;
|
|
396
398
|
if (!n) return null;
|
|
397
399
|
let { x: r, y: i } = t.client({
|
|
@@ -399,120 +401,112 @@ var Z = {
|
|
|
399
401
|
y: 0,
|
|
400
402
|
width: 0,
|
|
401
403
|
height: 0
|
|
402
|
-
}), { title: a, layers: o } = this.#
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
|
|
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 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
|
-
point: h,
|
|
404
|
+
}), { title: a, layers: o } = this.#H(n.source), s = t.geometry(t.project(this.#v)).regions, c = this.#K(s, e, n.source), l = t.bounds(), u = this.#u.getPreviewHint(n, t), { rect: d, kind: f } = n.cue, p = {
|
|
405
|
+
...d,
|
|
406
|
+
x: d.x - r,
|
|
407
|
+
y: d.y - i
|
|
408
|
+
}, m = n.point;
|
|
409
|
+
return B`${this.#Y(u, r, i)}${this.#q(c, n)}<nve-ghost class="destination" part="ghost destination-ghost" data-destination-ghost ?data-cue-clipped="${d.width <= 0 || d.height <= 0}" data-drag-phase="${n.phase}" ?data-drop-blocked="${n.blocked}" data-destination-kind="${f}" ?data-reserved-placement="${I(n)}" style="${`transform:translate(${d.x - r}px,${d.y - i}px);width:${d.width}px;height:${d.height}px;${P(p, e)}`}">${n.blocked ? B`<nve-icon part="icon blocked-icon" name="cancel" status="danger" size="lg" aria-hidden="true"></nve-icon>` : null}${this.#X(n)}</nve-ghost>${m ? this.#$({
|
|
410
|
+
point: m,
|
|
417
411
|
x: r,
|
|
418
412
|
y: i,
|
|
419
|
-
bounds:
|
|
413
|
+
bounds: l,
|
|
420
414
|
title: a,
|
|
421
415
|
layers: o
|
|
422
416
|
}) : null}`;
|
|
423
417
|
}
|
|
424
|
-
#
|
|
425
|
-
return e ?
|
|
418
|
+
#Y(e, t, n) {
|
|
419
|
+
return e ? B`<div class="order-overlay" data-insertion-index="${e.insertion.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
420
|
}
|
|
427
|
-
#
|
|
421
|
+
#X(e) {
|
|
428
422
|
if (!e || e.phase !== "detached" || e.blocked || !e.seams) return null;
|
|
429
423
|
let { kind: t, edges: n } = e.seams;
|
|
430
|
-
return
|
|
424
|
+
return B`${n.map((e) => {
|
|
431
425
|
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
426
|
right: 0,
|
|
433
427
|
bottom: 90,
|
|
434
428
|
left: 180,
|
|
435
429
|
top: 270
|
|
436
430
|
}[e.side];
|
|
437
|
-
return
|
|
431
|
+
return B`<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.#Z() : this.#Q()}</svg></div>`;
|
|
438
432
|
})}`;
|
|
439
433
|
}
|
|
440
|
-
#X() {
|
|
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
|
-
}
|
|
443
434
|
#Z() {
|
|
444
|
-
return
|
|
435
|
+
return H`<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>`;
|
|
445
436
|
}
|
|
446
|
-
#Q(
|
|
447
|
-
|
|
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>`;
|
|
437
|
+
#Q() {
|
|
438
|
+
return H`<rect x="2" y="7" width="7" height="10" rx="1" fill="currentColor" fill-opacity=".2"></rect><path d="M22 4h-9v16h9"></path>`;
|
|
449
439
|
}
|
|
450
440
|
#$(e) {
|
|
451
|
-
let t
|
|
452
|
-
return
|
|
441
|
+
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));
|
|
442
|
+
return B`<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>`;
|
|
453
443
|
}
|
|
454
444
|
#ee(e) {
|
|
455
|
-
|
|
445
|
+
let t = this.#x, { headerHeight: n } = t, r = this.#W() && e.panels.every((e) => this.#U(e.id)), i = this.#l.isSelectedGroup(e.active), a = (this.#m.presentation?.fullscreenable ?? this.fullscreenable) || i, o = a ? t.groupActionWidth ?? 0 : 0;
|
|
446
|
+
return B`<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="${G(r ? "true" : void 0)}" style="${`height:${n}px`}">${this.#te(e)} ${this.#ne(e, o)} ${a ? this.#ae(e, i) : null}</div></div>`;
|
|
456
447
|
}
|
|
457
|
-
#te(e
|
|
458
|
-
|
|
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>`;
|
|
448
|
+
#te(e) {
|
|
449
|
+
return (this.#m.presentation?.rearrangeable ?? this.#S.rearrangeable) && !this.#l.active && e.gripWidth > 0 ? B`<nve-drag-handle part="drag-handle" data-drag-group="${e.panels[0]?.id ?? ""}" draggable="false" aria-label="${G(this.i18n.move)}" @click="${(e) => e.preventDefault()}"></nve-drag-handle>` : null;
|
|
460
450
|
}
|
|
461
451
|
#ne(e, t) {
|
|
462
|
-
let n =
|
|
452
|
+
let n = T(e, this.#x), r = this.#x.panels?.[e.active]?.suffixWidth ?? 0;
|
|
453
|
+
return B`<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.#g.getGroupIdentity(e)}" @scroll="${(t) => this.#g.handleScroll(e, t)}">${this.#re(e, n)}</div>`;
|
|
454
|
+
}
|
|
455
|
+
#re(e, t) {
|
|
456
|
+
let n = K(e.panels, (e) => e.id, (n, r) => this.#ie(e, n, {
|
|
463
457
|
left: r * t,
|
|
464
458
|
width: t
|
|
465
459
|
}));
|
|
466
|
-
return e.tabbed ?
|
|
460
|
+
return e.tabbed ? B`<nve-tabs part="tabs" class="tab-track" @nve-key-change="${(e) => {
|
|
467
461
|
let t = e.detail.activeItem.dataset.panel;
|
|
468
|
-
t && this.#
|
|
469
|
-
}}" style="${`width:${e.panels.length * t}px`}">${n}</nve-tabs>` :
|
|
462
|
+
t && this.#P(t);
|
|
463
|
+
}}" style="${`width:${e.panels.length * t}px`}">${n}</nve-tabs>` : B`<div class="tab-track" style="${`width:${e.panels.length * t}px`}">${n}</div>`;
|
|
470
464
|
}
|
|
471
|
-
#
|
|
472
|
-
let r =
|
|
465
|
+
#ie(e, t, n) {
|
|
466
|
+
let r = q({
|
|
473
467
|
left: `${n.left}px`,
|
|
474
468
|
width: `${n.width}px`,
|
|
475
469
|
"--height": `${this.#x.headerHeight}px`
|
|
476
|
-
}), i = this.#
|
|
477
|
-
return e.tabbed ?
|
|
470
|
+
}), i = this.#U(t.id), a = t.querySelector(":scope > nve-workspace-panel-header") ? null : B`<span class="fallback-title">${t.id}</span>`, o = this.#C ? B`<nve-icon-button slot="${G(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(t)}`}" @click="${() => this.#I(t.id)}"></nve-icon-button>` : null;
|
|
471
|
+
return e.tabbed ? B`<nve-tabs-item-group part="tabs-item-group" class="tab-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${G(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.#g.setHeaderHovered(t.id, !0)}" @pointerleave="${() => this.#g.setHeaderHovered(t.id, !1)}" @click="${() => this.#P(t.id)}">${a}</nve-tabs-item>${o}</nve-tabs-item-group>` : B`<div class="tab-entry panel-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${G(i ? "true" : void 0)}" style="${r}"><div class="panel-title" data-panel="${t.id}" aria-hidden="true">${a}</div>${o}</div>`;
|
|
478
472
|
}
|
|
479
|
-
#
|
|
473
|
+
#ae(e, t) {
|
|
480
474
|
let n = this.#x.panels?.[e.active]?.suffixWidth ?? 0, r = !this.isCommandAvailable("--toggle-fullscreen", { value: e.active });
|
|
481
|
-
return
|
|
475
|
+
return B`<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="${G(t ? this.i18n.exitFullscreen : this.i18n.enterFullscreen)}"></nve-icon-button></div>`;
|
|
482
476
|
}
|
|
483
|
-
#
|
|
484
|
-
return this.#T ?
|
|
477
|
+
#oe() {
|
|
478
|
+
return this.#T ? K(this.#f, (e) => e.key, (e) => this.#se(e)) : null;
|
|
485
479
|
}
|
|
486
|
-
#
|
|
487
|
-
return
|
|
480
|
+
#se(e) {
|
|
481
|
+
return B`<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.#m.gesture}" @toggle="${(e) => e.preventDefault()}" @input="${(t) => this.#m.input(t, e)}" @change="${(t) => this.#m.change(t, e)}"></nve-resize-handle></div>`;
|
|
488
482
|
}
|
|
489
|
-
#
|
|
490
|
-
let { rearrangeable: e } = this.#S, t = this.fullscreenable || this.#
|
|
491
|
-
return
|
|
483
|
+
#ce() {
|
|
484
|
+
let { rearrangeable: e } = this.#S, t = this.fullscreenable || this.#d.some((e) => this.#l.isSelectedGroup(e.active));
|
|
485
|
+
return B`<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 ? B`<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 ? B`<nve-drag-handle part="drag-handle" draggable="false"></nve-drag-handle>` : null}${t ? B`<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
486
|
}
|
|
493
487
|
};
|
|
494
|
-
t([
|
|
488
|
+
t([U({
|
|
495
489
|
type: Object,
|
|
496
490
|
attribute: !1
|
|
497
|
-
})],
|
|
491
|
+
})], Z.prototype, "i18n", void 0), t([U({
|
|
498
492
|
type: Boolean,
|
|
499
493
|
reflect: !0
|
|
500
|
-
})],
|
|
494
|
+
})], Z.prototype, "resizable", void 0), t([U({
|
|
501
495
|
type: Boolean,
|
|
502
496
|
reflect: !0
|
|
503
|
-
})],
|
|
497
|
+
})], Z.prototype, "rearrangeable", void 0), t([U({
|
|
504
498
|
type: Boolean,
|
|
505
499
|
reflect: !0
|
|
506
|
-
})],
|
|
500
|
+
})], Z.prototype, "groupable", void 0), t([U({
|
|
507
501
|
type: Boolean,
|
|
508
502
|
reflect: !0
|
|
509
|
-
})],
|
|
503
|
+
})], Z.prototype, "fullscreenable", void 0), t([U({
|
|
510
504
|
type: Number,
|
|
511
505
|
attribute: "detach-threshold"
|
|
512
|
-
})],
|
|
506
|
+
})], Z.prototype, "detachThreshold", void 0), t([U({
|
|
513
507
|
type: Boolean,
|
|
514
508
|
reflect: !0
|
|
515
|
-
})],
|
|
516
|
-
export {
|
|
509
|
+
})], Z.prototype, "closable", void 0), t([U({ attribute: "resize-policy" })], Z.prototype, "resizePolicy", void 0), t([U({ reflect: !0 })], Z.prototype, "container", void 0), t([U({ type: String })], Z.prototype, "value", null), Z = t([J()], Z);
|
|
510
|
+
export { Z as Workspace };
|
|
517
511
|
|
|
518
512
|
//# sourceMappingURL=workspace2.js.map
|