@nvidia-elements/core 2.12.2 → 2.13.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 +10 -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.d.ts +9 -1
- package/dist/bundles/index.js +1 -1
- 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 +6 -0
- package/dist/custom-elements-vue.d.ts +6 -0
- package/dist/custom-elements.json +36 -1
- package/dist/data.html.json +5 -0
- package/dist/data.snippets.json +27 -27
- 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/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/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-node2.js +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/viewport/viewport-gridlines2.js +1 -1
- package/dist/viewport/viewport-minimap2.js +1 -1
- package/dist/viewport/viewport.d.ts +5 -0
- package/dist/viewport/viewport2.js +55 -45
- package/dist/viewport/viewport2.js.map +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +4 -3
|
@@ -55,6 +55,11 @@ export declare class Viewport extends LitElement {
|
|
|
55
55
|
/** Inclusive upper scale limit. */
|
|
56
56
|
get maxScale(): number;
|
|
57
57
|
set maxScale(value: number);
|
|
58
|
+
/**
|
|
59
|
+
* Scale stops for keyboard and command zoom, clamped to the scale bounds.
|
|
60
|
+
* Defaults to built-in stops; an empty array uses only the bounds.
|
|
61
|
+
*/
|
|
62
|
+
zoomStops?: readonly number[];
|
|
58
63
|
/** Enables panning by pointer, focused wheel, focused keyboard, and Invoker commands; requires Space for primary-pointer dragging when set to space. */
|
|
59
64
|
get behaviorPan(): ViewportPanBehavior;
|
|
60
65
|
set behaviorPan(value: ViewportPanBehavior | null | undefined);
|
|
@@ -40,7 +40,7 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
40
40
|
static {
|
|
41
41
|
this.metadata = {
|
|
42
42
|
tag: "nve-viewport",
|
|
43
|
-
version: "2.
|
|
43
|
+
version: "2.13.0"
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
#e;
|
|
@@ -59,9 +59,9 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
59
59
|
constructor() {
|
|
60
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
61
|
commitTransform: (e) => {
|
|
62
|
-
this.#
|
|
62
|
+
this.#M(e);
|
|
63
63
|
},
|
|
64
|
-
clampScale: (e) => this.#
|
|
64
|
+
clampScale: (e) => this.#F(e),
|
|
65
65
|
getTransform: () => this.getTransform(),
|
|
66
66
|
getViewportSize: () => ({
|
|
67
67
|
height: this.clientHeight,
|
|
@@ -71,8 +71,8 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
71
71
|
getTransform: () => this.getTransform(),
|
|
72
72
|
getZoomTarget: (e) => this.#b(e, this.#n.destinationScale ?? this.#s)
|
|
73
73
|
}), this.#t = new m(this, {
|
|
74
|
-
clampScale: (e) => this.#
|
|
75
|
-
clientToViewport: (e, t) => this.#
|
|
74
|
+
clampScale: (e) => this.#F(e),
|
|
75
|
+
clientToViewport: (e, t) => this.#O(e, t),
|
|
76
76
|
getTransform: () => this.getTransform(),
|
|
77
77
|
requestAdmittedPinchZoom: (e) => this.#p(e)
|
|
78
78
|
});
|
|
@@ -81,7 +81,7 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
81
81
|
return this.#a;
|
|
82
82
|
}
|
|
83
83
|
set x(e) {
|
|
84
|
-
this.#
|
|
84
|
+
this.#A({
|
|
85
85
|
...this.getTransform(),
|
|
86
86
|
x: r(e, 0)
|
|
87
87
|
});
|
|
@@ -90,7 +90,7 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
90
90
|
return this.#o;
|
|
91
91
|
}
|
|
92
92
|
set y(e) {
|
|
93
|
-
this.#
|
|
93
|
+
this.#A({
|
|
94
94
|
...this.getTransform(),
|
|
95
95
|
y: r(e, 0)
|
|
96
96
|
});
|
|
@@ -99,7 +99,7 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
99
99
|
return this.#s;
|
|
100
100
|
}
|
|
101
101
|
set scale(e) {
|
|
102
|
-
this.#
|
|
102
|
+
this.#A({
|
|
103
103
|
...this.getTransform(),
|
|
104
104
|
scale: e
|
|
105
105
|
});
|
|
@@ -111,7 +111,7 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
111
111
|
let t = Math.min(a(e, x), this.#l);
|
|
112
112
|
if (t === this.#c) return;
|
|
113
113
|
let n = this.#c;
|
|
114
|
-
this.#n.cancel(), this.#c = t, this.requestUpdate("minScale", n), this.#
|
|
114
|
+
this.#n.cancel(), this.#c = t, this.requestUpdate("minScale", n), this.#j({
|
|
115
115
|
...this.getTransform(),
|
|
116
116
|
scale: this.#s
|
|
117
117
|
});
|
|
@@ -123,7 +123,7 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
123
123
|
let t = Math.max(a(e, S), this.#c);
|
|
124
124
|
if (t === this.#l) return;
|
|
125
125
|
let n = this.#l;
|
|
126
|
-
this.#n.cancel(), this.#l = t, this.requestUpdate("maxScale", n), this.#
|
|
126
|
+
this.#n.cancel(), this.#l = t, this.requestUpdate("maxScale", n), this.#j({
|
|
127
127
|
...this.getTransform(),
|
|
128
128
|
scale: this.#s
|
|
129
129
|
});
|
|
@@ -215,13 +215,13 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
215
215
|
}
|
|
216
216
|
#p(e, t = {}) {
|
|
217
217
|
let n = this.#h(e.next), r = this.getTransform();
|
|
218
|
-
if (!this.#
|
|
218
|
+
if (!this.#N("zoom", {
|
|
219
219
|
...e,
|
|
220
220
|
next: { ...n },
|
|
221
221
|
start: { ...r }
|
|
222
222
|
}, !0)) return !1;
|
|
223
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.#
|
|
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
225
|
}
|
|
226
226
|
startPan(e) {
|
|
227
227
|
if (!this.pannable) return;
|
|
@@ -229,7 +229,7 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
229
229
|
...e,
|
|
230
230
|
source: t,
|
|
231
231
|
next: n
|
|
232
|
-
}, i = this.getTransform(), a = this.#
|
|
232
|
+
}, i = this.getTransform(), a = this.#N("panstart", {
|
|
233
233
|
...r,
|
|
234
234
|
next: { ...n },
|
|
235
235
|
start: { ...i }
|
|
@@ -244,7 +244,7 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
244
244
|
isActive: () => !o
|
|
245
245
|
}),
|
|
246
246
|
end: (e) => {
|
|
247
|
-
o || (o = !0, this.#
|
|
247
|
+
o || (o = !0, this.#N("panend", {
|
|
248
248
|
...e,
|
|
249
249
|
source: t,
|
|
250
250
|
start: { ...i },
|
|
@@ -260,47 +260,47 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
260
260
|
}
|
|
261
261
|
#m(e, t) {
|
|
262
262
|
let n = this.#h(e.next);
|
|
263
|
-
if (!this.#
|
|
263
|
+
if (!this.#N("pan", {
|
|
264
264
|
...e,
|
|
265
265
|
next: { ...n },
|
|
266
266
|
start: { ...t.start }
|
|
267
267
|
}, !0) || !t.appliesDefault || t.isActive?.() === !1) return !1;
|
|
268
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.#
|
|
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
270
|
}
|
|
271
271
|
#h(e) {
|
|
272
272
|
return {
|
|
273
273
|
x: r(e.x, this.#a),
|
|
274
274
|
y: r(e.y, this.#o),
|
|
275
|
-
scale: this.#
|
|
275
|
+
scale: this.#F(e.scale)
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
animateTo(e, t = {}) {
|
|
279
279
|
this.#n.animateTo(e, t);
|
|
280
280
|
}
|
|
281
281
|
reveal(e, t = {}) {
|
|
282
|
-
this.#v(this.#y(e, this.#
|
|
282
|
+
this.#v(this.#y(e, this.#C(t)), t);
|
|
283
283
|
}
|
|
284
284
|
fitContents(e = {}) {
|
|
285
|
-
let t = this.#g(this.#
|
|
285
|
+
let t = this.#g(this.#S(Array.from(this.children).filter((e) => !e.slot)), this.#w(e));
|
|
286
286
|
t && this.#v(t, e);
|
|
287
287
|
}
|
|
288
288
|
#g(e, t) {
|
|
289
289
|
if (!this.internalHost) return;
|
|
290
|
-
let n = this.getTransform(), r = this.#
|
|
290
|
+
let n = this.getTransform(), r = this.#D(), i = u(e, r, n);
|
|
291
291
|
return i ? this.#y(i, t, n) : void 0;
|
|
292
292
|
}
|
|
293
293
|
#_(e) {
|
|
294
|
-
let t = this.#g(e, this.#
|
|
295
|
-
t && (this.#n.cancel(), this.#
|
|
294
|
+
let t = this.#g(e, this.#w({}));
|
|
295
|
+
t && (this.#n.cancel(), this.#k(t) && this.#t.rebasePointerSessions());
|
|
296
296
|
}
|
|
297
297
|
#v(e, t) {
|
|
298
|
-
t.animated ? t.duration === void 0 ? this.animateTo(e) : this.animateTo(e, { duration: t.duration }) : this.#
|
|
298
|
+
t.animated ? t.duration === void 0 ? this.animateTo(e) : this.animateTo(e, { duration: t.duration }) : this.#A(e);
|
|
299
299
|
}
|
|
300
300
|
#y(e, t, n = this.getTransform()) {
|
|
301
301
|
return d(e, {
|
|
302
302
|
options: t,
|
|
303
|
-
scaleRange: this.#
|
|
303
|
+
scaleRange: this.#T(),
|
|
304
304
|
transform: n,
|
|
305
305
|
viewport: {
|
|
306
306
|
height: this.clientHeight,
|
|
@@ -309,64 +309,71 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
#b(e, t) {
|
|
312
|
-
return e === "in" ? this.#
|
|
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
313
|
}
|
|
314
|
-
#x(e) {
|
|
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) {
|
|
315
322
|
return (function* () {
|
|
316
323
|
for (let t of e) yield t.getBoundingClientRect();
|
|
317
324
|
})();
|
|
318
325
|
}
|
|
319
|
-
#
|
|
326
|
+
#C(e) {
|
|
320
327
|
return {
|
|
321
328
|
inset: e.inset,
|
|
322
329
|
scale: e.scale
|
|
323
330
|
};
|
|
324
331
|
}
|
|
325
|
-
#
|
|
332
|
+
#w(e) {
|
|
326
333
|
return {
|
|
327
334
|
inset: e.inset ?? this.#d,
|
|
328
335
|
scale: e.scale
|
|
329
336
|
};
|
|
330
337
|
}
|
|
331
|
-
#
|
|
338
|
+
#T() {
|
|
332
339
|
return {
|
|
333
340
|
min: this.#c,
|
|
334
341
|
max: this.#l
|
|
335
342
|
};
|
|
336
343
|
}
|
|
337
|
-
#
|
|
344
|
+
#E(e) {
|
|
338
345
|
return f(e, this.getTransform(), {
|
|
339
346
|
height: this.clientHeight,
|
|
340
347
|
width: this.clientWidth
|
|
341
348
|
});
|
|
342
349
|
}
|
|
343
|
-
#
|
|
350
|
+
#D() {
|
|
344
351
|
return this.internalHost?.getBoundingClientRect() ?? DOMRect.fromRect();
|
|
345
352
|
}
|
|
346
|
-
#
|
|
353
|
+
#O(e, t, n = this.#D()) {
|
|
347
354
|
return {
|
|
348
355
|
x: e - n.left,
|
|
349
356
|
y: t - n.top
|
|
350
357
|
};
|
|
351
358
|
}
|
|
352
|
-
#
|
|
353
|
-
let t = r(e.x, this.#a), n = r(e.y, this.#o), i = this.#
|
|
354
|
-
return t === this.#a && n === this.#o && i === this.#s ? !1 : (this.#
|
|
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({
|
|
355
362
|
scale: i,
|
|
356
363
|
x: t,
|
|
357
364
|
y: n
|
|
358
365
|
}), !0);
|
|
359
366
|
}
|
|
360
|
-
#k(e) {
|
|
361
|
-
this.#n.cancel(), this.#A(e);
|
|
362
|
-
}
|
|
363
367
|
#A(e) {
|
|
364
|
-
this.#
|
|
368
|
+
this.#n.cancel(), this.#j(e);
|
|
365
369
|
}
|
|
366
370
|
#j(e) {
|
|
367
|
-
this.#
|
|
371
|
+
this.#k(e) && (this.isConnected && this.#r.consume(), this.#t.rebasePointerSessions());
|
|
368
372
|
}
|
|
369
|
-
#M(e
|
|
373
|
+
#M(e) {
|
|
374
|
+
this.#k(e) && (this.isConnected && this.#r.consume(), this.#t.rebasePointerSessions());
|
|
375
|
+
}
|
|
376
|
+
#N(e, t, n) {
|
|
370
377
|
return this.dispatchEvent(new CustomEvent(e, {
|
|
371
378
|
bubbles: !0,
|
|
372
379
|
cancelable: n,
|
|
@@ -374,11 +381,11 @@ var x = .05, S = 20, C = 5, w = [
|
|
|
374
381
|
detail: t
|
|
375
382
|
}));
|
|
376
383
|
}
|
|
377
|
-
#
|
|
384
|
+
#P(e) {
|
|
378
385
|
let t = this.#a, n = this.#o, r = this.#s;
|
|
379
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);
|
|
380
387
|
}
|
|
381
|
-
#
|
|
388
|
+
#F(e) {
|
|
382
389
|
let t = Number.isFinite(e) && e > 0 ? e : this.#c;
|
|
383
390
|
return Math.min(this.#l, Math.max(this.#c, t));
|
|
384
391
|
}
|
|
@@ -392,6 +399,9 @@ o([y("[internal-host]")], E.prototype, "internalHost", void 0), o([v({ type: Num
|
|
|
392
399
|
type: Number,
|
|
393
400
|
reflect: !0
|
|
394
401
|
})], E.prototype, "maxScale", null), o([v({
|
|
402
|
+
attribute: "zoom-stops",
|
|
403
|
+
type: Array
|
|
404
|
+
})], E.prototype, "zoomStops", void 0), o([v({
|
|
395
405
|
attribute: "behavior-pan",
|
|
396
406
|
converter: T,
|
|
397
407
|
reflect: !0
|
|
@@ -413,10 +423,10 @@ o([y("[internal-host]")], E.prototype, "internalHost", void 0), o([v({ type: Num
|
|
|
413
423
|
})], E.prototype, "dragThreshold", null), E = o([e()], E);
|
|
414
424
|
function D(e, t, n) {
|
|
415
425
|
let r = [
|
|
416
|
-
...
|
|
426
|
+
...n.stops,
|
|
417
427
|
n.min,
|
|
418
428
|
n.max
|
|
419
|
-
].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]);
|
|
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]);
|
|
420
430
|
if (e > 0) return r.find((e) => e > t) ?? n.max;
|
|
421
431
|
for (let e = r.length - 1; e >= 0; --e) {
|
|
422
432
|
let n = r[e];
|
|
@@ -1 +1 @@
|
|
|
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 /** 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.#getCenteredScaleTransform(nextScaleStep(1, stepScale, this.#getScaleRange()));\n if (action === 'out') return this.#getCenteredScaleTransform(nextScaleStep(-1, stepScale, this.#getScaleRange()));\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 #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(direction: -1 | 1, current: number, scaleRange: { min: number; max: number }): number {\n const steps = [...ZOOM_SCALE_STEPS, scaleRange.min, scaleRange.max]\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;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;CAMA;CACA;CAC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EAAK,EAAW;CAAG,CAAC,CAChE,KAAI,MAAS,KAAK,IAAI,EAAW,KAAK,KAAK,IAAI,EAAW,KAAK,CAAK,CAAC,CAAC,CAAC,CACvE,MAAM,GAAO,MAAW,IAAQ,CAAM,CAAC,CACvC,QAAQ,GAAO,GAAO,MAAQ,MAAU,KAAK,MAAU,EAAI,IAAQ,EAAE;CACxE,IAAI,IAAY,GAAG,OAAO,EAAM,MAAK,MAAS,IAAQ,CAAO,KAAK,EAAW;CAC7E,KAAK,IAAI,IAAQ,EAAM,SAAS,GAAG,KAAS,GAAG,KAAY;EACzD,IAAM,IAAQ,EAAM;EACpB,IAAI,MAAU,KAAA,KAAa,IAAQ,GAAS,OAAO;CACrD;CACA,OAAO,EAAW;AACpB"}
|
|
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;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;CAMA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,cAAc;EAcZ,AAbA,MAAM,GAbsB,KAAA,KAAA,IAAI,EAA0B,OAAM,MAChE,KAAK,GAAqB,CAAW,CACvC,GAC2B,KAAA,KAAA,IACtB,KAAA,KAAA,GACA,KAAA,KAAA,GACI,KAAA,KAAA,GACG,KAAA,KAAA,GACA,KAAA,KAAA,GACK,KAAA,KAAA,GACL,KAAA,KAAA,GACwB,KAAA,KAAA,IA2GmD,KAAA,eAAA,IAajC,KAAA,UAAA,IArHpD,KAAK,KAAuB,IAAI,EAA4B,MAAM;GAChE,kBAAiB,MAAQ;IACvB,KAAK,GAAyB,CAAI;GACpC;GACA,aAAY,MAAS,KAAK,GAAY,CAAK;GAC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AAO,GAAO,MAAQ,MAAU,KAAK,MAAU,EAAI,IAAQ,EAAE;CACxE,IAAI,IAAY,GAAG,OAAO,EAAM,MAAK,MAAS,IAAQ,CAAO,KAAK,EAAW;CAC7E,KAAK,IAAI,IAAQ,EAAM,SAAS,GAAG,KAAS,GAAG,KAAY;EACzD,IAAM,IAAQ,EAAM;EACpB,IAAI,MAAU,KAAA,KAAa,IAAQ,GAAS,OAAO;CACrD;CACA,OAAO,EAAW;AACpB"}
|
package/dist/week/week2.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nvidia-elements/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"release": {
|
|
5
5
|
"extends": "../../release.config.js"
|
|
6
6
|
},
|
|
@@ -975,7 +975,7 @@
|
|
|
975
975
|
}
|
|
976
976
|
},
|
|
977
977
|
"dependencies": {
|
|
978
|
-
"@nvidia-elements/forms": "^2.0.
|
|
978
|
+
"@nvidia-elements/forms": "^2.0.7",
|
|
979
979
|
"lit": "^3.3.3",
|
|
980
980
|
"lit-html": "^3.3.3"
|
|
981
981
|
},
|
|
@@ -1011,6 +1011,7 @@
|
|
|
1011
1011
|
"svgo": "4.1.0",
|
|
1012
1012
|
"ts-lit-plugin": "2.0.2",
|
|
1013
1013
|
"typescript": "6.0.3",
|
|
1014
|
+
"typescript-7": "npm:typescript@7.0.2",
|
|
1014
1015
|
"vite": "8.2.2",
|
|
1015
1016
|
"vitest": "5.0.0"
|
|
1016
1017
|
},
|
|
@@ -1155,7 +1156,7 @@
|
|
|
1155
1156
|
}
|
|
1156
1157
|
},
|
|
1157
1158
|
"test:types": {
|
|
1158
|
-
"command": "tsc --project tsconfig.types.json",
|
|
1159
|
+
"command": "node ./node_modules/typescript-7/bin/tsc --project tsconfig.types.json",
|
|
1159
1160
|
"files": [
|
|
1160
1161
|
".stub/vue.d.ts",
|
|
1161
1162
|
"dist/custom-elements-jsx.d.ts",
|