@margoengine/xr 0.0.0-stage → 1.0.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.
Files changed (52) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +4 -0
  3. package/README.md +842 -2
  4. package/dist/ar-extra.d.ts +232 -0
  5. package/dist/ar-extra.js +315 -0
  6. package/dist/ar.d.ts +177 -0
  7. package/dist/ar.js +195 -0
  8. package/dist/body.d.ts +58 -0
  9. package/dist/body.js +134 -0
  10. package/dist/controller.d.ts +32 -0
  11. package/dist/device-check.d.ts +39 -0
  12. package/dist/device-check.js +155 -0
  13. package/dist/errors-XvcwUnU4.js +7 -0
  14. package/dist/eye-target.d.ts +25 -0
  15. package/dist/eyes.d.ts +45 -0
  16. package/dist/gizmo.d.ts +165 -0
  17. package/dist/gizmo.js +198 -0
  18. package/dist/hands.d.ts +48 -0
  19. package/dist/hands.js +198 -0
  20. package/dist/hit-test.d.ts +69 -0
  21. package/dist/index.d.ts +148 -0
  22. package/dist/index.js +1103 -0
  23. package/dist/interaction.d.ts +136 -0
  24. package/dist/interaction.js +205 -0
  25. package/dist/launch.d.ts +65 -0
  26. package/dist/launch.js +54 -0
  27. package/dist/layers-BTUTAawG.js +391 -0
  28. package/dist/layers.d.ts +247 -0
  29. package/dist/layers.js +1 -0
  30. package/dist/locomotion.d.ts +63 -0
  31. package/dist/locomotion.js +184 -0
  32. package/dist/models.d.ts +136 -0
  33. package/dist/models.js +335 -0
  34. package/dist/near.d.ts +465 -0
  35. package/dist/near.js +643 -0
  36. package/dist/occlusion.d.ts +49 -0
  37. package/dist/occlusion.js +218 -0
  38. package/dist/performance.d.ts +67 -0
  39. package/dist/performance.js +78 -0
  40. package/dist/pointer.d.ts +93 -0
  41. package/dist/pointer.js +205 -0
  42. package/dist/reflection.d.ts +70 -0
  43. package/dist/reflection.js +147 -0
  44. package/dist/renderer.d.ts +21 -0
  45. package/dist/scene-owner-BRObO-WJ.js +15 -0
  46. package/dist/scene-owner.d.ts +3 -0
  47. package/dist/scene-scope-DufD_3B6.js +42 -0
  48. package/dist/session.d.ts +60 -0
  49. package/dist/session.js +68 -0
  50. package/dist/shared/xr-run.d.ts +64 -0
  51. package/dist/types.d.ts +221 -0
  52. package/package.json +152 -4
package/dist/near.d.ts ADDED
@@ -0,0 +1,465 @@
1
+ /// <reference lib="esnext.disposable" preserve="true" />
2
+ import type { Mesh } from '@margoengine/core';
3
+ import { Quaternion } from '@margoengine/math/quaternion';
4
+ import { Vector3 } from '@margoengine/math/vector3';
5
+ import type { XRController } from './controller.js';
6
+ import type { PanelPointerEvent, RayPanel } from './interaction.js';
7
+ import type { XRFrameState } from './types.js';
8
+ /** What the behaviours need of an `XR`: its controllers and a per-frame hook. `XR` itself fits. */
9
+ export interface NearHost {
10
+ readonly controllers: readonly XRController[];
11
+ onFrame(callback: (state: XRFrameState) => void): () => void;
12
+ }
13
+ /** Something the behaviours move: a pose in the XR reference space (metres), optionally a scale. */
14
+ export interface NearTarget {
15
+ readonly position: Vector3;
16
+ readonly orientation: Quaternion;
17
+ /** Present when the target can be scaled. */
18
+ readonly scale?: Vector3;
19
+ /** Set by {@link HandConstraint}: false while the hand hides the target. Default true. */
20
+ visible?: boolean;
21
+ /** Called after a behaviour moves it; {@link nearTarget} writes the mesh here. */
22
+ apply?(): void;
23
+ }
24
+ /** A target a hand or controller can drag: it grabs within `radius` metres of the pointer, or along the ray. */
25
+ export interface NearDraggable extends NearTarget {
26
+ radius: number;
27
+ /** False ignores it. Default true. */
28
+ enabled?: boolean;
29
+ onDragStart?(event: NearDragEvent): void;
30
+ onDragEnd?(event: NearDragEvent): void;
31
+ }
32
+ /** A drag starting or ending. */
33
+ export interface NearDragEvent {
34
+ readonly controller: XRController;
35
+ /** True when the object was reached by the ray rather than by the hand. */
36
+ readonly ray: boolean;
37
+ /** Pointers on the object after a start, or before an end. */
38
+ readonly pointers: number;
39
+ }
40
+ /** A draggable that writes its pose and scale to `mesh` (a root mesh, so its position is in world units). */
41
+ export declare function nearTarget(mesh: Mesh, options?: {
42
+ radius?: number;
43
+ position?: readonly number[];
44
+ orientation?: readonly number[];
45
+ scale?: readonly number[];
46
+ }): NearDraggable & {
47
+ readonly scale: Vector3;
48
+ readonly mesh: Mesh;
49
+ };
50
+ /** Base of every behaviour: stops its frame hooks once, with `Symbol.dispose`. */
51
+ export declare class NearBehavior {
52
+ protected readonly stops: (() => void)[];
53
+ private done;
54
+ /** Stops following the session. Safe to call twice. */
55
+ dispose(): void;
56
+ [Symbol.dispose]: () => void;
57
+ /** Lets go of anything held; runs once on dispose. */
58
+ protected release(): void;
59
+ }
60
+ /** Options for {@link HandConstraint.attach}. */
61
+ export interface HandConstraintOptions {
62
+ /** The thing the hand carries. */
63
+ target: NearTarget;
64
+ /** Which hand. Default 'either': the one whose palm faces you most. */
65
+ hand?: 'left' | 'right' | 'either';
66
+ /** Joint index in WebXR Hand Input order. Default 0, the wrist. */
67
+ joint?: number;
68
+ /** Where the target floats, in the joint's frame (-Z toward the fingers, +Y out of the back of the hand). Default [0, -0.1, 0], 10 cm off the palm. */
69
+ offset?: readonly [number, number, number];
70
+ /** The palm must face the viewer within this angle in degrees to show. Default 45. */
71
+ showAngle?: number;
72
+ /** A shown target hides once the palm turns past this angle in degrees. Default 60. */
73
+ hideAngle?: number;
74
+ /** 'viewer' needs the palm turned toward you; 'any' always shows while the hand is tracked. Default 'viewer'. */
75
+ facing?: 'viewer' | 'any';
76
+ /** 'hand' lays the target on the palm (+Z out of the palm, +Y toward the fingers); 'viewer' turns it about the vertical axis to face you. Default 'hand'. */
77
+ orientation?: 'hand' | 'viewer';
78
+ /** Follow smoothing in 1/seconds; 0 follows exactly. Default 14. */
79
+ rate?: number;
80
+ onShow?(controller: XRController): void;
81
+ onHide?(): void;
82
+ }
83
+ /**
84
+ * Carries a target on the palm: it shows while a tracked hand's palm faces you and hides when the hand turns away
85
+ * (with hysteresis between `showAngle` and `hideAngle`), so a wrist menu or a watch does not flicker.
86
+ */
87
+ export declare class HandConstraint extends NearBehavior {
88
+ private readonly options;
89
+ /** True while the target is shown. */
90
+ visible: boolean;
91
+ /** The hand that carries it, or null. */
92
+ controller: XRController | null;
93
+ private readonly t;
94
+ private readonly p;
95
+ private readonly n;
96
+ private readonly w;
97
+ private readonly goal;
98
+ private readonly q;
99
+ private readonly r;
100
+ private placed;
101
+ static attach(xr: NearHost, options: HandConstraintOptions): HandConstraint;
102
+ private constructor();
103
+ protected release(): void;
104
+ private set;
105
+ private frame;
106
+ }
107
+ /** Options for {@link FollowInView.attach}. */
108
+ export interface FollowInViewOptions {
109
+ /** The panel or menu that tags along. */
110
+ target: NearTarget;
111
+ /** Half-angle in degrees of the cone around the gaze the target may leave before it moves. Default 25. */
112
+ maxViewDegrees?: number;
113
+ /** Nearest distance from the head in metres. Default 0.4. */
114
+ minDistance?: number;
115
+ /** Farthest distance from the head in metres. Default 1.2. */
116
+ maxDistance?: number;
117
+ /** Distance used by `snap()` and on the first frame. Default 0.7. */
118
+ distance?: number;
119
+ /** Smoothing in 1/seconds. Default 5. */
120
+ rate?: number;
121
+ /** 'yaw' turns the target about the vertical axis to face you, 'full' to face you exactly, 'none' leaves it. Default 'yaw'. */
122
+ billboard?: 'yaw' | 'full' | 'none';
123
+ /** Place the target `distance` in front of you on the first frame. Default true. */
124
+ snapOnStart?: boolean;
125
+ }
126
+ /**
127
+ * Keeps a target in view lazily (tag-along): while it stays inside the cone around your gaze and between the
128
+ * distance limits it does not move; once it leaves, it eases to the cone edge. Set `enabled` false to pin it.
129
+ */
130
+ export declare class FollowInView extends NearBehavior {
131
+ private readonly options;
132
+ /** False pins the target where it is. Default true. */
133
+ enabled: boolean;
134
+ private readonly o;
135
+ private snapNext;
136
+ private readonly d;
137
+ private readonly f;
138
+ private readonly goal;
139
+ private readonly q;
140
+ private readonly s;
141
+ static attach(xr: NearHost, options: FollowInViewOptions): FollowInView;
142
+ private constructor();
143
+ /** Places the target `distance` in front of the viewer on the next frame. */
144
+ snap(): void;
145
+ private frame;
146
+ private face;
147
+ }
148
+ /** A plane a target can stick to. `normal` is unit length and points out of the surface. */
149
+ export interface Surface {
150
+ readonly point: readonly [number, number, number];
151
+ readonly normal: readonly [number, number, number];
152
+ }
153
+ /** A hit-test result (`HitTest` from `@margoengine/xr/hit-test`) as a surface: its pose's +Y is the normal. */
154
+ export declare function surfaceFromHit(hit: {
155
+ readonly matrix: ArrayLike<number>;
156
+ }): Surface;
157
+ /** Options for {@link SurfaceMagnetism.attach} and {@link snapToSurface}. */
158
+ export interface SurfaceMagnetismOptions {
159
+ target: NearTarget;
160
+ /** The surfaces, or a function returning this frame's (for example from AR hit tests). */
161
+ surfaces: readonly Surface[] | (() => readonly Surface[]);
162
+ /** What aims: 'gaze' (default), a controller's index in `xr.controllers`, or the controller itself. */
163
+ source?: 'gaze' | number | XRController;
164
+ /** Farthest surface hit in metres. Default 3. */
165
+ maxDistance?: number;
166
+ /** Gap between the target and the surface in metres. Default 0.005. */
167
+ offset?: number;
168
+ /** Which target axis points out of the surface: 'y' stands it on the surface, 'z' hangs a panel. Default 'y'. */
169
+ normalAxis?: 'y' | 'z';
170
+ /** 'normal' aligns that axis to the surface; 'upright' keeps +Y vertical (a 'z' panel only turns about it); 'none' keeps the rotation. Default 'normal'. */
171
+ alignment?: 'normal' | 'upright' | 'none';
172
+ /** Smoothing in 1/seconds; 0 is exact. Default 18. */
173
+ rate?: number;
174
+ }
175
+ /**
176
+ * Moves `target` onto the nearest surface when it is within `snapDistance` metres of it (position projected onto
177
+ * the plane, plus `offset`) and aligns it; returns that surface or null. Use it after anything else moves the target,
178
+ * for example a drag.
179
+ */
180
+ export declare function snapToSurface(options: Omit<SurfaceMagnetismOptions, 'source' | 'maxDistance' | 'rate'> & {
181
+ snapDistance?: number;
182
+ }): Surface | null;
183
+ /**
184
+ * Sticks a target to the surface a ray points at: the gaze or a controller ray meets each plane (t = ((p - o) . n) /
185
+ * (d . n), front faces only) and the target sits on the nearest hit, aligned to it. With no hit it stays where it
186
+ * was. `surface` is the one it sits on, or null.
187
+ */
188
+ export declare class SurfaceMagnetism extends NearBehavior {
189
+ private readonly xr;
190
+ private readonly options;
191
+ /** The surface the target sits on this frame, or null. */
192
+ surface: Surface | null;
193
+ /** False stops moving the target. Default true. */
194
+ enabled: boolean;
195
+ private readonly o;
196
+ private readonly ro;
197
+ private readonly rd;
198
+ private readonly n;
199
+ private readonly goal;
200
+ private readonly q;
201
+ private placed;
202
+ static attach(xr: NearHost, options: SurfaceMagnetismOptions): SurfaceMagnetism;
203
+ private constructor();
204
+ private aim;
205
+ private frame;
206
+ }
207
+ /** How a dragged object turns. */
208
+ export type NearRotation = 'follow' | 'yaw' | 'none';
209
+ /** Options for {@link Manipulator.attach}. */
210
+ export interface ManipulatorOptions {
211
+ /** Objects to drag. The array stays live. */
212
+ draggables?: NearDraggable[];
213
+ /** Thumb-tip to index-tip distance in metres that counts as a pinch. Default 0.02. */
214
+ pinch?: number;
215
+ /** Reach objects along the controller or hand ray. Default true. */
216
+ ray?: boolean;
217
+ /** Longest ray in metres. Default 5. */
218
+ rayLength?: number;
219
+ /** Move the object. Default true. */
220
+ translate?: boolean;
221
+ /** Axes that keep their value while dragging. Default none. */
222
+ lock?: {
223
+ x?: boolean;
224
+ y?: boolean;
225
+ z?: boolean;
226
+ };
227
+ /** 'follow' turns the object with the pointer, 'yaw' only about the vertical axis, 'none' never. Default 'follow'. */
228
+ rotate?: NearRotation;
229
+ /** Let a second pointer on the same object scale it (and turn it by the line between them). Default true. */
230
+ scale?: boolean;
231
+ /** Limits of the object's x scale (uniform scale) in a two-pointer scale. Default [0.1, 10]. */
232
+ scaleLimits?: readonly [number, number];
233
+ }
234
+ /**
235
+ * Six-DoF drag and two-pointer scale. A pinch (hand) or squeeze (controller) on or near an object, or along the ray at
236
+ * it, picks it up; it keeps its pose in the pointer's frame (position, and rotation per `rotate`), so turning your
237
+ * wrist turns it. A second pointer on the same object switches to a two-point manipulation: the distance between
238
+ * the pointers scales it and the line between them turns it. Lifting one pointer returns to the one-point drag
239
+ * without a jump. For plain grab, throw and sockets use `Interaction`.
240
+ */
241
+ export declare class Manipulator extends NearBehavior {
242
+ private readonly xr;
243
+ readonly draggables: NearDraggable[];
244
+ private readonly o;
245
+ private readonly frames;
246
+ private readonly sessions;
247
+ private readonly a;
248
+ private readonly b;
249
+ private readonly c;
250
+ private readonly qa;
251
+ private readonly qb;
252
+ static attach(xr: NearHost, options?: ManipulatorOptions): Manipulator;
253
+ private constructor();
254
+ /** The objects being dragged now. */
255
+ get active(): readonly NearDraggable[];
256
+ protected release(): void;
257
+ private read;
258
+ private frame;
259
+ private pick;
260
+ private drop;
261
+ private end;
262
+ /** Records the object and pointers now, so the next update continues from here with no jump. */
263
+ private rebase;
264
+ private update;
265
+ /** 'yaw' keeps only the twist about the vertical axis of a rotation. */
266
+ private restrict;
267
+ }
268
+ /** One button of an {@link AppBar} or {@link NearMenu}. */
269
+ export interface NearButton {
270
+ id: string;
271
+ label: string;
272
+ /** False greys it out and ignores presses. Default true. */
273
+ enabled?: boolean;
274
+ }
275
+ /** A laid-out button for drawing: centre in metres from the panel centre (+y up), size, and its state. */
276
+ export interface ButtonRect {
277
+ readonly id: string;
278
+ readonly label: string;
279
+ readonly enabled: boolean;
280
+ readonly hovered: boolean;
281
+ readonly pressed: boolean;
282
+ readonly x: number;
283
+ readonly y: number;
284
+ readonly width: number;
285
+ readonly height: number;
286
+ }
287
+ /** Poking with a fingertip: the hover and touch distances in metres in front of the panel. */
288
+ export interface PokeOptions {
289
+ /** A tip this close in front of a button hovers it. Default 0.06. */
290
+ hover?: number;
291
+ /** A tip this close presses it; it releases 1 cm farther out. Default 0.012. */
292
+ touch?: number;
293
+ /** A tip that pushes this far through the panel cancels. Default 0.03. */
294
+ through?: number;
295
+ }
296
+ /** Options shared by the button panels. */
297
+ export interface ButtonPanelOptions {
298
+ buttons?: readonly NearButton[];
299
+ /** Buttons per row. Default all in one row (an app bar) or 3 (a menu). */
300
+ columns?: number;
301
+ /** Button width and height in metres. Default 0.05. */
302
+ buttonSize?: number;
303
+ /** Gap between buttons in metres. Default 0.008. */
304
+ spacing?: number;
305
+ /** Margin around the buttons in metres. Default 0.01. */
306
+ padding?: number;
307
+ /** Fingertip pressing, or false for rays only. Default on. */
308
+ poke?: PokeOptions | false;
309
+ /** Called with the button's id when it is pressed and released on itself. */
310
+ onSelect?(id: string): void;
311
+ }
312
+ /** A flat row or grid of buttons that works as a `RayPanel` (for `Interaction.panels`) and as a fingertip poke target. */
313
+ export declare class ButtonPanel extends NearBehavior implements RayPanel {
314
+ readonly position: Vector3;
315
+ readonly orientation: Quaternion;
316
+ size: readonly [number, number];
317
+ enabled: boolean;
318
+ /** The button list. Replace entries or push; the layout follows. */
319
+ buttons: NearButton[];
320
+ /** Index of the hovered button, or -1. */
321
+ hovered: number;
322
+ /** Index of the pressed button, or -1. */
323
+ pressed: number;
324
+ protected onSelect?: (id: string) => void;
325
+ private readonly cfg;
326
+ private readonly poke_;
327
+ private readonly poking;
328
+ private readonly tip;
329
+ private readonly inv;
330
+ constructor(options: ButtonPanelOptions, defaultColumns: number);
331
+ private relayout;
332
+ /** Every button's rectangle and state, for drawing. */
333
+ layout(): ButtonRect[];
334
+ private at;
335
+ /** Ray or poke events from `Interaction` (add the panel to `Interaction.panels`) or from a fingertip. */
336
+ onPointer(event: PanelPointerEvent): void;
337
+ /** Presses button `index` as a click would. */
338
+ protected select(index: number): void;
339
+ /** Drives hover and press from the index fingertips of tracked hands. */
340
+ protected pokeAll(controllers: readonly XRController[]): void;
341
+ }
342
+ /** Options for {@link AppBar.attach}. */
343
+ export interface AppBarOptions extends ButtonPanelOptions {
344
+ /** The object the bar belongs to. */
345
+ target: NearTarget;
346
+ /** The object's size in metres at scale 1. Default [0.3, 0.3]. Only the height places the bar. */
347
+ extent?: readonly [number, number];
348
+ /** Gap between the object's lower edge and the bar in metres. Default 0.03. */
349
+ gap?: number;
350
+ /** The bar shows while a hand or controller is within this distance of the object's centre. Default 0.6. */
351
+ showDistance?: number;
352
+ /** Always show it. Default false. */
353
+ alwaysVisible?: boolean;
354
+ /** Turn the bar about the vertical axis to face you. Default true. */
355
+ billboard?: boolean;
356
+ }
357
+ /**
358
+ * A row of buttons that sits under an object, shows when a hand comes near it and can be pressed by a ray or a
359
+ * fingertip. Add it to `Interaction.panels` for ray presses. Default buttons are `remove` and `adjust`; pass
360
+ * your own to add more.
361
+ */
362
+ export declare class AppBar extends ButtonPanel {
363
+ /** True while the bar is shown. */
364
+ visible: boolean;
365
+ private readonly a;
366
+ private readonly p;
367
+ static attach(xr: NearHost, options: AppBarOptions): AppBar;
368
+ private constructor();
369
+ private frame;
370
+ }
371
+ /** Options for {@link NearMenu.attach}. */
372
+ export interface NearMenuOptions extends ButtonPanelOptions {
373
+ /** Add a pin button that stops the menu following you. Default true. */
374
+ pinButton?: boolean;
375
+ /** Start pinned in place. Default false. */
376
+ pinned?: boolean;
377
+ /** How it follows you while not pinned; see {@link FollowInViewOptions}. */
378
+ follow?: Omit<FollowInViewOptions, 'target'>;
379
+ }
380
+ /**
381
+ * A grid of buttons that floats in front of you and tags along while it is not pinned, pressed by fingertip poke or
382
+ * ray. Its pin button (id `pin`) toggles `pinned`; every other button reports its id to `onSelect`.
383
+ */
384
+ export declare class NearMenu extends ButtonPanel {
385
+ private readonly following;
386
+ private custom;
387
+ private readonly pin;
388
+ private pinnedNow;
389
+ static attach(xr: NearHost, options?: NearMenuOptions): NearMenu;
390
+ private constructor();
391
+ /** True when the menu stays where it is. Setting it pins or unpins. */
392
+ get pinned(): boolean;
393
+ set pinned(value: boolean);
394
+ /** Replaces the buttons (the pin button stays last). */
395
+ setButtons(buttons: readonly NearButton[]): void;
396
+ /** Places the menu in front of you on the next frame. */
397
+ recenter(): void;
398
+ protected select(index: number): void;
399
+ private sync;
400
+ }
401
+ /** Options for {@link Slate}. */
402
+ export interface SlateOptions {
403
+ /** Centre in the reference space. Default [0, 1.4, -0.8]. */
404
+ position?: readonly [number, number, number];
405
+ /** Rotation [x, y, z, w]. Default identity (faces +Z). */
406
+ orientation?: readonly [number, number, number, number];
407
+ /** Width and height in metres. Default [0.4, 0.3]. */
408
+ size?: readonly [number, number];
409
+ /** Smallest size when resizing. Default [0.15, 0.1]. */
410
+ minSize?: readonly [number, number];
411
+ /** Largest size when resizing. Default [1.6, 1.2]. */
412
+ maxSize?: readonly [number, number];
413
+ /** Height of the title bar in metres. Default 0.04. */
414
+ titleHeight?: number;
415
+ /** Side of the corner resize handle in metres, or 0 for none. Default 0.03. */
416
+ handle?: number;
417
+ /** Drag the content with a ray or finger to pan it. Default true. */
418
+ panContent?: boolean;
419
+ title?: string;
420
+ /** Called with the new position after the title bar moved the slate. */
421
+ onMove?(slate: Slate): void;
422
+ /** Called after a corner drag resized it. */
423
+ onResize?(slate: Slate): void;
424
+ /** The close button was pressed (a button in the title bar's right end). */
425
+ onClose?(slate: Slate): void;
426
+ /** A tap on the content (panning on) or its raw down, move and up (panning off), in content metres from the content's top left. */
427
+ onContent?(event: {
428
+ type: 'tap' | 'down' | 'move' | 'up';
429
+ x: number;
430
+ y: number;
431
+ }): void;
432
+ }
433
+ /** Where a slate press landed. */
434
+ export type SlateRegion = 'title' | 'close' | 'handle' | 'content';
435
+ /**
436
+ * A holographic slate: a 2D panel with a title bar you drag to move it, a close button, a corner you drag to resize
437
+ * and content you drag to pan (`contentOffset`, `contentZoom`). It is a `RayPanel`: add it to `Interaction.panels`
438
+ * and rays and pinches drive it; draw its `size`, `title`, `contentOffset` and `contentZoom` yourself.
439
+ */
440
+ export declare class Slate extends NearBehavior implements RayPanel {
441
+ readonly position: Vector3;
442
+ readonly orientation: Quaternion;
443
+ size: readonly [number, number];
444
+ enabled: boolean;
445
+ title: string;
446
+ /** Pan of the content in panel metres (positive x right, positive y up). */
447
+ readonly contentOffset: [number, number];
448
+ /** Zoom of the content, 1 is natural size. */
449
+ contentZoom: number;
450
+ /** The region being dragged, or null. */
451
+ dragging: SlateRegion | null;
452
+ private readonly o;
453
+ private readonly d;
454
+ private owner;
455
+ private grab;
456
+ constructor(options?: SlateOptions);
457
+ /** The region at panel coordinates u (from the left) and v (from the top), or null outside. */
458
+ regionAt(u: number, v: number): SlateRegion | null;
459
+ /** Zooms the content by `factor`, clamped to [min, max] (default 0.25 to 4). */
460
+ zoomBy(factor: number, min?: number, max?: number): void;
461
+ onPointer(e: PanelPointerEvent): void;
462
+ private content;
463
+ /** Sets the size with the top-left corner fixed, within the limits. */
464
+ private resize;
465
+ }