svelte-tweakpane-ui 1.6.0-preview.3 → 1.6.0-preview.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 +5 -5
- package/dist/control/Button.svelte.d.ts +5 -5
- package/dist/control/ButtonGrid.svelte +5 -5
- package/dist/control/ButtonGrid.svelte.d.ts +32 -34
- package/dist/control/Checkbox.svelte.d.ts +9 -13
- package/dist/control/Color.svelte +3 -4
- package/dist/control/Color.svelte.d.ts +94 -99
- package/dist/control/ColorPlus.svelte +2 -2
- package/dist/control/ColorPlus.svelte.d.ts +95 -99
- package/dist/control/CubicBezier.svelte +5 -5
- package/dist/control/CubicBezier.svelte.d.ts +43 -47
- package/dist/control/File.svelte +3 -3
- package/dist/control/File.svelte.d.ts +34 -38
- package/dist/control/Image.svelte +3 -3
- package/dist/control/Image.svelte.d.ts +31 -35
- package/dist/control/IntervalSlider.svelte +1 -1
- package/dist/control/IntervalSlider.svelte.d.ts +103 -108
- package/dist/control/List.svelte +5 -5
- package/dist/control/List.svelte.d.ts +24 -28
- package/dist/control/Point.svelte +9 -9
- package/dist/control/Point.svelte.d.ts +142 -147
- package/dist/control/RadioGrid.svelte +3 -4
- package/dist/control/RadioGrid.svelte.d.ts +60 -64
- package/dist/control/Ring.svelte +1 -1
- package/dist/control/Ring.svelte.d.ts +105 -109
- package/dist/control/RotationEuler.svelte +5 -5
- package/dist/control/RotationEuler.svelte.d.ts +110 -115
- package/dist/control/RotationQuaternion.svelte +5 -5
- package/dist/control/RotationQuaternion.svelte.d.ts +108 -113
- package/dist/control/Slider.svelte +1 -1
- package/dist/control/Slider.svelte.d.ts +95 -99
- package/dist/control/Stepper.svelte +1 -1
- package/dist/control/Stepper.svelte.d.ts +95 -99
- package/dist/control/Text.svelte +1 -1
- package/dist/control/Text.svelte.d.ts +25 -29
- package/dist/control/Textarea.svelte +2 -2
- package/dist/control/Textarea.svelte.d.ts +34 -38
- package/dist/control/Wheel.svelte +1 -1
- package/dist/control/Wheel.svelte.d.ts +101 -104
- package/dist/core/Binding.svelte +5 -5
- package/dist/core/Binding.svelte.d.ts +9 -14
- package/dist/core/Blade.svelte +3 -3
- package/dist/core/Blade.svelte.d.ts +5 -7
- package/dist/core/Folder.svelte +4 -4
- package/dist/core/Folder.svelte.d.ts +5 -5
- package/dist/core/Pane.svelte +3 -3
- package/dist/core/Pane.svelte.d.ts +217 -221
- package/dist/core/Separator.svelte +1 -1
- package/dist/core/Separator.svelte.d.ts +0 -2
- package/dist/core/TabGroup.svelte +4 -4
- package/dist/core/TabGroup.svelte.d.ts +3 -3
- package/dist/core/TabPage.svelte +4 -4
- package/dist/core/TabPage.svelte.d.ts +4 -4
- package/dist/extra/AutoObject.svelte +5 -5
- package/dist/extra/AutoObject.svelte.d.ts +4 -5
- package/dist/extra/AutoValue.svelte.d.ts +9 -13
- package/dist/extra/Element.svelte +1 -1
- package/dist/extra/Element.svelte.d.ts +23 -25
- package/dist/internal/ClsPad.svelte +3 -2
- package/dist/internal/GenericBinding.svelte +2 -2
- package/dist/internal/GenericBinding.svelte.d.ts +8 -11
- package/dist/internal/GenericBladeFolding.svelte +1 -1
- package/dist/internal/GenericBladeFolding.svelte.d.ts +25 -27
- package/dist/internal/GenericInput.svelte.d.ts +8 -11
- package/dist/internal/GenericInputFolding.svelte.d.ts +78 -81
- package/dist/internal/GenericMonitor.svelte.d.ts +76 -79
- package/dist/internal/GenericPane.svelte +4 -4
- package/dist/internal/GenericPane.svelte.d.ts +6 -7
- package/dist/internal/GenericSlider.svelte +1 -1
- package/dist/internal/GenericSlider.svelte.d.ts +100 -101
- package/dist/internal/InternalMonitorBoolean.svelte +2 -2
- package/dist/internal/InternalMonitorBoolean.svelte.d.ts +79 -82
- package/dist/internal/InternalMonitorNumber.svelte +3 -3
- package/dist/internal/InternalMonitorNumber.svelte.d.ts +100 -103
- package/dist/internal/InternalMonitorString.svelte +2 -2
- package/dist/internal/InternalMonitorString.svelte.d.ts +84 -87
- package/dist/internal/InternalPaneDraggable.svelte +5 -5
- package/dist/internal/InternalPaneDraggable.svelte.d.ts +86 -88
- package/dist/internal/InternalPaneFixed.svelte.d.ts +26 -27
- package/dist/internal/InternalPaneInline.svelte +1 -1
- package/dist/internal/InternalPaneInline.svelte.d.ts +13 -14
- package/dist/monitor/FpsGraph.svelte +5 -5
- package/dist/monitor/FpsGraph.svelte.d.ts +45 -47
- package/dist/monitor/Monitor.svelte +1 -1
- package/dist/monitor/Monitor.svelte.d.ts +316 -331
- package/dist/monitor/Profiler.svelte +3 -3
- package/dist/monitor/Profiler.svelte.d.ts +51 -59
- package/dist/monitor/WaveformMonitor.svelte +5 -5
- package/dist/monitor/WaveformMonitor.svelte.d.ts +102 -105
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +0 -1
- package/dist/utils.d.ts +5 -5
- package/dist/utils.js +2 -4
- package/license.txt +1 -1
- package/package.json +27 -32
|
@@ -7,19 +7,90 @@ declare class __sveltets_Render<
|
|
|
7
7
|
U extends GenericMonitorOptions,
|
|
8
8
|
V extends GenericMonitorRef = GenericMonitorRef,
|
|
9
9
|
> {
|
|
10
|
-
props():
|
|
10
|
+
props(): Omit<
|
|
11
|
+
{
|
|
12
|
+
/**
|
|
13
|
+
* The binding's target object with values to manipulate.
|
|
14
|
+
* @bindable
|
|
15
|
+
*/
|
|
16
|
+
object: import('@tweakpane/core').Bindable & Record<string, T>
|
|
17
|
+
/** The key for the value in the target `object` that the control should manipulate. */
|
|
18
|
+
key: string
|
|
19
|
+
/**
|
|
20
|
+
* Prevent interactivity and gray out the control.
|
|
21
|
+
* @default `false`
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean
|
|
24
|
+
/**
|
|
25
|
+
* Text displayed next to control.
|
|
26
|
+
* @default `undefined`
|
|
27
|
+
*/
|
|
28
|
+
label?: string | undefined
|
|
29
|
+
/**
|
|
30
|
+
* Tweakpane's internal options object.
|
|
31
|
+
*
|
|
32
|
+
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
33
|
+
*
|
|
34
|
+
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
35
|
+
*
|
|
36
|
+
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
37
|
+
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
38
|
+
* Tweakpane UI_.
|
|
39
|
+
* @default `undefined`
|
|
40
|
+
*/
|
|
41
|
+
options?: U | undefined
|
|
42
|
+
/**
|
|
43
|
+
* Custom color scheme.
|
|
44
|
+
* @default `undefined` \
|
|
45
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
46
|
+
* set with `setGlobalDefaultTheme()`.
|
|
47
|
+
*/
|
|
48
|
+
theme?: import('..').Theme | undefined
|
|
49
|
+
/**
|
|
50
|
+
* Reference to internal Tweakpane
|
|
51
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
52
|
+
* this control.
|
|
53
|
+
*
|
|
54
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
55
|
+
* components wrapping `<Binding>`'s functionality.
|
|
56
|
+
*
|
|
57
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
58
|
+
* @bindable
|
|
59
|
+
* @readonly
|
|
60
|
+
*/
|
|
61
|
+
ref?: V | undefined
|
|
62
|
+
/**
|
|
63
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
64
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
65
|
+
*
|
|
66
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
67
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
68
|
+
*
|
|
69
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
70
|
+
* @default `undefined`
|
|
71
|
+
*/
|
|
72
|
+
plugin?: import('..').Plugin | undefined
|
|
73
|
+
},
|
|
74
|
+
'object' | 'key'
|
|
75
|
+
> & {
|
|
76
|
+
/**
|
|
77
|
+
* The value to control.
|
|
78
|
+
* @bindable
|
|
79
|
+
*/
|
|
80
|
+
value: T
|
|
81
|
+
} & {
|
|
11
82
|
/**
|
|
12
83
|
* Number of past states to retain.
|
|
13
84
|
* @default `1` \
|
|
14
85
|
* Or `64` if value is `number` and `graph` is `true`.
|
|
15
|
-
|
|
86
|
+
*/
|
|
16
87
|
bufferSize?: number
|
|
17
88
|
/**
|
|
18
89
|
* Time between value samples in milliseconds.
|
|
19
90
|
*
|
|
20
91
|
* Useful when `graph` is true. Defaults to reactive value updates only (`interval={0}`).
|
|
21
92
|
* @default `0`
|
|
22
|
-
|
|
93
|
+
*/
|
|
23
94
|
interval?: number
|
|
24
95
|
/**
|
|
25
96
|
* Number of visible rows of state history.
|
|
@@ -28,83 +99,9 @@ declare class __sveltets_Render<
|
|
|
28
99
|
* row count.
|
|
29
100
|
* @default `1` \
|
|
30
101
|
* Or `3` if value is `string` and `multiline` is `true`.
|
|
31
|
-
* */
|
|
32
|
-
rows?: number
|
|
33
|
-
} & {
|
|
34
|
-
/**
|
|
35
|
-
* The value to control.
|
|
36
|
-
* @bindable
|
|
37
102
|
*/
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
{
|
|
41
|
-
/**
|
|
42
|
-
* The binding's target object with values to manipulate.
|
|
43
|
-
* @bindable
|
|
44
|
-
*/
|
|
45
|
-
object: import('@tweakpane/core').Bindable & Record<string, T>
|
|
46
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
47
|
-
key: string
|
|
48
|
-
/**
|
|
49
|
-
* Prevent interactivity and gray out the control.
|
|
50
|
-
* @default `false`
|
|
51
|
-
*/
|
|
52
|
-
disabled?: boolean
|
|
53
|
-
/**
|
|
54
|
-
* Text displayed next to control.
|
|
55
|
-
* @default `undefined`
|
|
56
|
-
*/
|
|
57
|
-
label?: string | undefined
|
|
58
|
-
/**
|
|
59
|
-
* Tweakpane's internal options object.
|
|
60
|
-
*
|
|
61
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
62
|
-
*
|
|
63
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
64
|
-
*
|
|
65
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
66
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
67
|
-
* Tweakpane UI_.
|
|
68
|
-
* @default `undefined`
|
|
69
|
-
*/
|
|
70
|
-
options?: U | undefined
|
|
71
|
-
/**
|
|
72
|
-
* Custom color scheme.
|
|
73
|
-
*
|
|
74
|
-
* @default `undefined` \
|
|
75
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
76
|
-
* set with `setGlobalDefaultTheme()`.
|
|
77
|
-
*/
|
|
78
|
-
theme?: import('..').Theme | undefined
|
|
79
|
-
/**
|
|
80
|
-
* Reference to internal Tweakpane
|
|
81
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
82
|
-
* this control.
|
|
83
|
-
*
|
|
84
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
85
|
-
* components wrapping `<Binding>`'s functionality.
|
|
86
|
-
*
|
|
87
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
88
|
-
*
|
|
89
|
-
* @bindable
|
|
90
|
-
* @readonly
|
|
91
|
-
*/
|
|
92
|
-
ref?: V | undefined
|
|
93
|
-
/**
|
|
94
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
95
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
96
|
-
*
|
|
97
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
98
|
-
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
99
|
-
*
|
|
100
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
101
|
-
*
|
|
102
|
-
* @default `undefined`
|
|
103
|
-
*/
|
|
104
|
-
plugin?: import('..').Plugin | undefined
|
|
105
|
-
},
|
|
106
|
-
'object' | 'key'
|
|
107
|
-
>
|
|
103
|
+
rows?: number
|
|
104
|
+
}
|
|
108
105
|
events(): {} & {
|
|
109
106
|
[evt: string]: CustomEvent<any>
|
|
110
107
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import ClsPad from './ClsPad.svelte'
|
|
3
|
-
import { applyTheme } from '../theme.js'
|
|
4
|
-
import { updateCollapsibility } from '../utils.js'
|
|
5
2
|
import { BROWSER } from 'esm-env'
|
|
6
3
|
import { getContext, onDestroy, setContext, tick } from 'svelte'
|
|
7
4
|
import { writable } from 'svelte/store'
|
|
8
5
|
import { Pane as TpPane } from 'tweakpane'
|
|
6
|
+
import ClsPad from './ClsPad.svelte'
|
|
7
|
+
import { applyTheme } from '../theme.js'
|
|
8
|
+
import { updateCollapsibility } from '../utils.js'
|
|
9
9
|
export let title = void 0
|
|
10
10
|
export let userExpandable = true
|
|
11
11
|
export let expanded = true
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
})
|
|
67
67
|
}
|
|
68
|
-
$: tpPane?.element
|
|
68
|
+
$: tpPane?.element?.classList.add('svelte-tweakpane-ui')
|
|
69
69
|
$: tpPane && setScale(scale)
|
|
70
70
|
$: tpPane && updateCollapsibility(userExpandable, tpPane.element, 'tp-rotv_b', 'tp-rotv_m')
|
|
71
71
|
$: tpPane && title !== void 0 && (tpPane.title = title.length > 0 ? title : ' ')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import { type Theme } from '../theme.js'
|
|
3
2
|
import { Pane as TpPane } from 'tweakpane'
|
|
3
|
+
import { type Theme } from '../theme.js'
|
|
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
|
-
|
|
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
|
-
|
|
17
|
+
*/ userExpandable?: boolean
|
|
18
18
|
/**
|
|
19
19
|
* Expand or collapse the pane into its title bar.
|
|
20
20
|
* @default `true`
|
|
21
21
|
* @bindable
|
|
22
|
-
|
|
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
|
-
|
|
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
|
*
|
|
@@ -62,10 +62,9 @@ declare const __propDef: {
|
|
|
62
62
|
* Note that the `Pane` type for this property comes from the core Tweakpane library.
|
|
63
63
|
* Creating an alias is suggested to avoid confusion with the _Svelte Tweakpane UI_ `Pane`
|
|
64
64
|
* component: e.g. `import { type Pane as TpPane } from 'tweakpane'`
|
|
65
|
-
*
|
|
66
65
|
* @bindable
|
|
67
66
|
* @readonly
|
|
68
|
-
|
|
67
|
+
*/ tpPane?: TpPane | undefined
|
|
69
68
|
}
|
|
70
69
|
events: {
|
|
71
70
|
[evt: string]: CustomEvent<any>
|
|
@@ -1,129 +1,128 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type {
|
|
3
|
+
NumberInputParams as GenericSliderOptions,
|
|
4
|
+
SliderInputBindingApi as GenericSliderRef,
|
|
5
|
+
} from 'tweakpane'
|
|
2
6
|
import type { IntervalSliderValue } from '../control/IntervalSlider.svelte'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
declare class __sveltets_Render<T extends IntervalSliderValue | number> {
|
|
8
|
+
props(): Omit<
|
|
9
|
+
{
|
|
10
|
+
/**
|
|
11
|
+
* The binding's target object with values to manipulate.
|
|
12
|
+
* @bindable
|
|
13
|
+
*/
|
|
14
|
+
object: import('@tweakpane/core').Bindable & Record<string, T>
|
|
15
|
+
/** The key for the value in the target `object` that the control should manipulate. */
|
|
16
|
+
key: string
|
|
17
|
+
/**
|
|
18
|
+
* Prevent interactivity and gray out the control.
|
|
19
|
+
* @default `false`
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean
|
|
22
|
+
/**
|
|
23
|
+
* Text displayed next to control.
|
|
24
|
+
* @default `undefined`
|
|
25
|
+
*/
|
|
26
|
+
label?: string | undefined
|
|
27
|
+
/**
|
|
28
|
+
* Tweakpane's internal options object.
|
|
29
|
+
*
|
|
30
|
+
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
31
|
+
*
|
|
32
|
+
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
33
|
+
*
|
|
34
|
+
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
35
|
+
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
36
|
+
* Tweakpane UI_.
|
|
37
|
+
* @default `undefined`
|
|
38
|
+
*/
|
|
39
|
+
options?: GenericSliderOptions | undefined
|
|
40
|
+
/**
|
|
41
|
+
* Custom color scheme.
|
|
42
|
+
* @default `undefined` \
|
|
43
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
44
|
+
* set with `setGlobalDefaultTheme()`.
|
|
45
|
+
*/
|
|
46
|
+
theme?: import('..').Theme | undefined
|
|
47
|
+
/**
|
|
48
|
+
* Reference to internal Tweakpane
|
|
49
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
50
|
+
* this control.
|
|
51
|
+
*
|
|
52
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
53
|
+
* components wrapping `<Binding>`'s functionality.
|
|
54
|
+
*
|
|
55
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
56
|
+
* @bindable
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
59
|
+
ref?: GenericSliderRef | undefined
|
|
60
|
+
/**
|
|
61
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
62
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
63
|
+
*
|
|
64
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
65
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
66
|
+
*
|
|
67
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
68
|
+
* @default `undefined`
|
|
69
|
+
*/
|
|
70
|
+
plugin?: import('..').Plugin | undefined
|
|
71
|
+
},
|
|
72
|
+
'object' | 'key'
|
|
73
|
+
> & {
|
|
7
74
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
min?: number
|
|
14
|
-
/**
|
|
15
|
-
* Maximum value.
|
|
16
|
-
*
|
|
17
|
-
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
18
|
-
* @default `undefined`
|
|
19
|
-
* */
|
|
20
|
-
max?: number
|
|
75
|
+
* The value to control.
|
|
76
|
+
* @bindable
|
|
77
|
+
*/
|
|
78
|
+
value: T
|
|
79
|
+
} & {
|
|
21
80
|
/**
|
|
22
81
|
* A function to customize the point value's string representation (e.g. rounding, etc.).
|
|
23
82
|
* @default `undefined` \
|
|
24
83
|
* Normal `.toString()` formatting.
|
|
25
|
-
|
|
84
|
+
*/
|
|
26
85
|
format?: ((value: number) => string) | undefined
|
|
27
86
|
/**
|
|
28
87
|
* The unit scale for key-based input for all dimensions (e.g. the up and down arrow keys).
|
|
29
88
|
* @default `1` \
|
|
30
89
|
* Or `stepValue` if defined.
|
|
31
|
-
|
|
90
|
+
*/
|
|
32
91
|
keyScale?: number
|
|
92
|
+
/**
|
|
93
|
+
* Maximum value.
|
|
94
|
+
*
|
|
95
|
+
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
96
|
+
* @default `undefined`
|
|
97
|
+
*/
|
|
98
|
+
max?: number
|
|
99
|
+
/**
|
|
100
|
+
* Minimum value.
|
|
101
|
+
*
|
|
102
|
+
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
103
|
+
* @default `undefined`
|
|
104
|
+
*/
|
|
105
|
+
min?: number
|
|
33
106
|
/**
|
|
34
107
|
* The unit scale for pointer-based input for all dimensions.
|
|
35
108
|
* @default `undefined` \
|
|
36
109
|
* [Dynamic based on magnitude of
|
|
37
110
|
* `value`](https://github.com/cocopon/tweakpane/blob/66dfbea04bfe9b7f031673c955ceda1f92356e75/packages/core/src/common/number/util.ts#L54).
|
|
38
|
-
|
|
111
|
+
*/
|
|
39
112
|
pointerScale?: number
|
|
40
113
|
/**
|
|
41
114
|
* The minimum step interval.
|
|
42
115
|
* @default `undefined` \
|
|
43
116
|
* No step constraint.
|
|
44
|
-
|
|
117
|
+
*/
|
|
45
118
|
step?: number
|
|
46
119
|
/**
|
|
47
120
|
* When `true`, expand the width of the control at the expense of the numeric input
|
|
48
121
|
* field.
|
|
49
122
|
* @default `false`
|
|
50
|
-
* */
|
|
51
|
-
wide?: boolean
|
|
52
|
-
} & {
|
|
53
|
-
/**
|
|
54
|
-
* The value to control.
|
|
55
|
-
* @bindable
|
|
56
123
|
*/
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
{
|
|
60
|
-
/**
|
|
61
|
-
* The binding's target object with values to manipulate.
|
|
62
|
-
* @bindable
|
|
63
|
-
*/
|
|
64
|
-
object: import('@tweakpane/core').Bindable & Record<string, T>
|
|
65
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
66
|
-
key: string
|
|
67
|
-
/**
|
|
68
|
-
* Prevent interactivity and gray out the control.
|
|
69
|
-
* @default `false`
|
|
70
|
-
*/
|
|
71
|
-
disabled?: boolean
|
|
72
|
-
/**
|
|
73
|
-
* Text displayed next to control.
|
|
74
|
-
* @default `undefined`
|
|
75
|
-
*/
|
|
76
|
-
label?: string | undefined
|
|
77
|
-
/**
|
|
78
|
-
* Tweakpane's internal options object.
|
|
79
|
-
*
|
|
80
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
81
|
-
*
|
|
82
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
83
|
-
*
|
|
84
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
85
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
86
|
-
* Tweakpane UI_.
|
|
87
|
-
* @default `undefined`
|
|
88
|
-
*/
|
|
89
|
-
options?: GenericSliderOptions | undefined
|
|
90
|
-
/**
|
|
91
|
-
* Custom color scheme.
|
|
92
|
-
*
|
|
93
|
-
* @default `undefined` \
|
|
94
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
95
|
-
* set with `setGlobalDefaultTheme()`.
|
|
96
|
-
*/
|
|
97
|
-
theme?: import('..').Theme | undefined
|
|
98
|
-
/**
|
|
99
|
-
* Reference to internal Tweakpane
|
|
100
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
101
|
-
* this control.
|
|
102
|
-
*
|
|
103
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
104
|
-
* components wrapping `<Binding>`'s functionality.
|
|
105
|
-
*
|
|
106
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
107
|
-
*
|
|
108
|
-
* @bindable
|
|
109
|
-
* @readonly
|
|
110
|
-
*/
|
|
111
|
-
ref?: GenericSliderRef | undefined
|
|
112
|
-
/**
|
|
113
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
114
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
115
|
-
*
|
|
116
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
117
|
-
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
118
|
-
*
|
|
119
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
120
|
-
*
|
|
121
|
-
* @default `undefined`
|
|
122
|
-
*/
|
|
123
|
-
plugin?: import('..').Plugin | undefined
|
|
124
|
-
},
|
|
125
|
-
'object' | 'key'
|
|
126
|
-
>
|
|
124
|
+
wide?: boolean
|
|
125
|
+
}
|
|
127
126
|
events(): {
|
|
128
127
|
change: import('..').BindingChangeEvent
|
|
129
128
|
} & {
|
|
@@ -131,13 +130,13 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
131
130
|
}
|
|
132
131
|
slots(): {}
|
|
133
132
|
}
|
|
134
|
-
export type GenericSliderProps<T extends
|
|
133
|
+
export type GenericSliderProps<T extends IntervalSliderValue | number> = ReturnType<
|
|
135
134
|
__sveltets_Render<T>['props']
|
|
136
135
|
>
|
|
137
|
-
export type GenericSliderEvents<T extends
|
|
136
|
+
export type GenericSliderEvents<T extends IntervalSliderValue | number> = ReturnType<
|
|
138
137
|
__sveltets_Render<T>['events']
|
|
139
138
|
>
|
|
140
|
-
export type GenericSliderSlots<T extends
|
|
139
|
+
export type GenericSliderSlots<T extends IntervalSliderValue | number> = ReturnType<
|
|
141
140
|
__sveltets_Render<T>['slots']
|
|
142
141
|
>
|
|
143
142
|
/**
|
|
@@ -150,7 +149,7 @@ export type GenericSliderSlots<T extends number | IntervalSliderValue> = ReturnT
|
|
|
150
149
|
* @sourceLink
|
|
151
150
|
* [GenericSlider.svelte](https://github.com/kitschpatrol/svelte-tweakpane-ui/blob/main/src/lib/internal/GenericSlider.svelte)
|
|
152
151
|
*/
|
|
153
|
-
export default class GenericSlider<T extends
|
|
152
|
+
export default class GenericSlider<T extends IntervalSliderValue | number> extends SvelteComponent<
|
|
154
153
|
GenericSliderProps<T>,
|
|
155
154
|
GenericSliderEvents<T>,
|
|
156
155
|
GenericSliderSlots<T>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
+
import { BROWSER } from 'esm-env'
|
|
4
5
|
import ClsPad from './ClsPad.svelte'
|
|
5
6
|
import GenericMonitor from './GenericMonitor.svelte'
|
|
6
|
-
import { fillWith, rowsForMonitor } from '../utils'
|
|
7
|
-
import { BROWSER } from 'esm-env'
|
|
7
|
+
import { fillWith, rowsForMonitor } from '../utils.js'
|
|
8
8
|
export let value
|
|
9
9
|
</script>
|
|
10
10
|
|