svelte-tweakpane-ui 1.2.3 → 1.2.5
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/dist/control/Button.svelte +1 -1
- package/dist/control/ButtonGrid.svelte.d.ts +30 -30
- package/dist/control/Checkbox.svelte.d.ts +8 -8
- package/dist/control/Color.svelte.d.ts +96 -96
- package/dist/control/CubicBezier.svelte.d.ts +41 -41
- package/dist/control/Image.svelte.d.ts +40 -34
- package/dist/control/IntervalSlider.svelte.d.ts +105 -95
- package/dist/control/List.svelte.d.ts +20 -20
- package/dist/control/Point.svelte +1 -1
- package/dist/control/Point.svelte.d.ts +115 -114
- package/dist/control/RadioGrid.svelte +1 -1
- package/dist/control/RadioGrid.svelte.d.ts +59 -59
- package/dist/control/Ring.svelte.d.ts +102 -107
- package/dist/control/RotationEuler.svelte +1 -1
- package/dist/control/RotationEuler.svelte.d.ts +106 -106
- package/dist/control/RotationQuaternion.svelte +1 -1
- package/dist/control/RotationQuaternion.svelte.d.ts +104 -104
- package/dist/control/Slider.svelte.d.ts +84 -84
- package/dist/control/Text.svelte.d.ts +24 -24
- package/dist/control/Textarea.svelte +1 -1
- package/dist/control/Textarea.svelte.d.ts +33 -33
- package/dist/control/Wheel.svelte.d.ts +97 -97
- package/dist/core/Binding.svelte +1 -1
- package/dist/core/Blade.svelte +1 -1
- package/dist/core/Folder.svelte.d.ts +4 -1
- package/dist/core/Pane.svelte.d.ts +295 -275
- package/dist/extra/AutoValue.svelte.d.ts +8 -8
- package/dist/extra/Element.svelte.d.ts +23 -23
- package/dist/internal/ClsPad.svelte +1 -1
- package/dist/internal/GenericBinding.svelte.d.ts +8 -8
- package/dist/internal/GenericBladeFolding.svelte.d.ts +24 -24
- package/dist/internal/GenericInput.svelte.d.ts +8 -8
- package/dist/internal/GenericInputFolding.svelte.d.ts +78 -78
- package/dist/internal/GenericMonitor.svelte.d.ts +76 -76
- package/dist/internal/GenericSlider.svelte.d.ts +76 -76
- package/dist/internal/InternalMonitorBoolean.svelte.d.ts +82 -82
- package/dist/internal/InternalMonitorNumber.svelte.d.ts +101 -101
- package/dist/internal/InternalMonitorString.svelte.d.ts +87 -87
- package/dist/internal/InternalPaneDraggable.svelte +79 -42
- package/dist/internal/InternalPaneDraggable.svelte.d.ts +76 -76
- package/dist/internal/InternalPaneFixed.svelte.d.ts +26 -26
- package/dist/internal/InternalPaneInline.svelte.d.ts +13 -13
- package/dist/monitor/FpsGraph.svelte.d.ts +90 -90
- package/dist/monitor/Monitor.svelte.d.ts +502 -381
- package/dist/monitor/Profiler.svelte.d.ts +131 -131
- package/dist/monitor/WaveformMonitor.svelte.d.ts +104 -107
- package/dist/theme.d.ts +1 -1
- package/package.json +21 -22
- package/readme.md +2 -2
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
import { persisted } from 'svelte-local-storage-store';
|
|
13
13
|
const titlebarWindowShadeSingleClick = true;
|
|
14
14
|
const titlebarWindowShadeDoubleClick = false;
|
|
15
|
+
const pointerCancelOnWindowBlur = true;
|
|
16
|
+
const dragMovementDistanceThreshold = 3;
|
|
17
|
+
let initialDragEvent;
|
|
15
18
|
export let storePositionLocally = true;
|
|
16
19
|
export let localStoreId = localStoreDefaultId;
|
|
17
20
|
export let tpPane = void 0;
|
|
@@ -109,27 +112,33 @@
|
|
|
109
112
|
if (width !== void 0 && event.target === widthHandleElement) {
|
|
110
113
|
width = width < maxAvailablePanelWidth ? maxAvailablePanelWidth : minWidth;
|
|
111
114
|
} else if (
|
|
112
|
-
//
|
|
115
|
+
// Consider pointer movement threshold check...
|
|
116
|
+
// e.g. if (moveDistance < dragMovementDistanceThreshold && userExpandable)...
|
|
113
117
|
titlebarWindowShadeDoubleClick &&
|
|
114
|
-
event.target === dragBarElement &&
|
|
118
|
+
event.target === dragBarElement &&
|
|
115
119
|
tpPane
|
|
116
120
|
) {
|
|
117
121
|
tpPane.expanded = !tpPane.expanded;
|
|
118
122
|
}
|
|
119
123
|
}
|
|
120
124
|
};
|
|
121
|
-
const
|
|
125
|
+
const dragStartListener = (event) => {
|
|
122
126
|
if (x !== void 0 && y !== void 0 && event.button === 0 && event.target instanceof HTMLElement) {
|
|
123
127
|
moveDistance = 0;
|
|
128
|
+
initialDragEvent = event;
|
|
129
|
+
removeDragStartListeners();
|
|
130
|
+
addDragMoveAndEndListeners();
|
|
131
|
+
if (event.target === dragBarElement) {
|
|
132
|
+
dragBarElement.style.cursor = 'grabbing';
|
|
133
|
+
}
|
|
134
|
+
containerElement.style.transition = 'width 0s ease';
|
|
124
135
|
event.target.setPointerCapture(event.pointerId);
|
|
125
|
-
event.target.addEventListener('pointermove', moveListener);
|
|
126
|
-
event.target.addEventListener('pointerup', upListener);
|
|
127
136
|
startWidth = width ?? 0;
|
|
128
137
|
startOffsetX = x - event.pageX;
|
|
129
138
|
startOffsetY = y - event.pageY;
|
|
130
139
|
}
|
|
131
140
|
};
|
|
132
|
-
const
|
|
141
|
+
const dragMoveListener = (event) => {
|
|
133
142
|
if (
|
|
134
143
|
event.target instanceof HTMLElement &&
|
|
135
144
|
width !== void 0 &&
|
|
@@ -150,22 +159,72 @@
|
|
|
150
159
|
}
|
|
151
160
|
}
|
|
152
161
|
};
|
|
153
|
-
const
|
|
162
|
+
const blurListener = () => {
|
|
163
|
+
if (pointerCancelOnWindowBlur && initialDragEvent?.target instanceof HTMLElement) {
|
|
164
|
+
const { target } = initialDragEvent;
|
|
165
|
+
const bounds = target.getBoundingClientRect();
|
|
166
|
+
const pointerCancelEvent = new PointerEvent('pointercancel', {
|
|
167
|
+
bubbles: true,
|
|
168
|
+
clientX: bounds.left + bounds.width / 2,
|
|
169
|
+
clientY: bounds.top + bounds.height / 2,
|
|
170
|
+
composed: true,
|
|
171
|
+
pointerId: initialDragEvent.pointerId,
|
|
172
|
+
pointerType: initialDragEvent.pointerType
|
|
173
|
+
});
|
|
174
|
+
target.dispatchEvent(pointerCancelEvent);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const dragEndListener = (event) => {
|
|
154
178
|
event.stopImmediatePropagation();
|
|
155
179
|
if (event.target instanceof HTMLElement) {
|
|
156
|
-
event.target.
|
|
157
|
-
|
|
158
|
-
|
|
180
|
+
if (event.target.hasPointerCapture(event.pointerId)) {
|
|
181
|
+
event.target.releasePointerCapture(event.pointerId);
|
|
182
|
+
}
|
|
183
|
+
if (event.target === dragBarElement) {
|
|
184
|
+
dragBarElement.style.removeProperty('cursor');
|
|
185
|
+
}
|
|
186
|
+
containerElement.style.removeProperty('transition');
|
|
159
187
|
if (
|
|
188
|
+
event.type === 'pointerup' &&
|
|
160
189
|
titlebarWindowShadeSingleClick &&
|
|
161
190
|
event.target === dragBarElement &&
|
|
162
|
-
moveDistance <
|
|
191
|
+
moveDistance < dragMovementDistanceThreshold &&
|
|
163
192
|
userExpandable &&
|
|
164
193
|
tpPane
|
|
165
|
-
)
|
|
194
|
+
) {
|
|
166
195
|
tpPane.expanded = !tpPane.expanded;
|
|
196
|
+
}
|
|
197
|
+
initialDragEvent = void 0;
|
|
198
|
+
removeDragMoveAndEndListeners();
|
|
199
|
+
addDragStartListeners();
|
|
167
200
|
}
|
|
168
201
|
};
|
|
202
|
+
const addDragStartListeners = () => {
|
|
203
|
+
dragBarElement.addEventListener('pointerdown', dragStartListener);
|
|
204
|
+
widthHandleElement?.addEventListener('pointerdown', dragStartListener);
|
|
205
|
+
};
|
|
206
|
+
const removeDragStartListeners = () => {
|
|
207
|
+
dragBarElement.removeEventListener('pointerdown', dragStartListener);
|
|
208
|
+
widthHandleElement?.removeEventListener('pointerdown', dragStartListener);
|
|
209
|
+
};
|
|
210
|
+
const addDragMoveAndEndListeners = () => {
|
|
211
|
+
window.addEventListener('blur', blurListener);
|
|
212
|
+
dragBarElement.addEventListener('pointermove', dragMoveListener);
|
|
213
|
+
dragBarElement.addEventListener('pointerup', dragEndListener);
|
|
214
|
+
dragBarElement.addEventListener('pointercancel', dragEndListener);
|
|
215
|
+
widthHandleElement?.addEventListener('pointermove', dragMoveListener);
|
|
216
|
+
widthHandleElement?.addEventListener('pointerup', dragEndListener);
|
|
217
|
+
widthHandleElement?.addEventListener('pointercancel', dragEndListener);
|
|
218
|
+
};
|
|
219
|
+
const removeDragMoveAndEndListeners = () => {
|
|
220
|
+
window.removeEventListener('blur', blurListener);
|
|
221
|
+
dragBarElement.removeEventListener('pointermove', dragMoveListener);
|
|
222
|
+
dragBarElement.removeEventListener('pointerup', dragEndListener);
|
|
223
|
+
dragBarElement.removeEventListener('pointercancel', dragEndListener);
|
|
224
|
+
widthHandleElement?.removeEventListener('pointermove', dragMoveListener);
|
|
225
|
+
widthHandleElement?.removeEventListener('pointerup', dragEndListener);
|
|
226
|
+
widthHandleElement?.removeEventListener('pointercancel', dragEndListener);
|
|
227
|
+
};
|
|
169
228
|
const touchScrollBlocker = (event) => {
|
|
170
229
|
event.preventDefault();
|
|
171
230
|
};
|
|
@@ -182,35 +241,24 @@
|
|
|
182
241
|
dragBarElement = dragBarElementCheck;
|
|
183
242
|
dragBarElement.addEventListener('click', clickBlocker);
|
|
184
243
|
dragBarElement.addEventListener('dblclick', doubleClickListener);
|
|
185
|
-
dragBarElement.addEventListener('pointerdown', downListener);
|
|
186
244
|
widthHandleElement = dragBarElement.parentElement?.appendChild(document.createElement('div'));
|
|
187
245
|
if (widthHandleElement) {
|
|
188
246
|
widthHandleElement.className = 'tp-custom-width-handle';
|
|
189
247
|
widthHandleElement.textContent = '\u2194';
|
|
190
248
|
widthHandleElement.addEventListener('click', clickBlocker);
|
|
191
249
|
widthHandleElement.addEventListener('dblclick', doubleClickListener);
|
|
192
|
-
widthHandleElement.addEventListener('pointerdown', downListener);
|
|
193
250
|
}
|
|
251
|
+
addDragStartListeners();
|
|
194
252
|
}
|
|
195
253
|
});
|
|
196
254
|
onDestroy(() => {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (widthHandleElement) {
|
|
205
|
-
widthHandleElement.removeEventListener('click', clickBlocker);
|
|
206
|
-
widthHandleElement.removeEventListener('dblclick', doubleClickListener);
|
|
207
|
-
widthHandleElement.removeEventListener('pointerdown', downListener);
|
|
208
|
-
widthHandleElement.removeEventListener('pointermove', moveListener);
|
|
209
|
-
widthHandleElement.removeEventListener('pointerup', upListener);
|
|
210
|
-
}
|
|
211
|
-
if (containerElement) {
|
|
212
|
-
containerElement.removeEventListener('touchmove', touchScrollBlocker);
|
|
213
|
-
}
|
|
255
|
+
removeDragStartListeners();
|
|
256
|
+
removeDragMoveAndEndListeners();
|
|
257
|
+
dragBarElement.removeEventListener('click', clickBlocker);
|
|
258
|
+
dragBarElement.removeEventListener('dblclick', doubleClickListener);
|
|
259
|
+
widthHandleElement?.removeEventListener('click', clickBlocker);
|
|
260
|
+
widthHandleElement?.removeEventListener('dblclick', doubleClickListener);
|
|
261
|
+
containerElement?.removeEventListener('touchmove', touchScrollBlocker);
|
|
214
262
|
if (localStoreId !== void 0) {
|
|
215
263
|
localStoreIds.splice(localStoreIds.indexOf(localStoreId), 1);
|
|
216
264
|
}
|
|
@@ -321,13 +369,6 @@
|
|
|
321
369
|
transition: width 0.2s ease;
|
|
322
370
|
}
|
|
323
371
|
|
|
324
|
-
div.draggable-container:active {
|
|
325
|
-
/* prevent animation during direct manipulation */
|
|
326
|
-
transition: width 0s ease;
|
|
327
|
-
/* alternate less specific approach */
|
|
328
|
-
/* transition: none; */
|
|
329
|
-
}
|
|
330
|
-
|
|
331
372
|
/* stylelint-disable-next-line selector-class-pattern */
|
|
332
373
|
div.draggable-container :global(div.tp-rotv_t) {
|
|
333
374
|
cursor: grab;
|
|
@@ -355,10 +396,6 @@
|
|
|
355
396
|
white-space: nowrap;
|
|
356
397
|
}
|
|
357
398
|
|
|
358
|
-
div.draggable-container :global(div.tp-rotv_t:active) {
|
|
359
|
-
cursor: grabbing;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
399
|
div.draggable-container :global(div.tp-rotv_m) {
|
|
363
400
|
right: unset;
|
|
364
401
|
left: 0;
|
|
@@ -1,80 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte';
|
|
2
2
|
declare const __propDef: {
|
|
3
|
-
props:
|
|
4
|
-
{
|
|
5
|
-
/**
|
|
6
|
-
* Text in the pane's title bar.
|
|
7
|
-
* @default `Tweakpane` \
|
|
8
|
-
* Unless `position="inline"`, in which case the default is `undefined` and no title bar is
|
|
9
|
-
* shown.
|
|
10
|
-
*/
|
|
11
|
-
title?: string | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Allow users to interactively expand / contract the pane by clicking its title bar.
|
|
14
|
-
*
|
|
15
|
-
* Hides the collapse button from the title bar when `false`.
|
|
16
|
-
* @default `true`
|
|
17
|
-
*/
|
|
18
|
-
userExpandable?: boolean | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* Expand or collapse the pane into its title bar.
|
|
21
|
-
* @default `true`
|
|
22
|
-
* @bindable
|
|
23
|
-
*/
|
|
24
|
-
expanded?: boolean | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Custom color scheme.
|
|
27
|
-
*
|
|
28
|
-
* Applies to all child components, but note that setting a different `theme` on a child
|
|
29
|
-
* component's prop will **not** override the parent pane's theme.
|
|
30
|
-
*
|
|
31
|
-
* Note that `<Pane position="inline' ...>` squares off rounded corners by default to better
|
|
32
|
-
* integrate with surrounding content.
|
|
33
|
-
*
|
|
34
|
-
* Simply pass a custom or default theme like `ThemeUtils.presets.standard` if you want rounded
|
|
35
|
-
* corners on an `inline` pane.
|
|
36
|
-
*
|
|
37
|
-
* See also the `setGlobalDefaultTheme()` for a way to set a custom default theme for all panes
|
|
38
|
-
* on the page.
|
|
39
|
-
* @default `undefined` \
|
|
40
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
41
|
-
* set with `setGlobalDefaultTheme()`.
|
|
42
|
-
*/
|
|
43
|
-
theme?: import('..').Theme | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Scales the pane's elements by a factor of `scale` to make it easier to see.
|
|
46
|
-
*
|
|
47
|
-
* Holds the width of the pane constant, so the pane will grow taller as it is scaled and will
|
|
48
|
-
* continue to respect position- and size-related props. If you need more breathing room, set
|
|
49
|
-
* the `width` property on the pane.
|
|
50
|
-
*
|
|
51
|
-
* Note that the scaling prop is only available on `<Pane>`, not on stand-alone (implicitly
|
|
52
|
-
* wrapped) inline elements.
|
|
53
|
-
*
|
|
54
|
-
* Negative values are ignored.
|
|
55
|
-
* @default `1`
|
|
56
|
-
*/
|
|
57
|
-
scale?: number | undefined;
|
|
58
|
-
/** Internal use only. */
|
|
59
|
-
userCreatedPane?: boolean | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* The internal Tweakpane [`Pane`](https://tweakpane.github.io/docs/api/classes/Pane.html) object.
|
|
62
|
-
*
|
|
63
|
-
* This property is exposed for advanced use cases only.
|
|
64
|
-
*
|
|
65
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
66
|
-
*
|
|
67
|
-
* Note that the `Pane` type for this property comes from the core Tweakpane library.
|
|
68
|
-
* Creating an alias is suggested to avoid confusion with the _Svelte Tweakpane UI_ `Pane`
|
|
69
|
-
* component: e.g. `import { type Pane as TpPane } from 'tweakpane'`
|
|
70
|
-
*
|
|
71
|
-
* @bindable
|
|
72
|
-
* @readonly
|
|
73
|
-
*/
|
|
74
|
-
tpPane?: import('tweakpane').Pane | undefined;
|
|
75
|
-
},
|
|
76
|
-
'userCreatedPane'
|
|
77
|
-
> & {
|
|
3
|
+
props: {
|
|
78
4
|
/**
|
|
79
5
|
* Horizontal position of the pane relative to the left edge of the window, in pixels.
|
|
80
6
|
*
|
|
@@ -159,7 +85,81 @@ declare const __propDef: {
|
|
|
159
85
|
* @bindable
|
|
160
86
|
* */
|
|
161
87
|
width?: number | undefined;
|
|
162
|
-
}
|
|
88
|
+
} & Omit<
|
|
89
|
+
{
|
|
90
|
+
/**
|
|
91
|
+
* Text in the pane's title bar.
|
|
92
|
+
* @default `Tweakpane` \
|
|
93
|
+
* Unless `position="inline"`, in which case the default is `undefined` and no title bar is
|
|
94
|
+
* shown.
|
|
95
|
+
*/
|
|
96
|
+
title?: string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Allow users to interactively expand / contract the pane by clicking its title bar.
|
|
99
|
+
*
|
|
100
|
+
* Hides the collapse button from the title bar when `false`.
|
|
101
|
+
* @default `true`
|
|
102
|
+
*/
|
|
103
|
+
userExpandable?: boolean | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Expand or collapse the pane into its title bar.
|
|
106
|
+
* @default `true`
|
|
107
|
+
* @bindable
|
|
108
|
+
*/
|
|
109
|
+
expanded?: boolean | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Custom color scheme.
|
|
112
|
+
*
|
|
113
|
+
* Applies to all child components, but note that setting a different `theme` on a child
|
|
114
|
+
* component's prop will **not** override the parent pane's theme.
|
|
115
|
+
*
|
|
116
|
+
* Note that `<Pane position="inline' ...>` squares off rounded corners by default to better
|
|
117
|
+
* integrate with surrounding content.
|
|
118
|
+
*
|
|
119
|
+
* Simply pass a custom or default theme like `ThemeUtils.presets.standard` if you want rounded
|
|
120
|
+
* corners on an `inline` pane.
|
|
121
|
+
*
|
|
122
|
+
* See also the `setGlobalDefaultTheme()` for a way to set a custom default theme for all panes
|
|
123
|
+
* on the page.
|
|
124
|
+
* @default `undefined` \
|
|
125
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
126
|
+
* set with `setGlobalDefaultTheme()`.
|
|
127
|
+
*/
|
|
128
|
+
theme?: import('..').Theme | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Scales the pane's elements by a factor of `scale` to make it easier to see.
|
|
131
|
+
*
|
|
132
|
+
* Holds the width of the pane constant, so the pane will grow taller as it is scaled and will
|
|
133
|
+
* continue to respect position- and size-related props. If you need more breathing room, set
|
|
134
|
+
* the `width` property on the pane.
|
|
135
|
+
*
|
|
136
|
+
* Note that the scaling prop is only available on `<Pane>`, not on stand-alone (implicitly
|
|
137
|
+
* wrapped) inline elements.
|
|
138
|
+
*
|
|
139
|
+
* Negative values are ignored.
|
|
140
|
+
* @default `1`
|
|
141
|
+
*/
|
|
142
|
+
scale?: number | undefined;
|
|
143
|
+
/** Internal use only. */
|
|
144
|
+
userCreatedPane?: boolean | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* The internal Tweakpane [`Pane`](https://tweakpane.github.io/docs/api/classes/Pane.html) object.
|
|
147
|
+
*
|
|
148
|
+
* This property is exposed for advanced use cases only.
|
|
149
|
+
*
|
|
150
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
151
|
+
*
|
|
152
|
+
* Note that the `Pane` type for this property comes from the core Tweakpane library.
|
|
153
|
+
* Creating an alias is suggested to avoid confusion with the _Svelte Tweakpane UI_ `Pane`
|
|
154
|
+
* component: e.g. `import { type Pane as TpPane } from 'tweakpane'`
|
|
155
|
+
*
|
|
156
|
+
* @bindable
|
|
157
|
+
* @readonly
|
|
158
|
+
*/
|
|
159
|
+
tpPane?: import('tweakpane').Pane | undefined;
|
|
160
|
+
},
|
|
161
|
+
'userCreatedPane'
|
|
162
|
+
>;
|
|
163
163
|
events: {
|
|
164
164
|
[evt: string]: CustomEvent<any>;
|
|
165
165
|
};
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte';
|
|
2
2
|
declare const __propDef: {
|
|
3
|
-
props:
|
|
3
|
+
props: {
|
|
4
|
+
/**
|
|
5
|
+
* Horizontal position of the pane relative to the left edge of the window, in pixels.
|
|
6
|
+
*
|
|
7
|
+
* Not to be confused with the `position` prop which defines _how_, not _where_, the pane is
|
|
8
|
+
* positioned on the page. (So-named because of its similarity to CSS `position` property.)
|
|
9
|
+
* @default `undefined` \
|
|
10
|
+
* 8 pixels from the right edge of the window.
|
|
11
|
+
* */
|
|
12
|
+
x?: number | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Vertical position of the pane relative to the top of the window, in pixels.
|
|
15
|
+
*
|
|
16
|
+
* Not to be confused with the `position` prop which defines _how_, not _where_, the pane is
|
|
17
|
+
* positioned on the page. (So-named because of its similarity to CSS `position` property.)
|
|
18
|
+
* @default `undefined` \
|
|
19
|
+
* 8 pixels from the top edge of the window.
|
|
20
|
+
* */
|
|
21
|
+
y?: number | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Width of the pane, in pixels.
|
|
24
|
+
* @default `256`
|
|
25
|
+
* */
|
|
26
|
+
width?: number | undefined;
|
|
27
|
+
} & Omit<
|
|
4
28
|
{
|
|
5
29
|
/**
|
|
6
30
|
* Text in the pane's title bar.
|
|
@@ -74,31 +98,7 @@ declare const __propDef: {
|
|
|
74
98
|
tpPane?: import('tweakpane').Pane | undefined;
|
|
75
99
|
},
|
|
76
100
|
'userCreatedPane'
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Horizontal position of the pane relative to the left edge of the window, in pixels.
|
|
80
|
-
*
|
|
81
|
-
* Not to be confused with the `position` prop which defines _how_, not _where_, the pane is
|
|
82
|
-
* positioned on the page. (So-named because of its similarity to CSS `position` property.)
|
|
83
|
-
* @default `undefined` \
|
|
84
|
-
* 8 pixels from the right edge of the window.
|
|
85
|
-
* */
|
|
86
|
-
x?: number | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Vertical position of the pane relative to the top of the window, in pixels.
|
|
89
|
-
*
|
|
90
|
-
* Not to be confused with the `position` prop which defines _how_, not _where_, the pane is
|
|
91
|
-
* positioned on the page. (So-named because of its similarity to CSS `position` property.)
|
|
92
|
-
* @default `undefined` \
|
|
93
|
-
* 8 pixels from the top edge of the window.
|
|
94
|
-
* */
|
|
95
|
-
y?: number | undefined;
|
|
96
|
-
/**
|
|
97
|
-
* Width of the pane, in pixels.
|
|
98
|
-
* @default `256`
|
|
99
|
-
* */
|
|
100
|
-
width?: number | undefined;
|
|
101
|
-
};
|
|
101
|
+
>;
|
|
102
102
|
events: {
|
|
103
103
|
[evt: string]: CustomEvent<any>;
|
|
104
104
|
};
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte';
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
+
/**
|
|
5
|
+
* Width of the pane, in pixels.
|
|
6
|
+
*
|
|
7
|
+
* If undefined, the pane will fill the width of its container. (This behavior is unique to
|
|
8
|
+
* `position="inline"`.)
|
|
9
|
+
*
|
|
10
|
+
* This value is particularly important in combination with `scale`, since a scaled inline
|
|
11
|
+
* pane will grow indefinitely wider if an intrinsic width is not specified and a containing
|
|
12
|
+
* element is not provided.
|
|
13
|
+
* @default `undefined`
|
|
14
|
+
* */
|
|
15
|
+
width?: number | undefined;
|
|
16
|
+
} & {
|
|
4
17
|
/**
|
|
5
18
|
* Text in the pane's title bar.
|
|
6
19
|
* @default `Tweakpane` \
|
|
@@ -71,19 +84,6 @@ declare const __propDef: {
|
|
|
71
84
|
* @readonly
|
|
72
85
|
*/
|
|
73
86
|
tpPane?: import('tweakpane').Pane | undefined;
|
|
74
|
-
} & {
|
|
75
|
-
/**
|
|
76
|
-
* Width of the pane, in pixels.
|
|
77
|
-
*
|
|
78
|
-
* If undefined, the pane will fill the width of its container. (This behavior is unique to
|
|
79
|
-
* `position="inline"`.)
|
|
80
|
-
*
|
|
81
|
-
* This value is particularly important in combination with `scale`, since a scaled inline
|
|
82
|
-
* pane will grow indefinitely wider if an intrinsic width is not specified and a containing
|
|
83
|
-
* element is not provided.
|
|
84
|
-
* @default `undefined`
|
|
85
|
-
* */
|
|
86
|
-
width?: number | undefined;
|
|
87
87
|
};
|
|
88
88
|
events: {
|
|
89
89
|
[evt: string]: CustomEvent<any>;
|
|
@@ -20,96 +20,96 @@ declare const __propDef: {
|
|
|
20
20
|
* @default `undefined`
|
|
21
21
|
*/
|
|
22
22
|
end?: (() => void) | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
/**
|
|
25
|
+
* Lower bound of the FPS graph.
|
|
26
|
+
* @default `0`
|
|
27
|
+
* */
|
|
28
|
+
min?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Upper bound of the FPS graph.
|
|
31
|
+
* @default `90`
|
|
32
|
+
* */
|
|
33
|
+
max?: number | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Function to start a single frame measurement sample.
|
|
36
|
+
*
|
|
37
|
+
* If undefined, a `requestAnimationFrame` is used to indicate the overall performance of
|
|
38
|
+
* the page.
|
|
39
|
+
* @default `undefined`
|
|
40
|
+
* */
|
|
41
|
+
begin?: (() => void) | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Function to end a single frame measurement sample.
|
|
44
|
+
*
|
|
45
|
+
* If undefined, a `requestAnimationFrame` is used to indicate the overall performance of
|
|
46
|
+
* the page.
|
|
47
|
+
* @default `undefined`
|
|
48
|
+
* */
|
|
49
|
+
end?: (() => void) | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Time in milliseconds between updates to the graph.
|
|
52
|
+
* @default `1000`
|
|
53
|
+
* */
|
|
54
|
+
interval?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Text displayed next to the FPS graph.
|
|
57
|
+
* @default `undefined`
|
|
58
|
+
* */
|
|
59
|
+
label?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Height of the FPS graph, in rows.
|
|
62
|
+
* @default `2`
|
|
63
|
+
* */
|
|
64
|
+
rows?: number | undefined;
|
|
23
65
|
} & Omit<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Lower bound of the FPS graph.
|
|
73
|
-
* @default `0`
|
|
74
|
-
* */
|
|
75
|
-
min?: number | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Upper bound of the FPS graph.
|
|
78
|
-
* @default `90`
|
|
79
|
-
* */
|
|
80
|
-
max?: number | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Function to start a single frame measurement sample.
|
|
83
|
-
*
|
|
84
|
-
* If undefined, a `requestAnimationFrame` is used to indicate the overall performance of
|
|
85
|
-
* the page.
|
|
86
|
-
* @default `undefined`
|
|
87
|
-
* */
|
|
88
|
-
begin?: (() => void) | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* Function to end a single frame measurement sample.
|
|
91
|
-
*
|
|
92
|
-
* If undefined, a `requestAnimationFrame` is used to indicate the overall performance of
|
|
93
|
-
* the page.
|
|
94
|
-
* @default `undefined`
|
|
95
|
-
* */
|
|
96
|
-
end?: (() => void) | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* Time in milliseconds between updates to the graph.
|
|
99
|
-
* @default `1000`
|
|
100
|
-
* */
|
|
101
|
-
interval?: number | undefined;
|
|
102
|
-
/**
|
|
103
|
-
* Text displayed next to the FPS graph.
|
|
104
|
-
* @default `undefined`
|
|
105
|
-
* */
|
|
106
|
-
label?: string | undefined;
|
|
107
|
-
/**
|
|
108
|
-
* Height of the FPS graph, in rows.
|
|
109
|
-
* @default `2`
|
|
110
|
-
* */
|
|
111
|
-
rows?: number | undefined;
|
|
112
|
-
};
|
|
66
|
+
{
|
|
67
|
+
/**
|
|
68
|
+
* Blade configuration exposing Tweakpane's internal
|
|
69
|
+
* [`BladeParams`](https://tweakpane.github.io/docs/api/interfaces/BaseBladeParams.html).
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
options: FpsGraphOptions;
|
|
73
|
+
/**
|
|
74
|
+
* Prevent interactivity and gray out the control.
|
|
75
|
+
* @default `false`
|
|
76
|
+
*/
|
|
77
|
+
disabled?: boolean | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Custom color scheme.
|
|
80
|
+
* @default `undefined` \
|
|
81
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
82
|
+
* set with `setGlobalDefaultTheme()`.
|
|
83
|
+
*/
|
|
84
|
+
theme?: import('..').Theme | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Reference to internal Tweakpane
|
|
87
|
+
* [`BladeApi`](https://tweakpane.github.io/docs/api/classes/BladeApi.html) for this blade.
|
|
88
|
+
*
|
|
89
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
90
|
+
* components wrapping `<Blade>`'s functionality.
|
|
91
|
+
*
|
|
92
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
93
|
+
*
|
|
94
|
+
* @bindable
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
97
|
+
ref?: FpsGraphRef | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
100
|
+
* the `<Blade>`'s containing `<Pane>`.
|
|
101
|
+
*
|
|
102
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
103
|
+
* components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
|
|
104
|
+
*
|
|
105
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
106
|
+
*
|
|
107
|
+
* @default `undefined`
|
|
108
|
+
*/
|
|
109
|
+
plugin?: import('tweakpane').TpPluginBundle | undefined;
|
|
110
|
+
},
|
|
111
|
+
'ref' | 'options' | 'plugin'
|
|
112
|
+
>;
|
|
113
113
|
slots: {};
|
|
114
114
|
events: {
|
|
115
115
|
/**
|
|
@@ -198,7 +198,7 @@ export type FpsGraphSlots = typeof __propDef.slots;
|
|
|
198
198
|
* (x / gridSize) * phase +
|
|
199
199
|
* (y / gridSize) * phase}deg)"
|
|
200
200
|
* style:width="{100 / gridSize}%"
|
|
201
|
-
*
|
|
201
|
+
* ></div>
|
|
202
202
|
* {/each}
|
|
203
203
|
* {/each}
|
|
204
204
|
* </div>
|