@nvidia-elements/core 2.15.1 → 2.15.3
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 +17 -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 +0 -2
- package/dist/bundles/index.d.ts +0 -289
- package/dist/bundles/index.js +6 -6
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group2.js +1 -1
- package/dist/card/card2.js +4 -4
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/checkbox/checkbox-group2.js +1 -1
- package/dist/checkbox/checkbox2.js +1 -1
- package/dist/color/color2.js +1 -1
- package/dist/combobox/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements-jsx.d.ts +0 -157
- package/dist/custom-elements-vue.d.ts +0 -155
- package/dist/custom-elements.json +0 -3259
- package/dist/data.html.json +0 -119
- package/dist/data.snippets.json +45 -45
- 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/control2.js.map +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/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/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/services/global.service.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-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/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-node.js +1 -1
- package/dist/tree/tree-node.js.map +1 -1
- package/dist/tree/tree-node2.js +1 -1
- package/dist/tree/tree.examples.js.map +1 -1
- package/dist/tree/tree.examples.json +11 -0
- package/dist/tree/tree.js +1 -1
- package/dist/tree/tree.js.map +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +2 -14
- package/dist/viewport/define.d.ts +0 -8
- package/dist/viewport/define.js +0 -8
- package/dist/viewport/define.js.map +0 -1
- package/dist/viewport/index.d.ts +0 -4
- package/dist/viewport/index.js +0 -4
- package/dist/viewport/viewport-animation.controller.d.ts +0 -21
- package/dist/viewport/viewport-animation.controller.js +0 -93
- package/dist/viewport/viewport-animation.controller.js.map +0 -1
- package/dist/viewport/viewport-autofit.controller.d.ts +0 -18
- package/dist/viewport/viewport-autofit.controller.js +0 -105
- package/dist/viewport/viewport-autofit.controller.js.map +0 -1
- package/dist/viewport/viewport-fitting.utils.d.ts +0 -36
- package/dist/viewport/viewport-fitting.utils.js +0 -35
- package/dist/viewport/viewport-fitting.utils.js.map +0 -1
- package/dist/viewport/viewport-gesture-navigation.controller.d.ts +0 -27
- package/dist/viewport/viewport-gesture-navigation.controller.js +0 -318
- package/dist/viewport/viewport-gesture-navigation.controller.js.map +0 -1
- package/dist/viewport/viewport-gridlines.d.ts +0 -42
- package/dist/viewport/viewport-gridlines.js +0 -6
- package/dist/viewport/viewport-gridlines.js.map +0 -1
- package/dist/viewport/viewport-gridlines.utils.d.ts +0 -11
- package/dist/viewport/viewport-gridlines.utils.js +0 -54
- package/dist/viewport/viewport-gridlines.utils.js.map +0 -1
- package/dist/viewport/viewport-gridlines2.js +0 -164
- package/dist/viewport/viewport-gridlines2.js.map +0 -1
- package/dist/viewport/viewport-minimap.d.ts +0 -36
- package/dist/viewport/viewport-minimap.js +0 -6
- package/dist/viewport/viewport-minimap.js.map +0 -1
- package/dist/viewport/viewport-minimap.utils.d.ts +0 -13
- package/dist/viewport/viewport-minimap.utils.js +0 -49
- package/dist/viewport/viewport-minimap.utils.js.map +0 -1
- package/dist/viewport/viewport-minimap2.js +0 -309
- package/dist/viewport/viewport-minimap2.js.map +0 -1
- package/dist/viewport/viewport-navigation.controller.d.ts +0 -21
- package/dist/viewport/viewport-navigation.controller.js +0 -136
- package/dist/viewport/viewport-navigation.controller.js.map +0 -1
- package/dist/viewport/viewport-navigation.types.d.ts +0 -1
- package/dist/viewport/viewport-projection.utils.d.ts +0 -7
- package/dist/viewport/viewport-projection.utils.js +0 -25
- package/dist/viewport/viewport-projection.utils.js.map +0 -1
- package/dist/viewport/viewport.d.ts +0 -122
- package/dist/viewport/viewport.examples.js +0 -6
- package/dist/viewport/viewport.examples.js.map +0 -1
- package/dist/viewport/viewport.examples.json +0 -87
- package/dist/viewport/viewport.js +0 -6
- package/dist/viewport/viewport.js.map +0 -1
- package/dist/viewport/viewport.types.d.ts +0 -93
- package/dist/viewport/viewport2.js +0 -440
- package/dist/viewport/viewport2.js.map +0 -1
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
export interface ViewportTransform {
|
|
2
|
-
readonly x: number;
|
|
3
|
-
readonly y: number;
|
|
4
|
-
readonly scale: number;
|
|
5
|
-
}
|
|
6
|
-
export interface ViewportPoint {
|
|
7
|
-
readonly x: number;
|
|
8
|
-
readonly y: number;
|
|
9
|
-
}
|
|
10
|
-
export interface ViewportRect extends ViewportPoint {
|
|
11
|
-
readonly width: number;
|
|
12
|
-
readonly height: number;
|
|
13
|
-
}
|
|
14
|
-
export type ViewportPanBehavior = boolean | 'space';
|
|
15
|
-
export type ViewportNavigationSource = 'pointer' | 'wheel' | 'pinch' | 'keyboard' | 'command' | 'minimap' | 'control';
|
|
16
|
-
export interface ViewportPanProposal {
|
|
17
|
-
readonly source: ViewportNavigationSource;
|
|
18
|
-
readonly event: Event;
|
|
19
|
-
readonly next: ViewportTransform;
|
|
20
|
-
readonly clientX?: number;
|
|
21
|
-
readonly clientY?: number;
|
|
22
|
-
readonly deltaX?: number;
|
|
23
|
-
readonly deltaY?: number;
|
|
24
|
-
}
|
|
25
|
-
export type ViewportPanUpdateProposal = Omit<ViewportPanProposal, 'source'>;
|
|
26
|
-
export interface ViewportPanDetail extends ViewportPanProposal {
|
|
27
|
-
readonly start: ViewportTransform;
|
|
28
|
-
}
|
|
29
|
-
export interface ViewportPointerPanDetail extends ViewportPanDetail {
|
|
30
|
-
readonly source: 'pointer';
|
|
31
|
-
readonly event: PointerEvent;
|
|
32
|
-
readonly clientX: number;
|
|
33
|
-
readonly clientY: number;
|
|
34
|
-
readonly movementX: number;
|
|
35
|
-
readonly movementY: number;
|
|
36
|
-
readonly startClientX: number;
|
|
37
|
-
readonly startClientY: number;
|
|
38
|
-
readonly totalDisplacementX: number;
|
|
39
|
-
readonly totalDisplacementY: number;
|
|
40
|
-
}
|
|
41
|
-
export type ViewportWheelPanDetail = ViewportPanDetail & {
|
|
42
|
-
readonly source: 'wheel';
|
|
43
|
-
readonly event: WheelEvent;
|
|
44
|
-
readonly clientX: number;
|
|
45
|
-
readonly clientY: number;
|
|
46
|
-
readonly deltaX: number;
|
|
47
|
-
readonly deltaY: number;
|
|
48
|
-
};
|
|
49
|
-
export type ViewportDiscretePanDetail = ViewportPanDetail & {
|
|
50
|
-
readonly source: 'keyboard' | 'command';
|
|
51
|
-
readonly event: KeyboardEvent | CommandEvent;
|
|
52
|
-
};
|
|
53
|
-
export type ViewportPanEndReason = 'up' | 'cancel' | 'lost-capture' | 'buttons-released' | 'pinch';
|
|
54
|
-
export interface ViewportPanEndRequest {
|
|
55
|
-
readonly event: Event;
|
|
56
|
-
readonly interrupted: boolean;
|
|
57
|
-
readonly reason: ViewportPanEndReason;
|
|
58
|
-
}
|
|
59
|
-
export interface ViewportPanEndDetail extends ViewportPanEndRequest {
|
|
60
|
-
readonly source: ViewportNavigationSource;
|
|
61
|
-
readonly start: ViewportTransform;
|
|
62
|
-
readonly transform: ViewportTransform;
|
|
63
|
-
}
|
|
64
|
-
export interface ViewportPanSession {
|
|
65
|
-
readonly start: ViewportTransform;
|
|
66
|
-
update(proposal: ViewportPanUpdateProposal): boolean;
|
|
67
|
-
end(request: ViewportPanEndRequest): void;
|
|
68
|
-
}
|
|
69
|
-
export interface ViewportZoomProposal {
|
|
70
|
-
readonly source: ViewportNavigationSource;
|
|
71
|
-
readonly event: Event;
|
|
72
|
-
readonly clientX?: number;
|
|
73
|
-
readonly clientY?: number;
|
|
74
|
-
readonly anchor: ViewportPoint;
|
|
75
|
-
readonly factor: number;
|
|
76
|
-
readonly next: ViewportTransform;
|
|
77
|
-
}
|
|
78
|
-
export interface ViewportZoomRequestOptions {
|
|
79
|
-
readonly animated?: boolean;
|
|
80
|
-
}
|
|
81
|
-
export interface ViewportZoomDetail extends ViewportZoomProposal {
|
|
82
|
-
readonly start: ViewportTransform;
|
|
83
|
-
}
|
|
84
|
-
export interface ViewportAnimationOptions {
|
|
85
|
-
readonly duration?: number;
|
|
86
|
-
}
|
|
87
|
-
export interface ViewportRevealOptions {
|
|
88
|
-
/** Uniform CSS-pixel inset reserved around the revealed bounds. */
|
|
89
|
-
readonly inset?: number;
|
|
90
|
-
readonly scale?: number;
|
|
91
|
-
readonly animated?: boolean;
|
|
92
|
-
readonly duration?: number;
|
|
93
|
-
}
|
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
|
-
import { attachInternals as t } from "../internal/utils/a11y.js";
|
|
3
|
-
import { useStyles as n } from "../internal/styles/index.js";
|
|
4
|
-
import { finiteOr as r, nonnegativeFiniteOr as i, positiveFiniteOr as a } from "../internal/utils/numeric.js";
|
|
5
|
-
import o from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
6
|
-
import s from "./viewport.js";
|
|
7
|
-
import { ViewportAnimationController as c } from "./viewport-animation.controller.js";
|
|
8
|
-
import { ViewportAutoFitController as l } from "./viewport-autofit.controller.js";
|
|
9
|
-
import { contentBoundsFromClientRects as u, revealTarget as d } from "./viewport-fitting.utils.js";
|
|
10
|
-
import { centeredScaleTransform as f, contentPointFromViewport as p } from "./viewport-projection.utils.js";
|
|
11
|
-
import { ViewportGestureNavigationController as m } from "./viewport-gesture-navigation.controller.js";
|
|
12
|
-
import { ViewportNavigationController as h } from "./viewport-navigation.controller.js";
|
|
13
|
-
import { LitElement as g, html as _ } from "lit";
|
|
14
|
-
import { property as v } from "lit/decorators/property.js";
|
|
15
|
-
import { query as y } from "lit/decorators/query.js";
|
|
16
|
-
import { styleMap as b } from "lit/directives/style-map.js";
|
|
17
|
-
//#region src/viewport/viewport.ts
|
|
18
|
-
var x = .05, S = 20, C = 5, w = [
|
|
19
|
-
.05,
|
|
20
|
-
.1,
|
|
21
|
-
.25,
|
|
22
|
-
.5,
|
|
23
|
-
1,
|
|
24
|
-
2,
|
|
25
|
-
4,
|
|
26
|
-
8,
|
|
27
|
-
16,
|
|
28
|
-
20
|
|
29
|
-
], T = {
|
|
30
|
-
fromAttribute(e) {
|
|
31
|
-
return e === null ? !1 : e !== "space" || "space";
|
|
32
|
-
},
|
|
33
|
-
toAttribute(e) {
|
|
34
|
-
return e ? e === "space" ? "space" : "" : null;
|
|
35
|
-
}
|
|
36
|
-
}, E = class extends g {
|
|
37
|
-
static {
|
|
38
|
-
this.styles = n([s]);
|
|
39
|
-
}
|
|
40
|
-
static {
|
|
41
|
-
this.metadata = {
|
|
42
|
-
tag: "nve-viewport",
|
|
43
|
-
version: "2.15.1"
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
#e;
|
|
47
|
-
#t;
|
|
48
|
-
#n;
|
|
49
|
-
#r;
|
|
50
|
-
#i;
|
|
51
|
-
#a;
|
|
52
|
-
#o;
|
|
53
|
-
#s;
|
|
54
|
-
#c;
|
|
55
|
-
#l;
|
|
56
|
-
#u;
|
|
57
|
-
#d;
|
|
58
|
-
#f;
|
|
59
|
-
constructor() {
|
|
60
|
-
super(), this.#r = new l(this, (e) => this.#_(e)), this.#i = !1, this.#a = 0, this.#o = 0, this.#s = 1, this.#c = x, this.#l = S, this.#u = C, this.#d = 0, this.#f = !1, this.behaviorZoom = !1, this.autoFit = !1, this.#n = new c(this, {
|
|
61
|
-
commitTransform: (e) => {
|
|
62
|
-
this.#M(e);
|
|
63
|
-
},
|
|
64
|
-
clampScale: (e) => this.#F(e),
|
|
65
|
-
getTransform: () => this.getTransform(),
|
|
66
|
-
getViewportSize: () => ({
|
|
67
|
-
height: this.clientHeight,
|
|
68
|
-
width: this.clientWidth
|
|
69
|
-
})
|
|
70
|
-
}), this.#e = new h(this, {
|
|
71
|
-
getTransform: () => this.getTransform(),
|
|
72
|
-
getZoomTarget: (e) => this.#b(e, this.#n.destinationScale ?? this.#s)
|
|
73
|
-
}), this.#t = new m(this, {
|
|
74
|
-
clampScale: (e) => this.#F(e),
|
|
75
|
-
clientToViewport: (e, t) => this.#O(e, t),
|
|
76
|
-
getTransform: () => this.getTransform(),
|
|
77
|
-
requestAdmittedPinchZoom: (e) => this.#p(e)
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
get x() {
|
|
81
|
-
return this.#a;
|
|
82
|
-
}
|
|
83
|
-
set x(e) {
|
|
84
|
-
this.#A({
|
|
85
|
-
...this.getTransform(),
|
|
86
|
-
x: r(e, 0)
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
get y() {
|
|
90
|
-
return this.#o;
|
|
91
|
-
}
|
|
92
|
-
set y(e) {
|
|
93
|
-
this.#A({
|
|
94
|
-
...this.getTransform(),
|
|
95
|
-
y: r(e, 0)
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
get scale() {
|
|
99
|
-
return this.#s;
|
|
100
|
-
}
|
|
101
|
-
set scale(e) {
|
|
102
|
-
this.#A({
|
|
103
|
-
...this.getTransform(),
|
|
104
|
-
scale: e
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
get minScale() {
|
|
108
|
-
return this.#c;
|
|
109
|
-
}
|
|
110
|
-
set minScale(e) {
|
|
111
|
-
let t = Math.min(a(e, x), this.#l);
|
|
112
|
-
if (t === this.#c) return;
|
|
113
|
-
let n = this.#c;
|
|
114
|
-
this.#n.cancel(), this.#c = t, this.requestUpdate("minScale", n), this.#j({
|
|
115
|
-
...this.getTransform(),
|
|
116
|
-
scale: this.#s
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
get maxScale() {
|
|
120
|
-
return this.#l;
|
|
121
|
-
}
|
|
122
|
-
set maxScale(e) {
|
|
123
|
-
let t = Math.max(a(e, S), this.#c);
|
|
124
|
-
if (t === this.#l) return;
|
|
125
|
-
let n = this.#l;
|
|
126
|
-
this.#n.cancel(), this.#l = t, this.requestUpdate("maxScale", n), this.#j({
|
|
127
|
-
...this.getTransform(),
|
|
128
|
-
scale: this.#s
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
get behaviorPan() {
|
|
132
|
-
return this.#f;
|
|
133
|
-
}
|
|
134
|
-
set behaviorPan(e) {
|
|
135
|
-
let t = e === "space" ? "space" : !!e;
|
|
136
|
-
if (t === this.#f) return;
|
|
137
|
-
let n = this.#f;
|
|
138
|
-
this.#f = t, this.requestUpdate("behaviorPan", n);
|
|
139
|
-
}
|
|
140
|
-
get pannable() {
|
|
141
|
-
return !!this.behaviorPan;
|
|
142
|
-
}
|
|
143
|
-
get zoomable() {
|
|
144
|
-
return this.behaviorZoom;
|
|
145
|
-
}
|
|
146
|
-
get fitInset() {
|
|
147
|
-
return this.#d;
|
|
148
|
-
}
|
|
149
|
-
set fitInset(e) {
|
|
150
|
-
let t = i(e, 0);
|
|
151
|
-
if (t === this.#d) return;
|
|
152
|
-
let n = this.#d;
|
|
153
|
-
this.#d = t, this.requestUpdate("fitInset", n);
|
|
154
|
-
}
|
|
155
|
-
get dragThreshold() {
|
|
156
|
-
return this.#u;
|
|
157
|
-
}
|
|
158
|
-
set dragThreshold(e) {
|
|
159
|
-
let t = i(e, C);
|
|
160
|
-
if (t === this.#u) return;
|
|
161
|
-
let n = this.#u;
|
|
162
|
-
this.#u = t, this.requestUpdate("dragThreshold", n);
|
|
163
|
-
}
|
|
164
|
-
connectedCallback() {
|
|
165
|
-
super.connectedCallback(), t(this), this.hasUpdated && !this.isUpdatePending && (this.#i = !0);
|
|
166
|
-
}
|
|
167
|
-
disconnectedCallback() {
|
|
168
|
-
this.#i = !1, super.disconnectedCallback();
|
|
169
|
-
}
|
|
170
|
-
updated(e) {
|
|
171
|
-
super.updated(e), (e.has("behaviorPan") && !!e.get("behaviorPan") !== this.pannable || e.has("behaviorZoom") && !!e.get("behaviorZoom") !== this.zoomable) && this.dispatchEvent(new Event("capabilitieschange", {
|
|
172
|
-
bubbles: !0,
|
|
173
|
-
composed: !0
|
|
174
|
-
})), this.isConnected && this.#i && (e.has("x") || e.has("y") || e.has("scale")) && this.dispatchEvent(new CustomEvent("viewportchange", {
|
|
175
|
-
bubbles: !0,
|
|
176
|
-
composed: !0,
|
|
177
|
-
detail: this.getTransform()
|
|
178
|
-
})), this.#i = this.isConnected;
|
|
179
|
-
}
|
|
180
|
-
render() {
|
|
181
|
-
return _`<div internal-host focusable><div class="plane" style="${b({ transform: `scale(${this.#s}) translate(${-this.#a}px, ${-this.#o}px)` })}"><slot name="background"></slot><slot @slotchange="${this.#r.contentChanged}"></slot></div><div class="overlay"><slot name="overlay"></slot></div></div>`;
|
|
182
|
-
}
|
|
183
|
-
toViewportCoords(e, t) {
|
|
184
|
-
return {
|
|
185
|
-
x: (e - this.#a) * this.#s,
|
|
186
|
-
y: (t - this.#o) * this.#s
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
toContentCoords(e, t) {
|
|
190
|
-
return p(e, t, this.getTransform());
|
|
191
|
-
}
|
|
192
|
-
getTransform() {
|
|
193
|
-
return {
|
|
194
|
-
scale: this.#s,
|
|
195
|
-
x: this.#a,
|
|
196
|
-
y: this.#o
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
getVisibleRect() {
|
|
200
|
-
return {
|
|
201
|
-
x: this.#a,
|
|
202
|
-
y: this.#o,
|
|
203
|
-
width: this.clientWidth / this.#s,
|
|
204
|
-
height: this.clientHeight / this.#s
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
requestPan(e) {
|
|
208
|
-
return this.pannable ? this.#m(e, {
|
|
209
|
-
start: this.getTransform(),
|
|
210
|
-
appliesDefault: !0
|
|
211
|
-
}) : !1;
|
|
212
|
-
}
|
|
213
|
-
requestZoom(e, t = {}) {
|
|
214
|
-
return this.zoomable ? this.#p(e, t) : !1;
|
|
215
|
-
}
|
|
216
|
-
#p(e, t = {}) {
|
|
217
|
-
let n = this.#h(e.next), r = this.getTransform();
|
|
218
|
-
if (!this.#N("zoom", {
|
|
219
|
-
...e,
|
|
220
|
-
next: { ...n },
|
|
221
|
-
start: { ...r }
|
|
222
|
-
}, !0)) return !1;
|
|
223
|
-
let i = this.getTransform();
|
|
224
|
-
return n.x === i.x && n.y === i.y && n.scale === i.scale && (!t.animated || this.#n.destinationScale === void 0) ? !1 : (this.#n.cancel(), this.#r.consume(), t.animated ? (this.animateTo(n), !0) : this.#k(n) ? (this.#t.rebasePointerSessions(), !0) : !1);
|
|
225
|
-
}
|
|
226
|
-
startPan(e) {
|
|
227
|
-
if (!this.pannable) return;
|
|
228
|
-
let t = e.source, n = this.#h(e.next), r = {
|
|
229
|
-
...e,
|
|
230
|
-
source: t,
|
|
231
|
-
next: n
|
|
232
|
-
}, i = this.getTransform(), a = this.#N("panstart", {
|
|
233
|
-
...r,
|
|
234
|
-
next: { ...n },
|
|
235
|
-
start: { ...i }
|
|
236
|
-
}, !0), o = !1, s = {
|
|
237
|
-
start: { ...i },
|
|
238
|
-
update: (e) => !o && this.#m({
|
|
239
|
-
...e,
|
|
240
|
-
source: t
|
|
241
|
-
}, {
|
|
242
|
-
start: i,
|
|
243
|
-
appliesDefault: a,
|
|
244
|
-
isActive: () => !o
|
|
245
|
-
}),
|
|
246
|
-
end: (e) => {
|
|
247
|
-
o || (o = !0, this.#N("panend", {
|
|
248
|
-
...e,
|
|
249
|
-
source: t,
|
|
250
|
-
start: { ...i },
|
|
251
|
-
transform: this.getTransform()
|
|
252
|
-
}, !1));
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
return this.#m(r, {
|
|
256
|
-
start: i,
|
|
257
|
-
appliesDefault: a,
|
|
258
|
-
isActive: () => !o
|
|
259
|
-
}), s;
|
|
260
|
-
}
|
|
261
|
-
#m(e, t) {
|
|
262
|
-
let n = this.#h(e.next);
|
|
263
|
-
if (!this.#N("pan", {
|
|
264
|
-
...e,
|
|
265
|
-
next: { ...n },
|
|
266
|
-
start: { ...t.start }
|
|
267
|
-
}, !0) || !t.appliesDefault || t.isActive?.() === !1) return !1;
|
|
268
|
-
let r = this.getTransform();
|
|
269
|
-
return n.x === r.x && n.y === r.y && n.scale === r.scale || (this.#n.cancel(), this.#r.consume(), !this.#k(n)) ? !1 : (this.#t.rebasePointerSessions(), !0);
|
|
270
|
-
}
|
|
271
|
-
#h(e) {
|
|
272
|
-
return {
|
|
273
|
-
x: r(e.x, this.#a),
|
|
274
|
-
y: r(e.y, this.#o),
|
|
275
|
-
scale: this.#F(e.scale)
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
animateTo(e, t = {}) {
|
|
279
|
-
this.#n.animateTo(e, t);
|
|
280
|
-
}
|
|
281
|
-
reveal(e, t = {}) {
|
|
282
|
-
this.#v(this.#y(e, this.#C(t)), t);
|
|
283
|
-
}
|
|
284
|
-
fitContents(e = {}) {
|
|
285
|
-
let t = this.#g(this.#S(Array.from(this.children).filter((e) => !e.slot)), this.#w(e));
|
|
286
|
-
t && this.#v(t, e);
|
|
287
|
-
}
|
|
288
|
-
#g(e, t) {
|
|
289
|
-
if (!this.internalHost) return;
|
|
290
|
-
let n = this.getTransform(), r = this.#D(), i = u(e, r, n);
|
|
291
|
-
return i ? this.#y(i, t, n) : void 0;
|
|
292
|
-
}
|
|
293
|
-
#_(e) {
|
|
294
|
-
let t = this.#g(e, this.#w({}));
|
|
295
|
-
t && (this.#n.cancel(), this.#k(t) && this.#t.rebasePointerSessions());
|
|
296
|
-
}
|
|
297
|
-
#v(e, t) {
|
|
298
|
-
t.animated ? t.duration === void 0 ? this.animateTo(e) : this.animateTo(e, { duration: t.duration }) : this.#A(e);
|
|
299
|
-
}
|
|
300
|
-
#y(e, t, n = this.getTransform()) {
|
|
301
|
-
return d(e, {
|
|
302
|
-
options: t,
|
|
303
|
-
scaleRange: this.#T(),
|
|
304
|
-
transform: n,
|
|
305
|
-
viewport: {
|
|
306
|
-
height: this.clientHeight,
|
|
307
|
-
width: this.clientWidth
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
#b(e, t) {
|
|
312
|
-
return e === "in" ? this.#x(1, t) : e === "out" ? this.#x(-1, t) : e === "reset" ? this.#E(this.#F(1)) : this.#g(this.#S(Array.from(this.children).filter((e) => !e.slot)), this.#w({}));
|
|
313
|
-
}
|
|
314
|
-
#x(e, t) {
|
|
315
|
-
let n = Array.isArray(this.zoomStops) ? this.zoomStops : w, r = D(e, t, {
|
|
316
|
-
...this.#T(),
|
|
317
|
-
stops: n
|
|
318
|
-
});
|
|
319
|
-
return this.#E(r);
|
|
320
|
-
}
|
|
321
|
-
#S(e) {
|
|
322
|
-
return (function* () {
|
|
323
|
-
for (let t of e) yield t.getBoundingClientRect();
|
|
324
|
-
})();
|
|
325
|
-
}
|
|
326
|
-
#C(e) {
|
|
327
|
-
return {
|
|
328
|
-
inset: e.inset,
|
|
329
|
-
scale: e.scale
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
#w(e) {
|
|
333
|
-
return {
|
|
334
|
-
inset: e.inset ?? this.#d,
|
|
335
|
-
scale: e.scale
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
#T() {
|
|
339
|
-
return {
|
|
340
|
-
min: this.#c,
|
|
341
|
-
max: this.#l
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
#E(e) {
|
|
345
|
-
return f(e, this.getTransform(), {
|
|
346
|
-
height: this.clientHeight,
|
|
347
|
-
width: this.clientWidth
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
#D() {
|
|
351
|
-
return this.internalHost?.getBoundingClientRect() ?? DOMRect.fromRect();
|
|
352
|
-
}
|
|
353
|
-
#O(e, t, n = this.#D()) {
|
|
354
|
-
return {
|
|
355
|
-
x: e - n.left,
|
|
356
|
-
y: t - n.top
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
#k(e) {
|
|
360
|
-
let t = r(e.x, this.#a), n = r(e.y, this.#o), i = this.#F(e.scale);
|
|
361
|
-
return t === this.#a && n === this.#o && i === this.#s ? !1 : (this.#P({
|
|
362
|
-
scale: i,
|
|
363
|
-
x: t,
|
|
364
|
-
y: n
|
|
365
|
-
}), !0);
|
|
366
|
-
}
|
|
367
|
-
#A(e) {
|
|
368
|
-
this.#n.cancel(), this.#j(e);
|
|
369
|
-
}
|
|
370
|
-
#j(e) {
|
|
371
|
-
this.#k(e) && (this.isConnected && this.#r.consume(), this.#t.rebasePointerSessions());
|
|
372
|
-
}
|
|
373
|
-
#M(e) {
|
|
374
|
-
this.#k(e) && (this.isConnected && this.#r.consume(), this.#t.rebasePointerSessions());
|
|
375
|
-
}
|
|
376
|
-
#N(e, t, n) {
|
|
377
|
-
return this.dispatchEvent(new CustomEvent(e, {
|
|
378
|
-
bubbles: !0,
|
|
379
|
-
cancelable: n,
|
|
380
|
-
composed: !0,
|
|
381
|
-
detail: t
|
|
382
|
-
}));
|
|
383
|
-
}
|
|
384
|
-
#P(e) {
|
|
385
|
-
let t = this.#a, n = this.#o, r = this.#s;
|
|
386
|
-
this.#a = e.x, this.#o = e.y, this.#s = e.scale, e.x !== t && this.requestUpdate("x", t), e.y !== n && this.requestUpdate("y", n), e.scale !== r && this.requestUpdate("scale", r);
|
|
387
|
-
}
|
|
388
|
-
#F(e) {
|
|
389
|
-
let t = Number.isFinite(e) && e > 0 ? e : this.#c;
|
|
390
|
-
return Math.min(this.#l, Math.max(this.#c, t));
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
o([y("[internal-host]")], E.prototype, "internalHost", void 0), o([v({ type: Number })], E.prototype, "x", null), o([v({ type: Number })], E.prototype, "y", null), o([v({ type: Number })], E.prototype, "scale", null), o([v({
|
|
394
|
-
attribute: "min-scale",
|
|
395
|
-
type: Number,
|
|
396
|
-
reflect: !0
|
|
397
|
-
})], E.prototype, "minScale", null), o([v({
|
|
398
|
-
attribute: "max-scale",
|
|
399
|
-
type: Number,
|
|
400
|
-
reflect: !0
|
|
401
|
-
})], E.prototype, "maxScale", null), o([v({
|
|
402
|
-
attribute: "zoom-stops",
|
|
403
|
-
type: Array
|
|
404
|
-
})], E.prototype, "zoomStops", void 0), o([v({
|
|
405
|
-
attribute: "behavior-pan",
|
|
406
|
-
converter: T,
|
|
407
|
-
reflect: !0
|
|
408
|
-
})], E.prototype, "behaviorPan", null), o([v({
|
|
409
|
-
type: Boolean,
|
|
410
|
-
attribute: "behavior-zoom",
|
|
411
|
-
reflect: !0
|
|
412
|
-
})], E.prototype, "behaviorZoom", void 0), o([v({
|
|
413
|
-
type: Boolean,
|
|
414
|
-
reflect: !0
|
|
415
|
-
})], E.prototype, "autoFit", void 0), o([v({
|
|
416
|
-
attribute: "fit-inset",
|
|
417
|
-
type: Number,
|
|
418
|
-
reflect: !0
|
|
419
|
-
})], E.prototype, "fitInset", null), o([v({
|
|
420
|
-
attribute: "drag-threshold",
|
|
421
|
-
type: Number,
|
|
422
|
-
reflect: !0
|
|
423
|
-
})], E.prototype, "dragThreshold", null), E = o([e()], E);
|
|
424
|
-
function D(e, t, n) {
|
|
425
|
-
let r = [
|
|
426
|
-
...n.stops,
|
|
427
|
-
n.min,
|
|
428
|
-
n.max
|
|
429
|
-
].filter((e) => Number.isFinite(e) && e > 0).map((e) => Math.min(n.max, Math.max(n.min, e))).sort((e, t) => e - t).filter((e, t, n) => t === 0 || e !== n[t - 1]);
|
|
430
|
-
if (e > 0) return r.find((e) => e > t) ?? n.max;
|
|
431
|
-
for (let e = r.length - 1; e >= 0; --e) {
|
|
432
|
-
let n = r[e];
|
|
433
|
-
if (n !== void 0 && n < t) return n;
|
|
434
|
-
}
|
|
435
|
-
return n.min;
|
|
436
|
-
}
|
|
437
|
-
//#endregion
|
|
438
|
-
export { E as Viewport };
|
|
439
|
-
|
|
440
|
-
//# sourceMappingURL=viewport2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewport2.js","names":[],"sources":["../../src/viewport/viewport.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, type PropertyValues } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { query } from 'lit/decorators/query.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport {\n audit,\n attachInternals,\n finiteOr,\n nonnegativeFiniteOr,\n positiveFiniteOr,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport styles from './viewport.css?inline';\nimport { ViewportAnimationController } from './viewport-animation.controller.js';\nimport { ViewportAutoFitController } from './viewport-autofit.controller.js';\nimport {\n contentBoundsFromClientRects,\n revealTarget,\n type ViewportClientRect,\n type ViewportFitOptions\n} from './viewport-fitting.utils.js';\nimport { ViewportGestureNavigationController } from './viewport-gesture-navigation.controller.js';\nimport { ViewportNavigationController } from './viewport-navigation.controller.js';\nimport type { ViewportZoomAction } from './viewport-navigation.types.js';\nimport type {\n ViewportAnimationOptions,\n ViewportPanBehavior,\n ViewportPanProposal,\n ViewportPanSession,\n ViewportPanUpdateProposal,\n ViewportPoint,\n ViewportRect,\n ViewportRevealOptions,\n ViewportTransform,\n ViewportZoomProposal,\n ViewportZoomRequestOptions\n} from './viewport.types.js';\nimport { centeredScaleTransform, contentPointFromViewport } from './viewport-projection.utils.js';\n\nconst DEFAULT_MIN_SCALE = 0.05;\nconst DEFAULT_MAX_SCALE = 20;\nconst DEFAULT_DRAG_THRESHOLD = 5;\nconst ZOOM_SCALE_STEPS = [0.05, 0.1, 0.25, 0.5, 1, 2, 4, 8, 16, 20] as const;\nconst BEHAVIOR_PAN_CONVERTER = {\n fromAttribute(value: string | null): ViewportPanBehavior {\n if (value === null) return false;\n return value === 'space' ? 'space' : true;\n },\n toAttribute(value: ViewportPanBehavior): string | null {\n if (!value) return null;\n return value === 'space' ? 'space' : '';\n }\n};\n\n/**\n * @element nve-viewport\n * @description A viewport provides a spatial surface for arbitrary content, with optional pan and zoom navigation.\n * @documentation https://nvidia.github.io/elements/docs/elements/viewport/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/viewport\n * @slot - Content positioned in the viewport's infinite content space.\n * @slot background - Custom content rendered behind viewport content and excluded from content fitting\n * @slot overlay - Interactive content fixed above the transformed plane and excluded from content fitting\n * @event panstart - Dispatched when a sustained pointer or control pan begins. Cancel to suppress the default for its session.\n * @event pan - Dispatched for admitted user pan proposals. Cancel to skip the proposed transform mutation.\n * @event panend - Dispatched once when a sustained pan ends, including its terminal reason.\n * @event zoom - Dispatched for admitted user zoom proposals. Cancel to skip the proposed transform mutation.\n * @event viewportchange - Dispatched once after a render that commits one or more viewport transform changes.\n * @event capabilitieschange - Dispatched after effective user-input pan or zoom admission changes.\n * @cssprop --background - Background color of the fixed viewport area.\n * @cssprop --min-height\n * @cssprop --pan-cursor - Cursor shown over a background eligible for primary-pointer panning.\n * @cssprop --panning-cursor - Cursor shown while a pointer pan is active.\n * @command --pan-left - With behavior-pan enabled, pans left by one discrete step.\n * @command --pan-right - With behavior-pan enabled, pans right by one discrete step.\n * @command --pan-up - With behavior-pan enabled, pans up by one discrete step.\n * @command --pan-down - With behavior-pan enabled, pans down by one discrete step.\n * @command --zoom-in - With behavior-zoom enabled, animates to the next permitted scale step.\n * @command --zoom-out - With behavior-zoom enabled, animates to the previous permitted scale step.\n * @command --zoom-reset - With behavior-zoom enabled, animates to 100% scale.\n * @command --zoom-to-fit - With behavior-zoom enabled, animates to fit direct default-slot element boxes.\n * @stable false\n */\n@audit()\nexport class Viewport extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-viewport',\n version: '0.0.0'\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n @query('[internal-host]') private internalHost: HTMLElement | null;\n readonly #navigationController: ViewportNavigationController;\n readonly #gestureNavigationController: ViewportGestureNavigationController;\n readonly #animationController: ViewportAnimationController;\n readonly #autoFitController = new ViewportAutoFitController(this, clientRects =>\n this.#applyInitialAutoFit(clientRects)\n );\n #publishTransformChanges = false;\n #x = 0;\n #y = 0;\n #scale = 1;\n #minScale = DEFAULT_MIN_SCALE;\n #maxScale = DEFAULT_MAX_SCALE;\n #dragThreshold = DEFAULT_DRAG_THRESHOLD;\n #fitInset = 0;\n #behaviorPan: ViewportPanBehavior = false;\n constructor() {\n super();\n this.#animationController = new ViewportAnimationController(this, {\n commitTransform: next => {\n this.#applyAnimationTransform(next);\n },\n clampScale: value => this.#clampScale(value),\n getTransform: () => this.getTransform(),\n getViewportSize: () => ({ height: this.clientHeight, width: this.clientWidth })\n });\n this.#navigationController = new ViewportNavigationController(this, {\n getTransform: () => this.getTransform(),\n getZoomTarget: action => this.#getZoomTarget(action, this.#animationController.destinationScale ?? this.#scale)\n });\n this.#gestureNavigationController = new ViewportGestureNavigationController(this, {\n clampScale: value => this.#clampScale(value),\n clientToViewport: (clientX, clientY) => this.#clientToViewport(clientX, clientY),\n getTransform: () => this.getTransform(),\n requestAdmittedPinchZoom: proposal => this.#performZoom(proposal)\n });\n }\n\n /** Horizontal content-space coordinate at the viewport origin. */\n @property({ type: Number })\n get x(): number {\n return this.#x;\n }\n\n set x(value: number) {\n this.#applyExternalTransform({ ...this.getTransform(), x: finiteOr(value, 0) });\n }\n\n /** Vertical content-space coordinate at the viewport origin. */\n @property({ type: Number })\n get y(): number {\n return this.#y;\n }\n\n set y(value: number) {\n this.#applyExternalTransform({ ...this.getTransform(), y: finiteOr(value, 0) });\n }\n\n /** Content-to-viewport CSS-pixel scale. */\n @property({ type: Number })\n get scale(): number {\n return this.#scale;\n }\n\n set scale(value: number) {\n this.#applyExternalTransform({ ...this.getTransform(), scale: value });\n }\n\n /** Inclusive lower scale limit. */\n @property({ attribute: 'min-scale', type: Number, reflect: true })\n get minScale(): number {\n return this.#minScale;\n }\n\n set minScale(value: number) {\n const next = Math.min(positiveFiniteOr(value, DEFAULT_MIN_SCALE), this.#maxScale);\n if (next === this.#minScale) return;\n const previous = this.#minScale;\n this.#animationController.cancel();\n this.#minScale = next;\n this.requestUpdate('minScale', previous);\n this.#commitExternalTransform({ ...this.getTransform(), scale: this.#scale });\n }\n\n /** Inclusive upper scale limit. */\n @property({ attribute: 'max-scale', type: Number, reflect: true })\n get maxScale(): number {\n return this.#maxScale;\n }\n\n set maxScale(value: number) {\n const next = Math.max(positiveFiniteOr(value, DEFAULT_MAX_SCALE), this.#minScale);\n if (next === this.#maxScale) return;\n const previous = this.#maxScale;\n this.#animationController.cancel();\n this.#maxScale = next;\n this.requestUpdate('maxScale', previous);\n this.#commitExternalTransform({ ...this.getTransform(), scale: this.#scale });\n }\n\n /**\n * Scale stops for keyboard and command zoom, clamped to the scale bounds.\n * Defaults to built-in stops; an empty array uses only the bounds.\n */\n // eslint-disable-next-line local/primitive-property\n @property({ attribute: 'zoom-stops', type: Array }) zoomStops?: readonly number[];\n\n /** Enables panning by pointer, focused wheel, focused keyboard, and Invoker commands; requires Space for primary-pointer dragging when set to space. */\n @property({ attribute: 'behavior-pan', converter: BEHAVIOR_PAN_CONVERTER, reflect: true })\n get behaviorPan(): ViewportPanBehavior {\n return this.#behaviorPan;\n }\n\n set behaviorPan(value: ViewportPanBehavior | null | undefined) {\n const next = value === 'space' ? 'space' : Boolean(value);\n if (next === this.#behaviorPan) return;\n const previous = this.#behaviorPan;\n this.#behaviorPan = next;\n this.requestUpdate('behaviorPan', previous);\n }\n\n /** Enables zooming by pinch, focused modified wheel, focused keyboard, and Invoker commands. */\n @property({ type: Boolean, attribute: 'behavior-zoom', reflect: true }) behaviorZoom = false;\n\n /** Whether the viewport may admit new user-input panning. */\n get pannable(): boolean {\n return Boolean(this.behaviorPan);\n }\n\n /** Whether the viewport may admit new user-input zooming. */\n get zoomable(): boolean {\n return this.behaviorZoom;\n }\n\n /** Fits measurable direct default-slot content once after initial layout. */\n @property({ type: Boolean, reflect: true }) autoFit = false;\n /** Default uniform CSS-pixel inset reserved around bounds when fitting content. */\n @property({ attribute: 'fit-inset', type: Number, reflect: true })\n get fitInset(): number {\n return this.#fitInset;\n }\n\n set fitInset(value: number) {\n const next = nonnegativeFiniteOr(value, 0);\n if (next === this.#fitInset) return;\n const previous = this.#fitInset;\n this.#fitInset = next;\n this.requestUpdate('fitInset', previous);\n }\n\n /** CSS-pixel pointer movement required before a pointer pan begins. */\n @property({ attribute: 'drag-threshold', type: Number, reflect: true })\n get dragThreshold(): number {\n return this.#dragThreshold;\n }\n\n set dragThreshold(value: number) {\n const next = nonnegativeFiniteOr(value, DEFAULT_DRAG_THRESHOLD);\n if (next === this.#dragThreshold) return;\n const previous = this.#dragThreshold;\n this.#dragThreshold = next;\n this.requestUpdate('dragThreshold', previous);\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n attachInternals(this);\n if (this.hasUpdated && !this.isUpdatePending) this.#publishTransformChanges = true;\n }\n\n disconnectedCallback(): void {\n this.#publishTransformChanges = false;\n super.disconnectedCallback();\n }\n\n protected updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n if (\n (changed.has('behaviorPan') && Boolean(changed.get('behaviorPan')) !== this.pannable) ||\n (changed.has('behaviorZoom') && Boolean(changed.get('behaviorZoom')) !== this.zoomable)\n ) {\n this.dispatchEvent(new Event('capabilitieschange', { bubbles: true, composed: true }));\n }\n if (\n this.isConnected &&\n this.#publishTransformChanges &&\n (changed.has('x') || changed.has('y') || changed.has('scale'))\n ) {\n this.dispatchEvent(\n new CustomEvent<ViewportTransform>('viewportchange', {\n bubbles: true,\n composed: true,\n detail: this.getTransform()\n })\n );\n }\n this.#publishTransformChanges = this.isConnected;\n }\n\n render() {\n return html`\n <div internal-host focusable>\n <div\n class=\"plane\"\n style=${styleMap({ transform: `scale(${this.#scale}) translate(${-this.#x}px, ${-this.#y}px)` })}\n >\n <slot name=\"background\"></slot>\n <slot @slotchange=${this.#autoFitController.contentChanged}></slot>\n </div>\n <div class=\"overlay\">\n <slot name=\"overlay\"></slot>\n </div>\n </div>\n `;\n }\n\n /** Converts a content-space point to viewport CSS pixels. */\n toViewportCoords(contentX: number, contentY: number): ViewportPoint {\n return {\n x: (contentX - this.#x) * this.#scale,\n y: (contentY - this.#y) * this.#scale\n };\n }\n\n /** Converts a viewport CSS-pixel point to content space. */\n toContentCoords(viewportX: number, viewportY: number): ViewportPoint {\n return contentPointFromViewport(viewportX, viewportY, this.getTransform());\n }\n\n /** Returns the current content-space origin and CSS-pixel scale. */\n getTransform(): ViewportTransform {\n return { scale: this.#scale, x: this.#x, y: this.#y };\n }\n\n /** Returns the visible content-space rectangle. */\n getVisibleRect(): ViewportRect {\n return {\n x: this.#x,\n y: this.#y,\n width: this.clientWidth / this.#scale,\n height: this.clientHeight / this.#scale\n };\n }\n\n /**\n * Requests one discrete user-originated pan. When pannable, the viewport dispatches\n * a cancelable `pan` and applies the default transform if no listener cancels the event.\n * Returns true only when that default changes the transform.\n */\n requestPan(proposal: ViewportPanProposal): boolean {\n if (!this.pannable) return false;\n return this.#requestPan(proposal, { start: this.getTransform(), appliesDefault: true });\n }\n\n /**\n * Requests one discrete user-originated zoom. When zoomable, the viewport dispatches\n * a cancelable `zoom` and applies the default transform if no listener cancels the event.\n * Set `options.animated` to animate the uncanceled default; the option is absent from the `zoom` detail.\n * Returns true when the default changes or schedules a change to the transform.\n */\n requestZoom(proposal: ViewportZoomProposal, options: ViewportZoomRequestOptions = {}): boolean {\n if (!this.zoomable) return false;\n return this.#performZoom(proposal, options);\n }\n\n #performZoom(proposal: ViewportZoomProposal, options: ViewportZoomRequestOptions = {}): boolean {\n const next = this.#normalizeTransform(proposal.next);\n const start = this.getTransform();\n if (!this.#dispatchNavigationEvent('zoom', { ...proposal, next: { ...next }, start: { ...start } }, true))\n return false;\n const current = this.getTransform();\n const unchanged = next.x === current.x && next.y === current.y && next.scale === current.scale;\n if (unchanged && (!options.animated || this.#animationController.destinationScale === undefined)) return false;\n this.#animationController.cancel();\n this.#autoFitController.consume();\n if (options.animated) {\n this.animateTo(next);\n return true;\n }\n if (!this.#commitTransform(next)) return false;\n this.#gestureNavigationController.rebasePointerSessions();\n return true;\n }\n\n /**\n * Starts a sustained semantic pan after the caller crosses its activation threshold.\n * Dispatches `panstart`, performs the initial `pan` update, and returns a session for later updates\n * and one terminal `panend`. Returns undefined when pannable is false.\n */\n startPan(proposal: ViewportPanProposal): ViewportPanSession | undefined {\n if (!this.pannable) return undefined;\n const source = proposal.source;\n const next = this.#normalizeTransform(proposal.next);\n const initialProposal: ViewportPanProposal = { ...proposal, source, next };\n const sessionStart = this.getTransform();\n const appliesDefault = this.#dispatchNavigationEvent(\n 'panstart',\n { ...initialProposal, next: { ...next }, start: { ...sessionStart } },\n true\n );\n let ended = false;\n const session: ViewportPanSession = {\n start: { ...sessionStart },\n update: (update: ViewportPanUpdateProposal): boolean => {\n if (ended) return false;\n return this.#requestPan({ ...update, source }, { start: sessionStart, appliesDefault, isActive: () => !ended });\n },\n end: request => {\n if (ended) return;\n ended = true;\n this.#dispatchNavigationEvent(\n 'panend',\n { ...request, source, start: { ...sessionStart }, transform: this.getTransform() },\n false\n );\n }\n };\n this.#requestPan(initialProposal, { start: sessionStart, appliesDefault, isActive: () => !ended });\n return session;\n }\n\n #requestPan(\n proposal: ViewportPanProposal,\n disposition: { start: ViewportTransform; appliesDefault: boolean; isActive?: () => boolean }\n ): boolean {\n const next = this.#normalizeTransform(proposal.next);\n if (\n !this.#dispatchNavigationEvent('pan', { ...proposal, next: { ...next }, start: { ...disposition.start } }, true)\n ) {\n return false;\n }\n if (!disposition.appliesDefault || disposition.isActive?.() === false) return false;\n const current = this.getTransform();\n if (next.x === current.x && next.y === current.y && next.scale === current.scale) return false;\n this.#animationController.cancel();\n this.#autoFitController.consume();\n if (!this.#commitTransform(next)) return false;\n this.#gestureNavigationController.rebasePointerSessions();\n return true;\n }\n\n #normalizeTransform(next: ViewportTransform): ViewportTransform {\n return { x: finiteOr(next.x, this.#x), y: finiteOr(next.y, this.#y), scale: this.#clampScale(next.scale) };\n }\n\n /** Animates the viewport to the requested partial transform. */\n animateTo(target: Partial<ViewportTransform>, options: ViewportAnimationOptions = {}): void {\n this.#animationController.animateTo(target, options);\n }\n\n /** Centers or fits a content-space region within the viewport. */\n reveal(region: { x: number; y: number; width?: number; height?: number }, options: ViewportRevealOptions = {}): void {\n this.#applyRevealTarget(this.#getRevealTarget(region, this.#revealFitOptions(options)), options);\n }\n\n /** Fits the union of direct default-slot element boxes within the viewport. */\n fitContents(options: ViewportRevealOptions = {}): void {\n const target = this.#getFitContentsTargetFromClientRects(\n this.#clientRectsFromChildren(Array.from(this.children).filter(child => !child.slot)),\n this.#resolveFitOptions(options)\n );\n if (target) this.#applyRevealTarget(target, options);\n }\n\n #getFitContentsTargetFromClientRects(\n clientRects: Iterable<ViewportClientRect>,\n options: ViewportFitOptions\n ): ViewportTransform | undefined {\n if (!this.internalHost) return undefined;\n const transform = this.getTransform();\n const viewportFrame = this.#viewportFrame();\n const region = contentBoundsFromClientRects(clientRects, viewportFrame, transform);\n return region ? this.#getRevealTarget(region, options, transform) : undefined;\n }\n\n #applyInitialAutoFit(clientRects: readonly ViewportClientRect[]): void {\n const target = this.#getFitContentsTargetFromClientRects(clientRects, this.#resolveFitOptions({}));\n if (!target) return;\n this.#animationController.cancel();\n if (this.#commitTransform(target)) {\n this.#gestureNavigationController.rebasePointerSessions();\n }\n }\n\n #applyRevealTarget(target: ViewportTransform, options: ViewportRevealOptions): void {\n if (options.animated) {\n if (options.duration === undefined) this.animateTo(target);\n else this.animateTo(target, { duration: options.duration });\n } else {\n this.#applyExternalTransform(target);\n }\n }\n\n #getRevealTarget(\n region: { x: number; y: number; width?: number; height?: number },\n options: ViewportFitOptions,\n transform = this.getTransform()\n ): ViewportTransform {\n return revealTarget(region, {\n options,\n scaleRange: this.#getScaleRange(),\n transform,\n viewport: { height: this.clientHeight, width: this.clientWidth }\n });\n }\n\n #getZoomTarget(action: ViewportZoomAction, stepScale: number): ViewportTransform | undefined {\n if (action === 'in') return this.#getZoomStepTarget(1, stepScale);\n if (action === 'out') return this.#getZoomStepTarget(-1, stepScale);\n if (action === 'reset') return this.#getCenteredScaleTransform(this.#clampScale(1));\n return this.#getFitContentsTargetFromClientRects(\n this.#clientRectsFromChildren(Array.from(this.children).filter(child => !child.slot)),\n this.#resolveFitOptions({})\n );\n }\n\n #getZoomStepTarget(direction: -1 | 1, currentScale: number): ViewportTransform {\n const stops = Array.isArray(this.zoomStops) ? this.zoomStops : ZOOM_SCALE_STEPS;\n const scaleRange = { ...this.#getScaleRange(), stops };\n const scale = nextScaleStep(direction, currentScale, scaleRange);\n return this.#getCenteredScaleTransform(scale);\n }\n\n #clientRectsFromChildren(children: Iterable<Element>): Iterable<ViewportClientRect> {\n return (function* (): Generator<ViewportClientRect> {\n for (const child of children) yield child.getBoundingClientRect();\n })();\n }\n\n #revealFitOptions(options: ViewportRevealOptions): ViewportFitOptions {\n return { inset: options.inset, scale: options.scale };\n }\n\n #resolveFitOptions(options: ViewportRevealOptions): ViewportFitOptions {\n return { inset: options.inset ?? this.#fitInset, scale: options.scale };\n }\n #getScaleRange(): { min: number; max: number } {\n return { min: this.#minScale, max: this.#maxScale };\n }\n #getCenteredScaleTransform(scale: number): ViewportTransform {\n return centeredScaleTransform(scale, this.getTransform(), { height: this.clientHeight, width: this.clientWidth });\n }\n\n #viewportFrame(): DOMRect {\n return this.internalHost?.getBoundingClientRect() ?? DOMRect.fromRect();\n }\n #clientToViewport(clientX: number, clientY: number, frame = this.#viewportFrame()): ViewportPoint {\n return { x: clientX - frame.left, y: clientY - frame.top };\n }\n\n #commitTransform(next: ViewportTransform): boolean {\n const x = finiteOr(next.x, this.#x);\n const y = finiteOr(next.y, this.#y);\n const scale = this.#clampScale(next.scale);\n if (x === this.#x && y === this.#y && scale === this.#scale) return false;\n this.#updateTransformFields({ scale, x, y });\n return true;\n }\n\n #applyExternalTransform(next: ViewportTransform): void {\n this.#animationController.cancel();\n this.#commitExternalTransform(next);\n }\n\n #commitExternalTransform(next: ViewportTransform): void {\n if (!this.#commitTransform(next)) return;\n if (this.isConnected) this.#autoFitController.consume();\n this.#gestureNavigationController.rebasePointerSessions();\n }\n\n #applyAnimationTransform(next: ViewportTransform): void {\n const committed = this.#commitTransform(next);\n if (!committed) return;\n if (this.isConnected) this.#autoFitController.consume();\n this.#gestureNavigationController.rebasePointerSessions();\n }\n\n #dispatchNavigationEvent<T>(type: string, detail: T, cancelable: boolean): boolean {\n return this.dispatchEvent(\n new CustomEvent<T>(type, {\n bubbles: true,\n cancelable,\n composed: true,\n detail\n })\n );\n }\n\n #updateTransformFields(next: ViewportTransform): void {\n const previousX = this.#x;\n const previousY = this.#y;\n const previousScale = this.#scale;\n this.#x = next.x;\n this.#y = next.y;\n this.#scale = next.scale;\n if (next.x !== previousX) this.requestUpdate('x', previousX);\n if (next.y !== previousY) this.requestUpdate('y', previousY);\n if (next.scale !== previousScale) this.requestUpdate('scale', previousScale);\n }\n #clampScale(value: number): number {\n const finite = Number.isFinite(value) && value > 0 ? value : this.#minScale;\n return Math.min(this.#maxScale, Math.max(this.#minScale, finite));\n }\n}\n\nfunction nextScaleStep(\n direction: -1 | 1,\n current: number,\n scaleRange: { min: number; max: number; stops: readonly number[] }\n): number {\n const steps = [...scaleRange.stops, scaleRange.min, scaleRange.max]\n .filter(scale => Number.isFinite(scale) && scale > 0)\n .map(scale => Math.min(scaleRange.max, Math.max(scaleRange.min, scale)))\n .sort((first, second) => first - second)\n .filter((scale, index, all) => index === 0 || scale !== all[index - 1]);\n if (direction > 0) return steps.find(scale => scale > current) ?? scaleRange.max;\n for (let index = steps.length - 1; index >= 0; index -= 1) {\n const scale = steps[index];\n if (scale !== undefined && scale < current) return scale;\n }\n return scaleRange.min;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0CA,IAAM,IAAoB,KACpB,IAAoB,IACpB,IAAyB,GACzB,IAAmB;CAAC;CAAM;CAAK;CAAM;CAAK;CAAG;CAAG;CAAG;CAAG;CAAI;AAAE,GAC5D,IAAyB;CAC7B,cAAc,GAA2C;EAEvD,OADI,MAAU,OAAa,KACpB,MAAU,WAAU;CAC7B;CACA,YAAY,GAA2C;EAErD,OADK,IACE,MAAU,UAAU,UAAU,KADlB;CAErB;AACF,GAgCa,IAAN,cAAuB,EAAW;;EACvB,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;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