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
|
@@ -2,13 +2,78 @@ import { SvelteComponent } from 'svelte'
|
|
|
2
2
|
import type { BooleanMonitorParams } from '@tweakpane/core'
|
|
3
3
|
export type InternalMonitorBooleanOptions = BooleanMonitorParams
|
|
4
4
|
declare const __propDef: {
|
|
5
|
-
props:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
props: Omit<
|
|
6
|
+
Omit<
|
|
7
|
+
{
|
|
8
|
+
/**
|
|
9
|
+
* The binding's target object with values to manipulate.
|
|
10
|
+
* @bindable
|
|
11
|
+
*/
|
|
12
|
+
object: import('@tweakpane/core').Bindable & Record<string, boolean>
|
|
13
|
+
/** The key for the value in the target `object` that the control should manipulate. */
|
|
14
|
+
key: string
|
|
15
|
+
/**
|
|
16
|
+
* Prevent interactivity and gray out the control.
|
|
17
|
+
* @default `false`
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean
|
|
20
|
+
/**
|
|
21
|
+
* Text displayed next to control.
|
|
22
|
+
* @default `undefined`
|
|
23
|
+
*/
|
|
24
|
+
label?: string | undefined
|
|
25
|
+
/**
|
|
26
|
+
* Tweakpane's internal options object.
|
|
27
|
+
*
|
|
28
|
+
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
29
|
+
*
|
|
30
|
+
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
31
|
+
*
|
|
32
|
+
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
33
|
+
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
34
|
+
* Tweakpane UI_.
|
|
35
|
+
* @default `undefined`
|
|
36
|
+
*/
|
|
37
|
+
options?: BooleanMonitorParams | undefined
|
|
38
|
+
/**
|
|
39
|
+
* Custom color scheme.
|
|
40
|
+
* @default `undefined` \
|
|
41
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
42
|
+
* set with `setGlobalDefaultTheme()`.
|
|
43
|
+
*/
|
|
44
|
+
theme?: import('..').Theme | undefined
|
|
45
|
+
/**
|
|
46
|
+
* Reference to internal Tweakpane
|
|
47
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
48
|
+
* this control.
|
|
49
|
+
*
|
|
50
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
51
|
+
* components wrapping `<Binding>`'s functionality.
|
|
52
|
+
*
|
|
53
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
54
|
+
* @bindable
|
|
55
|
+
* @readonly
|
|
56
|
+
*/
|
|
57
|
+
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
58
|
+
/**
|
|
59
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
60
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
61
|
+
*
|
|
62
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
63
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
64
|
+
*
|
|
65
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
66
|
+
* @default `undefined`
|
|
67
|
+
*/
|
|
68
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
69
|
+
},
|
|
70
|
+
'object' | 'key'
|
|
71
|
+
> & {
|
|
72
|
+
/**
|
|
73
|
+
* A `boolean` value to monitor.
|
|
74
|
+
*/
|
|
75
|
+
value: boolean
|
|
76
|
+
} & {
|
|
12
77
|
/**
|
|
13
78
|
* Number of past states to retain.
|
|
14
79
|
* @default `1` \
|
|
@@ -31,82 +96,14 @@ declare const __propDef: {
|
|
|
31
96
|
* Or `3` if value is `string` and `multiline` is `true`.
|
|
32
97
|
*/
|
|
33
98
|
rows?: number
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* A `boolean` value to monitor.
|
|
37
|
-
*/
|
|
38
|
-
value: boolean
|
|
39
|
-
} & Omit<
|
|
40
|
-
{
|
|
41
|
-
/**
|
|
42
|
-
* The binding's target object with values to manipulate.
|
|
43
|
-
* @bindable
|
|
44
|
-
*/
|
|
45
|
-
object: import('@tweakpane/core').Bindable & Record<string, boolean>
|
|
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?: BooleanMonitorParams | 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?: import('./GenericMonitor.svelte').GenericMonitorRef | 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('../utils').Plugin | undefined
|
|
105
|
-
},
|
|
106
|
-
'object' | 'key'
|
|
107
|
-
>,
|
|
99
|
+
},
|
|
108
100
|
'ref' | 'options' | 'plugin' | 'interval'
|
|
109
|
-
>
|
|
101
|
+
> & {
|
|
102
|
+
/**
|
|
103
|
+
* A `boolean` value to monitor.
|
|
104
|
+
*/
|
|
105
|
+
value: boolean
|
|
106
|
+
}
|
|
110
107
|
events: {
|
|
111
108
|
[evt: string]: CustomEvent<any>
|
|
112
109
|
}
|
|
@@ -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
7
|
import { fillWith, rowsForMonitor } from '../utils.js'
|
|
7
|
-
import { BROWSER } from 'esm-env'
|
|
8
8
|
export let value
|
|
9
9
|
export let graph = void 0
|
|
10
10
|
export let format = void 0
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
let formatProxy = format
|
|
15
15
|
$: formatProxy !== format && (formatProxy = format)
|
|
16
16
|
$: options = {
|
|
17
|
-
min,
|
|
18
|
-
max,
|
|
19
17
|
format: formatProxy,
|
|
18
|
+
max,
|
|
19
|
+
min,
|
|
20
20
|
readonly: true,
|
|
21
21
|
view: graph ? 'graph' : void 0,
|
|
22
22
|
}
|
|
@@ -2,34 +2,78 @@ import { SvelteComponent } from 'svelte'
|
|
|
2
2
|
import type { NumberMonitorParams } from '@tweakpane/core'
|
|
3
3
|
export type InternalMonitorNumberOptions = NumberMonitorParams
|
|
4
4
|
declare const __propDef: {
|
|
5
|
-
props:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
5
|
+
props: Omit<
|
|
6
|
+
Omit<
|
|
7
|
+
{
|
|
8
|
+
/**
|
|
9
|
+
* The binding's target object with values to manipulate.
|
|
10
|
+
* @bindable
|
|
11
|
+
*/
|
|
12
|
+
object: import('@tweakpane/core').Bindable & Record<string, number>
|
|
13
|
+
/** The key for the value in the target `object` that the control should manipulate. */
|
|
14
|
+
key: string
|
|
15
|
+
/**
|
|
16
|
+
* Prevent interactivity and gray out the control.
|
|
17
|
+
* @default `false`
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean
|
|
20
|
+
/**
|
|
21
|
+
* Text displayed next to control.
|
|
22
|
+
* @default `undefined`
|
|
23
|
+
*/
|
|
24
|
+
label?: string | undefined
|
|
25
|
+
/**
|
|
26
|
+
* Tweakpane's internal options object.
|
|
27
|
+
*
|
|
28
|
+
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
29
|
+
*
|
|
30
|
+
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
31
|
+
*
|
|
32
|
+
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
33
|
+
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
34
|
+
* Tweakpane UI_.
|
|
35
|
+
* @default `undefined`
|
|
36
|
+
*/
|
|
37
|
+
options?: NumberMonitorParams | undefined
|
|
38
|
+
/**
|
|
39
|
+
* Custom color scheme.
|
|
40
|
+
* @default `undefined` \
|
|
41
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
42
|
+
* set with `setGlobalDefaultTheme()`.
|
|
43
|
+
*/
|
|
44
|
+
theme?: import('..').Theme | undefined
|
|
45
|
+
/**
|
|
46
|
+
* Reference to internal Tweakpane
|
|
47
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
48
|
+
* this control.
|
|
49
|
+
*
|
|
50
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
51
|
+
* components wrapping `<Binding>`'s functionality.
|
|
52
|
+
*
|
|
53
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
54
|
+
* @bindable
|
|
55
|
+
* @readonly
|
|
56
|
+
*/
|
|
57
|
+
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
58
|
+
/**
|
|
59
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
60
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
61
|
+
*
|
|
62
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
63
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
64
|
+
*
|
|
65
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
66
|
+
* @default `undefined`
|
|
67
|
+
*/
|
|
68
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
69
|
+
},
|
|
70
|
+
'object' | 'key'
|
|
71
|
+
> & {
|
|
72
|
+
/**
|
|
73
|
+
* A `number` value to monitor.
|
|
74
|
+
*/
|
|
75
|
+
value: number
|
|
76
|
+
} & {
|
|
33
77
|
/**
|
|
34
78
|
* Number of past states to retain.
|
|
35
79
|
* @default `1` \
|
|
@@ -52,82 +96,35 @@ declare const __propDef: {
|
|
|
52
96
|
* Or `3` if value is `string` and `multiline` is `true`.
|
|
53
97
|
*/
|
|
54
98
|
rows?: number
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* A `number` value to monitor.
|
|
58
|
-
*/
|
|
59
|
-
value: number
|
|
60
|
-
} & Omit<
|
|
61
|
-
{
|
|
62
|
-
/**
|
|
63
|
-
* The binding's target object with values to manipulate.
|
|
64
|
-
* @bindable
|
|
65
|
-
*/
|
|
66
|
-
object: import('@tweakpane/core').Bindable & Record<string, number>
|
|
67
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
68
|
-
key: string
|
|
69
|
-
/**
|
|
70
|
-
* Prevent interactivity and gray out the control.
|
|
71
|
-
* @default `false`
|
|
72
|
-
*/
|
|
73
|
-
disabled?: boolean
|
|
74
|
-
/**
|
|
75
|
-
* Text displayed next to control.
|
|
76
|
-
* @default `undefined`
|
|
77
|
-
*/
|
|
78
|
-
label?: string | undefined
|
|
79
|
-
/**
|
|
80
|
-
* Tweakpane's internal options object.
|
|
81
|
-
*
|
|
82
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
83
|
-
*
|
|
84
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
85
|
-
*
|
|
86
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
87
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
88
|
-
* Tweakpane UI_.
|
|
89
|
-
* @default `undefined`
|
|
90
|
-
*/
|
|
91
|
-
options?: NumberMonitorParams | undefined
|
|
92
|
-
/**
|
|
93
|
-
* Custom color scheme.
|
|
94
|
-
*
|
|
95
|
-
* @default `undefined` \
|
|
96
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
97
|
-
* set with `setGlobalDefaultTheme()`.
|
|
98
|
-
*/
|
|
99
|
-
theme?: import('..').Theme | undefined
|
|
100
|
-
/**
|
|
101
|
-
* Reference to internal Tweakpane
|
|
102
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
103
|
-
* this control.
|
|
104
|
-
*
|
|
105
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
106
|
-
* components wrapping `<Binding>`'s functionality.
|
|
107
|
-
*
|
|
108
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
109
|
-
*
|
|
110
|
-
* @bindable
|
|
111
|
-
* @readonly
|
|
112
|
-
*/
|
|
113
|
-
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
114
|
-
/**
|
|
115
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
116
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
117
|
-
*
|
|
118
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
119
|
-
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
120
|
-
*
|
|
121
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
122
|
-
*
|
|
123
|
-
* @default `undefined`
|
|
124
|
-
*/
|
|
125
|
-
plugin?: import('../utils.js').Plugin | undefined
|
|
126
|
-
},
|
|
127
|
-
'object' | 'key'
|
|
128
|
-
>,
|
|
99
|
+
},
|
|
129
100
|
'ref' | 'options' | 'plugin'
|
|
130
|
-
>
|
|
101
|
+
> & {
|
|
102
|
+
/**
|
|
103
|
+
* A `number` value to monitor.
|
|
104
|
+
*/
|
|
105
|
+
value: number
|
|
106
|
+
/**
|
|
107
|
+
* Minimum bound when `graph` is true.
|
|
108
|
+
* @default `0`
|
|
109
|
+
*/
|
|
110
|
+
min?: number
|
|
111
|
+
/**
|
|
112
|
+
* Maximum bound when `graph` is true.
|
|
113
|
+
* @default `100`
|
|
114
|
+
*/
|
|
115
|
+
max?: number
|
|
116
|
+
/**
|
|
117
|
+
* A function to customize the number's string representation (e.g. rounding, etc.).
|
|
118
|
+
* @default `undefined` \
|
|
119
|
+
* Normal `.toString()` formatting.
|
|
120
|
+
*/
|
|
121
|
+
format?: (value: number) => string
|
|
122
|
+
/**
|
|
123
|
+
* Display a graph of the value's changes over time.
|
|
124
|
+
* @default `false`
|
|
125
|
+
*/
|
|
126
|
+
graph?: boolean
|
|
127
|
+
}
|
|
131
128
|
events: {
|
|
132
129
|
[evt: string]: CustomEvent<any>
|
|
133
130
|
}
|
|
@@ -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
|
export let multiline = void 0
|
|
10
10
|
let options
|
|
@@ -2,18 +2,78 @@ import { SvelteComponent } from 'svelte'
|
|
|
2
2
|
import type { StringMonitorParams } from '@tweakpane/core'
|
|
3
3
|
export type InternalMonitorStringOptions = StringMonitorParams
|
|
4
4
|
declare const __propDef: {
|
|
5
|
-
props:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
props: Omit<
|
|
6
|
+
Omit<
|
|
7
|
+
{
|
|
8
|
+
/**
|
|
9
|
+
* The binding's target object with values to manipulate.
|
|
10
|
+
* @bindable
|
|
11
|
+
*/
|
|
12
|
+
object: import('@tweakpane/core').Bindable & Record<string, string>
|
|
13
|
+
/** The key for the value in the target `object` that the control should manipulate. */
|
|
14
|
+
key: string
|
|
15
|
+
/**
|
|
16
|
+
* Prevent interactivity and gray out the control.
|
|
17
|
+
* @default `false`
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean
|
|
20
|
+
/**
|
|
21
|
+
* Text displayed next to control.
|
|
22
|
+
* @default `undefined`
|
|
23
|
+
*/
|
|
24
|
+
label?: string | undefined
|
|
25
|
+
/**
|
|
26
|
+
* Tweakpane's internal options object.
|
|
27
|
+
*
|
|
28
|
+
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
29
|
+
*
|
|
30
|
+
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
31
|
+
*
|
|
32
|
+
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
33
|
+
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
34
|
+
* Tweakpane UI_.
|
|
35
|
+
* @default `undefined`
|
|
36
|
+
*/
|
|
37
|
+
options?: StringMonitorParams | undefined
|
|
38
|
+
/**
|
|
39
|
+
* Custom color scheme.
|
|
40
|
+
* @default `undefined` \
|
|
41
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
42
|
+
* set with `setGlobalDefaultTheme()`.
|
|
43
|
+
*/
|
|
44
|
+
theme?: import('..').Theme | undefined
|
|
45
|
+
/**
|
|
46
|
+
* Reference to internal Tweakpane
|
|
47
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
48
|
+
* this control.
|
|
49
|
+
*
|
|
50
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
51
|
+
* components wrapping `<Binding>`'s functionality.
|
|
52
|
+
*
|
|
53
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
54
|
+
* @bindable
|
|
55
|
+
* @readonly
|
|
56
|
+
*/
|
|
57
|
+
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
58
|
+
/**
|
|
59
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
60
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
61
|
+
*
|
|
62
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
63
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
64
|
+
*
|
|
65
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
66
|
+
* @default `undefined`
|
|
67
|
+
*/
|
|
68
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
69
|
+
},
|
|
70
|
+
'object' | 'key'
|
|
71
|
+
> & {
|
|
72
|
+
/**
|
|
73
|
+
* A `string` value to monitor.
|
|
74
|
+
*/
|
|
75
|
+
value: string
|
|
76
|
+
} & {
|
|
17
77
|
/**
|
|
18
78
|
* Number of past states to retain.
|
|
19
79
|
* @default `1` \
|
|
@@ -36,82 +96,19 @@ declare const __propDef: {
|
|
|
36
96
|
* Or `3` if value is `string` and `multiline` is `true`.
|
|
37
97
|
*/
|
|
38
98
|
rows?: number
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* A `string` value to monitor.
|
|
42
|
-
*/
|
|
43
|
-
value: string
|
|
44
|
-
} & Omit<
|
|
45
|
-
{
|
|
46
|
-
/**
|
|
47
|
-
* The binding's target object with values to manipulate.
|
|
48
|
-
* @bindable
|
|
49
|
-
*/
|
|
50
|
-
object: import('@tweakpane/core').Bindable & Record<string, string>
|
|
51
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
52
|
-
key: string
|
|
53
|
-
/**
|
|
54
|
-
* Prevent interactivity and gray out the control.
|
|
55
|
-
* @default `false`
|
|
56
|
-
*/
|
|
57
|
-
disabled?: boolean
|
|
58
|
-
/**
|
|
59
|
-
* Text displayed next to control.
|
|
60
|
-
* @default `undefined`
|
|
61
|
-
*/
|
|
62
|
-
label?: string | undefined
|
|
63
|
-
/**
|
|
64
|
-
* Tweakpane's internal options object.
|
|
65
|
-
*
|
|
66
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
67
|
-
*
|
|
68
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
69
|
-
*
|
|
70
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
71
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
72
|
-
* Tweakpane UI_.
|
|
73
|
-
* @default `undefined`
|
|
74
|
-
*/
|
|
75
|
-
options?: StringMonitorParams | undefined
|
|
76
|
-
/**
|
|
77
|
-
* Custom color scheme.
|
|
78
|
-
*
|
|
79
|
-
* @default `undefined` \
|
|
80
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
81
|
-
* set with `setGlobalDefaultTheme()`.
|
|
82
|
-
*/
|
|
83
|
-
theme?: import('..').Theme | undefined
|
|
84
|
-
/**
|
|
85
|
-
* Reference to internal Tweakpane
|
|
86
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
87
|
-
* this control.
|
|
88
|
-
*
|
|
89
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
90
|
-
* components wrapping `<Binding>`'s functionality.
|
|
91
|
-
*
|
|
92
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
93
|
-
*
|
|
94
|
-
* @bindable
|
|
95
|
-
* @readonly
|
|
96
|
-
*/
|
|
97
|
-
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
98
|
-
/**
|
|
99
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
100
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
101
|
-
*
|
|
102
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
103
|
-
* components wrapping `<Binding>`'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('../utils').Plugin | undefined
|
|
110
|
-
},
|
|
111
|
-
'object' | 'key'
|
|
112
|
-
>,
|
|
99
|
+
},
|
|
113
100
|
'ref' | 'options' | 'plugin' | 'interval'
|
|
114
|
-
>
|
|
101
|
+
> & {
|
|
102
|
+
/**
|
|
103
|
+
* A `string` value to monitor.
|
|
104
|
+
*/
|
|
105
|
+
value: string
|
|
106
|
+
/**
|
|
107
|
+
* Display multiline strings.
|
|
108
|
+
* @default `false`
|
|
109
|
+
*/
|
|
110
|
+
multiline?: boolean
|
|
111
|
+
}
|
|
115
112
|
events: {
|
|
116
113
|
[evt: string]: CustomEvent<any>
|
|
117
114
|
}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script>
|
|
9
|
-
import GenericPane from './GenericPane.svelte'
|
|
10
|
-
import { clamp, getSwatchButton, pickerIsOpen, removeKeys } from '../utils.js'
|
|
11
9
|
import { onDestroy, onMount } from 'svelte'
|
|
12
10
|
import { persisted } from 'svelte-persisted-store'
|
|
11
|
+
import GenericPane from './GenericPane.svelte'
|
|
12
|
+
import { clamp, getSwatchButton, pickerIsOpen, removeKeys } from '../utils.js'
|
|
13
13
|
const titlebarWindowShadeSingleClick = true
|
|
14
14
|
const titlebarWindowShadeDoubleClick = false
|
|
15
15
|
const pointerCancelOnWindowBlur = true
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
positionStore = persisted(`${localStorePrefix}${localStoreId}`, {
|
|
24
24
|
x: 0,
|
|
25
25
|
y: 0,
|
|
26
|
-
expanded: true,
|
|
27
26
|
width: 350,
|
|
27
|
+
expanded: true,
|
|
28
28
|
})
|
|
29
29
|
}
|
|
30
30
|
export let expanded = $positionStore?.expanded ?? true
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
positionStore = persisted(`${localStorePrefix}${localStoreId}`, {
|
|
77
77
|
x,
|
|
78
78
|
y,
|
|
79
|
-
expanded,
|
|
80
79
|
width,
|
|
80
|
+
expanded,
|
|
81
81
|
})
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
y !== void 0 &&
|
|
316
316
|
width !== void 0 &&
|
|
317
317
|
expanded !== void 0 &&
|
|
318
|
-
positionStore?.set({ x, y,
|
|
318
|
+
positionStore?.set({ x, y, width, expanded })
|
|
319
319
|
$: {
|
|
320
320
|
if (containerElement) {
|
|
321
321
|
if (scale === void 0 || scale === 1) {
|