@nvidia-elements/core 2.23.5 → 2.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/accordion/accordion2.js +4 -4
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge2.js +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundles/index.js +7 -7
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group2.js +1 -1
- package/dist/card/card2.js +4 -4
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/checkbox/checkbox-group2.js +1 -1
- package/dist/checkbox/checkbox2.js +1 -1
- package/dist/color/color2.js +1 -1
- package/dist/combobox/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements.json +1000 -229
- package/dist/date/date2.js +1 -1
- package/dist/datetime/datetime2.js +1 -1
- package/dist/dialog/dialog-footer2.js +1 -1
- package/dist/dialog/dialog-header2.js +1 -1
- package/dist/dialog/dialog2.js +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drag-handle/drag-handle2.js +1 -1
- package/dist/drawer/drawer-content2.js +1 -1
- package/dist/drawer/drawer-footer2.js +1 -1
- package/dist/drawer/drawer-header2.js +1 -1
- package/dist/drawer/drawer2.js +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +1 -1
- package/dist/dropdown/dropdown2.js +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.js +1 -1
- package/dist/format-datetime/format-datetime2.js +1 -1
- package/dist/format-number/format-number2.js +1 -1
- package/dist/format-relative-time/format-relative-time2.js +1 -1
- package/dist/format-truncate/format-truncate2.js +1 -1
- package/dist/forms/control/control2.js +1 -1
- package/dist/forms/control-group/control-group2.js +1 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/gauge/gauge2.js +1 -1
- package/dist/ghost/ghost2.js +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column2.js +1 -1
- package/dist/grid/footer/footer2.js +1 -1
- package/dist/grid/grid2.js +1 -1
- package/dist/grid/header/header2.js +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +1 -1
- package/dist/icon/icon2.js +1 -1
- package/dist/icon-button/icon-button2.js +1 -1
- package/dist/iframe/iframe2.js +1 -1
- package/dist/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/joystick/joystick2.js +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-group2.js +1 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu2.js +1 -1
- package/dist/month/month2.js +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +1 -1
- package/dist/page/page-panel/page-panel-header2.js +1 -1
- package/dist/page/page-panel/page-panel2.js +1 -1
- package/dist/page/page2.js +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader2.js +1 -1
- package/dist/pagination/pagination2.js +1 -1
- package/dist/panel/panel2.js +4 -4
- package/dist/password/password2.js +1 -1
- package/dist/preferences-input/preferences-input2.js +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-dot/progress-dot2.js +1 -1
- package/dist/progress-ring/progress-ring2.js +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
- package/dist/pulse/pulse2.js +1 -1
- package/dist/radio/radio-group2.js +1 -1
- package/dist/radio/radio2.js +1 -1
- package/dist/range/range2.js +1 -1
- package/dist/resize-handle/resize-handle2.js +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +1 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +1 -1
- package/dist/sparkline/sparkline2.js +1 -1
- package/dist/star-rating/star-rating2.js +1 -1
- package/dist/steps/steps2.js +2 -2
- package/dist/switch/switch-group2.js +1 -1
- package/dist/switch/switch2.js +1 -1
- package/dist/tabs/tabs-group2.js +1 -1
- package/dist/tabs/tabs-item-group2.js +1 -1
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tag/tag2.js +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +1 -1
- package/dist/toast/toast2.js +1 -1
- package/dist/toggletip/toggletip-footer2.js +1 -1
- package/dist/toggletip/toggletip-header2.js +1 -1
- package/dist/toggletip/toggletip2.js +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node2.js +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/dist/workspace/controllers/workspace-composition.controller.d.ts +4 -1
- package/dist/workspace/controllers/workspace-composition.controller.js +69 -39
- package/dist/workspace/controllers/workspace-composition.controller.js.map +1 -1
- package/dist/workspace/controllers/workspace-rearrange.controller.js +27 -27
- package/dist/workspace/controllers/workspace-rearrange.controller.js.map +1 -1
- package/dist/workspace/controllers/workspace-restoration.controller.js +2 -2
- package/dist/workspace/controllers/workspace-restoration.controller.js.map +1 -1
- package/dist/workspace/panel/panel2.js +2 -2
- package/dist/workspace/panel/panel2.js.map +1 -1
- package/dist/workspace/panel-content/panel-content2.js +1 -1
- package/dist/workspace/panel-footer/panel-footer2.js +1 -1
- package/dist/workspace/panel-header/panel-header2.js +1 -1
- package/dist/workspace/utils/comparison.utils.d.ts +3 -0
- package/dist/workspace/utils/comparison.utils.js +13 -0
- package/dist/workspace/utils/comparison.utils.js.map +1 -0
- package/dist/workspace/utils/evaluation.utils.d.ts +65 -6
- package/dist/workspace/utils/evaluation.utils.js +334 -99
- package/dist/workspace/utils/evaluation.utils.js.map +1 -1
- package/dist/workspace/utils/geometry/allocation.utils.js +15 -13
- package/dist/workspace/utils/geometry/allocation.utils.js.map +1 -1
- package/dist/workspace/utils/geometry/sizing.utils.d.ts +2 -0
- package/dist/workspace/utils/geometry/sizing.utils.js +37 -17
- package/dist/workspace/utils/geometry/sizing.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/boundary.utils.d.ts +2 -2
- package/dist/workspace/utils/interaction/boundary.utils.js +2 -2
- package/dist/workspace/utils/interaction/boundary.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/drag-preview.utils.d.ts +3 -3
- package/dist/workspace/utils/interaction/drag-preview.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/insertion-offers.utils.d.ts +11 -9
- package/dist/workspace/utils/interaction/insertion-offers.utils.js +37 -43
- package/dist/workspace/utils/interaction/insertion-offers.utils.js.map +1 -1
- package/dist/workspace/utils/interaction/placement-decision.utils.d.ts +6 -1
- package/dist/workspace/utils/interaction/placement-decision.utils.js +94 -87
- package/dist/workspace/utils/interaction/placement-decision.utils.js.map +1 -1
- package/dist/workspace/utils/model/layout.utils.d.ts +2 -1
- package/dist/workspace/utils/model/layout.utils.js +12 -10
- package/dist/workspace/utils/model/layout.utils.js.map +1 -1
- package/dist/workspace/utils/model/membership.utils.d.ts +4 -0
- package/dist/workspace/utils/model/membership.utils.js +13 -4
- package/dist/workspace/utils/model/membership.utils.js.map +1 -1
- package/dist/workspace/utils/model/operations.utils.d.ts +1 -0
- package/dist/workspace/utils/model/operations.utils.js +51 -46
- package/dist/workspace/utils/model/operations.utils.js.map +1 -1
- package/dist/workspace/utils/model/projection.utils.d.ts +4 -2
- package/dist/workspace/utils/model/projection.utils.js +49 -40
- package/dist/workspace/utils/model/projection.utils.js.map +1 -1
- package/dist/workspace/utils/model/value.utils.d.ts +4 -3
- package/dist/workspace/utils/model/value.utils.js +15 -50
- package/dist/workspace/utils/model/value.utils.js.map +1 -1
- package/dist/workspace/utils/placement/acquisition-sizing.utils.d.ts +2 -0
- package/dist/workspace/utils/placement/acquisition-sizing.utils.js +30 -22
- package/dist/workspace/utils/placement/acquisition-sizing.utils.js.map +1 -1
- package/dist/workspace/utils/placement/group-insertion.utils.d.ts +19 -13
- package/dist/workspace/utils/placement/group-insertion.utils.js +50 -47
- package/dist/workspace/utils/placement/group-insertion.utils.js.map +1 -1
- package/dist/workspace/utils/placement/planner.utils.d.ts +13 -2
- package/dist/workspace/utils/placement/planner.utils.js +79 -73
- package/dist/workspace/utils/placement/planner.utils.js.map +1 -1
- package/dist/workspace/utils/placement/preparation.utils.d.ts +5 -2
- package/dist/workspace/utils/placement/preparation.utils.js +45 -41
- package/dist/workspace/utils/placement/preparation.utils.js.map +1 -1
- package/dist/workspace/utils/placement/region.utils.js +32 -32
- package/dist/workspace/utils/placement/region.utils.js.map +1 -1
- package/dist/workspace/utils/placement/scope.utils.d.ts +34 -0
- package/dist/workspace/utils/placement/scope.utils.js +155 -0
- package/dist/workspace/utils/placement/scope.utils.js.map +1 -0
- package/dist/workspace/utils/placement/session.utils.d.ts +11 -0
- package/dist/workspace/utils/placement/session.utils.js +78 -0
- package/dist/workspace/utils/placement/session.utils.js.map +1 -0
- package/dist/workspace/utils/placement/split-sizing.utils.d.ts +2 -2
- package/dist/workspace/utils/placement/split-sizing.utils.js +19 -19
- package/dist/workspace/utils/placement/split-sizing.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/composition.utils.d.ts +1 -1
- package/dist/workspace/utils/presentation/composition.utils.js +4 -2
- package/dist/workspace/utils/presentation/composition.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/groups.utils.d.ts +3 -3
- package/dist/workspace/utils/presentation/groups.utils.js +40 -30
- package/dist/workspace/utils/presentation/groups.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/measurements.utils.d.ts +1 -0
- package/dist/workspace/utils/presentation/measurements.utils.js +6 -14
- package/dist/workspace/utils/presentation/measurements.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/offers.utils.d.ts +1 -1
- package/dist/workspace/utils/presentation/offers.utils.js +3 -3
- package/dist/workspace/utils/presentation/offers.utils.js.map +1 -1
- package/dist/workspace/utils/presentation/preview.utils.d.ts +6 -0
- package/dist/workspace/utils/presentation/preview.utils.js +14 -3
- package/dist/workspace/utils/presentation/preview.utils.js.map +1 -1
- package/dist/workspace/workspace.examples.js.map +1 -1
- package/dist/workspace/workspace.examples.json +4 -4
- package/dist/workspace/workspace.js +1 -1
- package/dist/workspace/workspace.js.map +1 -1
- package/dist/workspace/workspace2.js +206 -212
- package/dist/workspace/workspace2.js.map +1 -1
- package/package.json +1 -1
- package/dist/workspace/utils/placement/context.utils.d.ts +0 -36
- package/dist/workspace/utils/placement/context.utils.js +0 -135
- package/dist/workspace/utils/placement/context.utils.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/workspace/utils/comparison.utils.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
if (e === t) return !0;
|
|
4
|
+
if (e.length !== t.length) return !1;
|
|
5
|
+
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
6
|
+
return !0;
|
|
7
|
+
}
|
|
8
|
+
function t(e, t) {
|
|
9
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
10
|
+
}
|
|
11
|
+
export { e as sameArrayItems, t as sameRect };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=comparison.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comparison.utils.js","names":["sameArrayItems","left","right","index","sameRect"],"sources":["../../../src/workspace/utils/comparison.utils.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Rect } from '@nvidia-elements/core/internal';\n\nexport function sameArrayItems<T>(left: readonly T[], right: readonly T[]) {\n if (left === right) return true;\n if (left.length !== right.length) return false;\n for (let index = 0; index < left.length; index++) {\n if (left[index] !== right[index]) return false;\n }\n return true;\n}\n\nexport function sameRect(left: Rect, right: Rect) {\n return left.x === right.x && left.y === right.y && left.width === right.width && left.height === right.height;\n}\n"],"mappings":";AAKA,SAAgBA,EAAkB,GAAoB,GAAqB;CACzE,IAAIC,MAASC,GAAO,OAAO;CAC3B,IAAID,EAAK,WAAWC,EAAM,QAAQ,OAAO;CACzC,KAAK,IAAIC,IAAQ,GAAGA,IAAQF,EAAK,QAAQ,KACvC,IAAIA,EAAKE,OAAWD,EAAMC,IAAQ,OAAO;CAE3C,OAAO;AACT;AAEA,SAAgBC,EAAS,GAAY,GAAa;CAChD,OAAOH,EAAK,MAAMC,EAAM,KAAKD,EAAK,MAAMC,EAAM,KAAKD,EAAK,UAAUC,EAAM,SAASD,EAAK,WAAWC,EAAM;AACzG"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Dimensions, Point, Rect } from '@nvidia-elements/core/internal';
|
|
2
2
|
import type { WorkspaceBoundary, WorkspacePlacedRegion } from './geometry/allocation.utils.js';
|
|
3
|
+
import type { WorkspaceRequirements } from './geometry/sizing.utils.js';
|
|
3
4
|
import type { WorkspaceDragPreview } from './interaction/drag-preview.utils.js';
|
|
4
5
|
import type { WorkspaceLayout, WorkspaceNode } from './model/layout.utils.js';
|
|
6
|
+
import type { WorkspaceScopeRectResolver } from './placement/scope.utils.js';
|
|
5
7
|
import type { WorkspacePresentedGroup, WorkspaceTarget } from './presentation/groups.utils.js';
|
|
6
8
|
import type { WorkspaceMeasurements } from './presentation/measurements.utils.js';
|
|
7
9
|
import type { WorkspacePanel } from '../panel/panel.js';
|
|
@@ -29,10 +31,11 @@ export interface WorkspaceEvaluationDelegate {
|
|
|
29
31
|
readonly getResizePreview: () => WorkspaceLayout | undefined;
|
|
30
32
|
}
|
|
31
33
|
export interface WorkspacePlacementCatalog {
|
|
34
|
+
resolveScopeRect?: WorkspaceScopeRectResolver;
|
|
32
35
|
targets: WorkspaceTarget[];
|
|
33
36
|
regions: WorkspacePlacedRegion[];
|
|
34
37
|
orderingRegions?: WorkspacePlacedRegion[];
|
|
35
|
-
|
|
38
|
+
sourceReservation?: Rect;
|
|
36
39
|
headers?: Rect[];
|
|
37
40
|
preview?: WorkspaceDragPreview;
|
|
38
41
|
bounds: Rect;
|
|
@@ -40,15 +43,68 @@ export interface WorkspacePlacementCatalog {
|
|
|
40
43
|
reservationHit?: WorkspaceReservationHit;
|
|
41
44
|
}
|
|
42
45
|
type WorkspaceReservationHit = 'group' | 'tab';
|
|
46
|
+
interface GeometryInputSnapshot {
|
|
47
|
+
layout: WorkspaceLayout;
|
|
48
|
+
closed: string[];
|
|
49
|
+
source: string[];
|
|
50
|
+
available: string[];
|
|
51
|
+
panels: WorkspacePanel[];
|
|
52
|
+
measurementIdentity: WorkspaceMeasurements;
|
|
53
|
+
measurements: WorkspaceMeasurements;
|
|
54
|
+
requirements: WorkspaceRequirements;
|
|
55
|
+
policy: WorkspaceEvaluationInputs['policy'];
|
|
56
|
+
}
|
|
57
|
+
interface CachedWorkspaceGeometry {
|
|
58
|
+
inputs: GeometryInputSnapshot;
|
|
59
|
+
projected?: WorkspaceLayout;
|
|
60
|
+
base?: WorkspaceGeometry;
|
|
61
|
+
detached?: WorkspaceGeometry;
|
|
62
|
+
}
|
|
63
|
+
type StructuralPlacementCatalog = Omit<WorkspacePlacementCatalog, 'preview' | 'headerTarget' | 'reservationHit'> & {
|
|
64
|
+
gap: number;
|
|
65
|
+
};
|
|
66
|
+
interface PresentedGroupSnapshot {
|
|
67
|
+
rect: Rect;
|
|
68
|
+
panels: string[];
|
|
69
|
+
}
|
|
70
|
+
interface CatalogInputSnapshot {
|
|
71
|
+
layout: WorkspaceLayout;
|
|
72
|
+
closed: string[];
|
|
73
|
+
source: string[];
|
|
74
|
+
available: string[];
|
|
75
|
+
measurementIdentity: WorkspaceMeasurements;
|
|
76
|
+
measurements: WorkspaceMeasurements;
|
|
77
|
+
requirements: WorkspaceRequirements;
|
|
78
|
+
bounds: Rect;
|
|
79
|
+
origin: Rect;
|
|
80
|
+
catalog: WorkspacePlacedRegion[];
|
|
81
|
+
allocation: WorkspacePlacedRegion[];
|
|
82
|
+
reservation?: WorkspacePlacedRegion[];
|
|
83
|
+
groups?: PresentedGroupSnapshot[];
|
|
84
|
+
}
|
|
85
|
+
interface CachedPlacementCatalog {
|
|
86
|
+
inputs: CatalogInputSnapshot;
|
|
87
|
+
catalog: StructuralPlacementCatalog;
|
|
88
|
+
}
|
|
89
|
+
/** Owns retained geometry and catalog data and the current synchronous evaluation for one Workspace. */
|
|
90
|
+
export declare class WorkspaceEvaluationCache {
|
|
91
|
+
#private;
|
|
92
|
+
geometry?: CachedWorkspaceGeometry;
|
|
93
|
+
catalog?: CachedPlacementCatalog;
|
|
94
|
+
constructor(host: HTMLElement);
|
|
95
|
+
get current(): WorkspaceEvaluation | undefined;
|
|
96
|
+
run<T>(inputs: WorkspaceEvaluationInputs, delegate: WorkspaceEvaluationDelegate | undefined, work: (evaluation: WorkspaceEvaluation) => T): T;
|
|
97
|
+
clear(): void;
|
|
98
|
+
}
|
|
43
99
|
/** Shares layout inputs and browser reads within one synchronous evaluation. */
|
|
44
100
|
export declare class WorkspaceEvaluation {
|
|
45
101
|
#private;
|
|
46
102
|
readonly panels: WorkspacePanel[];
|
|
47
103
|
readonly available: string[];
|
|
48
|
-
readonly requirements:
|
|
104
|
+
readonly requirements: WorkspaceRequirements;
|
|
49
105
|
readonly projectLayout: import("./model/projection.utils.js").WorkspaceLayoutProjector;
|
|
50
|
-
readonly
|
|
51
|
-
constructor(host: HTMLElement, inputs: WorkspaceEvaluationInputs, delegate?: WorkspaceEvaluationDelegate);
|
|
106
|
+
readonly resolveScopeRect: WorkspaceScopeRectResolver;
|
|
107
|
+
constructor(host: HTMLElement, inputs: WorkspaceEvaluationInputs, delegate?: WorkspaceEvaluationDelegate, cacheOwner?: WorkspaceEvaluationCache);
|
|
52
108
|
minimum(node: WorkspaceNode | null): Dimensions;
|
|
53
109
|
project(layout: WorkspaceLayout): WorkspaceLayout;
|
|
54
110
|
geometry(layout: WorkspaceLayout, extent?: WorkspaceLayout): WorkspaceGeometry;
|
|
@@ -56,9 +112,10 @@ export declare class WorkspaceEvaluation {
|
|
|
56
112
|
nonOrderGeometry(source: string[]): WorkspaceGeometry;
|
|
57
113
|
targetCatalog(source: string[], allocation?: WorkspaceGeometry): {
|
|
58
114
|
gap: number;
|
|
115
|
+
resolveScopeRect: WorkspaceScopeRectResolver;
|
|
59
116
|
regions: WorkspacePlacedRegion[];
|
|
60
117
|
orderingRegions: WorkspacePlacedRegion[];
|
|
61
|
-
|
|
118
|
+
sourceReservation: Rect | undefined;
|
|
62
119
|
preview: WorkspaceDragPreview | undefined;
|
|
63
120
|
headers: Rect[];
|
|
64
121
|
targets: {
|
|
@@ -68,7 +125,9 @@ export declare class WorkspaceEvaluation {
|
|
|
68
125
|
tabs: never[];
|
|
69
126
|
}[];
|
|
70
127
|
bounds: Rect;
|
|
71
|
-
}
|
|
128
|
+
} | (WorkspacePlacementCatalog & {
|
|
129
|
+
gap: number;
|
|
130
|
+
});
|
|
72
131
|
getPlacementCatalog(source: string[], point: Point): WorkspacePlacementCatalog;
|
|
73
132
|
bounds(): Rect;
|
|
74
133
|
client(rect: Rect): {
|