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
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import ClsPad from './ClsPad.svelte'
|
|
3
|
-
import { applyTheme } from '../theme.js'
|
|
4
|
-
import { updateCollapsibility } from '../utils.js'
|
|
5
|
-
import { BROWSER } from 'esm-env'
|
|
6
|
-
import { getContext, onDestroy, setContext, tick } from 'svelte'
|
|
7
|
-
import { writable } from 'svelte/store'
|
|
8
|
-
import { Pane as TpPane } from 'tweakpane'
|
|
9
|
-
export let title = void 0
|
|
10
|
-
export let userExpandable = true
|
|
11
|
-
export let expanded = true
|
|
12
|
-
export let theme = void 0
|
|
13
|
-
export let scale = 1
|
|
14
|
-
export let userCreatedPane = true
|
|
15
|
-
export let tpPane = void 0
|
|
16
|
-
const parentStore = writable()
|
|
17
|
-
const existingParentStore = getContext('parentStore')
|
|
18
|
-
let pluginsRegistered = []
|
|
2
|
+
import ClsPad from './ClsPad.svelte'
|
|
3
|
+
import { applyTheme } from '../theme.js'
|
|
4
|
+
import { updateCollapsibility } from '../utils.js'
|
|
5
|
+
import { BROWSER } from 'esm-env'
|
|
6
|
+
import { getContext, onDestroy, setContext, tick } from 'svelte'
|
|
7
|
+
import { writable } from 'svelte/store'
|
|
8
|
+
import { Pane as TpPane } from 'tweakpane'
|
|
9
|
+
export let title = void 0
|
|
10
|
+
export let userExpandable = true
|
|
11
|
+
export let expanded = true
|
|
12
|
+
export let theme = void 0
|
|
13
|
+
export let scale = 1
|
|
14
|
+
export let userCreatedPane = true
|
|
15
|
+
export let tpPane = void 0
|
|
16
|
+
const parentStore = writable()
|
|
17
|
+
const existingParentStore = getContext('parentStore')
|
|
18
|
+
let pluginsRegistered = []
|
|
19
19
|
const registerPlugin = (plugin) => {
|
|
20
20
|
if (tpPane === void 0) {
|
|
21
|
-
console.warn(`tpPane is undefined, failed to register plugin "${plugin.id}"`)
|
|
21
|
+
console.warn(`tpPane is undefined, failed to register plugin "${plugin.id}"`)
|
|
22
22
|
} else if (!pluginsRegistered.includes(plugin.id)) {
|
|
23
|
-
tpPane?.registerPlugin(plugin)
|
|
24
|
-
pluginsRegistered.push(plugin.id)
|
|
23
|
+
tpPane?.registerPlugin(plugin)
|
|
24
|
+
pluginsRegistered.push(plugin.id)
|
|
25
25
|
}
|
|
26
|
-
}
|
|
27
|
-
setContext('registerPlugin', registerPlugin)
|
|
28
|
-
setContext('userCreatedPane', userCreatedPane)
|
|
26
|
+
}
|
|
27
|
+
setContext('registerPlugin', registerPlugin)
|
|
28
|
+
setContext('userCreatedPane', userCreatedPane)
|
|
29
29
|
if ($existingParentStore !== void 0) {
|
|
30
|
-
console.warn('<Panes> must not be nested')
|
|
30
|
+
console.warn('<Panes> must not be nested')
|
|
31
31
|
}
|
|
32
32
|
if (BROWSER) {
|
|
33
|
-
$parentStore = new TpPane({ expanded, title })
|
|
33
|
+
$parentStore = new TpPane({ expanded, title })
|
|
34
34
|
$parentStore.on('fold', () => {
|
|
35
35
|
if ($parentStore.expanded !== void 0 && expanded !== $parentStore.expanded) {
|
|
36
|
-
expanded = $parentStore.expanded
|
|
36
|
+
expanded = $parentStore.expanded
|
|
37
37
|
}
|
|
38
|
-
})
|
|
39
|
-
tpPane = $parentStore
|
|
40
|
-
setContext('parentStore', parentStore)
|
|
38
|
+
})
|
|
39
|
+
tpPane = $parentStore
|
|
40
|
+
setContext('parentStore', parentStore)
|
|
41
41
|
onDestroy(() => {
|
|
42
|
-
$parentStore.dispose()
|
|
43
|
-
})
|
|
42
|
+
$parentStore.dispose()
|
|
43
|
+
})
|
|
44
44
|
} else {
|
|
45
|
-
setContext('parentStore', writable(true))
|
|
45
|
+
setContext('parentStore', writable(true))
|
|
46
46
|
}
|
|
47
47
|
function setScale(scale2) {
|
|
48
48
|
if (tpPane) {
|
|
49
49
|
if (scale2 === 1) {
|
|
50
|
-
tpPane.element.style.removeProperty('transform-origin')
|
|
51
|
-
tpPane.element.style.removeProperty('transform')
|
|
52
|
-
tpPane.element.style.removeProperty('width')
|
|
50
|
+
tpPane.element.style.removeProperty('transform-origin')
|
|
51
|
+
tpPane.element.style.removeProperty('transform')
|
|
52
|
+
tpPane.element.style.removeProperty('width')
|
|
53
53
|
} else {
|
|
54
|
-
const clampedScale = Math.max(0, scale2)
|
|
55
|
-
tpPane.element.style.transformOrigin = '0 0'
|
|
56
|
-
tpPane.element.style.transform = `scale(${clampedScale})
|
|
57
|
-
tpPane.element.style.width = `${100 / clampedScale}
|
|
54
|
+
const clampedScale = Math.max(0, scale2)
|
|
55
|
+
tpPane.element.style.transformOrigin = '0 0'
|
|
56
|
+
tpPane.element.style.transform = `scale(${clampedScale})`
|
|
57
|
+
tpPane.element.style.width = `${100 / clampedScale}%`
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
function updateExpanded(expanded2) {
|
|
62
62
|
void tick().then(() => {
|
|
63
63
|
if (tpPane?.expanded !== void 0 && expanded2 !== void 0 && tpPane.expanded !== expanded2) {
|
|
64
|
-
tpPane.expanded = expanded2
|
|
64
|
+
tpPane.expanded = expanded2
|
|
65
65
|
}
|
|
66
|
-
})
|
|
66
|
+
})
|
|
67
67
|
}
|
|
68
|
-
$: tpPane?.element && tpPane?.element.classList.add('svelte-tweakpane-ui')
|
|
69
|
-
$: tpPane && setScale(scale)
|
|
70
|
-
$: tpPane && updateCollapsibility(userExpandable, tpPane.element, 'tp-rotv_b', 'tp-rotv_m')
|
|
71
|
-
$: tpPane && title !== void 0 && (tpPane.title = title.length > 0 ? title : ' ')
|
|
72
|
-
$: tpPane && applyTheme(tpPane.element, theme)
|
|
73
|
-
$: tpPane && updateExpanded(expanded)
|
|
68
|
+
$: tpPane?.element && tpPane?.element.classList.add('svelte-tweakpane-ui')
|
|
69
|
+
$: tpPane && setScale(scale)
|
|
70
|
+
$: tpPane && updateCollapsibility(userExpandable, tpPane.element, 'tp-rotv_b', 'tp-rotv_m')
|
|
71
|
+
$: tpPane && title !== void 0 && (tpPane.title = title.length > 0 ? title : ' ')
|
|
72
|
+
$: tpPane && applyTheme(tpPane.element, theme)
|
|
73
|
+
$: tpPane && updateExpanded(expanded)
|
|
74
74
|
</script>
|
|
75
75
|
|
|
76
76
|
{#if BROWSER}
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
'containerVerticalPadding',
|
|
85
85
|
'containerVerticalPadding',
|
|
86
86
|
'containerVerticalPadding',
|
|
87
|
-
'containerUnitSize'
|
|
87
|
+
'containerUnitSize',
|
|
88
88
|
]}
|
|
89
89
|
{theme}
|
|
90
90
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import { type Theme } from '../theme.js'
|
|
3
|
-
import { Pane as TpPane } from 'tweakpane'
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import { type Theme } from '../theme.js'
|
|
3
|
+
import { Pane as TpPane } from 'tweakpane'
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
/**
|
|
@@ -8,18 +8,18 @@ declare const __propDef: {
|
|
|
8
8
|
* @default `Tweakpane` \
|
|
9
9
|
* Unless `position="inline"`, in which case the default is `undefined` and no title bar is
|
|
10
10
|
* shown.
|
|
11
|
-
* */ title?: string | undefined
|
|
11
|
+
* */ title?: string | undefined
|
|
12
12
|
/**
|
|
13
13
|
* Allow users to interactively expand / contract the pane by clicking its title bar.
|
|
14
14
|
*
|
|
15
15
|
* Hides the collapse button from the title bar when `false`.
|
|
16
16
|
* @default `true`
|
|
17
|
-
* */ userExpandable?: boolean
|
|
17
|
+
* */ userExpandable?: boolean
|
|
18
18
|
/**
|
|
19
19
|
* Expand or collapse the pane into its title bar.
|
|
20
20
|
* @default `true`
|
|
21
21
|
* @bindable
|
|
22
|
-
* */ expanded?: boolean
|
|
22
|
+
* */ expanded?: boolean
|
|
23
23
|
/**
|
|
24
24
|
* Custom color scheme.
|
|
25
25
|
*
|
|
@@ -37,7 +37,7 @@ declare const __propDef: {
|
|
|
37
37
|
* @default `undefined` \
|
|
38
38
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
39
39
|
* set with `setGlobalDefaultTheme()`.
|
|
40
|
-
* */ theme?: Theme | undefined
|
|
40
|
+
* */ theme?: Theme | undefined
|
|
41
41
|
/**
|
|
42
42
|
* Scales the pane's elements by a factor of `scale` to make it easier to see.
|
|
43
43
|
*
|
|
@@ -50,8 +50,8 @@ declare const __propDef: {
|
|
|
50
50
|
*
|
|
51
51
|
* Negative values are ignored.
|
|
52
52
|
* @default `1`
|
|
53
|
-
*/ scale?: number
|
|
54
|
-
/** Internal use only. */ userCreatedPane?: boolean
|
|
53
|
+
*/ scale?: number
|
|
54
|
+
/** Internal use only. */ userCreatedPane?: boolean
|
|
55
55
|
/**
|
|
56
56
|
* The internal Tweakpane [`Pane`](https://tweakpane.github.io/docs/api/classes/Pane.html) object.
|
|
57
57
|
*
|
|
@@ -65,23 +65,23 @@ declare const __propDef: {
|
|
|
65
65
|
*
|
|
66
66
|
* @bindable
|
|
67
67
|
* @readonly
|
|
68
|
-
* */ tpPane?: TpPane | undefined
|
|
69
|
-
}
|
|
68
|
+
* */ tpPane?: TpPane | undefined
|
|
69
|
+
}
|
|
70
70
|
events: {
|
|
71
|
-
[evt: string]: CustomEvent<any
|
|
72
|
-
}
|
|
71
|
+
[evt: string]: CustomEvent<any>
|
|
72
|
+
}
|
|
73
73
|
slots: {
|
|
74
74
|
/**
|
|
75
75
|
* Any Tweakpane component, except another `<Pane>`.
|
|
76
76
|
*/
|
|
77
|
-
default: {}
|
|
78
|
-
}
|
|
79
|
-
exports?: {} | undefined
|
|
80
|
-
bindings?: string | undefined
|
|
81
|
-
}
|
|
82
|
-
export type GenericPaneProps = typeof __propDef.props
|
|
83
|
-
export type GenericPaneEvents = typeof __propDef.events
|
|
84
|
-
export type GenericPaneSlots = typeof __propDef.slots
|
|
77
|
+
default: {}
|
|
78
|
+
}
|
|
79
|
+
exports?: {} | undefined
|
|
80
|
+
bindings?: string | undefined
|
|
81
|
+
}
|
|
82
|
+
export type GenericPaneProps = typeof __propDef.props
|
|
83
|
+
export type GenericPaneEvents = typeof __propDef.events
|
|
84
|
+
export type GenericPaneSlots = typeof __propDef.slots
|
|
85
85
|
/**
|
|
86
86
|
* This component is for internal use only.
|
|
87
87
|
*
|
|
@@ -93,4 +93,4 @@ export default class GenericPane extends SvelteComponent<
|
|
|
93
93
|
GenericPaneEvents,
|
|
94
94
|
GenericPaneSlots
|
|
95
95
|
> {}
|
|
96
|
-
export {}
|
|
96
|
+
export {}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script generics="T extends number | IntervalSliderValue">
|
|
2
|
-
import GenericInput from './GenericInput.svelte'
|
|
3
|
-
export let value
|
|
4
|
-
export let options = void 0
|
|
5
|
-
export let min = void 0
|
|
6
|
-
export let max = void 0
|
|
7
|
-
export let step = void 0
|
|
8
|
-
export let pointerScale = void 0
|
|
9
|
-
export let keyScale = void 0
|
|
10
|
-
export let format = void 0
|
|
11
|
-
export let ref = void 0
|
|
12
|
-
let formatProxy = format
|
|
13
|
-
$: formatProxy !== format && (formatProxy = format)
|
|
14
|
-
let optionsInternal
|
|
2
|
+
import GenericInput from './GenericInput.svelte'
|
|
3
|
+
export let value
|
|
4
|
+
export let options = void 0
|
|
5
|
+
export let min = void 0
|
|
6
|
+
export let max = void 0
|
|
7
|
+
export let step = void 0
|
|
8
|
+
export let pointerScale = void 0
|
|
9
|
+
export let keyScale = void 0
|
|
10
|
+
export let format = void 0
|
|
11
|
+
export let ref = void 0
|
|
12
|
+
let formatProxy = format
|
|
13
|
+
$: formatProxy !== format && (formatProxy = format)
|
|
14
|
+
let optionsInternal
|
|
15
15
|
$: optionsInternal = {
|
|
16
16
|
min,
|
|
17
17
|
max,
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
keyScale,
|
|
20
20
|
pointerScale,
|
|
21
21
|
step,
|
|
22
|
-
...options
|
|
23
|
-
}
|
|
22
|
+
...options,
|
|
23
|
+
}
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<GenericInput bind:value bind:ref on:change options={optionsInternal} {...$$restProps} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { IntervalSliderValue } from '../control/IntervalSlider.svelte'
|
|
3
|
-
import type { NumberInputParams as GenericSliderOptions } from 'tweakpane'
|
|
4
|
-
import type { SliderInputBindingApi as GenericSliderRef } from 'tweakpane'
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { IntervalSliderValue } from '../control/IntervalSlider.svelte'
|
|
3
|
+
import type { NumberInputParams as GenericSliderOptions } from 'tweakpane'
|
|
4
|
+
import type { SliderInputBindingApi as GenericSliderRef } from 'tweakpane'
|
|
5
5
|
declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
6
6
|
props(): {
|
|
7
7
|
/**
|
|
@@ -10,70 +10,70 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
10
10
|
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
11
11
|
* @default `undefined`
|
|
12
12
|
* */
|
|
13
|
-
min?: number
|
|
13
|
+
min?: number
|
|
14
14
|
/**
|
|
15
15
|
* Maximum value.
|
|
16
16
|
*
|
|
17
17
|
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
18
18
|
* @default `undefined`
|
|
19
19
|
* */
|
|
20
|
-
max?: number
|
|
20
|
+
max?: number
|
|
21
21
|
/**
|
|
22
22
|
* A function to customize the point value's string representation (e.g. rounding, etc.).
|
|
23
23
|
* @default `undefined` \
|
|
24
24
|
* Normal `.toString()` formatting.
|
|
25
25
|
* */
|
|
26
|
-
format?: ((value: number) => string) | undefined
|
|
26
|
+
format?: ((value: number) => string) | undefined
|
|
27
27
|
/**
|
|
28
28
|
* The unit scale for key-based input for all dimensions (e.g. the up and down arrow keys).
|
|
29
29
|
* @default `1` \
|
|
30
30
|
* Or `stepValue` if defined.
|
|
31
31
|
* */
|
|
32
|
-
keyScale?: number
|
|
32
|
+
keyScale?: number
|
|
33
33
|
/**
|
|
34
34
|
* The unit scale for pointer-based input for all dimensions.
|
|
35
35
|
* @default `undefined` \
|
|
36
36
|
* [Dynamic based on magnitude of
|
|
37
37
|
* `value`](https://github.com/cocopon/tweakpane/blob/66dfbea04bfe9b7f031673c955ceda1f92356e75/packages/core/src/common/number/util.ts#L54).
|
|
38
38
|
* */
|
|
39
|
-
pointerScale?: number
|
|
39
|
+
pointerScale?: number
|
|
40
40
|
/**
|
|
41
41
|
* The minimum step interval.
|
|
42
42
|
* @default `undefined` \
|
|
43
43
|
* No step constraint.
|
|
44
44
|
* */
|
|
45
|
-
step?: number
|
|
45
|
+
step?: number
|
|
46
46
|
/**
|
|
47
47
|
* When `true`, expand the width of the control at the expense of the numeric input
|
|
48
48
|
* field.
|
|
49
49
|
* @default `false`
|
|
50
50
|
* */
|
|
51
|
-
wide?: boolean
|
|
51
|
+
wide?: boolean
|
|
52
52
|
} & {
|
|
53
53
|
/**
|
|
54
54
|
* The value to control.
|
|
55
55
|
* @bindable
|
|
56
56
|
*/
|
|
57
|
-
value: T
|
|
57
|
+
value: T
|
|
58
58
|
} & Omit<
|
|
59
59
|
{
|
|
60
60
|
/**
|
|
61
61
|
* The binding's target object with values to manipulate.
|
|
62
62
|
* @bindable
|
|
63
63
|
*/
|
|
64
|
-
object: import('@tweakpane/core').Bindable & Record<string, T
|
|
64
|
+
object: import('@tweakpane/core').Bindable & Record<string, T>
|
|
65
65
|
/** The key for the value in the target `object` that the control should manipulate. */
|
|
66
|
-
key: string
|
|
66
|
+
key: string
|
|
67
67
|
/**
|
|
68
68
|
* Prevent interactivity and gray out the control.
|
|
69
69
|
* @default `false`
|
|
70
70
|
*/
|
|
71
|
-
disabled?: boolean
|
|
71
|
+
disabled?: boolean
|
|
72
72
|
/**
|
|
73
73
|
* Text displayed next to control.
|
|
74
74
|
* @default `undefined`
|
|
75
75
|
*/
|
|
76
|
-
label?: string | undefined
|
|
76
|
+
label?: string | undefined
|
|
77
77
|
/**
|
|
78
78
|
* Tweakpane's internal options object.
|
|
79
79
|
*
|
|
@@ -86,7 +86,7 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
86
86
|
* Tweakpane UI_.
|
|
87
87
|
* @default `undefined`
|
|
88
88
|
*/
|
|
89
|
-
options?: GenericSliderOptions | undefined
|
|
89
|
+
options?: GenericSliderOptions | undefined
|
|
90
90
|
/**
|
|
91
91
|
* Custom color scheme.
|
|
92
92
|
*
|
|
@@ -94,7 +94,7 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
94
94
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
95
95
|
* set with `setGlobalDefaultTheme()`.
|
|
96
96
|
*/
|
|
97
|
-
theme?: import('..').Theme | undefined
|
|
97
|
+
theme?: import('..').Theme | undefined
|
|
98
98
|
/**
|
|
99
99
|
* Reference to internal Tweakpane
|
|
100
100
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
@@ -108,7 +108,7 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
108
108
|
* @bindable
|
|
109
109
|
* @readonly
|
|
110
110
|
*/
|
|
111
|
-
ref?: GenericSliderRef | undefined
|
|
111
|
+
ref?: GenericSliderRef | undefined
|
|
112
112
|
/**
|
|
113
113
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
114
114
|
* the `<Binding>`'s containing `<Pane>`.
|
|
@@ -120,26 +120,26 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
120
120
|
*
|
|
121
121
|
* @default `undefined`
|
|
122
122
|
*/
|
|
123
|
-
plugin?: import('..').Plugin | undefined
|
|
123
|
+
plugin?: import('..').Plugin | undefined
|
|
124
124
|
},
|
|
125
125
|
'object' | 'key'
|
|
126
|
-
|
|
126
|
+
>
|
|
127
127
|
events(): {
|
|
128
|
-
change: import('..').BindingChangeEvent
|
|
128
|
+
change: import('..').BindingChangeEvent
|
|
129
129
|
} & {
|
|
130
|
-
[evt: string]: CustomEvent<any
|
|
131
|
-
}
|
|
132
|
-
slots(): {}
|
|
130
|
+
[evt: string]: CustomEvent<any>
|
|
131
|
+
}
|
|
132
|
+
slots(): {}
|
|
133
133
|
}
|
|
134
134
|
export type GenericSliderProps<T extends number | IntervalSliderValue> = ReturnType<
|
|
135
135
|
__sveltets_Render<T>['props']
|
|
136
|
-
|
|
136
|
+
>
|
|
137
137
|
export type GenericSliderEvents<T extends number | IntervalSliderValue> = ReturnType<
|
|
138
138
|
__sveltets_Render<T>['events']
|
|
139
|
-
|
|
139
|
+
>
|
|
140
140
|
export type GenericSliderSlots<T extends number | IntervalSliderValue> = ReturnType<
|
|
141
141
|
__sveltets_Render<T>['slots']
|
|
142
|
-
|
|
142
|
+
>
|
|
143
143
|
/**
|
|
144
144
|
* This component is for internal use only.
|
|
145
145
|
*
|
|
@@ -155,4 +155,4 @@ export default class GenericSlider<T extends number | IntervalSliderValue> exten
|
|
|
155
155
|
GenericSliderEvents<T>,
|
|
156
156
|
GenericSliderSlots<T>
|
|
157
157
|
> {}
|
|
158
|
-
export {}
|
|
158
|
+
export {}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import ClsPad from './ClsPad.svelte'
|
|
5
|
-
import GenericMonitor from './GenericMonitor.svelte'
|
|
6
|
-
import { fillWith, rowsForMonitor } from '../utils'
|
|
7
|
-
import { BROWSER } from 'esm-env'
|
|
8
|
-
export let value
|
|
4
|
+
import ClsPad from './ClsPad.svelte'
|
|
5
|
+
import GenericMonitor from './GenericMonitor.svelte'
|
|
6
|
+
import { fillWith, rowsForMonitor } from '../utils'
|
|
7
|
+
import { BROWSER } from 'esm-env'
|
|
8
|
+
export let value
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<GenericMonitor {value} {...$$restProps} />
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { BooleanMonitorParams } from '@tweakpane/core'
|
|
3
|
-
export type InternalMonitorBooleanOptions = BooleanMonitorParams
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { BooleanMonitorParams } from '@tweakpane/core'
|
|
3
|
+
export type InternalMonitorBooleanOptions = BooleanMonitorParams
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
/**
|
|
7
7
|
* A `boolean` value to monitor.
|
|
8
8
|
* */
|
|
9
|
-
value: boolean
|
|
9
|
+
value: boolean
|
|
10
10
|
} & Omit<
|
|
11
11
|
{
|
|
12
12
|
/**
|
|
@@ -14,14 +14,14 @@ declare const __propDef: {
|
|
|
14
14
|
* @default `1` \
|
|
15
15
|
* Or `64` if value is `number` and `graph` is `true`.
|
|
16
16
|
*/
|
|
17
|
-
bufferSize?: number
|
|
17
|
+
bufferSize?: number
|
|
18
18
|
/**
|
|
19
19
|
* Time between value samples in milliseconds.
|
|
20
20
|
*
|
|
21
21
|
* Useful when `graph` is true. Defaults to reactive value updates only (`interval={0}`).
|
|
22
22
|
* @default `0`
|
|
23
23
|
*/
|
|
24
|
-
interval?: number
|
|
24
|
+
interval?: number
|
|
25
25
|
/**
|
|
26
26
|
* Number of visible rows of state history.
|
|
27
27
|
*
|
|
@@ -30,31 +30,31 @@ declare const __propDef: {
|
|
|
30
30
|
* @default `1` \
|
|
31
31
|
* Or `3` if value is `string` and `multiline` is `true`.
|
|
32
32
|
*/
|
|
33
|
-
rows?: number
|
|
33
|
+
rows?: number
|
|
34
34
|
} & {
|
|
35
35
|
/**
|
|
36
36
|
* A `boolean` value to monitor.
|
|
37
37
|
*/
|
|
38
|
-
value: boolean
|
|
38
|
+
value: boolean
|
|
39
39
|
} & Omit<
|
|
40
40
|
{
|
|
41
41
|
/**
|
|
42
42
|
* The binding's target object with values to manipulate.
|
|
43
43
|
* @bindable
|
|
44
44
|
*/
|
|
45
|
-
object: import('@tweakpane/core').Bindable & Record<string, boolean
|
|
45
|
+
object: import('@tweakpane/core').Bindable & Record<string, boolean>
|
|
46
46
|
/** The key for the value in the target `object` that the control should manipulate. */
|
|
47
|
-
key: string
|
|
47
|
+
key: string
|
|
48
48
|
/**
|
|
49
49
|
* Prevent interactivity and gray out the control.
|
|
50
50
|
* @default `false`
|
|
51
51
|
*/
|
|
52
|
-
disabled?: boolean
|
|
52
|
+
disabled?: boolean
|
|
53
53
|
/**
|
|
54
54
|
* Text displayed next to control.
|
|
55
55
|
* @default `undefined`
|
|
56
56
|
*/
|
|
57
|
-
label?: string | undefined
|
|
57
|
+
label?: string | undefined
|
|
58
58
|
/**
|
|
59
59
|
* Tweakpane's internal options object.
|
|
60
60
|
*
|
|
@@ -67,7 +67,7 @@ declare const __propDef: {
|
|
|
67
67
|
* Tweakpane UI_.
|
|
68
68
|
* @default `undefined`
|
|
69
69
|
*/
|
|
70
|
-
options?: BooleanMonitorParams | undefined
|
|
70
|
+
options?: BooleanMonitorParams | undefined
|
|
71
71
|
/**
|
|
72
72
|
* Custom color scheme.
|
|
73
73
|
*
|
|
@@ -75,7 +75,7 @@ declare const __propDef: {
|
|
|
75
75
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
76
76
|
* set with `setGlobalDefaultTheme()`.
|
|
77
77
|
*/
|
|
78
|
-
theme?: import('..').Theme | undefined
|
|
78
|
+
theme?: import('..').Theme | undefined
|
|
79
79
|
/**
|
|
80
80
|
* Reference to internal Tweakpane
|
|
81
81
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
@@ -89,7 +89,7 @@ declare const __propDef: {
|
|
|
89
89
|
* @bindable
|
|
90
90
|
* @readonly
|
|
91
91
|
*/
|
|
92
|
-
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
92
|
+
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
93
93
|
/**
|
|
94
94
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
95
95
|
* the `<Binding>`'s containing `<Pane>`.
|
|
@@ -101,22 +101,22 @@ declare const __propDef: {
|
|
|
101
101
|
*
|
|
102
102
|
* @default `undefined`
|
|
103
103
|
*/
|
|
104
|
-
plugin?: import('../utils').Plugin | undefined
|
|
104
|
+
plugin?: import('../utils').Plugin | undefined
|
|
105
105
|
},
|
|
106
106
|
'object' | 'key'
|
|
107
107
|
>,
|
|
108
108
|
'ref' | 'options' | 'plugin' | 'interval'
|
|
109
|
-
|
|
109
|
+
>
|
|
110
110
|
events: {
|
|
111
|
-
[evt: string]: CustomEvent<any
|
|
112
|
-
}
|
|
113
|
-
slots: {}
|
|
114
|
-
exports?: {} | undefined
|
|
115
|
-
bindings?: string | undefined
|
|
116
|
-
}
|
|
117
|
-
export type InternalMonitorBooleanProps = typeof __propDef.props
|
|
118
|
-
export type InternalMonitorBooleanEvents = typeof __propDef.events
|
|
119
|
-
export type InternalMonitorBooleanSlots = typeof __propDef.slots
|
|
111
|
+
[evt: string]: CustomEvent<any>
|
|
112
|
+
}
|
|
113
|
+
slots: {}
|
|
114
|
+
exports?: {} | undefined
|
|
115
|
+
bindings?: string | undefined
|
|
116
|
+
}
|
|
117
|
+
export type InternalMonitorBooleanProps = typeof __propDef.props
|
|
118
|
+
export type InternalMonitorBooleanEvents = typeof __propDef.events
|
|
119
|
+
export type InternalMonitorBooleanSlots = typeof __propDef.slots
|
|
120
120
|
/**
|
|
121
121
|
* This component is for internal use only.
|
|
122
122
|
*
|
|
@@ -137,13 +137,13 @@ export type InternalMonitorBooleanSlots = typeof __propDef.slots;
|
|
|
137
137
|
* @example
|
|
138
138
|
* ```svelte
|
|
139
139
|
* <script lang="ts">
|
|
140
|
-
* import { InternalMonitorBoolean } from 'svelte-tweakpane-ui'
|
|
140
|
+
* import { InternalMonitorBoolean } from 'svelte-tweakpane-ui'
|
|
141
141
|
*
|
|
142
|
-
* let booleanToMonitor = false
|
|
142
|
+
* let booleanToMonitor = false
|
|
143
143
|
*
|
|
144
144
|
* setInterval(() => {
|
|
145
|
-
* booleanToMonitor = Math.random() > 0.5
|
|
146
|
-
* }, 100)
|
|
145
|
+
* booleanToMonitor = Math.random() > 0.5
|
|
146
|
+
* }, 100)
|
|
147
147
|
* </script>
|
|
148
148
|
*
|
|
149
149
|
* <InternalMonitorBoolean value={booleanToMonitor} bufferSize={5} rows={5} />
|
|
@@ -157,4 +157,4 @@ export default class InternalMonitorBoolean extends SvelteComponent<
|
|
|
157
157
|
InternalMonitorBooleanEvents,
|
|
158
158
|
InternalMonitorBooleanSlots
|
|
159
159
|
> {}
|
|
160
|
-
export {}
|
|
160
|
+
export {}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import ClsPad from './ClsPad.svelte'
|
|
5
|
-
import GenericMonitor from './GenericMonitor.svelte'
|
|
6
|
-
import { fillWith, rowsForMonitor } from '../utils.js'
|
|
7
|
-
import { BROWSER } from 'esm-env'
|
|
8
|
-
export let value
|
|
9
|
-
export let graph = void 0
|
|
10
|
-
export let format = void 0
|
|
11
|
-
export let max = void 0
|
|
12
|
-
export let min = void 0
|
|
13
|
-
let options
|
|
14
|
-
let formatProxy = format
|
|
15
|
-
$: formatProxy !== format && (formatProxy = format)
|
|
4
|
+
import ClsPad from './ClsPad.svelte'
|
|
5
|
+
import GenericMonitor from './GenericMonitor.svelte'
|
|
6
|
+
import { fillWith, rowsForMonitor } from '../utils.js'
|
|
7
|
+
import { BROWSER } from 'esm-env'
|
|
8
|
+
export let value
|
|
9
|
+
export let graph = void 0
|
|
10
|
+
export let format = void 0
|
|
11
|
+
export let max = void 0
|
|
12
|
+
export let min = void 0
|
|
13
|
+
let options
|
|
14
|
+
let formatProxy = format
|
|
15
|
+
$: formatProxy !== format && (formatProxy = format)
|
|
16
16
|
$: options = {
|
|
17
17
|
min,
|
|
18
18
|
max,
|
|
19
19
|
format: formatProxy,
|
|
20
20
|
readonly: true,
|
|
21
|
-
view: graph ? 'graph' : void 0
|
|
22
|
-
}
|
|
21
|
+
view: graph ? 'graph' : void 0,
|
|
22
|
+
}
|
|
23
23
|
</script>
|
|
24
24
|
|
|
25
25
|
<GenericMonitor {value} {options} {...$$restProps} />
|