@nvidia-elements/core 2.22.5 → 2.23.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 +6 -0
- package/dist/accordion/accordion2.js +4 -4
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge2.js +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundle.d.ts +4 -0
- package/dist/bundles/index.d.ts +336 -0
- 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 +6555 -0
- package/dist/data.html.json +133 -0
- package/dist/data.snippets.json +27 -27
- 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/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.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +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 +8 -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 +25 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import type { WorkspaceHeaderConfiguration } from '../utils/presentation/header-configuration.utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* @element nve-workspace-panel-header
|
|
5
|
+
* @description Supplies a workspace panel title, decoration, and application controls.
|
|
6
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/workspace/
|
|
7
|
+
* @since 0.0.0
|
|
8
|
+
* @stable false
|
|
9
|
+
* @entrypoint \@nvidia-elements/core/workspace
|
|
10
|
+
* @slot - Noninteractive panel title.
|
|
11
|
+
* @slot prefix - Noninteractive title decoration.
|
|
12
|
+
* @slot suffix - Application controls for the selected panel.
|
|
13
|
+
* @cssprop --min-height
|
|
14
|
+
* @cssprop --padding - Padding around the title.
|
|
15
|
+
* @cssprop --prefix-padding - Padding around title decoration.
|
|
16
|
+
* @cssprop --prefix-border - Border after title decoration.
|
|
17
|
+
* @cssprop --suffix-padding - Override the shared inset around header controls.
|
|
18
|
+
* @cssprop --suffix-border - Border before header controls.
|
|
19
|
+
* @cssprop --gap
|
|
20
|
+
* @cssprop --border-bottom
|
|
21
|
+
*/
|
|
22
|
+
export declare class WorkspacePanelHeader extends LitElement {
|
|
23
|
+
#private;
|
|
24
|
+
static styles: import("lit").CSSResult[];
|
|
25
|
+
static readonly metadata: {
|
|
26
|
+
tag: string;
|
|
27
|
+
version: string;
|
|
28
|
+
parents: string[];
|
|
29
|
+
};
|
|
30
|
+
/** @private */
|
|
31
|
+
slot: string;
|
|
32
|
+
/** @private */
|
|
33
|
+
_internals: ElementInternals;
|
|
34
|
+
private configuration;
|
|
35
|
+
connectedCallback(): void;
|
|
36
|
+
disconnectedCallback(): void;
|
|
37
|
+
protected updated(): void;
|
|
38
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
39
|
+
/** @internal */
|
|
40
|
+
_getMeasurementTargets(): {
|
|
41
|
+
label: HTMLElement | null;
|
|
42
|
+
suffix: HTMLElement | null;
|
|
43
|
+
};
|
|
44
|
+
/** @internal */
|
|
45
|
+
_getTransitionTargets(): {
|
|
46
|
+
labelViewport: HTMLElement | null;
|
|
47
|
+
labelTrack: HTMLElement | null;
|
|
48
|
+
label: HTMLElement | null;
|
|
49
|
+
suffix: HTMLElement | null;
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
_hover(hovered: boolean): void;
|
|
53
|
+
/** @internal */
|
|
54
|
+
_configure({ scrollLeft, ...configuration }: WorkspaceHeaderConfiguration & {
|
|
55
|
+
scrollLeft: number;
|
|
56
|
+
}): void;
|
|
57
|
+
/** @internal */
|
|
58
|
+
_scroll(scrollLeft: number): void;
|
|
59
|
+
/** @internal */
|
|
60
|
+
_bindScroll(source: HTMLElement | undefined, extent: number): void;
|
|
61
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/workspace/panel-header/panel-header.css?inline
|
|
2
|
+
var e = ":host{--min-height: calc(var(--nve-ref-size-1000) + var(--nve-ref-size-200));--padding: var(--nve-ref-size-300) var(--nve-ref-size-400);--prefix-padding: 0;--prefix-border: none;--suffix-padding: initial;--suffix-border: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);--gap: var(--nve-ref-space-xs);--border-bottom: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);--font-size: var(--nve-ref-font-size-100);--font-weight: var(--nve-ref-font-weight-medium);--color: var(--nve-sys-text-muted-color);--text-transform: initial;display:block;position:absolute;inset:0;pointer-events:none;contain:none}:host(:state(selected)){--color: var(--nve-sys-text-emphasis-color);--font-weight: var(--nve-ref-font-weight-semibold)}:host(:is(:hover,:state(tab-hover)):not(:state(selected))){--color: var(--nve-sys-text-emphasis-color)}[internal-host]{position:relative;height:100%}.label-viewport{position:absolute;top:0;overflow:hidden;pointer-events:none}.label-track{transform:translate(var(--_workspace-tab-scroll, 0));position:absolute;inset:0}.label{position:absolute;top:0;overflow:hidden;box-sizing:border-box;display:flex;align-items:center}.label[data-animate]{transition:left var(--animation-duration) var(--animation-easing),width var(--animation-duration) var(--animation-easing)}.label-content{padding:var(--padding);min-height:var(--min-height);box-sizing:border-box;color:var(--color);font-size:var(--font-size);font-weight:var(--font-weight);line-height:var(--nve-ref-font-size-500);text-transform:var(--text-transform);display:inline-flex;align-items:center;gap:var(--gap);white-space:nowrap;width:100%}slot[name=prefix]{flex:none;display:inline-flex;align-items:center;gap:var(--gap);padding:var(--prefix-padding)}slot[name=prefix][data-empty]{display:none}slot[name=prefix]:not([data-empty]){border-inline-end:var(--prefix-border)}.title-content{display:block;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title-content slot{display:contents}.suffix{position:absolute;inset:0 0 0 auto;display:flex;align-items:center;width:max-content;pointer-events:auto;box-sizing:border-box;z-index:3}.suffix[data-inactive]{visibility:hidden;pointer-events:none}.suffix-content{min-height:var(--min-height);box-sizing:border-box;display:flex;align-items:center;width:max-content;padding:var(--suffix-padding, var(--header-control-inset, var(--nve-ref-size-100)));gap:var(--gap)}.suffix[data-group-actions] .suffix-content{padding:var( --suffix-padding, var(--header-control-inset, var(--nve-ref-size-100)) 0 var(--header-control-inset, var(--nve-ref-size-100)) var(--header-control-inset, var(--nve-ref-size-100)) )}.suffix:not([data-empty]) .suffix-content{border-inline-start:var(--suffix-border);border-inline-start-color:transparent}.suffix:not([data-empty]):before{content:\"\";position:absolute;inset-block:0;inset-inline-start:0;border-inline-start:var(--suffix-border);pointer-events:none}.suffix[data-empty] .suffix-content{min-height:0;padding:0}.separator{position:absolute;left:0;right:0;border-top:var(--border-bottom);z-index:1;pointer-events:none}";
|
|
3
|
+
export { e as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=panel-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-header.js","names":["panel_header_default"],"sources":["../../../src/workspace/panel-header/panel-header.css?inline"],"sourcesContent":["/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */\n/* SPDX-License-Identifier: Apache-2.0 */\n\n:host {\n --min-height: calc(var(--nve-ref-size-1000) + var(--nve-ref-size-200));\n --padding: var(--nve-ref-size-300) var(--nve-ref-size-400);\n --prefix-padding: 0;\n --prefix-border: none;\n --suffix-padding: initial;\n --suffix-border: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);\n --gap: var(--nve-ref-space-xs);\n --border-bottom: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);\n --font-size: var(--nve-ref-font-size-100);\n --font-weight: var(--nve-ref-font-weight-medium);\n --color: var(--nve-sys-text-muted-color);\n --text-transform: initial;\n display: block;\n position: absolute;\n inset: 0;\n pointer-events: none;\n contain: none;\n}\n\n:host(:state(selected)) {\n --color: var(--nve-sys-text-emphasis-color);\n --font-weight: var(--nve-ref-font-weight-semibold);\n}\n\n:host(:is(:hover, :state(tab-hover)):not(:state(selected))) {\n --color: var(--nve-sys-text-emphasis-color);\n}\n\n[internal-host] {\n position: relative;\n height: 100%;\n}\n\n.label-viewport {\n position: absolute;\n top: 0;\n overflow: hidden;\n pointer-events: none;\n}\n\n.label-track {\n transform: translateX(var(--_workspace-tab-scroll, 0));\n position: absolute;\n inset: 0;\n}\n\n.label {\n position: absolute;\n top: 0;\n overflow: hidden;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n}\n\n.label[data-animate] {\n transition:\n left var(--animation-duration) var(--animation-easing),\n width var(--animation-duration) var(--animation-easing);\n}\n\n.label-content {\n padding: var(--padding);\n min-height: var(--min-height);\n box-sizing: border-box;\n color: var(--color);\n font-size: var(--font-size);\n font-weight: var(--font-weight);\n line-height: var(--nve-ref-font-size-500);\n text-transform: var(--text-transform);\n display: inline-flex;\n align-items: center;\n gap: var(--gap);\n white-space: nowrap;\n width: 100%;\n}\n\nslot[name='prefix'] {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: var(--gap);\n padding: var(--prefix-padding);\n}\n\nslot[name='prefix'][data-empty] {\n display: none;\n}\n\nslot[name='prefix']:not([data-empty]) {\n border-inline-end: var(--prefix-border);\n}\n\n.title-content {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.title-content slot {\n display: contents;\n}\n\n.suffix {\n position: absolute;\n inset: 0 0 0 auto;\n display: flex;\n align-items: center;\n width: max-content;\n pointer-events: auto;\n box-sizing: border-box;\n z-index: 3;\n}\n\n.suffix[data-inactive] {\n visibility: hidden;\n pointer-events: none;\n}\n\n.suffix-content {\n min-height: var(--min-height);\n box-sizing: border-box;\n display: flex;\n align-items: center;\n width: max-content;\n padding: var(--suffix-padding, var(--header-control-inset, var(--nve-ref-size-100)));\n gap: var(--gap);\n}\n\n.suffix[data-group-actions] .suffix-content {\n padding: var(\n --suffix-padding,\n var(--header-control-inset, var(--nve-ref-size-100)) 0 var(--header-control-inset, var(--nve-ref-size-100))\n var(--header-control-inset, var(--nve-ref-size-100))\n );\n}\n\n.suffix:not([data-empty]) .suffix-content {\n border-inline-start: var(--suffix-border);\n border-inline-start-color: transparent;\n}\n\n.suffix:not([data-empty])::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n border-inline-start: var(--suffix-border);\n pointer-events: none;\n}\n\n.suffix[data-empty] .suffix-content {\n min-height: 0;\n padding: 0;\n}\n\n.separator {\n position: absolute;\n left: 0;\n right: 0;\n border-top: var(--border-bottom);\n z-index: 1;\n pointer-events: none;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { attachInternals as e } from "../../internal/utils/a11y.js";
|
|
2
|
+
import { hostAttr as t } from "../../internal/decorators/host-attr.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 { sameHeaderConfiguration as i } from "../utils/presentation/header-configuration.utils.js";
|
|
6
|
+
import a from "./panel-header.js";
|
|
7
|
+
import { LitElement as o, html as s, isServer as c } from "lit";
|
|
8
|
+
import { state as l } from "lit/decorators/state.js";
|
|
9
|
+
// src/workspace/panel-header/panel-header.ts
|
|
10
|
+
var u = class extends o {
|
|
11
|
+
constructor(...e) {
|
|
12
|
+
super(...e), this.slot = "header", this.configuration = {
|
|
13
|
+
selected: !1,
|
|
14
|
+
offset: 0,
|
|
15
|
+
animate: !1,
|
|
16
|
+
tabWidth: 0,
|
|
17
|
+
headerHeight: 0,
|
|
18
|
+
suffixEnd: 0,
|
|
19
|
+
clipLeft: 0,
|
|
20
|
+
clipWidth: 0
|
|
21
|
+
}, this.#t = 0;
|
|
22
|
+
}
|
|
23
|
+
static {
|
|
24
|
+
this.styles = n([a]);
|
|
25
|
+
}
|
|
26
|
+
static {
|
|
27
|
+
this.metadata = {
|
|
28
|
+
tag: "nve-workspace-panel-header",
|
|
29
|
+
version: "2.23.0",
|
|
30
|
+
parents: ["nve-workspace-panel"]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
#e;
|
|
34
|
+
#t;
|
|
35
|
+
#n;
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback(), e(this);
|
|
38
|
+
}
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
super.disconnectedCallback(), this._bindScroll(void 0, 0);
|
|
41
|
+
}
|
|
42
|
+
updated() {
|
|
43
|
+
this.#i();
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
let { selected: e, offset: t, animate: n, tabWidth: r, headerHeight: i, suffixEnd: a, clipLeft: o, clipWidth: l } = this.configuration;
|
|
47
|
+
return s`<div internal-host><div class="label-viewport" aria-hidden="true" style="${`left:${o}px;width:${l}px;height:${i}px`}"><div class="label-track"><div class="label" ?data-animate="${n}" style="${`left:${t - o}px;width:${r}px;height:${i}px`}"><span class="label-content"><slot name="prefix" ?data-empty="${!c && !this.querySelector(":scope > [slot=\"prefix\"]")}" @slotchange="${() => this.requestUpdate()}"></slot><span class="title-content"><slot @slotchange="${() => this.requestUpdate()}"></slot>${this.#a() ? null : this.parentElement?.id}</span></span></div></div></div>${e ? s`<div class="separator" style="${`top:${i}px`}" aria-hidden="true"></div>` : null}<div class="suffix" ?data-group-actions="${a > 0}" style="${`height:${i}px;right:${a}px`}" aria-hidden="${!e}" ?inert="${!e}" ?data-inactive="${!e}" ?data-empty="${!c && !this.querySelector(":scope > [slot=\"suffix\"]")}"><div class="suffix-content"><slot name="suffix" @slotchange="${() => this.requestUpdate()}"></slot></div></div></div>`;
|
|
48
|
+
}
|
|
49
|
+
_getMeasurementTargets() {
|
|
50
|
+
return {
|
|
51
|
+
label: this.shadowRoot?.querySelector(".label-content") ?? null,
|
|
52
|
+
suffix: this.shadowRoot?.querySelector(".suffix-content") ?? null
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
_getTransitionTargets() {
|
|
56
|
+
return {
|
|
57
|
+
labelViewport: this.shadowRoot?.querySelector(".label-viewport") ?? null,
|
|
58
|
+
labelTrack: this.shadowRoot?.querySelector(".label-track") ?? null,
|
|
59
|
+
label: this.shadowRoot?.querySelector(".label") ?? null,
|
|
60
|
+
suffix: this.shadowRoot?.querySelector(".suffix") ?? null
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
_hover(e) {
|
|
64
|
+
e ? this._internals.states.add("tab-hover") : this._internals.states.delete("tab-hover");
|
|
65
|
+
}
|
|
66
|
+
_configure({ scrollLeft: e, ...t }) {
|
|
67
|
+
this._scroll(e), !i(this.configuration, t) && (t.selected ? this._internals.states.add("selected") : this._internals.states.delete("selected"), this.configuration = t);
|
|
68
|
+
}
|
|
69
|
+
_scroll(e) {
|
|
70
|
+
this.#n || this.style.setProperty("--_workspace-tab-scroll", `${-e}px`);
|
|
71
|
+
}
|
|
72
|
+
_bindScroll(e, t) {
|
|
73
|
+
e === this.#e && t === this.#t || this.#r(e, t) || (this.#n?.cancel(), this.#n = void 0, this.#e = e, this.#t = t, this.#i(), this.#n || this._scroll(e?.scrollLeft ?? 0));
|
|
74
|
+
}
|
|
75
|
+
#r(e, t) {
|
|
76
|
+
if (e !== this.#e || t <= 0) return !1;
|
|
77
|
+
let n = this.#n?.effect;
|
|
78
|
+
return n instanceof KeyframeEffect && (this.#t = t, n.setKeyframes(d(t)), !0);
|
|
79
|
+
}
|
|
80
|
+
#i() {
|
|
81
|
+
if (this.#n || !this.#e || this.#t <= 0 || typeof ScrollTimeline > "u") return;
|
|
82
|
+
let e = this.shadowRoot?.querySelector(".label-track");
|
|
83
|
+
e && (this.#n = e.animate(d(this.#t), {
|
|
84
|
+
timeline: new ScrollTimeline({
|
|
85
|
+
source: this.#e,
|
|
86
|
+
axis: "x"
|
|
87
|
+
}),
|
|
88
|
+
fill: "both",
|
|
89
|
+
easing: "linear"
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
#a() {
|
|
93
|
+
return c ? !0 : [...this.childNodes].some((e) => (!(e instanceof Element) || !e.hasAttribute("slot")) && !!e.textContent?.trim());
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
r([t()], u.prototype, "slot", void 0), r([l()], u.prototype, "configuration", void 0);
|
|
97
|
+
function d(e) {
|
|
98
|
+
return [{ transform: "translateX(0px)" }, { transform: `translateX(${-e}px)` }];
|
|
99
|
+
}
|
|
100
|
+
export { u as WorkspacePanelHeader };
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=panel-header2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-header2.js","names":["styles","_decorate","__decorate","panel_header_default","WorkspacePanelHeader","LitElement","_args","#scrollExtent","useStyles","attachInternals","#bindScrollAnimation","clipLeft","clipWidth","headerHeight","animate","offset","tabWidth","isServer","#hasTitle","selected","suffixEnd","hovered","configuration","scrollLeft","#scrollAnimation","source","#scrollSource","extent","#updateScrollExtent","effect","scrollKeyframes","track","node","hostAttr","state"],"sources":["../../../src/workspace/panel-header/panel-header.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\nimport { state } from 'lit/decorators/state.js';\n\nimport { attachInternals, hostAttr, useStyles } from '@nvidia-elements/core/internal';\n\nimport { sameHeaderConfiguration } from '../utils/presentation/header-configuration.utils.js';\n\nimport type { WorkspaceHeaderConfiguration } from '../utils/presentation/header-configuration.utils.js';\n\nimport styles from './panel-header.css?inline';\n\n/**\n * @element nve-workspace-panel-header\n * @description Supplies a workspace panel title, decoration, and application controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/workspace/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/workspace\n * @slot - Noninteractive panel title.\n * @slot prefix - Noninteractive title decoration.\n * @slot suffix - Application controls for the selected panel.\n * @cssprop --min-height\n * @cssprop --padding - Padding around the title.\n * @cssprop --prefix-padding - Padding around title decoration.\n * @cssprop --prefix-border - Border after title decoration.\n * @cssprop --suffix-padding - Override the shared inset around header controls.\n * @cssprop --suffix-border - Border before header controls.\n * @cssprop --gap\n * @cssprop --border-bottom\n */\nexport class WorkspacePanelHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = { tag: 'nve-workspace-panel-header', version: '0.0.0', parents: ['nve-workspace-panel'] };\n\n /** @private */\n @hostAttr() slot = 'header';\n\n /** @private */\n declare _internals: ElementInternals;\n\n @state() private configuration: WorkspaceHeaderConfiguration = {\n selected: false,\n offset: 0,\n animate: false,\n tabWidth: 0,\n headerHeight: 0,\n suffixEnd: 0,\n clipLeft: 0,\n clipWidth: 0\n };\n\n #scrollSource?: HTMLElement;\n #scrollExtent = 0;\n #scrollAnimation?: Animation;\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._bindScroll(undefined, 0);\n }\n\n protected updated() {\n this.#bindScrollAnimation();\n }\n\n render() {\n const { selected, offset, animate, tabWidth, headerHeight, suffixEnd, clipLeft, clipWidth } = this.configuration;\n return html`\n <div internal-host>\n <div\n class=\"label-viewport\"\n aria-hidden=\"true\"\n style=${`left:${clipLeft}px;width:${clipWidth}px;height:${headerHeight}px`}>\n <div class=\"label-track\">\n <div\n class=\"label\"\n ?data-animate=${animate}\n style=${`left:${offset - clipLeft}px;width:${tabWidth}px;height:${headerHeight}px`}>\n <span class=\"label-content\">\n <slot\n name=\"prefix\"\n ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"prefix\"]')}\n @slotchange=${() => this.requestUpdate()}></slot>\n <span class=\"title-content\"><slot @slotchange=${() => this.requestUpdate()}></slot>${this.#hasTitle() ? null : this.parentElement?.id}</span>\n </span>\n </div>\n </div>\n </div>\n ${\n selected\n ? html`\n <div class=\"separator\" style=${`top:${headerHeight}px`} aria-hidden=\"true\"></div>\n `\n : null\n }\n <div\n class=\"suffix\"\n ?data-group-actions=${suffixEnd > 0}\n style=${`height:${headerHeight}px;right:${suffixEnd}px`}\n aria-hidden=${!selected}\n ?inert=${!selected}\n ?data-inactive=${!selected}\n ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"suffix\"]')}>\n <div class=\"suffix-content\"><slot name=\"suffix\" @slotchange=${() => this.requestUpdate()}></slot></div>\n </div>\n </div>\n `;\n }\n\n /** @internal */\n _getMeasurementTargets() {\n return {\n label: this.shadowRoot?.querySelector<HTMLElement>('.label-content') ?? null,\n suffix: this.shadowRoot?.querySelector<HTMLElement>('.suffix-content') ?? null\n };\n }\n\n /** @internal */\n _getTransitionTargets() {\n return {\n labelViewport: this.shadowRoot?.querySelector<HTMLElement>('.label-viewport') ?? null,\n labelTrack: this.shadowRoot?.querySelector<HTMLElement>('.label-track') ?? null,\n label: this.shadowRoot?.querySelector<HTMLElement>('.label') ?? null,\n suffix: this.shadowRoot?.querySelector<HTMLElement>('.suffix') ?? null\n };\n }\n\n /** @internal */\n _hover(hovered: boolean) {\n if (hovered) this._internals.states.add('tab-hover');\n else this._internals.states.delete('tab-hover');\n }\n\n /** @internal */\n _configure({ scrollLeft, ...configuration }: WorkspaceHeaderConfiguration & { scrollLeft: number }) {\n this._scroll(scrollLeft);\n if (sameHeaderConfiguration(this.configuration, configuration)) return;\n if (configuration.selected) this._internals.states.add('selected');\n else this._internals.states.delete('selected');\n this.configuration = configuration;\n }\n\n /** @internal */\n _scroll(scrollLeft: number) {\n // ScrollTimeline fallback; remove after wider adoption of Firefox 159.\n if (!this.#scrollAnimation) this.style.setProperty('--_workspace-tab-scroll', `${-scrollLeft}px`);\n }\n\n /** @internal */\n _bindScroll(source: HTMLElement | undefined, extent: number) {\n if (source === this.#scrollSource && extent === this.#scrollExtent) return;\n if (this.#updateScrollExtent(source, extent)) return;\n this.#scrollAnimation?.cancel();\n this.#scrollAnimation = undefined;\n this.#scrollSource = source;\n this.#scrollExtent = extent;\n this.#bindScrollAnimation();\n if (!this.#scrollAnimation) this._scroll(source?.scrollLeft ?? 0);\n }\n\n #updateScrollExtent(source: HTMLElement | undefined, extent: number) {\n if (source !== this.#scrollSource || extent <= 0) return false;\n const effect = this.#scrollAnimation?.effect;\n if (!(effect instanceof KeyframeEffect)) return false;\n this.#scrollExtent = extent;\n effect.setKeyframes(scrollKeyframes(extent));\n return true;\n }\n\n #bindScrollAnimation() {\n if (\n this.#scrollAnimation ||\n !this.#scrollSource ||\n this.#scrollExtent <= 0 ||\n typeof ScrollTimeline === 'undefined'\n )\n return;\n const track = this.shadowRoot?.querySelector<HTMLElement>('.label-track');\n if (!track) return;\n this.#scrollAnimation = track.animate(scrollKeyframes(this.#scrollExtent), {\n timeline: new ScrollTimeline({ source: this.#scrollSource, axis: 'x' }),\n fill: 'both',\n easing: 'linear'\n });\n }\n\n #hasTitle() {\n if (isServer) return true;\n return [...this.childNodes].some(\n node => (!(node instanceof Element) || !node.hasAttribute('slot')) && !!node.textContent?.trim()\n );\n }\n}\n\nfunction scrollKeyframes(extent: number) {\n return [{ transform: 'translateX(0px)' }, { transform: `translateX(${-extent}px)` }];\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAaI,IAAb,cAA0CC,EAAW;;EAuBnC,A,aAjBG,KAAA,OAAA,UAK4C,KAAA,gBAAA;GAC7D,UAAU;GACV,QAAQ;GACR,SAAS;GACT,UAAU;GACV,cAAc;GACd,WAAW;GACX,UAAU;GACV,WAAW;EACb,GAGgB,KAAAE,KAAA;;;EAtBA,KAAA,SAAAC,EAAU,CAACR,CAAM,CAAC;;;EAEP,KAAA,WAAA;GAAE,KAAK;GAA8B,SAAS;GAAS,SAAS,CAAC,qBAAqB;EAAE;;CAmBnH;CACA;CACA;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxBS,EAAgB,IAAI;CACtB;CAEA,uBAAuB;EAErB,AADA,MAAM,qBAAqB,GAC3B,KAAK,YAAY,KAAA,GAAW,CAAC;CAC/B;CAEA,UAAoB;EAClB,KAAKC,GAAqB;CAC5B;CAEA,SAAS;EACP,IAAM,EAAE,aAAU,WAAQ,YAAS,aAAU,iBAAc,cAAW,aAAU,iBAAc,KAAK;EACnG,OAAO,CAAI,4EAKG,QAAQC,EAAS,WAAWC,EAAU,YAAYC,EAAa,IAAI,+DAIvDC,EAAQ,WAChB,QAAQC,IAASJ,EAAS,WAAWK,EAAS,YAAYH,EAAa,IAAI,iEAIjE,CAACI,KAAY,CAAC,KAAK,cAAc,4BAA0B,EAAE,uBACvD,KAAK,cAAc,EAAE,gEACW,KAAK,cAAc,EAAE,WAAU,KAAKC,GAA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orkspacePlacedRegion } from './geometry/allocation.utils.js';
|
|
3
|
+
import type { WorkspaceDragPreview } from './interaction/drag-preview.utils.js';
|
|
4
|
+
import type { WorkspaceLayout, WorkspaceNode } from './model/layout.utils.js';
|
|
5
|
+
import type { WorkspacePresentedGroup, WorkspaceTarget } from './presentation/groups.utils.js';
|
|
6
|
+
import type { WorkspaceMeasurements } from './presentation/measurements.utils.js';
|
|
7
|
+
import type { WorkspacePanel } from '../panel/panel.js';
|
|
8
|
+
interface WorkspaceEvaluationInputs {
|
|
9
|
+
panels: WorkspacePanel[];
|
|
10
|
+
layout: WorkspaceLayout;
|
|
11
|
+
source: string[];
|
|
12
|
+
measurements: WorkspaceMeasurements;
|
|
13
|
+
policy: 'stop' | 'propagate';
|
|
14
|
+
strip(group: WorkspacePresentedGroup): HTMLElement | null | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkspaceGeometry {
|
|
17
|
+
groups: WorkspacePresentedGroup[];
|
|
18
|
+
boundaries: WorkspaceBoundary[];
|
|
19
|
+
regions: WorkspacePlacedRegion[];
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
minimum: Dimensions;
|
|
23
|
+
}
|
|
24
|
+
export interface WorkspaceEvaluationDelegate {
|
|
25
|
+
readonly getCurrentLayout: () => WorkspaceLayout;
|
|
26
|
+
readonly getCurrentMeasurements: () => WorkspaceMeasurements;
|
|
27
|
+
readonly getCurrentPreview: () => WorkspaceDragPreview | undefined;
|
|
28
|
+
readonly getFullscreenTarget: () => string | undefined;
|
|
29
|
+
readonly getResizePreview: () => WorkspaceLayout | undefined;
|
|
30
|
+
}
|
|
31
|
+
export interface WorkspacePlacementCatalog {
|
|
32
|
+
targets: WorkspaceTarget[];
|
|
33
|
+
regions: WorkspacePlacedRegion[];
|
|
34
|
+
orderingRegions?: WorkspacePlacedRegion[];
|
|
35
|
+
sourceSlot?: Rect;
|
|
36
|
+
headers?: Rect[];
|
|
37
|
+
preview?: WorkspaceDragPreview;
|
|
38
|
+
bounds: Rect;
|
|
39
|
+
headerTarget?: WorkspaceTarget;
|
|
40
|
+
reservationHit?: WorkspaceReservationHit;
|
|
41
|
+
}
|
|
42
|
+
type WorkspaceReservationHit = 'group' | 'tab';
|
|
43
|
+
/** Shares layout inputs and browser reads within one synchronous evaluation. */
|
|
44
|
+
export declare class WorkspaceEvaluation {
|
|
45
|
+
#private;
|
|
46
|
+
readonly panels: WorkspacePanel[];
|
|
47
|
+
readonly available: string[];
|
|
48
|
+
readonly requirements: import("./geometry/sizing.utils.js").WorkspaceRequirements;
|
|
49
|
+
readonly projectLayout: import("./model/projection.utils.js").WorkspaceLayoutProjector;
|
|
50
|
+
readonly contextRect: import("./placement/context.utils.js").WorkspaceContextRectResolver;
|
|
51
|
+
constructor(host: HTMLElement, inputs: WorkspaceEvaluationInputs, delegate?: WorkspaceEvaluationDelegate);
|
|
52
|
+
minimum(node: WorkspaceNode | null): Dimensions;
|
|
53
|
+
project(layout: WorkspaceLayout): WorkspaceLayout;
|
|
54
|
+
geometry(layout: WorkspaceLayout, extent?: WorkspaceLayout): WorkspaceGeometry;
|
|
55
|
+
detached(source: string[]): WorkspaceGeometry;
|
|
56
|
+
nonOrderGeometry(source: string[]): WorkspaceGeometry;
|
|
57
|
+
targetCatalog(source: string[], allocation?: WorkspaceGeometry): {
|
|
58
|
+
gap: number;
|
|
59
|
+
regions: WorkspacePlacedRegion[];
|
|
60
|
+
orderingRegions: WorkspacePlacedRegion[];
|
|
61
|
+
sourceSlot: Rect | undefined;
|
|
62
|
+
preview: WorkspaceDragPreview | undefined;
|
|
63
|
+
headers: Rect[];
|
|
64
|
+
targets: {
|
|
65
|
+
panels: string[];
|
|
66
|
+
rect: Rect;
|
|
67
|
+
headerHeight: number;
|
|
68
|
+
tabs: never[];
|
|
69
|
+
}[];
|
|
70
|
+
bounds: Rect;
|
|
71
|
+
};
|
|
72
|
+
getPlacementCatalog(source: string[], point: Point): WorkspacePlacementCatalog;
|
|
73
|
+
bounds(): Rect;
|
|
74
|
+
client(rect: Rect): {
|
|
75
|
+
width: number;
|
|
76
|
+
height: number;
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
};
|
|
80
|
+
scroll(group: WorkspacePresentedGroup): number;
|
|
81
|
+
presentationGeometry(): WorkspaceGeometry;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { getPanelIds as e } from "./model/layout.utils.js";
|
|
2
|
+
import { createDetachedLayout as t, getFullscreenWorkspaceLayout as n, projectLayout as r } from "./model/operations.utils.js";
|
|
3
|
+
import { clipCue as i } from "./interaction/drag-preview.utils.js";
|
|
4
|
+
import { createPresentedGroups as a, findTabHeaderTarget as o, getTabReservationHit as s, preserveRecipientSelection as c, projectTabMembership as l } from "./presentation/groups.utils.js";
|
|
5
|
+
import { allocateContextProxies as u, createContextRectResolver as d, getContextKey as f } from "./placement/context.utils.js";
|
|
6
|
+
import { createWorkspaceLayoutProjector as p, findDeepestProjectionCarrier as m, getProjectionSignature as h } from "./model/projection.utils.js";
|
|
7
|
+
import { getMinimumWorkspaceDimensions as g, getWorkspaceRequirements as _ } from "./geometry/sizing.utils.js";
|
|
8
|
+
import { allocateWorkspace as v } from "./geometry/allocation.utils.js";
|
|
9
|
+
// src/workspace/utils/evaluation.utils.ts
|
|
10
|
+
var y = class {
|
|
11
|
+
#e;
|
|
12
|
+
#t;
|
|
13
|
+
#n;
|
|
14
|
+
#r;
|
|
15
|
+
#i;
|
|
16
|
+
#a;
|
|
17
|
+
#o;
|
|
18
|
+
#s;
|
|
19
|
+
#c;
|
|
20
|
+
constructor(e, t, n) {
|
|
21
|
+
this.projectLayout = p(), this.contextRect = d(), this.#r = /* @__PURE__ */ new WeakMap(), this.#i = /* @__PURE__ */ new Map(), this.#a = /* @__PURE__ */ new Map(), this.#o = /* @__PURE__ */ new WeakMap(), this.#e = e, this.#t = t, this.#n = n, this.panels = t.panels, this.available = t.panels.map((e) => e.id), this.requirements = _(t);
|
|
22
|
+
}
|
|
23
|
+
minimum(e) {
|
|
24
|
+
let t = this.#a.get(e);
|
|
25
|
+
return t || (t = g(e, this.requirements), this.#a.set(e, t)), t;
|
|
26
|
+
}
|
|
27
|
+
project(e) {
|
|
28
|
+
return this.projectLayout(e, this.available);
|
|
29
|
+
}
|
|
30
|
+
geometry(e, t = e) {
|
|
31
|
+
let n = this.#i.get(e.root);
|
|
32
|
+
n || (n = /* @__PURE__ */ new Map(), this.#i.set(e.root, n));
|
|
33
|
+
let r = n.get(t.root);
|
|
34
|
+
return r || (r = b({
|
|
35
|
+
...this.#t,
|
|
36
|
+
minimum: (e) => this.minimum(e)
|
|
37
|
+
}, e, t), n.set(t.root, r)), r;
|
|
38
|
+
}
|
|
39
|
+
detached(e) {
|
|
40
|
+
let n = this.#o.get(e);
|
|
41
|
+
return n || (n = this.geometry(this.project(t(this.#t.layout, e)), this.project(this.#t.layout)), this.#o.set(e, n)), n;
|
|
42
|
+
}
|
|
43
|
+
nonOrderGeometry(e) {
|
|
44
|
+
let t = this.detached(e), n = this.#n?.getCurrentPreview();
|
|
45
|
+
return n?.phase !== "detached" || n.intent.kind !== "tab" || n.allocation !== "reserved" ? t : {
|
|
46
|
+
...t,
|
|
47
|
+
groups: l(t.groups, this.geometry(this.project(n.layout)).groups)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
targetCatalog(e, t = this.nonOrderGeometry(e)) {
|
|
51
|
+
let n = this.#l;
|
|
52
|
+
return x({
|
|
53
|
+
gap: this.#u.gap,
|
|
54
|
+
currentLayout: n,
|
|
55
|
+
catalog: this.geometry(this.project(n)).regions,
|
|
56
|
+
allocation: t,
|
|
57
|
+
reservation: this.presentationGeometry(),
|
|
58
|
+
preview: this.#n?.getCurrentPreview(),
|
|
59
|
+
source: e,
|
|
60
|
+
available: this.available,
|
|
61
|
+
bounds: this.bounds(),
|
|
62
|
+
client: (e) => this.client(e),
|
|
63
|
+
headerHeight: this.#u.headerHeight
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getPlacementCatalog(e, t) {
|
|
67
|
+
let n = o(this.#f(e, t)), r = this.targetCatalog(e);
|
|
68
|
+
return r.headerTarget = n, r.reservationHit = D({
|
|
69
|
+
...this.#f(this.#n?.getCurrentPreview()?.source ?? [], t),
|
|
70
|
+
groups: this.presentationGeometry().groups
|
|
71
|
+
}), r;
|
|
72
|
+
}
|
|
73
|
+
bounds() {
|
|
74
|
+
return this.#c ??= A(this.#e);
|
|
75
|
+
}
|
|
76
|
+
client(e) {
|
|
77
|
+
let t = this.#s ??= j(this.#e, {
|
|
78
|
+
x: 0,
|
|
79
|
+
y: 0,
|
|
80
|
+
width: 0,
|
|
81
|
+
height: 0
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
...e,
|
|
85
|
+
x: e.x + t.x,
|
|
86
|
+
y: e.y + t.y
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
scroll(e) {
|
|
90
|
+
if (e.panels.length < 2) return 0;
|
|
91
|
+
let t = this.#t.strip(e);
|
|
92
|
+
if (!t) return 0;
|
|
93
|
+
let n = this.#r.get(t);
|
|
94
|
+
return n === void 0 && (n = t.scrollLeft, this.#r.set(t, n)), n;
|
|
95
|
+
}
|
|
96
|
+
presentationGeometry() {
|
|
97
|
+
let e = n(this.project(this.#l), this.#n?.getFullscreenTarget());
|
|
98
|
+
return e ? this.geometry(e) : this.#d();
|
|
99
|
+
}
|
|
100
|
+
get #l() {
|
|
101
|
+
return this.#n?.getCurrentLayout() ?? this.#t.layout;
|
|
102
|
+
}
|
|
103
|
+
get #u() {
|
|
104
|
+
return this.#n?.getCurrentMeasurements() ?? this.#t.measurements;
|
|
105
|
+
}
|
|
106
|
+
#d() {
|
|
107
|
+
let e = this.#n?.getCurrentPreview();
|
|
108
|
+
return M(e) ? this.nonOrderGeometry(e.source) : e && "allocation" in e && e.allocation === "reserved" ? this.geometry(this.project(e.layout)) : N(e) ? this.detached(e.source) : this.geometry(this.project(this.#n?.getResizePreview() ?? this.#l));
|
|
109
|
+
}
|
|
110
|
+
#f(e, t) {
|
|
111
|
+
return {
|
|
112
|
+
groups: c(this.nonOrderGeometry(e).groups, this.#l.root, e),
|
|
113
|
+
measurements: this.#u,
|
|
114
|
+
source: e,
|
|
115
|
+
point: t,
|
|
116
|
+
bounds: this.bounds(),
|
|
117
|
+
client: (e) => this.client(e),
|
|
118
|
+
scroll: (e) => this.scroll(e)
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
function b(e, t, n) {
|
|
123
|
+
let r = e.minimum(n.root), i = Math.max(e.measurements.width, r.width), o = Math.max(e.measurements.height, r.height), s = v({
|
|
124
|
+
root: t.root,
|
|
125
|
+
rect: {
|
|
126
|
+
x: 0,
|
|
127
|
+
y: 0,
|
|
128
|
+
width: i,
|
|
129
|
+
height: o
|
|
130
|
+
},
|
|
131
|
+
minimum: e.minimum,
|
|
132
|
+
policy: e.policy,
|
|
133
|
+
gap: e.measurements.gap
|
|
134
|
+
}), c = a({
|
|
135
|
+
groups: s.groups,
|
|
136
|
+
panels: e.panels,
|
|
137
|
+
root: e.layout.root,
|
|
138
|
+
closed: e.layout.closed,
|
|
139
|
+
source: e.source,
|
|
140
|
+
gripWidth: e.measurements.gripWidth
|
|
141
|
+
});
|
|
142
|
+
return {
|
|
143
|
+
...s,
|
|
144
|
+
width: i,
|
|
145
|
+
height: o,
|
|
146
|
+
minimum: r,
|
|
147
|
+
groups: c
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function x(e) {
|
|
151
|
+
let { currentLayout: t, catalog: n, allocation: r, source: i, available: a, bounds: o } = e, s = {
|
|
152
|
+
catalog: n,
|
|
153
|
+
allocation: r.regions,
|
|
154
|
+
source: i,
|
|
155
|
+
bounds: o,
|
|
156
|
+
getRemainingLayoutSignature: w({
|
|
157
|
+
currentLayout: t,
|
|
158
|
+
source: i,
|
|
159
|
+
available: a
|
|
160
|
+
})
|
|
161
|
+
}, c = n.map((t) => ({
|
|
162
|
+
...t,
|
|
163
|
+
rect: e.client(t.rect)
|
|
164
|
+
})), l = S({
|
|
165
|
+
...s,
|
|
166
|
+
catalog: c,
|
|
167
|
+
allocation: r.regions.map((t) => ({
|
|
168
|
+
...t,
|
|
169
|
+
rect: e.client(t.rect)
|
|
170
|
+
}))
|
|
171
|
+
});
|
|
172
|
+
return {
|
|
173
|
+
gap: e.gap,
|
|
174
|
+
regions: l,
|
|
175
|
+
orderingRegions: e.reservation ? S({
|
|
176
|
+
...s,
|
|
177
|
+
catalog: c,
|
|
178
|
+
allocation: e.reservation.regions.map((t) => ({
|
|
179
|
+
...t,
|
|
180
|
+
rect: e.client(t.rect)
|
|
181
|
+
}))
|
|
182
|
+
}) : l,
|
|
183
|
+
sourceSlot: e.reservation ? O({
|
|
184
|
+
...e,
|
|
185
|
+
groups: e.reservation.groups
|
|
186
|
+
}) : void 0,
|
|
187
|
+
preview: e.preview,
|
|
188
|
+
headers: E(e),
|
|
189
|
+
targets: T(l, i, e.headerHeight),
|
|
190
|
+
bounds: o
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function S(e) {
|
|
194
|
+
let t = u(e);
|
|
195
|
+
return C(e, (e) => t.find((t) => t.key === e)?.rect);
|
|
196
|
+
}
|
|
197
|
+
function C(t, n) {
|
|
198
|
+
let { catalog: r, allocation: a, source: o, bounds: s } = t, c = a.some((t) => t.node.type === "group" && e(t.node).every((e) => o.includes(e))), l = new Set(a.filter((e) => e.node.type === "split").map((t) => f(e(t.node)))), u = /* @__PURE__ */ new Set();
|
|
199
|
+
return [...r].reverse().flatMap((r) => {
|
|
200
|
+
let a = e(r.node), d = a.filter((e) => !o.includes(e));
|
|
201
|
+
if (!d.length) return [];
|
|
202
|
+
let p = f(a), m = c && r.node.type === "split" && l.has(p) ? p : f(d), h = n(m);
|
|
203
|
+
if (!h) return [];
|
|
204
|
+
let g = i(h, s);
|
|
205
|
+
if (g.width <= 0 || g.height <= 0) return [];
|
|
206
|
+
let _ = `${m}:${t.getRemainingLayoutSignature(r.node)}`;
|
|
207
|
+
return u.has(_) ? [] : (u.add(_), [{
|
|
208
|
+
...r,
|
|
209
|
+
rect: {
|
|
210
|
+
x: h.x,
|
|
211
|
+
y: h.y,
|
|
212
|
+
width: h.width,
|
|
213
|
+
height: h.height
|
|
214
|
+
}
|
|
215
|
+
}]);
|
|
216
|
+
}).reverse();
|
|
217
|
+
}
|
|
218
|
+
function w(e) {
|
|
219
|
+
let n = e.available.filter((t) => !e.currentLayout.closed.includes(t)), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (e) => (i.has(e) || i.set(e, r({
|
|
220
|
+
version: 1,
|
|
221
|
+
root: e,
|
|
222
|
+
closed: []
|
|
223
|
+
}, n).root), i.get(e) ?? null);
|
|
224
|
+
return (n) => {
|
|
225
|
+
let r = a.get(n);
|
|
226
|
+
if (r === void 0) {
|
|
227
|
+
let i = m(e.currentLayout.root, h(n), o), s = t({
|
|
228
|
+
version: 1,
|
|
229
|
+
root: i ?? n,
|
|
230
|
+
closed: []
|
|
231
|
+
}, e.source);
|
|
232
|
+
r = JSON.stringify(s.root), a.set(n, r);
|
|
233
|
+
}
|
|
234
|
+
return r;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function T(e, t, n) {
|
|
238
|
+
return e.flatMap((e) => e.node.type === "group" ? [{
|
|
239
|
+
panels: e.node.panels.filter((e) => !t.includes(e)),
|
|
240
|
+
rect: e.rect,
|
|
241
|
+
headerHeight: n,
|
|
242
|
+
tabs: []
|
|
243
|
+
}] : []);
|
|
244
|
+
}
|
|
245
|
+
function E(e) {
|
|
246
|
+
return (e.reservation?.groups ?? []).flatMap((t) => {
|
|
247
|
+
if (t.panels.every((t) => e.source.includes(t.id))) return [];
|
|
248
|
+
let n = e.client(t.rect);
|
|
249
|
+
return [i({
|
|
250
|
+
...n,
|
|
251
|
+
height: Math.min(n.height, e.headerHeight)
|
|
252
|
+
}, e.bounds)];
|
|
253
|
+
}).filter((e) => e.width > 0 && e.height > 0);
|
|
254
|
+
}
|
|
255
|
+
function D(e) {
|
|
256
|
+
let t = O(e);
|
|
257
|
+
if (!t) return s(e);
|
|
258
|
+
if (k(t, e.point)) return "group";
|
|
259
|
+
}
|
|
260
|
+
function O(e) {
|
|
261
|
+
let t = e.groups.find((t) => t.panels.length > 0 && t.panels.every((t) => e.source.includes(t.id)));
|
|
262
|
+
return t ? i(e.client(t.rect), e.bounds) : void 0;
|
|
263
|
+
}
|
|
264
|
+
function k(e, t) {
|
|
265
|
+
return e.width > 0 && e.height > 0 && t.x >= e.x && t.x < e.x + e.width && t.y >= e.y && t.y < e.y + e.height;
|
|
266
|
+
}
|
|
267
|
+
function A(e) {
|
|
268
|
+
let t = e.shadowRoot?.querySelector(".viewport");
|
|
269
|
+
if (!(t instanceof HTMLElement)) return e.getBoundingClientRect();
|
|
270
|
+
let n = t.getBoundingClientRect();
|
|
271
|
+
return {
|
|
272
|
+
x: n.x + t.clientLeft,
|
|
273
|
+
y: n.y + t.clientTop,
|
|
274
|
+
width: t.clientWidth,
|
|
275
|
+
height: t.clientHeight
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
function j(e, t) {
|
|
279
|
+
let n = e.shadowRoot?.querySelector(".canvas")?.getBoundingClientRect();
|
|
280
|
+
return {
|
|
281
|
+
...t,
|
|
282
|
+
x: t.x + (n?.x ?? 0),
|
|
283
|
+
y: t.y + (n?.y ?? 0)
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
function M(e) {
|
|
287
|
+
return !!e && e.phase === "detached" && e.intent.kind !== "order" && e.intent.kind !== "insert" && (e.intent.kind !== "invalid" || e.allocation !== "reserved");
|
|
288
|
+
}
|
|
289
|
+
function N(e) {
|
|
290
|
+
return !!e && "allocation" in e && e.allocation === "overlay" && (e.phase === "detached" || e.phase === "returning-detached");
|
|
291
|
+
}
|
|
292
|
+
export { y as WorkspaceEvaluation };
|
|
293
|
+
|
|
294
|
+
//# sourceMappingURL=evaluation.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluation.utils.js","names":["WorkspaceEvaluation","createWorkspaceLayoutProjector","createContextRectResolver","#scroll","#allocations","#minima","#detached","#host","host","#inputs","inputs","#delegate","delegate","panel","getWorkspaceRequirements","minimum","node","getMinimumWorkspaceDimensions","layout","allocations","geometry","extent","allocateGeometry","source","createDetachedLayout","spatial","preview","projectTabMembership","currentLayout","#currentLayout","workspaceInputCatalog","#currentMeasurements","rect","headerTarget","findTabHeaderTarget","#headerInput","point","catalog","computedReservationHit","#bounds","interactionBounds","origin","#origin","canvasClientRect","group","strip","scroll","fullscreen","getFullscreenWorkspaceLayout","#getArrangementGeometry","isNonOrderPreview","isOverlayDetachedPreview","preserveRecipientSelection","floor","input","width","height","allocated","allocateWorkspace","groups","createPresentedGroups","allocation","createRemainingLayoutSignatureResolver","clientCatalog","region","regions","computedRegionCatalog","computedSourceSlot","computedChromeRects","groupTargets","proxies","allocateContextProxies","regionCatalog","proxy","key","vacant","getPanelIds","id","owners","getContextKey","seen","members","remaining","full","presented","read","clipCue","bounds","identity","visible","projections","signatures","getProjectedNode","candidate","projectLayout","signature","carrier","findDeepestProjectionCarrier","getProjectionSignature","remainingLayout","getTabReservationHit","contains","item","viewport","workspace","canvas"],"sources":["../../../src/workspace/utils/evaluation.utils.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Dimensions, Point, Rect } from '@nvidia-elements/core/internal';\n\nimport { allocateWorkspace } from './geometry/allocation.utils.js';\nimport { getMinimumWorkspaceDimensions, getWorkspaceRequirements } from './geometry/sizing.utils.js';\nimport { clipCue } from './interaction/drag-preview.utils.js';\nimport { getPanelIds } from './model/layout.utils.js';\nimport { createDetachedLayout, getFullscreenWorkspaceLayout, projectLayout } from './model/operations.utils.js';\nimport {\n createWorkspaceLayoutProjector,\n findDeepestProjectionCarrier,\n getProjectionSignature\n} from './model/projection.utils.js';\nimport { allocateContextProxies, createContextRectResolver, getContextKey } from './placement/context.utils.js';\nimport {\n createPresentedGroups,\n findTabHeaderTarget,\n getTabReservationHit,\n preserveRecipientSelection,\n projectTabMembership\n} from './presentation/groups.utils.js';\n\nimport type { WorkspaceBoundary, WorkspacePlacedRegion } from './geometry/allocation.utils.js';\nimport type { WorkspaceDragPreview } from './interaction/drag-preview.utils.js';\nimport type { WorkspaceLayout, WorkspaceNode } from './model/layout.utils.js';\nimport type { WorkspacePresentedGroup, WorkspaceTarget } from './presentation/groups.utils.js';\nimport type { WorkspaceMeasurements } from './presentation/measurements.utils.js';\n\nimport type { WorkspacePanel } from '../panel/panel.js';\n\ninterface WorkspaceEvaluationInputs {\n panels: WorkspacePanel[];\n layout: WorkspaceLayout;\n source: string[];\n measurements: WorkspaceMeasurements;\n policy: 'stop' | 'propagate';\n strip(group: WorkspacePresentedGroup): HTMLElement | null | undefined;\n}\n\nexport interface WorkspaceGeometry {\n groups: WorkspacePresentedGroup[];\n boundaries: WorkspaceBoundary[];\n regions: WorkspacePlacedRegion[];\n width: number;\n height: number;\n minimum: Dimensions;\n}\n\nexport interface WorkspaceEvaluationDelegate {\n readonly getCurrentLayout: () => WorkspaceLayout;\n readonly getCurrentMeasurements: () => WorkspaceMeasurements;\n readonly getCurrentPreview: () => WorkspaceDragPreview | undefined;\n readonly getFullscreenTarget: () => string | undefined;\n readonly getResizePreview: () => WorkspaceLayout | undefined;\n}\n\nexport interface WorkspacePlacementCatalog {\n targets: WorkspaceTarget[];\n regions: WorkspacePlacedRegion[];\n orderingRegions?: WorkspacePlacedRegion[];\n sourceSlot?: Rect;\n headers?: Rect[];\n preview?: WorkspaceDragPreview;\n bounds: Rect;\n headerTarget?: WorkspaceTarget;\n reservationHit?: WorkspaceReservationHit;\n}\n\ntype WorkspaceReservationHit = 'group' | 'tab';\n\ninterface RegionCatalogInput {\n catalog: WorkspacePlacedRegion[];\n allocation: WorkspacePlacedRegion[];\n source: string[];\n bounds: Rect;\n getRemainingLayoutSignature(node: WorkspaceNode): string;\n}\n\ntype DetachedPreview = Extract<WorkspaceDragPreview, { phase: 'detached' }>;\n\n/** Shares layout inputs and browser reads within one synchronous evaluation. */\nexport class WorkspaceEvaluation {\n readonly panels: WorkspacePanel[];\n readonly available: string[];\n readonly requirements;\n readonly projectLayout = createWorkspaceLayoutProjector();\n readonly contextRect = createContextRectResolver();\n\n readonly #host: HTMLElement;\n readonly #inputs: WorkspaceEvaluationInputs;\n readonly #delegate?: WorkspaceEvaluationDelegate;\n readonly #scroll = new WeakMap<HTMLElement, number>();\n readonly #allocations = new Map<WorkspaceNode | null, Map<WorkspaceNode | null, WorkspaceGeometry>>();\n readonly #minima = new Map<WorkspaceNode | null, Dimensions>();\n readonly #detached = new WeakMap<string[], WorkspaceGeometry>();\n\n #origin?: Rect;\n #bounds?: Rect;\n\n constructor(host: HTMLElement, inputs: WorkspaceEvaluationInputs, delegate?: WorkspaceEvaluationDelegate) {\n this.#host = host;\n this.#inputs = inputs;\n this.#delegate = delegate;\n this.panels = inputs.panels;\n this.available = inputs.panels.map(panel => panel.id);\n this.requirements = getWorkspaceRequirements(inputs);\n }\n\n minimum(node: WorkspaceNode | null) {\n let minimum = this.#minima.get(node);\n if (!minimum) {\n minimum = getMinimumWorkspaceDimensions(node, this.requirements);\n this.#minima.set(node, minimum);\n }\n return minimum;\n }\n\n project(layout: WorkspaceLayout) {\n return this.projectLayout(layout, this.available);\n }\n\n geometry(layout: WorkspaceLayout, extent = layout) {\n let allocations = this.#allocations.get(layout.root);\n if (!allocations) {\n allocations = new Map();\n this.#allocations.set(layout.root, allocations);\n }\n let geometry = allocations.get(extent.root);\n if (!geometry) {\n geometry = allocateGeometry({ ...this.#inputs, minimum: node => this.minimum(node) }, layout, extent);\n allocations.set(extent.root, geometry);\n }\n return geometry;\n }\n\n detached(source: string[]) {\n let geometry = this.#detached.get(source);\n if (!geometry) {\n geometry = this.geometry(\n this.project(createDetachedLayout(this.#inputs.layout, source)),\n this.project(this.#inputs.layout)\n );\n this.#detached.set(source, geometry);\n }\n return geometry;\n }\n\n nonOrderGeometry(source: string[]) {\n const spatial = this.detached(source);\n const preview = this.#delegate?.getCurrentPreview();\n if (preview?.phase !== 'detached' || preview.intent.kind !== 'tab' || preview.allocation !== 'reserved') {\n return spatial;\n }\n\n return {\n ...spatial,\n groups: projectTabMembership(spatial.groups, this.geometry(this.project(preview.layout)).groups)\n };\n }\n\n targetCatalog(source: string[], allocation = this.nonOrderGeometry(source)) {\n const currentLayout = this.#currentLayout;\n return workspaceInputCatalog({\n gap: this.#currentMeasurements.gap,\n currentLayout,\n catalog: this.geometry(this.project(currentLayout)).regions,\n allocation,\n reservation: this.presentationGeometry(),\n preview: this.#delegate?.getCurrentPreview(),\n source,\n available: this.available,\n bounds: this.bounds(),\n client: rect => this.client(rect),\n headerHeight: this.#currentMeasurements.headerHeight\n });\n }\n\n getPlacementCatalog(source: string[], point: Point): WorkspacePlacementCatalog {\n const headerTarget = findTabHeaderTarget(this.#headerInput(source, point));\n const catalog: WorkspacePlacementCatalog = this.targetCatalog(source);\n catalog.headerTarget = headerTarget;\n catalog.reservationHit = computedReservationHit({\n ...this.#headerInput(this.#delegate?.getCurrentPreview()?.source ?? [], point),\n groups: this.presentationGeometry().groups\n });\n return catalog;\n }\n\n bounds() {\n return (this.#bounds ??= interactionBounds(this.#host));\n }\n\n client(rect: Rect) {\n const origin = (this.#origin ??= canvasClientRect(this.#host, { x: 0, y: 0, width: 0, height: 0 }));\n return { ...rect, x: rect.x + origin.x, y: rect.y + origin.y };\n }\n\n scroll(group: WorkspacePresentedGroup) {\n if (group.panels.length < 2) return 0;\n const strip = this.#inputs.strip(group);\n if (!strip) return 0;\n let scroll = this.#scroll.get(strip);\n if (scroll === undefined) {\n scroll = strip.scrollLeft;\n this.#scroll.set(strip, scroll);\n }\n return scroll;\n }\n\n presentationGeometry() {\n const fullscreen = getFullscreenWorkspaceLayout(\n this.project(this.#currentLayout),\n this.#delegate?.getFullscreenTarget()\n );\n if (fullscreen) {\n return this.geometry(fullscreen);\n }\n return this.#getArrangementGeometry();\n }\n\n get #currentLayout() {\n return this.#delegate?.getCurrentLayout() ?? this.#inputs.layout;\n }\n\n get #currentMeasurements() {\n return this.#delegate?.getCurrentMeasurements() ?? this.#inputs.measurements;\n }\n\n #getArrangementGeometry() {\n const preview = this.#delegate?.getCurrentPreview();\n if (isNonOrderPreview(preview)) {\n return this.nonOrderGeometry(preview.source);\n }\n if (preview && 'allocation' in preview && preview.allocation === 'reserved') {\n return this.geometry(this.project(preview.layout));\n }\n if (isOverlayDetachedPreview(preview)) {\n return this.detached(preview.source);\n }\n return this.geometry(this.project(this.#delegate?.getResizePreview() ?? this.#currentLayout));\n }\n\n #headerInput(source: string[], point: Point) {\n return {\n groups: preserveRecipientSelection(this.nonOrderGeometry(source).groups, this.#currentLayout.root, source),\n measurements: this.#currentMeasurements,\n source,\n point,\n bounds: this.bounds(),\n client: (rect: Rect) => this.client(rect),\n scroll: (group: WorkspacePresentedGroup) => this.scroll(group)\n };\n }\n}\n\nfunction allocateGeometry(\n input: WorkspaceEvaluationInputs & { minimum(node: WorkspaceNode | null): Dimensions },\n layout: WorkspaceLayout,\n extent: WorkspaceLayout\n): WorkspaceGeometry {\n const floor = input.minimum(extent.root);\n const width = Math.max(input.measurements.width, floor.width);\n const height = Math.max(input.measurements.height, floor.height);\n const allocated = allocateWorkspace({\n root: layout.root,\n rect: { x: 0, y: 0, width, height },\n minimum: input.minimum,\n policy: input.policy,\n gap: input.measurements.gap\n });\n const groups = createPresentedGroups({\n groups: allocated.groups,\n panels: input.panels,\n root: input.layout.root,\n closed: input.layout.closed,\n source: input.source,\n gripWidth: input.measurements.gripWidth\n });\n return { ...allocated, width, height, minimum: floor, groups };\n}\n\nfunction workspaceInputCatalog(input: {\n gap: number;\n currentLayout: WorkspaceLayout;\n catalog: WorkspacePlacedRegion[];\n allocation: { regions: WorkspacePlacedRegion[] };\n reservation?: { regions: WorkspacePlacedRegion[]; groups: WorkspacePresentedGroup[] };\n preview?: WorkspaceDragPreview;\n source: string[];\n available: string[];\n bounds: Rect;\n client(rect: Rect): Rect;\n headerHeight: number;\n}) {\n const { currentLayout, catalog, allocation, source, available, bounds } = input;\n const geometry = {\n catalog,\n allocation: allocation.regions,\n source,\n bounds,\n getRemainingLayoutSignature: createRemainingLayoutSignatureResolver({ currentLayout, source, available })\n };\n const clientCatalog = catalog.map(region => ({ ...region, rect: input.client(region.rect) }));\n const regions = computedRegionCatalog({\n ...geometry,\n catalog: clientCatalog,\n allocation: allocation.regions.map(region => ({ ...region, rect: input.client(region.rect) }))\n });\n\n return {\n gap: input.gap,\n regions,\n orderingRegions: input.reservation\n ? computedRegionCatalog({\n ...geometry,\n catalog: clientCatalog,\n allocation: input.reservation.regions.map(region => ({ ...region, rect: input.client(region.rect) }))\n })\n : regions,\n sourceSlot: input.reservation ? computedSourceSlot({ ...input, groups: input.reservation.groups }) : undefined,\n preview: input.preview,\n headers: computedChromeRects(input),\n targets: groupTargets(regions, source, input.headerHeight),\n bounds\n };\n}\n\n/** Maps region paths onto the computed acquisition allocation without reading animated nodes. */\nfunction computedRegionCatalog(input: RegionCatalogInput): WorkspacePlacedRegion[] {\n const proxies = allocateContextProxies(input);\n return regionCatalog(input, key => proxies.find(proxy => proxy.key === key)?.rect);\n}\n\nfunction regionCatalog(input: RegionCatalogInput, read: (key: string) => Rect | undefined): WorkspacePlacedRegion[] {\n const { catalog, allocation, source, bounds } = input;\n const vacant = allocation.some(\n region => region.node.type === 'group' && getPanelIds(region.node).every(id => source.includes(id))\n );\n const owners = new Set(\n allocation.filter(region => region.node.type === 'split').map(region => getContextKey(getPanelIds(region.node)))\n );\n const seen = new Set<string>();\n return [...catalog]\n .reverse()\n .flatMap(region => {\n const members = getPanelIds(region.node);\n const remaining = members.filter(id => !source.includes(id));\n if (!remaining.length) return [];\n const full = getContextKey(members);\n const key = vacant && region.node.type === 'split' && owners.has(full) ? full : getContextKey(remaining);\n const presented = read(key);\n if (!presented) return [];\n const rect = clipCue(presented, bounds);\n if (rect.width <= 0 || rect.height <= 0) return [];\n const identity = `${key}:${input.getRemainingLayoutSignature(region.node)}`;\n if (seen.has(identity)) return [];\n seen.add(identity);\n return [\n {\n ...region,\n rect: { x: presented.x, y: presented.y, width: presented.width, height: presented.height }\n }\n ];\n })\n .reverse();\n}\n\nfunction createRemainingLayoutSignatureResolver(input: {\n currentLayout: WorkspaceLayout;\n source: string[];\n available: string[];\n}) {\n const visible = input.available.filter(id => !input.currentLayout.closed.includes(id));\n const projections = new Map<WorkspaceNode, WorkspaceNode | null>();\n const signatures = new Map<WorkspaceNode, string>();\n\n const getProjectedNode = (candidate: WorkspaceNode) => {\n if (!projections.has(candidate)) {\n projections.set(candidate, projectLayout({ version: 1, root: candidate, closed: [] }, visible).root);\n }\n return projections.get(candidate) ?? null;\n };\n\n return (node: WorkspaceNode) => {\n let signature = signatures.get(node);\n if (signature === undefined) {\n const carrier = findDeepestProjectionCarrier(\n input.currentLayout.root,\n getProjectionSignature(node),\n getProjectedNode\n );\n const remainingLayout = createDetachedLayout({ version: 1, root: carrier ?? node, closed: [] }, input.source);\n signature = JSON.stringify(remainingLayout.root);\n signatures.set(node, signature);\n }\n return signature;\n };\n}\n\nfunction groupTargets(regions: WorkspacePlacedRegion[], source: string[], headerHeight: number) {\n return regions.flatMap(region =>\n region.node.type === 'group'\n ? [{ panels: region.node.panels.filter(id => !source.includes(id)), rect: region.rect, headerHeight, tabs: [] }]\n : []\n );\n}\n\nfunction computedChromeRects(input: Parameters<typeof workspaceInputCatalog>[0]) {\n const groups = input.reservation?.groups ?? [];\n return groups\n .flatMap(group => {\n if (group.panels.every(panel => input.source.includes(panel.id))) return [];\n const rect = input.client(group.rect);\n return [clipCue({ ...rect, height: Math.min(rect.height, input.headerHeight) }, input.bounds)];\n })\n .filter(rect => rect.width > 0 && rect.height > 0);\n}\n\n/** Source occupancy is an ordinary target in the currently allocated reservation projection. */\nfunction computedReservationHit(input: Parameters<typeof findTabHeaderTarget>[0]) {\n const group = computedSourceSlot(input);\n if (!group) return getTabReservationHit(input);\n if (contains(group, input.point)) return 'group' as const;\n return undefined;\n}\n\n/** Finds only genuine allocated whole-source occupancy, never an overlapping split indicator. */\nfunction computedSourceSlot(\n input: Pick<Parameters<typeof findTabHeaderTarget>[0], 'groups' | 'source' | 'client' | 'bounds'>\n): Rect | undefined {\n const group = input.groups.find(\n item => item.panels.length > 0 && item.panels.every(panel => input.source.includes(panel.id))\n );\n return group ? clipCue(input.client(group.rect), input.bounds) : undefined;\n}\n\nfunction contains(rect: Rect, point: Point) {\n return (\n rect.width > 0 &&\n rect.height > 0 &&\n point.x >= rect.x &&\n point.x < rect.x + rect.width &&\n point.y >= rect.y &&\n point.y < rect.y + rect.height\n );\n}\n\nfunction interactionBounds(workspace: HTMLElement): Rect {\n const viewport = workspace.shadowRoot?.querySelector('.viewport');\n if (!(viewport instanceof HTMLElement)) return workspace.getBoundingClientRect();\n const rect = viewport.getBoundingClientRect();\n return {\n x: rect.x + viewport.clientLeft,\n y: rect.y + viewport.clientTop,\n width: viewport.clientWidth,\n height: viewport.clientHeight\n };\n}\n\nfunction canvasClientRect(workspace: HTMLElement, rect: Rect): Rect {\n const canvas = workspace.shadowRoot?.querySelector('.canvas')?.getBoundingClientRect();\n return { ...rect, x: rect.x + (canvas?.x ?? 0), y: rect.y + (canvas?.y ?? 0) };\n}\n\nfunction isNonOrderPreview(preview: WorkspaceDragPreview | undefined): preview is DetachedPreview {\n return (\n !!preview &&\n preview.phase === 'detached' &&\n preview.intent.kind !== 'order' &&\n preview.intent.kind !== 'insert' &&\n !(preview.intent.kind === 'invalid' && preview.allocation === 'reserved')\n );\n}\n\nfunction isOverlayDetachedPreview(\n preview: WorkspaceDragPreview | undefined\n): preview is Exclude<WorkspaceDragPreview, { phase: 'attached' }> {\n return (\n !!preview &&\n 'allocation' in preview &&\n preview.allocation === 'overlay' &&\n (preview.phase === 'detached' || preview.phase === 'returning-detached')\n );\n}\n"],"mappings":";;;;;;;;;AAmFA,IAAaA,IAAb,MAAiC;CAO/B;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CAEA,YAAY,GAAmB,GAAmC,GAAwC;EAMxG,AApBuB,KAAA,gBAAAC,EAA+B,GACjC,KAAA,cAAAC,EAA0B,GAK9B,KAAAC,qBAAA,IAAI,QAA6B,GAC5B,KAAAC,qBAAA,IAAI,IAAwE,GACjF,KAAAC,qBAAA,IAAI,IAAsC,GACxC,KAAAC,qBAAA,IAAI,QAAqC,GAM5D,KAAKC,KAAQC,GACb,KAAKC,KAAUC,GACf,KAAKC,KAAYC,GACjB,KAAK,SAASF,EAAO,QACrB,KAAK,YAAYA,EAAO,OAAO,KAAI,MAASG,EAAM,EAAE,GACpD,KAAK,eAAeC,EAAyBJ,CAAM;CACrD;CAEA,QAAQ,GAA4B;EAClC,IAAIK,IAAU,KAAKV,GAAQ,IAAIW,CAAI;EAKnC,OAJKD,MACH,IAAUE,EAA8BD,GAAM,KAAK,YAAY,GAC/D,KAAKX,GAAQ,IAAIW,GAAMD,CAAO,IAEzBA;CACT;CAEA,QAAQ,GAAyB;EAC/B,OAAO,KAAK,cAAcG,GAAQ,KAAK,SAAS;CAClD;CAEA,SAAS,GAAyB,IAASA,GAAQ;EACjD,IAAIC,IAAc,KAAKf,GAAa,IAAIc,EAAO,IAAI;EACnD,AAAKC,MACH,oBAAc,IAAI,IAAI,GACtB,KAAKf,GAAa,IAAIc,EAAO,MAAMC,CAAW;EAEhD,IAAIC,IAAWD,EAAY,IAAIE,EAAO,IAAI;EAK1C,OAJKD,MACH,IAAWE,EAAiB;GAAE,GAAG,KAAKb;GAAS,UAAS,MAAQ,KAAK,QAAQO,CAAI;EAAE,GAAGE,GAAQG,CAAM,GACpGF,EAAY,IAAIE,EAAO,MAAMD,CAAQ,IAEhCA;CACT;CAEA,SAAS,GAAkB;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