svelte-tweakpane-ui 1.6.0-preview.4 → 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 +23 -28
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import Blade from '../core/Blade.svelte'
|
|
5
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
6
|
-
import { fillWith } from '../utils'
|
|
7
4
|
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-profiler'
|
|
8
5
|
import { BROWSER } from 'esm-env'
|
|
9
6
|
import { createEventDispatcher, onDestroy } from 'svelte'
|
|
7
|
+
import Blade from '../core/Blade.svelte'
|
|
8
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
9
|
+
import { fillWith } from '../utils.js'
|
|
10
10
|
function _measure(name, functionToMeasure) {
|
|
11
11
|
profilerBlade?.measure(name, functionToMeasure)
|
|
12
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { Simplify } from '../utils'
|
|
3
2
|
import type { ProfilerBladeMeasureHandler } from '@kitschpatrol/tweakpane-plugin-profiler'
|
|
3
|
+
import type { Simplify } from '../utils.js'
|
|
4
4
|
export type ProfilerCalcMode = 'frame' | 'mean' | 'median'
|
|
5
5
|
export type ProfilerMeasure = (name: string, functionToMeasure: () => void) => void
|
|
6
6
|
export type ProfilerMeasureAsync = (
|
|
@@ -18,7 +18,6 @@ declare const __propDef: {
|
|
|
18
18
|
*
|
|
19
19
|
* If you want to measure something other than execution duration, customize
|
|
20
20
|
* `ProfilerBladeDefaultMeasureHandler`.
|
|
21
|
-
*
|
|
22
21
|
* @example `measure('Hard Work', () => { ... })`;
|
|
23
22
|
* @bindable
|
|
24
23
|
* @readonly
|
|
@@ -28,7 +27,6 @@ declare const __propDef: {
|
|
|
28
27
|
/**
|
|
29
28
|
* Async variation of function handle that wraps another function to measure its execution
|
|
30
29
|
* duration.
|
|
31
|
-
*
|
|
32
30
|
* @example `measureAsync('Hard Work', async () => { ... })`;
|
|
33
31
|
* @bindable
|
|
34
32
|
* @async
|
|
@@ -36,7 +34,52 @@ declare const __propDef: {
|
|
|
36
34
|
* @default `undefined`
|
|
37
35
|
*/
|
|
38
36
|
measureAsync?: ProfilerMeasureAsync | undefined
|
|
39
|
-
} & (
|
|
37
|
+
} & (Omit<
|
|
38
|
+
{
|
|
39
|
+
/**
|
|
40
|
+
* Blade configuration exposing Tweakpane's internal
|
|
41
|
+
* [`BladeParams`](https://tweakpane.github.io/docs/api/interfaces/BaseBladeParams.html).
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
options: ProfilerOptions
|
|
45
|
+
/**
|
|
46
|
+
* Prevent interactivity and gray out the control.
|
|
47
|
+
* @default `false`
|
|
48
|
+
*/
|
|
49
|
+
disabled?: boolean
|
|
50
|
+
/**
|
|
51
|
+
* Custom color scheme.
|
|
52
|
+
* @default `undefined` \
|
|
53
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
54
|
+
* set with `setGlobalDefaultTheme()`.
|
|
55
|
+
*/
|
|
56
|
+
theme?: import('..').Theme | undefined
|
|
57
|
+
/**
|
|
58
|
+
* Reference to internal Tweakpane
|
|
59
|
+
* [`BladeApi`](https://tweakpane.github.io/docs/api/classes/BladeApi.html) for this blade.
|
|
60
|
+
*
|
|
61
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
62
|
+
* components wrapping `<Blade>`'s functionality.
|
|
63
|
+
*
|
|
64
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
65
|
+
* @bindable
|
|
66
|
+
* @readonly
|
|
67
|
+
*/
|
|
68
|
+
ref?: ProfilerRef | undefined
|
|
69
|
+
/**
|
|
70
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
71
|
+
* the `<Blade>`'s containing `<Pane>`.
|
|
72
|
+
*
|
|
73
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
74
|
+
* components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
|
|
75
|
+
*
|
|
76
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
77
|
+
* @default `undefined`
|
|
78
|
+
*/
|
|
79
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
80
|
+
},
|
|
81
|
+
'ref' | 'options' | 'plugin'
|
|
82
|
+
> & {
|
|
40
83
|
/**
|
|
41
84
|
* Number of duration samples from which to calculate the delta value when `calcMode` is
|
|
42
85
|
* `'mean'` or `'median'`.
|
|
@@ -57,7 +100,7 @@ declare const __propDef: {
|
|
|
57
100
|
* Possibly useful if you're using a custom `ProfilerBladeDefaultMeasureHandler` and are
|
|
58
101
|
* measuring something other than time.
|
|
59
102
|
* @default `'ms'`
|
|
60
|
-
|
|
103
|
+
*/
|
|
61
104
|
deltaUnit?: string
|
|
62
105
|
/**
|
|
63
106
|
* Precision of the delta values shown in the control.
|
|
@@ -75,16 +118,14 @@ declare const __propDef: {
|
|
|
75
118
|
/**
|
|
76
119
|
* Text displayed next to the profiler visualization.
|
|
77
120
|
* @default `undefined`
|
|
78
|
-
|
|
121
|
+
*/
|
|
79
122
|
label?: string
|
|
80
123
|
/**
|
|
81
124
|
* Function handle that wraps another function to measure its execution duration.
|
|
82
125
|
*
|
|
83
126
|
* If you want to measure something other than execution duration, customize
|
|
84
127
|
* `ProfilerBladeDefaultMeasureHandler`.
|
|
85
|
-
*
|
|
86
128
|
* @example `measure('Hard Work', () => { ... })`;
|
|
87
|
-
*
|
|
88
129
|
* @bindable
|
|
89
130
|
* @readonly
|
|
90
131
|
* @default `undefined`
|
|
@@ -93,9 +134,7 @@ declare const __propDef: {
|
|
|
93
134
|
/**
|
|
94
135
|
* Async variation of function handle that wraps another function to measure its execution
|
|
95
136
|
* duration.
|
|
96
|
-
*
|
|
97
137
|
* @example `measureAsync('Hard Work', async () => { ... })`;
|
|
98
|
-
*
|
|
99
138
|
* @bindable
|
|
100
139
|
* @async
|
|
101
140
|
* @readonly
|
|
@@ -116,54 +155,7 @@ declare const __propDef: {
|
|
|
116
155
|
* 60fps.
|
|
117
156
|
*/
|
|
118
157
|
targetDelta?: number
|
|
119
|
-
}
|
|
120
|
-
{
|
|
121
|
-
/**
|
|
122
|
-
* Blade configuration exposing Tweakpane's internal
|
|
123
|
-
* [`BladeParams`](https://tweakpane.github.io/docs/api/interfaces/BaseBladeParams.html).
|
|
124
|
-
*
|
|
125
|
-
*/
|
|
126
|
-
options: ProfilerOptions
|
|
127
|
-
/**
|
|
128
|
-
* Prevent interactivity and gray out the control.
|
|
129
|
-
* @default `false`
|
|
130
|
-
*/
|
|
131
|
-
disabled?: boolean
|
|
132
|
-
/**
|
|
133
|
-
* Custom color scheme.
|
|
134
|
-
* @default `undefined` \
|
|
135
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
136
|
-
* set with `setGlobalDefaultTheme()`.
|
|
137
|
-
*/
|
|
138
|
-
theme?: import('..').Theme | undefined
|
|
139
|
-
/**
|
|
140
|
-
* Reference to internal Tweakpane
|
|
141
|
-
* [`BladeApi`](https://tweakpane.github.io/docs/api/classes/BladeApi.html) for this blade.
|
|
142
|
-
*
|
|
143
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
144
|
-
* components wrapping `<Blade>`'s functionality.
|
|
145
|
-
*
|
|
146
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
147
|
-
*
|
|
148
|
-
* @bindable
|
|
149
|
-
* @readonly
|
|
150
|
-
*/
|
|
151
|
-
ref?: ProfilerRef | undefined
|
|
152
|
-
/**
|
|
153
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
154
|
-
* the `<Blade>`'s containing `<Pane>`.
|
|
155
|
-
*
|
|
156
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
157
|
-
* components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
|
|
158
|
-
*
|
|
159
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
160
|
-
*
|
|
161
|
-
* @default `undefined`
|
|
162
|
-
*/
|
|
163
|
-
plugin?: import('../utils').Plugin | undefined
|
|
164
|
-
},
|
|
165
|
-
'ref' | 'options' | 'plugin'
|
|
166
|
-
>)
|
|
158
|
+
})
|
|
167
159
|
slots: {}
|
|
168
160
|
events: {
|
|
169
161
|
/**
|
|
@@ -172,7 +164,7 @@ declare const __propDef: {
|
|
|
172
164
|
* Note that the values described in the `ProfilerChangeEvent` type are available on the
|
|
173
165
|
* `event.detail` parameter.
|
|
174
166
|
* @event
|
|
175
|
-
|
|
167
|
+
*/
|
|
176
168
|
change: ProfilerChangeEvent
|
|
177
169
|
}
|
|
178
170
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
5
|
-
import GenericMonitor from '../internal/GenericMonitor.svelte'
|
|
6
|
-
import { fillWith } from '../utils'
|
|
7
4
|
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-waveform'
|
|
8
5
|
import { BROWSER } from 'esm-env'
|
|
6
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
7
|
+
import GenericMonitor from '../internal/GenericMonitor.svelte'
|
|
8
|
+
import { fillWith } from '../utils.js'
|
|
9
9
|
export let value
|
|
10
10
|
export let max = void 0
|
|
11
11
|
export let min = void 0
|
|
12
12
|
export let lineStyle = void 0
|
|
13
13
|
let options
|
|
14
14
|
$: options = {
|
|
15
|
-
min,
|
|
16
|
-
max,
|
|
17
15
|
lineStyle,
|
|
16
|
+
max,
|
|
17
|
+
min,
|
|
18
18
|
readonly: true,
|
|
19
19
|
view: 'waveform',
|
|
20
20
|
}
|
|
@@ -2,29 +2,85 @@ import { SvelteComponent } from 'svelte'
|
|
|
2
2
|
export type WaveformMonitorValue = number[] | Uint8Array | Uint16Array | Uint32Array
|
|
3
3
|
import type { WaveformStyles as WaveformMonitorLineStyle } from '@kitschpatrol/tweakpane-plugin-waveform/dist/types/view/waveform.js'
|
|
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
|
-
|
|
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, WaveformMonitorValue>
|
|
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?:
|
|
38
|
+
| (import('@tweakpane/core').BaseMonitorParams & {
|
|
39
|
+
min?: number
|
|
40
|
+
max?: number
|
|
41
|
+
lineStyle?: WaveformMonitorLineStyle
|
|
42
|
+
})
|
|
43
|
+
| undefined
|
|
44
|
+
/**
|
|
45
|
+
* Custom color scheme.
|
|
46
|
+
* @default `undefined` \
|
|
47
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
48
|
+
* set with `setGlobalDefaultTheme()`.
|
|
49
|
+
*/
|
|
50
|
+
theme?: import('..').Theme | undefined
|
|
51
|
+
/**
|
|
52
|
+
* Reference to internal Tweakpane
|
|
53
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
54
|
+
* this control.
|
|
55
|
+
*
|
|
56
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
57
|
+
* components wrapping `<Binding>`'s functionality.
|
|
58
|
+
*
|
|
59
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
60
|
+
* @bindable
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
ref?: import('../internal/GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
64
|
+
/**
|
|
65
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
66
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
67
|
+
*
|
|
68
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
69
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
70
|
+
*
|
|
71
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
72
|
+
* @default `undefined`
|
|
73
|
+
*/
|
|
74
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
75
|
+
},
|
|
76
|
+
'object' | 'key'
|
|
77
|
+
> & {
|
|
78
|
+
/**
|
|
79
|
+
* Waveform values.
|
|
80
|
+
* @bindable
|
|
81
|
+
*/
|
|
82
|
+
value: WaveformMonitorValue
|
|
83
|
+
} & {
|
|
28
84
|
/**
|
|
29
85
|
* Number of past states to retain.
|
|
30
86
|
* @default `1` \
|
|
@@ -47,89 +103,30 @@ declare const __propDef: {
|
|
|
47
103
|
* Or `3` if value is `string` and `multiline` is `true`.
|
|
48
104
|
*/
|
|
49
105
|
rows?: number
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Waveform values.
|
|
53
|
-
* @bindable
|
|
54
|
-
*/
|
|
55
|
-
value: WaveformMonitorValue
|
|
56
|
-
} & Omit<
|
|
57
|
-
{
|
|
58
|
-
/**
|
|
59
|
-
* The binding's target object with values to manipulate.
|
|
60
|
-
* @bindable
|
|
61
|
-
*/
|
|
62
|
-
object: import('@tweakpane/core').Bindable & Record<string, WaveformMonitorValue>
|
|
63
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
64
|
-
key: string
|
|
65
|
-
/**
|
|
66
|
-
* Prevent interactivity and gray out the control.
|
|
67
|
-
* @default `false`
|
|
68
|
-
*/
|
|
69
|
-
disabled?: boolean
|
|
70
|
-
/**
|
|
71
|
-
* Text displayed next to control.
|
|
72
|
-
* @default `undefined`
|
|
73
|
-
*/
|
|
74
|
-
label?: string | undefined
|
|
75
|
-
/**
|
|
76
|
-
* Tweakpane's internal options object.
|
|
77
|
-
*
|
|
78
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
79
|
-
*
|
|
80
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
81
|
-
*
|
|
82
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
83
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
84
|
-
* Tweakpane UI_.
|
|
85
|
-
* @default `undefined`
|
|
86
|
-
*/
|
|
87
|
-
options?:
|
|
88
|
-
| ({
|
|
89
|
-
min?: number
|
|
90
|
-
max?: number
|
|
91
|
-
lineStyle?: WaveformMonitorLineStyle
|
|
92
|
-
} & import('@tweakpane/core').BaseMonitorParams)
|
|
93
|
-
| undefined
|
|
94
|
-
/**
|
|
95
|
-
* Custom color scheme.
|
|
96
|
-
*
|
|
97
|
-
* @default `undefined` \
|
|
98
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
99
|
-
* set with `setGlobalDefaultTheme()`.
|
|
100
|
-
*/
|
|
101
|
-
theme?: import('..').Theme | undefined
|
|
102
|
-
/**
|
|
103
|
-
* Reference to internal Tweakpane
|
|
104
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
105
|
-
* this control.
|
|
106
|
-
*
|
|
107
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
108
|
-
* components wrapping `<Binding>`'s functionality.
|
|
109
|
-
*
|
|
110
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
111
|
-
*
|
|
112
|
-
* @bindable
|
|
113
|
-
* @readonly
|
|
114
|
-
*/
|
|
115
|
-
ref?: import('../internal/GenericMonitor.svelte').GenericMonitorRef | undefined
|
|
116
|
-
/**
|
|
117
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
118
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
119
|
-
*
|
|
120
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
121
|
-
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
122
|
-
*
|
|
123
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
124
|
-
*
|
|
125
|
-
* @default `undefined`
|
|
126
|
-
*/
|
|
127
|
-
plugin?: import('../utils').Plugin | undefined
|
|
128
|
-
},
|
|
129
|
-
'object' | 'key'
|
|
130
|
-
>,
|
|
106
|
+
},
|
|
131
107
|
'ref' | 'options' | 'plugin'
|
|
132
|
-
>
|
|
108
|
+
> & {
|
|
109
|
+
/**
|
|
110
|
+
* Waveform values.
|
|
111
|
+
* @bindable
|
|
112
|
+
*/
|
|
113
|
+
value: WaveformMonitorValue
|
|
114
|
+
/**
|
|
115
|
+
* Minimum graph bound.
|
|
116
|
+
* @default `0`
|
|
117
|
+
*/
|
|
118
|
+
min?: number
|
|
119
|
+
/**
|
|
120
|
+
* Maximum graph bound.
|
|
121
|
+
* @default `100`
|
|
122
|
+
*/
|
|
123
|
+
max?: number
|
|
124
|
+
/**
|
|
125
|
+
* Line style.
|
|
126
|
+
* @default `'linear''`
|
|
127
|
+
*/
|
|
128
|
+
lineStyle?: 'bezier' | 'linear'
|
|
129
|
+
}
|
|
133
130
|
events: {
|
|
134
131
|
[evt: string]: CustomEvent<any>
|
|
135
132
|
}
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RgbaColorObject, RgbColorObject } from '@tweakpane/core'
|
|
2
|
-
import type { Simplify } from './utils'
|
|
2
|
+
import type { Simplify } from './utils.js'
|
|
3
3
|
export type ThemeColorValue = Simplify<RgbaColorObject | RgbColorObject | string>
|
|
4
4
|
export type Theme = CustomThemeKeys & ThemeKeys
|
|
5
5
|
type ThemeKeys = {
|
package/dist/theme.js
CHANGED
|
@@ -36,7 +36,6 @@ const standard = {
|
|
|
36
36
|
// PluginThumbnailListHeight: '400px', pluginThumbnailListThumbSize: '20px',
|
|
37
37
|
// pluginThumbnailListWidth: '200px'
|
|
38
38
|
}
|
|
39
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
40
39
|
export const keys = Object.keys(standard).reduce((acc, key) => {
|
|
41
40
|
acc[key] = key
|
|
42
41
|
return acc
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Theme } from './theme'
|
|
2
1
|
import type { FolderApi, Pane, TabPageApi } from 'tweakpane'
|
|
2
|
+
import type { Theme } from './theme.js'
|
|
3
3
|
export type Container = FolderApi | Pane | TabPageApi
|
|
4
4
|
export type Simplify<T> = NonNullable<unknown> & {
|
|
5
5
|
[KeyType in keyof T]: T[KeyType]
|
|
@@ -17,16 +17,16 @@ export type Plugin = TpPluginBundle
|
|
|
17
17
|
* The base event type for value change notification events emitted by various controls.
|
|
18
18
|
*/
|
|
19
19
|
export type ValueChangeEvent<V> = CustomEvent<{
|
|
20
|
+
/**
|
|
21
|
+
* A copy of the value at the time of the event.
|
|
22
|
+
*/
|
|
23
|
+
value: V
|
|
20
24
|
/**
|
|
21
25
|
* The origin of the event.
|
|
22
26
|
* Changes resulting from the user's direct manipulation of the control will are marked as `internal`.
|
|
23
27
|
* Changes resulting from manipulation of the bound value from _outside_ the component are marked as `external`.
|
|
24
28
|
*/
|
|
25
29
|
origin: 'external' | 'internal'
|
|
26
|
-
/**
|
|
27
|
-
* A copy of the value at the time of the event.
|
|
28
|
-
*/
|
|
29
|
-
value: V
|
|
30
30
|
}>
|
|
31
31
|
/**
|
|
32
32
|
* Needed to conveniently use $$Events as the single source of truth for component events Performs
|
package/dist/utils.js
CHANGED
|
@@ -65,10 +65,8 @@ export function enforceReadonly(
|
|
|
65
65
|
) {
|
|
66
66
|
allowAssignmentToUndefined ??= false
|
|
67
67
|
if (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(allowAssignmentToUndefined && internal === undefined && external !== undefined)
|
|
71
|
-
)
|
|
68
|
+
external !== internal &&
|
|
69
|
+
(!allowAssignmentToUndefined || internal !== undefined || external === undefined)
|
|
72
70
|
) {
|
|
73
71
|
const componentString = componentName ? `<${componentName}> ` : ''
|
|
74
72
|
const propertyString = propertyName ? `property "${propertyName}" ` : ''
|
package/license.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-tweakpane-ui",
|
|
3
|
-
"version": "1.6.0-preview.
|
|
3
|
+
"version": "1.6.0-preview.5",
|
|
4
4
|
"description": "A Svelte component library wrapping UI elements from Tweakpane, plus some additional functionality for convenience and flexibility.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -198,50 +198,45 @@
|
|
|
198
198
|
"@kitschpatrol/tweakpane-plugin-waveform": "1.0.4-beta.3",
|
|
199
199
|
"@tweakpane/core": "2.0.5",
|
|
200
200
|
"esm-env": "^1.2.2",
|
|
201
|
-
"fast-copy": "^
|
|
202
|
-
"fast-equals": "^
|
|
201
|
+
"fast-copy": "^4.0.2",
|
|
202
|
+
"fast-equals": "^6.0.0",
|
|
203
203
|
"nanoid": "^5.1.6",
|
|
204
204
|
"svelte-persisted-store": "0.12.0",
|
|
205
205
|
"tweakpane": "4.0.5",
|
|
206
|
-
"tweakpane-plugin-color-plus": "0.
|
|
206
|
+
"tweakpane-plugin-color-plus": "0.2.0"
|
|
207
207
|
},
|
|
208
208
|
"devDependencies": {
|
|
209
|
-
"@kitschpatrol/shared-config": "
|
|
210
|
-
"@phenomnomnominal/tsquery": "^6.1.
|
|
209
|
+
"@kitschpatrol/shared-config": "^5.12.0",
|
|
210
|
+
"@phenomnomnominal/tsquery": "^6.1.4",
|
|
211
211
|
"@playwright/test": "^1.57.0",
|
|
212
212
|
"@stkb/rewrap": "^0.1.0",
|
|
213
213
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
214
|
-
"@sveltejs/kit": "^2.
|
|
214
|
+
"@sveltejs/kit": "^2.50.0",
|
|
215
215
|
"@sveltejs/package": "^2.5.7",
|
|
216
216
|
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
|
217
217
|
"@types/eslint": "^8.56.12",
|
|
218
|
-
"@types/
|
|
219
|
-
"
|
|
220
|
-
"
|
|
221
|
-
"
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"publint": "^0.3.15",
|
|
227
|
-
"read-package-up": "^11.0.0",
|
|
218
|
+
"@types/node": "^20.19.30",
|
|
219
|
+
"bumpp": "^10.4.0",
|
|
220
|
+
"glob": "^13.0.0",
|
|
221
|
+
"node-addon-api": "^8.5.0",
|
|
222
|
+
"node-gyp": "^12.1.0",
|
|
223
|
+
"postcss-html": "^1.8.1",
|
|
224
|
+
"publint": "^0.3.16",
|
|
225
|
+
"read-package-up": "^12.0.0",
|
|
228
226
|
"svelte": "^4.2.20",
|
|
229
|
-
"svelte-check": "^4.3.
|
|
230
|
-
"svelte-language-server": "0.17.
|
|
231
|
-
"svelte2tsx": "^0.7.
|
|
232
|
-
"ts-morph": "^
|
|
227
|
+
"svelte-check": "^4.3.5",
|
|
228
|
+
"svelte-language-server": "^0.17.23",
|
|
229
|
+
"svelte2tsx": "^0.7.46",
|
|
230
|
+
"ts-morph": "^27.0.2",
|
|
233
231
|
"tslib": "^2.8.1",
|
|
234
232
|
"tsx": "^4.21.0",
|
|
235
|
-
"typescript": "~5.
|
|
233
|
+
"typescript": "~5.9.3",
|
|
236
234
|
"vite": "^5.4.21",
|
|
237
235
|
"yaml": "^2.8.2"
|
|
238
236
|
},
|
|
239
237
|
"peerDependencies": {
|
|
240
238
|
"svelte": "^4.0.0 || ^5.0.0"
|
|
241
239
|
},
|
|
242
|
-
"publishConfig": {
|
|
243
|
-
"access": "public"
|
|
244
|
-
},
|
|
245
240
|
"scripts": {
|
|
246
241
|
"build": "pnpm run --sequential /^build:/",
|
|
247
242
|
"build:01-sync": "pnpm run check && pnpm run docs-sync",
|
|
@@ -265,13 +260,13 @@
|
|
|
265
260
|
"docs-dev": "pnpm -C ./docs run dev",
|
|
266
261
|
"docs-preview": "pnpm -C ./docs run preview",
|
|
267
262
|
"docs-sync": "pnpm -C ./docs run sync",
|
|
268
|
-
"fix": "
|
|
269
|
-
"format": "
|
|
263
|
+
"fix": "ksc fix",
|
|
264
|
+
"format": "ksc-mdat fix ; ksc-eslint fix ; ksc-prettier fix ; tsx ./scripts/format-embedded-code.ts",
|
|
270
265
|
"kit-build": "pnpm run kit-examples && vite build",
|
|
271
266
|
"kit-dev": " pnpm run kit-examples && vite dev",
|
|
272
267
|
"kit-examples": "tsx ./scripts/generate-kit-examples.ts",
|
|
273
268
|
"kit-preview": "vite preview",
|
|
274
|
-
"lint": "
|
|
269
|
+
"lint": "ksc lint && svelte-check --tsconfig ./tsconfig.build.json",
|
|
275
270
|
"release": "pnpm run build && bumpp --preid preview --commit 'Release: %s' && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish --tag preview --ignore-scripts",
|
|
276
271
|
"rewrap": "rewrap -i --column 100 `find src \\( -name '*.svelte' -o -name '*.ts' -o -name '*.html' \\) -type f | grep -v src/examples`",
|
|
277
272
|
"test": "pnpm run --sequential /^test:/",
|