svelte-tweakpane-ui 1.5.3 → 1.5.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 +30 -30
- package/dist/control/Button.svelte.d.ts +18 -18
- package/dist/control/ButtonGrid.svelte +25 -25
- package/dist/control/ButtonGrid.svelte.d.ts +35 -35
- package/dist/control/Checkbox.svelte +2 -2
- package/dist/control/Checkbox.svelte.d.ts +23 -23
- package/dist/control/Color.svelte +34 -34
- package/dist/control/Color.svelte.d.ts +40 -40
- package/dist/control/CubicBezier.svelte +30 -30
- package/dist/control/CubicBezier.svelte.d.ts +47 -47
- package/dist/control/File.svelte +20 -20
- package/dist/control/File.svelte.d.ts +38 -38
- package/dist/control/Image.svelte +22 -22
- package/dist/control/Image.svelte.d.ts +31 -31
- package/dist/control/IntervalSlider.svelte +24 -24
- package/dist/control/IntervalSlider.svelte.d.ts +39 -39
- package/dist/control/List.svelte +35 -35
- package/dist/control/List.svelte.d.ts +31 -31
- package/dist/control/Point.svelte +31 -31
- package/dist/control/Point.svelte.d.ts +81 -81
- package/dist/control/RadioGrid.svelte +24 -24
- package/dist/control/RadioGrid.svelte.d.ts +40 -40
- package/dist/control/Ring.svelte +9 -9
- package/dist/control/Ring.svelte.d.ts +40 -40
- package/dist/control/RotationEuler.svelte +25 -25
- package/dist/control/RotationEuler.svelte.d.ts +53 -53
- package/dist/control/RotationQuaternion.svelte +24 -24
- package/dist/control/RotationQuaternion.svelte.d.ts +47 -47
- package/dist/control/Slider.svelte +9 -9
- package/dist/control/Slider.svelte.d.ts +32 -32
- package/dist/control/Stepper.svelte +16 -16
- package/dist/control/Stepper.svelte.d.ts +32 -32
- package/dist/control/Text.svelte +13 -13
- package/dist/control/Text.svelte.d.ts +26 -26
- package/dist/control/Textarea.svelte +34 -34
- package/dist/control/Textarea.svelte.d.ts +29 -29
- package/dist/control/Wheel.svelte +8 -8
- package/dist/control/Wheel.svelte.d.ts +32 -32
- package/dist/core/Binding.svelte +60 -60
- package/dist/core/Binding.svelte.d.ts +33 -33
- package/dist/core/Blade.svelte +30 -30
- package/dist/core/Blade.svelte.d.ts +21 -21
- package/dist/core/Folder.svelte +34 -34
- package/dist/core/Folder.svelte.d.ts +22 -22
- package/dist/core/Pane.svelte +17 -17
- package/dist/core/Pane.svelte.d.ts +56 -56
- package/dist/core/Separator.svelte +5 -5
- package/dist/core/Separator.svelte.d.ts +20 -20
- package/dist/core/TabGroup.svelte +29 -29
- package/dist/core/TabGroup.svelte.d.ts +18 -18
- package/dist/core/TabPage.svelte +36 -36
- package/dist/core/TabPage.svelte.d.ts +21 -21
- package/dist/extra/AutoObject.svelte +20 -20
- package/dist/extra/AutoObject.svelte.d.ts +22 -22
- package/dist/extra/AutoValue.svelte +3 -3
- package/dist/extra/AutoValue.svelte.d.ts +26 -26
- package/dist/extra/Element.svelte +10 -10
- package/dist/extra/Element.svelte.d.ts +26 -26
- package/dist/index.d.ts +48 -48
- package/dist/index.js +35 -35
- package/dist/internal/ClsPad.svelte +11 -11
- package/dist/internal/ClsPad.svelte.d.ts +17 -17
- package/dist/internal/GenericBinding.svelte +11 -11
- package/dist/internal/GenericBinding.svelte.d.ts +25 -25
- package/dist/internal/GenericBladeFolding.svelte +19 -19
- package/dist/internal/GenericBladeFolding.svelte.d.ts +20 -20
- package/dist/internal/GenericInput.svelte +7 -7
- package/dist/internal/GenericInput.svelte.d.ts +27 -27
- package/dist/internal/GenericInputFolding.svelte +21 -21
- package/dist/internal/GenericInputFolding.svelte.d.ts +32 -32
- package/dist/internal/GenericMonitor.svelte +10 -10
- package/dist/internal/GenericMonitor.svelte.d.ts +29 -29
- package/dist/internal/GenericPane.svelte +48 -48
- package/dist/internal/GenericPane.svelte.d.ts +22 -22
- package/dist/internal/GenericSlider.svelte +15 -15
- package/dist/internal/GenericSlider.svelte.d.ts +29 -29
- package/dist/internal/InternalMonitorBoolean.svelte +5 -5
- package/dist/internal/InternalMonitorBoolean.svelte.d.ts +31 -31
- package/dist/internal/InternalMonitorNumber.svelte +14 -14
- package/dist/internal/InternalMonitorNumber.svelte.d.ts +37 -37
- package/dist/internal/InternalMonitorString.svelte +9 -9
- package/dist/internal/InternalMonitorString.svelte.d.ts +32 -32
- package/dist/internal/InternalPaneDraggable.svelte +169 -173
- package/dist/internal/InternalPaneDraggable.svelte.d.ts +30 -30
- package/dist/internal/InternalPaneFixed.svelte +13 -13
- package/dist/internal/InternalPaneFixed.svelte.d.ts +23 -23
- package/dist/internal/InternalPaneInline.svelte +14 -14
- package/dist/internal/InternalPaneInline.svelte.d.ts +21 -21
- package/dist/monitor/FpsGraph.svelte +35 -35
- package/dist/monitor/FpsGraph.svelte.d.ts +50 -42
- package/dist/monitor/Monitor.svelte +4 -4
- package/dist/monitor/Monitor.svelte.d.ts +87 -88
- package/dist/monitor/Profiler.svelte +37 -37
- package/dist/monitor/Profiler.svelte.d.ts +78 -76
- package/dist/monitor/WaveformMonitor.svelte +12 -12
- package/dist/monitor/WaveformMonitor.svelte.d.ts +39 -39
- package/dist/theme.d.ts +61 -61
- package/dist/theme.js +49 -53
- package/dist/utils.d.ts +62 -66
- package/dist/utils.js +78 -78
- package/license.txt +1 -1
- package/package.json +110 -125
- package/readme.md +1 -1
package/dist/core/Pane.svelte
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import InternalPaneDraggable from '../internal/InternalPaneDraggable.svelte'
|
|
5
|
-
import InternalPaneFixed from '../internal/InternalPaneFixed.svelte'
|
|
6
|
-
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
7
|
-
import { removeKeys } from '../utils'
|
|
8
|
-
import { BROWSER } from 'esm-env'
|
|
9
|
-
import { beforeUpdate } from 'svelte'
|
|
10
|
-
export let expanded = void 0
|
|
11
|
-
export let position = void 0
|
|
12
|
-
export let width = void 0
|
|
13
|
-
export let tpPane = void 0
|
|
14
|
-
export let x = void 0
|
|
15
|
-
export let y = void 0
|
|
4
|
+
import InternalPaneDraggable from '../internal/InternalPaneDraggable.svelte'
|
|
5
|
+
import InternalPaneFixed from '../internal/InternalPaneFixed.svelte'
|
|
6
|
+
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
7
|
+
import { removeKeys } from '../utils'
|
|
8
|
+
import { BROWSER } from 'esm-env'
|
|
9
|
+
import { beforeUpdate } from 'svelte'
|
|
10
|
+
export let expanded = void 0
|
|
11
|
+
export let position = void 0
|
|
12
|
+
export let width = void 0
|
|
13
|
+
export let tpPane = void 0
|
|
14
|
+
export let x = void 0
|
|
15
|
+
export let y = void 0
|
|
16
16
|
beforeUpdate(() => {
|
|
17
17
|
if ($$props.position === 'inline' || $$props.position === 'fixed') {
|
|
18
|
-
x = $$props.x
|
|
19
|
-
y = $$props.y
|
|
20
|
-
width = $$props.width
|
|
21
|
-
expanded = $$props.expanded
|
|
18
|
+
x = $$props.x
|
|
19
|
+
y = $$props.y
|
|
20
|
+
width = $$props.width
|
|
21
|
+
expanded = $$props.expanded
|
|
22
22
|
}
|
|
23
|
-
})
|
|
23
|
+
})
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<!-- Only prerender inline panes, because fixed / absolute positioned objects don't affect layout
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
-
export type PanePosition = 'draggable' | 'fixed' | 'inline'
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
export type PanePosition = 'draggable' | 'fixed' | 'inline'
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
/**
|
|
@@ -17,7 +17,7 @@ declare const __propDef: {
|
|
|
17
17
|
* vary depending on the defined `position` value.
|
|
18
18
|
* @default `'draggable'`
|
|
19
19
|
* */
|
|
20
|
-
position?: PanePosition
|
|
20
|
+
position?: PanePosition
|
|
21
21
|
} & (
|
|
22
22
|
| ({
|
|
23
23
|
/**
|
|
@@ -35,7 +35,7 @@ declare const __propDef: {
|
|
|
35
35
|
* vary depending on the defined `position` value.
|
|
36
36
|
* @default `'draggable'`
|
|
37
37
|
*/
|
|
38
|
-
position: 'fixed'
|
|
38
|
+
position: 'fixed'
|
|
39
39
|
} & {
|
|
40
40
|
/**
|
|
41
41
|
* Horizontal position of the pane relative to the left edge of the window, in pixels.
|
|
@@ -47,7 +47,7 @@ declare const __propDef: {
|
|
|
47
47
|
* @default `0`
|
|
48
48
|
* @bindable
|
|
49
49
|
*/
|
|
50
|
-
x?: number
|
|
50
|
+
x?: number
|
|
51
51
|
/**
|
|
52
52
|
* Vertical position of the pane relative to the top of the window, in pixels.
|
|
53
53
|
*
|
|
@@ -58,7 +58,7 @@ declare const __propDef: {
|
|
|
58
58
|
* @default `0`
|
|
59
59
|
* @bindable
|
|
60
60
|
*/
|
|
61
|
-
y?: number
|
|
61
|
+
y?: number
|
|
62
62
|
/**
|
|
63
63
|
* Width of the pane, in pixels.
|
|
64
64
|
*
|
|
@@ -74,7 +74,7 @@ declare const __propDef: {
|
|
|
74
74
|
* @default `256`
|
|
75
75
|
* @bindable
|
|
76
76
|
*/
|
|
77
|
-
width?: number
|
|
77
|
+
width?: number
|
|
78
78
|
} & Omit<
|
|
79
79
|
{
|
|
80
80
|
/**
|
|
@@ -83,20 +83,20 @@ declare const __propDef: {
|
|
|
83
83
|
* Unless `position="inline"`, in which case the default is `undefined` and no title bar is
|
|
84
84
|
* shown.
|
|
85
85
|
*/
|
|
86
|
-
title?: string | undefined
|
|
86
|
+
title?: string | undefined
|
|
87
87
|
/**
|
|
88
88
|
* Allow users to interactively expand / contract the pane by clicking its title bar.
|
|
89
89
|
*
|
|
90
90
|
* Hides the collapse button from the title bar when `false`.
|
|
91
91
|
* @default `true`
|
|
92
92
|
*/
|
|
93
|
-
userExpandable?: boolean
|
|
93
|
+
userExpandable?: boolean
|
|
94
94
|
/**
|
|
95
95
|
* Expand or collapse the pane into its title bar.
|
|
96
96
|
* @default `true`
|
|
97
97
|
* @bindable
|
|
98
98
|
*/
|
|
99
|
-
expanded?: boolean
|
|
99
|
+
expanded?: boolean
|
|
100
100
|
/**
|
|
101
101
|
* Custom color scheme.
|
|
102
102
|
*
|
|
@@ -115,7 +115,7 @@ declare const __propDef: {
|
|
|
115
115
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
116
116
|
* set with `setGlobalDefaultTheme()`.
|
|
117
117
|
*/
|
|
118
|
-
theme?: import('..').Theme | undefined
|
|
118
|
+
theme?: import('..').Theme | undefined
|
|
119
119
|
/**
|
|
120
120
|
* Scales the pane's elements by a factor of `scale` to make it easier to see.
|
|
121
121
|
*
|
|
@@ -129,9 +129,9 @@ declare const __propDef: {
|
|
|
129
129
|
* Negative values are ignored.
|
|
130
130
|
* @default `1`
|
|
131
131
|
*/
|
|
132
|
-
scale?: number
|
|
132
|
+
scale?: number
|
|
133
133
|
/** Internal use only. */
|
|
134
|
-
userCreatedPane?: boolean
|
|
134
|
+
userCreatedPane?: boolean
|
|
135
135
|
/**
|
|
136
136
|
* The internal Tweakpane [`Pane`](https://tweakpane.github.io/docs/api/classes/Pane.html) object.
|
|
137
137
|
*
|
|
@@ -146,7 +146,7 @@ declare const __propDef: {
|
|
|
146
146
|
* @bindable
|
|
147
147
|
* @readonly
|
|
148
148
|
*/
|
|
149
|
-
tpPane?: import('tweakpane').Pane | undefined
|
|
149
|
+
tpPane?: import('tweakpane').Pane | undefined
|
|
150
150
|
},
|
|
151
151
|
'userCreatedPane'
|
|
152
152
|
>)
|
|
@@ -166,7 +166,7 @@ declare const __propDef: {
|
|
|
166
166
|
* vary depending on the defined `position` value.
|
|
167
167
|
* @default `'draggable'`
|
|
168
168
|
*/
|
|
169
|
-
position: 'inline'
|
|
169
|
+
position: 'inline'
|
|
170
170
|
} & Omit<
|
|
171
171
|
{
|
|
172
172
|
/**
|
|
@@ -184,7 +184,7 @@ declare const __propDef: {
|
|
|
184
184
|
* @default `256`
|
|
185
185
|
* @bindable
|
|
186
186
|
*/
|
|
187
|
-
width?: number
|
|
187
|
+
width?: number
|
|
188
188
|
} & {
|
|
189
189
|
/**
|
|
190
190
|
* Text in the pane's title bar.
|
|
@@ -192,20 +192,20 @@ declare const __propDef: {
|
|
|
192
192
|
* Unless `position="inline"`, in which case the default is `undefined` and no title bar is
|
|
193
193
|
* shown.
|
|
194
194
|
*/
|
|
195
|
-
title?: string | undefined
|
|
195
|
+
title?: string | undefined
|
|
196
196
|
/**
|
|
197
197
|
* Allow users to interactively expand / contract the pane by clicking its title bar.
|
|
198
198
|
*
|
|
199
199
|
* Hides the collapse button from the title bar when `false`.
|
|
200
200
|
* @default `true`
|
|
201
201
|
*/
|
|
202
|
-
userExpandable?: boolean
|
|
202
|
+
userExpandable?: boolean
|
|
203
203
|
/**
|
|
204
204
|
* Expand or collapse the pane into its title bar.
|
|
205
205
|
* @default `true`
|
|
206
206
|
* @bindable
|
|
207
207
|
*/
|
|
208
|
-
expanded?: boolean
|
|
208
|
+
expanded?: boolean
|
|
209
209
|
/**
|
|
210
210
|
* Custom color scheme.
|
|
211
211
|
*
|
|
@@ -224,7 +224,7 @@ declare const __propDef: {
|
|
|
224
224
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
225
225
|
* set with `setGlobalDefaultTheme()`.
|
|
226
226
|
*/
|
|
227
|
-
theme?: import('..').Theme | undefined
|
|
227
|
+
theme?: import('..').Theme | undefined
|
|
228
228
|
/**
|
|
229
229
|
* Scales the pane's elements by a factor of `scale` to make it easier to see.
|
|
230
230
|
*
|
|
@@ -238,9 +238,9 @@ declare const __propDef: {
|
|
|
238
238
|
* Negative values are ignored.
|
|
239
239
|
* @default `1`
|
|
240
240
|
*/
|
|
241
|
-
scale?: number
|
|
241
|
+
scale?: number
|
|
242
242
|
/** Internal use only. */
|
|
243
|
-
userCreatedPane?: boolean
|
|
243
|
+
userCreatedPane?: boolean
|
|
244
244
|
/**
|
|
245
245
|
* The internal Tweakpane [`Pane`](https://tweakpane.github.io/docs/api/classes/Pane.html) object.
|
|
246
246
|
*
|
|
@@ -255,7 +255,7 @@ declare const __propDef: {
|
|
|
255
255
|
* @bindable
|
|
256
256
|
* @readonly
|
|
257
257
|
*/
|
|
258
|
-
tpPane?: import('tweakpane').Pane | undefined
|
|
258
|
+
tpPane?: import('tweakpane').Pane | undefined
|
|
259
259
|
},
|
|
260
260
|
'userCreatedPane'
|
|
261
261
|
>)
|
|
@@ -275,7 +275,7 @@ declare const __propDef: {
|
|
|
275
275
|
* vary depending on the defined `position` value.
|
|
276
276
|
* @default `'draggable'`
|
|
277
277
|
*/
|
|
278
|
-
position?: 'draggable' | undefined
|
|
278
|
+
position?: 'draggable' | undefined
|
|
279
279
|
} & {
|
|
280
280
|
/**
|
|
281
281
|
* Horizontal position of the pane relative to the left edge of the window, in pixels.
|
|
@@ -287,7 +287,7 @@ declare const __propDef: {
|
|
|
287
287
|
* @default `0`
|
|
288
288
|
* @bindable
|
|
289
289
|
*/
|
|
290
|
-
x?: number
|
|
290
|
+
x?: number
|
|
291
291
|
/**
|
|
292
292
|
* Vertical position of the pane relative to the top of the window, in pixels.
|
|
293
293
|
*
|
|
@@ -298,30 +298,30 @@ declare const __propDef: {
|
|
|
298
298
|
* @default `0`
|
|
299
299
|
* @bindable
|
|
300
300
|
*/
|
|
301
|
-
y?: number
|
|
301
|
+
y?: number
|
|
302
302
|
/**
|
|
303
303
|
* Minimum pane width in pixels.
|
|
304
304
|
* @default `200`
|
|
305
305
|
*/
|
|
306
|
-
minWidth?: number
|
|
306
|
+
minWidth?: number
|
|
307
307
|
/**
|
|
308
308
|
* Maximum pane width in pixels.
|
|
309
309
|
* @default `600`
|
|
310
310
|
*/
|
|
311
|
-
maxWidth?: number
|
|
311
|
+
maxWidth?: number
|
|
312
312
|
/**
|
|
313
313
|
* Automatically collapse open panels when the available window size is less than the height
|
|
314
314
|
* of the pane.
|
|
315
315
|
*
|
|
316
316
|
* @default `false`
|
|
317
317
|
*/
|
|
318
|
-
collapseChildrenToFit?: boolean
|
|
318
|
+
collapseChildrenToFit?: boolean
|
|
319
319
|
/**
|
|
320
320
|
* Identifier to be used if multiple `<Pane position="draggable">` components with
|
|
321
321
|
* `storePositionLocally` set to true are used on the same page.
|
|
322
322
|
* @default `'1'`
|
|
323
323
|
*/
|
|
324
|
-
localStoreId?: string
|
|
324
|
+
localStoreId?: string
|
|
325
325
|
/**
|
|
326
326
|
* CSS [padding property string](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)
|
|
327
327
|
* to apply to the draggable pane container to prevent it from being dragged all the way to
|
|
@@ -330,13 +330,13 @@ declare const __propDef: {
|
|
|
330
330
|
* Useful for keeping the pane away from of menu bars, etc.
|
|
331
331
|
* @default `'0'`
|
|
332
332
|
*/
|
|
333
|
-
padding?: string
|
|
333
|
+
padding?: string
|
|
334
334
|
/**
|
|
335
335
|
* Allow the user to resize the width of the pane by dragging the right corner of the title
|
|
336
336
|
* bar.
|
|
337
337
|
* @default `true`
|
|
338
338
|
*/
|
|
339
|
-
resizable?: boolean
|
|
339
|
+
resizable?: boolean
|
|
340
340
|
/**
|
|
341
341
|
* Store the pane's position and width when the user changes it interactively.
|
|
342
342
|
*
|
|
@@ -344,7 +344,7 @@ declare const __propDef: {
|
|
|
344
344
|
* `storePositionLocally` set to `true`.
|
|
345
345
|
* @default `true`
|
|
346
346
|
*/
|
|
347
|
-
storePositionLocally?: boolean
|
|
347
|
+
storePositionLocally?: boolean
|
|
348
348
|
/**
|
|
349
349
|
* Width of the pane, in pixels.
|
|
350
350
|
*
|
|
@@ -360,7 +360,7 @@ declare const __propDef: {
|
|
|
360
360
|
* @default `256`
|
|
361
361
|
* @bindable
|
|
362
362
|
*/
|
|
363
|
-
width?: number
|
|
363
|
+
width?: number
|
|
364
364
|
} & Omit<
|
|
365
365
|
{
|
|
366
366
|
/**
|
|
@@ -369,20 +369,20 @@ declare const __propDef: {
|
|
|
369
369
|
* Unless `position="inline"`, in which case the default is `undefined` and no title bar is
|
|
370
370
|
* shown.
|
|
371
371
|
*/
|
|
372
|
-
title?: string | undefined
|
|
372
|
+
title?: string | undefined
|
|
373
373
|
/**
|
|
374
374
|
* Allow users to interactively expand / contract the pane by clicking its title bar.
|
|
375
375
|
*
|
|
376
376
|
* Hides the collapse button from the title bar when `false`.
|
|
377
377
|
* @default `true`
|
|
378
378
|
*/
|
|
379
|
-
userExpandable?: boolean
|
|
379
|
+
userExpandable?: boolean
|
|
380
380
|
/**
|
|
381
381
|
* Expand or collapse the pane into its title bar.
|
|
382
382
|
* @default `true`
|
|
383
383
|
* @bindable
|
|
384
384
|
*/
|
|
385
|
-
expanded?: boolean
|
|
385
|
+
expanded?: boolean
|
|
386
386
|
/**
|
|
387
387
|
* Custom color scheme.
|
|
388
388
|
*
|
|
@@ -401,7 +401,7 @@ declare const __propDef: {
|
|
|
401
401
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
402
402
|
* set with `setGlobalDefaultTheme()`.
|
|
403
403
|
*/
|
|
404
|
-
theme?: import('..').Theme | undefined
|
|
404
|
+
theme?: import('..').Theme | undefined
|
|
405
405
|
/**
|
|
406
406
|
* Scales the pane's elements by a factor of `scale` to make it easier to see.
|
|
407
407
|
*
|
|
@@ -415,9 +415,9 @@ declare const __propDef: {
|
|
|
415
415
|
* Negative values are ignored.
|
|
416
416
|
* @default `1`
|
|
417
417
|
*/
|
|
418
|
-
scale?: number
|
|
418
|
+
scale?: number
|
|
419
419
|
/** Internal use only. */
|
|
420
|
-
userCreatedPane?: boolean
|
|
420
|
+
userCreatedPane?: boolean
|
|
421
421
|
/**
|
|
422
422
|
* The internal Tweakpane [`Pane`](https://tweakpane.github.io/docs/api/classes/Pane.html) object.
|
|
423
423
|
*
|
|
@@ -432,26 +432,26 @@ declare const __propDef: {
|
|
|
432
432
|
* @bindable
|
|
433
433
|
* @readonly
|
|
434
434
|
*/
|
|
435
|
-
tpPane?: import('tweakpane').Pane | undefined
|
|
435
|
+
tpPane?: import('tweakpane').Pane | undefined
|
|
436
436
|
},
|
|
437
437
|
'userCreatedPane'
|
|
438
438
|
>)
|
|
439
|
-
)
|
|
439
|
+
)
|
|
440
440
|
events: {
|
|
441
|
-
[evt: string]: CustomEvent<any
|
|
442
|
-
}
|
|
441
|
+
[evt: string]: CustomEvent<any>
|
|
442
|
+
}
|
|
443
443
|
slots: {
|
|
444
444
|
/**
|
|
445
445
|
* Any Tweakpane component, except another `<Pane>`.
|
|
446
446
|
*/
|
|
447
|
-
default: {}
|
|
448
|
-
}
|
|
449
|
-
exports?: {} | undefined
|
|
450
|
-
bindings?: string | undefined
|
|
451
|
-
}
|
|
452
|
-
export type PaneProps = typeof __propDef.props
|
|
453
|
-
export type PaneEvents = typeof __propDef.events
|
|
454
|
-
export type PaneSlots = typeof __propDef.slots
|
|
447
|
+
default: {}
|
|
448
|
+
}
|
|
449
|
+
exports?: {} | undefined
|
|
450
|
+
bindings?: string | undefined
|
|
451
|
+
}
|
|
452
|
+
export type PaneProps = typeof __propDef.props
|
|
453
|
+
export type PaneEvents = typeof __propDef.events
|
|
454
|
+
export type PaneSlots = typeof __propDef.slots
|
|
455
455
|
/**
|
|
456
456
|
* The root `<Pane>` component, used for organizing controls into a single group and controlling how
|
|
457
457
|
* and where the Tweakpane is displayed.
|
|
@@ -512,10 +512,10 @@ export type PaneSlots = typeof __propDef.slots;
|
|
|
512
512
|
* @example
|
|
513
513
|
* ```svelte
|
|
514
514
|
* <script lang="ts">
|
|
515
|
-
* import { Pane, type PanePosition, RadioGrid } from 'svelte-tweakpane-ui'
|
|
515
|
+
* import { Pane, type PanePosition, RadioGrid } from 'svelte-tweakpane-ui'
|
|
516
516
|
*
|
|
517
|
-
* const options: PanePosition[] = ['inline', 'fixed', 'draggable']
|
|
518
|
-
* let position: PanePosition = options[0]
|
|
517
|
+
* const options: PanePosition[] = ['inline', 'fixed', 'draggable']
|
|
518
|
+
* let position: PanePosition = options[0]
|
|
519
519
|
* </script>
|
|
520
520
|
*
|
|
521
521
|
* <Pane {position} title="Pane" y={position === 'inline' ? undefined : 110}>
|
|
@@ -546,4 +546,4 @@ export type PaneSlots = typeof __propDef.slots;
|
|
|
546
546
|
* [Pane.svelte](https://github.com/kitschpatrol/svelte-tweakpane-ui/blob/main/src/lib/core/Pane.svelte)
|
|
547
547
|
*/
|
|
548
548
|
export default class Pane extends SvelteComponent<PaneProps, PaneEvents, PaneSlots> {}
|
|
549
|
-
export {}
|
|
549
|
+
export {}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import Blade from './Blade.svelte'
|
|
3
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
4
|
-
import { BROWSER } from 'esm-env'
|
|
2
|
+
import Blade from './Blade.svelte'
|
|
3
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
4
|
+
import { BROWSER } from 'esm-env'
|
|
5
5
|
const options = {
|
|
6
|
-
view: 'separator'
|
|
7
|
-
}
|
|
6
|
+
view: 'separator',
|
|
7
|
+
}
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
{#if BROWSER}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
2
|
import type {
|
|
3
3
|
SeparatorBladeApi as SeparatorBladeRef,
|
|
4
|
-
SeparatorBladeParams as SeparatorOptions
|
|
5
|
-
} from 'tweakpane'
|
|
4
|
+
SeparatorBladeParams as SeparatorOptions,
|
|
5
|
+
} from 'tweakpane'
|
|
6
6
|
declare const __propDef: {
|
|
7
7
|
props: Omit<
|
|
8
8
|
{
|
|
@@ -11,19 +11,19 @@ declare const __propDef: {
|
|
|
11
11
|
* [`BladeParams`](https://tweakpane.github.io/docs/api/interfaces/BaseBladeParams.html).
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
|
-
options: SeparatorOptions
|
|
14
|
+
options: SeparatorOptions
|
|
15
15
|
/**
|
|
16
16
|
* Prevent interactivity and gray out the control.
|
|
17
17
|
* @default `false`
|
|
18
18
|
*/
|
|
19
|
-
disabled?: boolean
|
|
19
|
+
disabled?: boolean
|
|
20
20
|
/**
|
|
21
21
|
* Custom color scheme.
|
|
22
22
|
* @default `undefined` \
|
|
23
23
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
24
24
|
* set with `setGlobalDefaultTheme()`.
|
|
25
25
|
*/
|
|
26
|
-
theme?: import('..').Theme | undefined
|
|
26
|
+
theme?: import('..').Theme | undefined
|
|
27
27
|
/**
|
|
28
28
|
* Reference to internal Tweakpane
|
|
29
29
|
* [`BladeApi`](https://tweakpane.github.io/docs/api/classes/BladeApi.html) for this blade.
|
|
@@ -36,7 +36,7 @@ declare const __propDef: {
|
|
|
36
36
|
* @bindable
|
|
37
37
|
* @readonly
|
|
38
38
|
*/
|
|
39
|
-
ref?: SeparatorBladeRef | undefined
|
|
39
|
+
ref?: SeparatorBladeRef | undefined
|
|
40
40
|
/**
|
|
41
41
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
42
42
|
* the `<Blade>`'s containing `<Pane>`.
|
|
@@ -48,20 +48,20 @@ declare const __propDef: {
|
|
|
48
48
|
*
|
|
49
49
|
* @default `undefined`
|
|
50
50
|
*/
|
|
51
|
-
plugin?: import('./Blade.svelte').Plugin | undefined
|
|
51
|
+
plugin?: import('./Blade.svelte').Plugin | undefined
|
|
52
52
|
},
|
|
53
53
|
'ref' | 'options' | 'plugin'
|
|
54
|
-
|
|
54
|
+
>
|
|
55
55
|
events: {
|
|
56
|
-
[evt: string]: CustomEvent<any
|
|
57
|
-
}
|
|
58
|
-
slots: {}
|
|
59
|
-
exports?: {} | undefined
|
|
60
|
-
bindings?: string | undefined
|
|
61
|
-
}
|
|
62
|
-
export type SeparatorProps = typeof __propDef.props
|
|
63
|
-
export type SeparatorEvents = typeof __propDef.events
|
|
64
|
-
export type SeparatorSlots = typeof __propDef.slots
|
|
56
|
+
[evt: string]: CustomEvent<any>
|
|
57
|
+
}
|
|
58
|
+
slots: {}
|
|
59
|
+
exports?: {} | undefined
|
|
60
|
+
bindings?: string | undefined
|
|
61
|
+
}
|
|
62
|
+
export type SeparatorProps = typeof __propDef.props
|
|
63
|
+
export type SeparatorEvents = typeof __propDef.events
|
|
64
|
+
export type SeparatorSlots = typeof __propDef.slots
|
|
65
65
|
/**
|
|
66
66
|
* A convenience component providing a subtle visual separator between controls, in the spirit of the
|
|
67
67
|
* HTML `<hr>` element.
|
|
@@ -74,7 +74,7 @@ export type SeparatorSlots = typeof __propDef.slots;
|
|
|
74
74
|
* @example
|
|
75
75
|
* ```svelte
|
|
76
76
|
* <script lang="ts">
|
|
77
|
-
* import { Button, Separator } from 'svelte-tweakpane-ui'
|
|
77
|
+
* import { Button, Separator } from 'svelte-tweakpane-ui'
|
|
78
78
|
* </script>
|
|
79
79
|
*
|
|
80
80
|
* <Button title="Oil" />
|
|
@@ -90,4 +90,4 @@ export default class Separator extends SvelteComponent<
|
|
|
90
90
|
SeparatorEvents,
|
|
91
91
|
SeparatorSlots
|
|
92
92
|
> {}
|
|
93
|
-
export {}
|
|
93
|
+
export {}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
3
|
-
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
4
|
-
import { getElementIndex, isRootPane } from '../utils.js'
|
|
5
|
-
import { BROWSER } from 'esm-env'
|
|
6
|
-
import { getContext, onDestroy, onMount, setContext } from 'svelte'
|
|
7
|
-
import { writable } from 'svelte/store'
|
|
8
|
-
export let disabled = false
|
|
9
|
-
export let selectedIndex = 0
|
|
10
|
-
export let theme = void 0
|
|
11
|
-
const parentStore = getContext('parentStore')
|
|
12
|
-
const tabGroupStore = writable()
|
|
13
|
-
setContext('tabGroupStore', tabGroupStore)
|
|
14
|
-
const tabIndexStore = writable()
|
|
15
|
-
setContext('tabIndexStore', tabIndexStore)
|
|
16
|
-
const userCreatedPane = getContext('userCreatedPane')
|
|
17
|
-
let indexElement
|
|
2
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
3
|
+
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
4
|
+
import { getElementIndex, isRootPane } from '../utils.js'
|
|
5
|
+
import { BROWSER } from 'esm-env'
|
|
6
|
+
import { getContext, onDestroy, onMount, setContext } from 'svelte'
|
|
7
|
+
import { writable } from 'svelte/store'
|
|
8
|
+
export let disabled = false
|
|
9
|
+
export let selectedIndex = 0
|
|
10
|
+
export let theme = void 0
|
|
11
|
+
const parentStore = getContext('parentStore')
|
|
12
|
+
const tabGroupStore = writable()
|
|
13
|
+
setContext('tabGroupStore', tabGroupStore)
|
|
14
|
+
const tabIndexStore = writable()
|
|
15
|
+
setContext('tabIndexStore', tabIndexStore)
|
|
16
|
+
const userCreatedPane = getContext('userCreatedPane')
|
|
17
|
+
let indexElement
|
|
18
18
|
onMount(() => {
|
|
19
|
-
$tabIndexStore = userCreatedPane ? getElementIndex(indexElement) : 0
|
|
20
|
-
})
|
|
19
|
+
$tabIndexStore = userCreatedPane ? getElementIndex(indexElement) : 0
|
|
20
|
+
})
|
|
21
21
|
onDestroy(() => {
|
|
22
|
-
$tabGroupStore?.dispose()
|
|
23
|
-
})
|
|
22
|
+
$tabGroupStore?.dispose()
|
|
23
|
+
})
|
|
24
24
|
function setUpListeners(t) {
|
|
25
25
|
t?.on('select', (event) => {
|
|
26
|
-
selectedIndex = event.index
|
|
27
|
-
})
|
|
26
|
+
selectedIndex = event.index
|
|
27
|
+
})
|
|
28
28
|
}
|
|
29
29
|
function setSelectedIndex(index) {
|
|
30
|
-
const tabPageApi = $tabGroupStore?.pages.at(index)
|
|
31
|
-
if (tabPageApi && !tabPageApi.selected) tabPageApi.selected = true
|
|
30
|
+
const tabPageApi = $tabGroupStore?.pages.at(index)
|
|
31
|
+
if (tabPageApi && !tabPageApi.selected) tabPageApi.selected = true
|
|
32
32
|
}
|
|
33
|
-
$: setUpListeners($tabGroupStore)
|
|
34
|
-
$: setSelectedIndex(selectedIndex)
|
|
35
|
-
$: $tabGroupStore && ($tabGroupStore.disabled = disabled)
|
|
33
|
+
$: setUpListeners($tabGroupStore)
|
|
34
|
+
$: setSelectedIndex(selectedIndex)
|
|
35
|
+
$: $tabGroupStore && ($tabGroupStore.disabled = disabled)
|
|
36
36
|
$: theme &&
|
|
37
37
|
$parentStore &&
|
|
38
38
|
(userCreatedPane || !isRootPane($parentStore)) &&
|
|
39
39
|
console.warn(
|
|
40
|
-
'Set theme on the <Pane> component, not on its children! (Check nested <TabGroup> components for a theme prop.)'
|
|
41
|
-
)
|
|
40
|
+
'Set theme on the <Pane> component, not on its children! (Check nested <TabGroup> components for a theme prop.)',
|
|
41
|
+
)
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
{#if parentStore}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { Theme } from '../theme.js'
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { Theme } from '../theme.js'
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
/**
|
|
6
6
|
* Prevent interactivity and gray out the control.
|
|
7
7
|
* @default `false`
|
|
8
|
-
* */ disabled?: boolean
|
|
8
|
+
* */ disabled?: boolean
|
|
9
9
|
/**
|
|
10
10
|
* Active page index.
|
|
11
11
|
*
|
|
@@ -13,29 +13,29 @@ declare const __propDef: {
|
|
|
13
13
|
* index.
|
|
14
14
|
* @default `0`
|
|
15
15
|
* @bindable
|
|
16
|
-
* */ selectedIndex?: number
|
|
16
|
+
* */ selectedIndex?: number
|
|
17
17
|
/**
|
|
18
18
|
* Custom color scheme.
|
|
19
19
|
* @default `undefined` \
|
|
20
20
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
21
21
|
* set with `setGlobalDefaultTheme()`.
|
|
22
|
-
* */ theme?: Theme | undefined
|
|
23
|
-
}
|
|
22
|
+
* */ theme?: Theme | undefined
|
|
23
|
+
}
|
|
24
24
|
events: {
|
|
25
|
-
[evt: string]: CustomEvent<any
|
|
26
|
-
}
|
|
25
|
+
[evt: string]: CustomEvent<any>
|
|
26
|
+
}
|
|
27
27
|
slots: {
|
|
28
28
|
/**
|
|
29
29
|
* A `<TabPage>` component.
|
|
30
30
|
*/
|
|
31
|
-
default: {}
|
|
32
|
-
}
|
|
33
|
-
exports?: {} | undefined
|
|
34
|
-
bindings?: string | undefined
|
|
35
|
-
}
|
|
36
|
-
export type TabGroupProps = typeof __propDef.props
|
|
37
|
-
export type TabGroupEvents = typeof __propDef.events
|
|
38
|
-
export type TabGroupSlots = typeof __propDef.slots
|
|
31
|
+
default: {}
|
|
32
|
+
}
|
|
33
|
+
exports?: {} | undefined
|
|
34
|
+
bindings?: string | undefined
|
|
35
|
+
}
|
|
36
|
+
export type TabGroupProps = typeof __propDef.props
|
|
37
|
+
export type TabGroupEvents = typeof __propDef.events
|
|
38
|
+
export type TabGroupSlots = typeof __propDef.slots
|
|
39
39
|
/**
|
|
40
40
|
* Contains a collection of `<TabPage>` components to be presented as a tabs.
|
|
41
41
|
*
|
|
@@ -50,7 +50,7 @@ export type TabGroupSlots = typeof __propDef.slots;
|
|
|
50
50
|
* @example
|
|
51
51
|
* ```svelte
|
|
52
52
|
* <script lang="ts">
|
|
53
|
-
* import { Button, TabGroup, TabPage } from 'svelte-tweakpane-ui'
|
|
53
|
+
* import { Button, TabGroup, TabPage } from 'svelte-tweakpane-ui'
|
|
54
54
|
* </script>
|
|
55
55
|
*
|
|
56
56
|
* <TabGroup>
|
|
@@ -71,4 +71,4 @@ export default class TabGroup extends SvelteComponent<
|
|
|
71
71
|
TabGroupEvents,
|
|
72
72
|
TabGroupSlots
|
|
73
73
|
> {}
|
|
74
|
-
export {}
|
|
74
|
+
export {}
|