svelte-tweakpane-ui 1.5.11 → 1.5.13
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/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 +26 -31
|
@@ -2,34 +2,79 @@ import { SvelteComponent } from 'svelte'
|
|
|
2
2
|
import type { ValueChangeEvent } from '../utils.js'
|
|
3
3
|
export type WheelChangeEvent = ValueChangeEvent<number>
|
|
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
|
-
|
|
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?: import('tweakpane').NumberInputParams | 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('tweakpane').SliderInputBindingApi | 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
|
+
> & {
|
|
26
72
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
30
|
-
* @default `undefined`
|
|
73
|
+
* A `number` value to control.
|
|
74
|
+
* @bindable
|
|
31
75
|
*/
|
|
32
|
-
|
|
76
|
+
value: number
|
|
77
|
+
} & {
|
|
33
78
|
/**
|
|
34
79
|
* A function to customize the point value's string representation (e.g. rounding, etc.).
|
|
35
80
|
* @default `undefined` \
|
|
@@ -42,6 +87,20 @@ declare const __propDef: {
|
|
|
42
87
|
* Or `stepValue` if defined.
|
|
43
88
|
*/
|
|
44
89
|
keyScale?: number
|
|
90
|
+
/**
|
|
91
|
+
* Maximum value.
|
|
92
|
+
*
|
|
93
|
+
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
94
|
+
* @default `undefined`
|
|
95
|
+
*/
|
|
96
|
+
max?: number
|
|
97
|
+
/**
|
|
98
|
+
* Minimum value.
|
|
99
|
+
*
|
|
100
|
+
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
101
|
+
* @default `undefined`
|
|
102
|
+
*/
|
|
103
|
+
min?: number
|
|
45
104
|
/**
|
|
46
105
|
* The unit scale for pointer-based input for all dimensions.
|
|
47
106
|
* @default `undefined` \
|
|
@@ -61,83 +120,22 @@ declare const __propDef: {
|
|
|
61
120
|
* @default `false`
|
|
62
121
|
*/
|
|
63
122
|
wide?: boolean
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* A `number` value to control.
|
|
67
|
-
* @bindable
|
|
68
|
-
*/
|
|
69
|
-
value: number
|
|
70
|
-
} & Omit<
|
|
71
|
-
{
|
|
72
|
-
/**
|
|
73
|
-
* The binding's target object with values to manipulate.
|
|
74
|
-
* @bindable
|
|
75
|
-
*/
|
|
76
|
-
object: import('@tweakpane/core').Bindable & Record<string, number>
|
|
77
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
78
|
-
key: string
|
|
79
|
-
/**
|
|
80
|
-
* Prevent interactivity and gray out the control.
|
|
81
|
-
* @default `false`
|
|
82
|
-
*/
|
|
83
|
-
disabled?: boolean
|
|
84
|
-
/**
|
|
85
|
-
* Text displayed next to control.
|
|
86
|
-
* @default `undefined`
|
|
87
|
-
*/
|
|
88
|
-
label?: string | undefined
|
|
89
|
-
/**
|
|
90
|
-
* Tweakpane's internal options object.
|
|
91
|
-
*
|
|
92
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
93
|
-
*
|
|
94
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
95
|
-
*
|
|
96
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
97
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
98
|
-
* Tweakpane UI_.
|
|
99
|
-
* @default `undefined`
|
|
100
|
-
*/
|
|
101
|
-
options?: import('tweakpane').NumberInputParams | undefined
|
|
102
|
-
/**
|
|
103
|
-
* Custom color scheme.
|
|
104
|
-
*
|
|
105
|
-
* @default `undefined` \
|
|
106
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
107
|
-
* set with `setGlobalDefaultTheme()`.
|
|
108
|
-
*/
|
|
109
|
-
theme?: import('..').Theme | undefined
|
|
110
|
-
/**
|
|
111
|
-
* Reference to internal Tweakpane
|
|
112
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
113
|
-
* this control.
|
|
114
|
-
*
|
|
115
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
116
|
-
* components wrapping `<Binding>`'s functionality.
|
|
117
|
-
*
|
|
118
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
119
|
-
*
|
|
120
|
-
* @bindable
|
|
121
|
-
* @readonly
|
|
122
|
-
*/
|
|
123
|
-
ref?: import('tweakpane').SliderInputBindingApi | undefined
|
|
124
|
-
/**
|
|
125
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
126
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
127
|
-
*
|
|
128
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
129
|
-
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
130
|
-
*
|
|
131
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
132
|
-
*
|
|
133
|
-
* @default `undefined`
|
|
134
|
-
*/
|
|
135
|
-
plugin?: import('../utils.js').Plugin | undefined
|
|
136
|
-
},
|
|
137
|
-
'object' | 'key'
|
|
138
|
-
>,
|
|
123
|
+
},
|
|
139
124
|
'ref' | 'options' | 'plugin'
|
|
140
|
-
>
|
|
125
|
+
> & {
|
|
126
|
+
/**
|
|
127
|
+
* A `number` value to control.
|
|
128
|
+
* @bindable
|
|
129
|
+
*/
|
|
130
|
+
value: number
|
|
131
|
+
/**
|
|
132
|
+
* The amount of the value to change per pixel of movement.
|
|
133
|
+
* @default `undefined` \
|
|
134
|
+
* [Dynamic based on magnitude of
|
|
135
|
+
* `value`](https://github.com/cocopon/tweakpane/blob/66dfbea04bfe9b7f031673c955ceda1f92356e75/packages/core/src/common/number/util.ts#L54).
|
|
136
|
+
*/
|
|
137
|
+
amount?: number
|
|
138
|
+
}
|
|
141
139
|
slots: {}
|
|
142
140
|
events: {
|
|
143
141
|
/**
|
|
@@ -147,10 +145,9 @@ declare const __propDef: {
|
|
|
147
145
|
*
|
|
148
146
|
* The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
|
|
149
147
|
* and changes resulting from programmatic manipulation of the `value` (`external`).
|
|
150
|
-
*
|
|
151
148
|
* @extends ValueChangeEvent
|
|
152
149
|
* @event
|
|
153
|
-
|
|
150
|
+
*/
|
|
154
151
|
change: WheelChangeEvent
|
|
155
152
|
}
|
|
156
153
|
}
|
package/dist/core/Binding.svelte
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script generics="T extends BindingObject, U extends BindingOptions, V extends BindingRef">
|
|
4
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
5
|
-
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
6
|
-
import { enforceReadonly, getElementIndex, isRootPane } from '../utils.js'
|
|
7
4
|
import { BROWSER, DEV } from 'esm-env'
|
|
8
|
-
import copy from 'fast-copy'
|
|
5
|
+
import { copy } from 'fast-copy'
|
|
9
6
|
import { shallowEqual } from 'fast-equals'
|
|
10
7
|
import { createEventDispatcher, getContext, onDestroy, onMount } from 'svelte'
|
|
8
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
9
|
+
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
10
|
+
import { enforceReadonly, getElementIndex, isRootPane } from '../utils.js'
|
|
11
11
|
export let object
|
|
12
12
|
export let key
|
|
13
13
|
export let disabled = false
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
$: $parentStore !== void 0 && onBoundValueChange(object)
|
|
95
95
|
$: theme &&
|
|
96
96
|
$parentStore !== void 0 &&
|
|
97
|
-
(userCreatedPane
|
|
97
|
+
(userCreatedPane ?? !isRootPane($parentStore)) &&
|
|
98
98
|
console.warn(
|
|
99
99
|
'Set theme on the <Pane> component, not on its children! (Check nested <Binding> components for a theme prop.)',
|
|
100
100
|
)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { BindingObject } from '../utils'
|
|
3
|
-
import type { ValueChangeEvent } from '../utils.js'
|
|
4
2
|
import type { BindingApi, BindingParams } from '@tweakpane/core'
|
|
3
|
+
import type { BindingObject, ValueChangeEvent } from '../utils.js'
|
|
5
4
|
export type BindingOptions = BindingParams
|
|
6
5
|
export type BindingRef = BindingApi
|
|
7
6
|
export type BindingChangeEvent = ValueChangeEvent<BindingObject>
|
|
@@ -16,16 +15,16 @@ declare class __sveltets_Render<
|
|
|
16
15
|
/**
|
|
17
16
|
* The binding's target object with values to manipulate.
|
|
18
17
|
* @bindable
|
|
19
|
-
|
|
18
|
+
*/ object: T
|
|
20
19
|
/** The key for the value in the target `object` that the control should manipulate. */ key: keyof T
|
|
21
20
|
/**
|
|
22
21
|
* Prevent interactivity and gray out the control.
|
|
23
22
|
* @default `false`
|
|
24
|
-
|
|
23
|
+
*/ disabled?: boolean
|
|
25
24
|
/**
|
|
26
25
|
* Text displayed next to control.
|
|
27
26
|
* @default `undefined`
|
|
28
|
-
|
|
27
|
+
*/ label?: string | undefined
|
|
29
28
|
/**
|
|
30
29
|
* Tweakpane's internal options object.
|
|
31
30
|
*
|
|
@@ -37,14 +36,13 @@ declare class __sveltets_Render<
|
|
|
37
36
|
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
38
37
|
* Tweakpane UI_.
|
|
39
38
|
* @default `undefined`
|
|
40
|
-
|
|
39
|
+
*/ options?: U | undefined
|
|
41
40
|
/**
|
|
42
41
|
* Custom color scheme.
|
|
43
|
-
*
|
|
44
42
|
* @default `undefined` \
|
|
45
43
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
46
44
|
* set with `setGlobalDefaultTheme()`.
|
|
47
|
-
|
|
45
|
+
*/ theme?: Theme | undefined
|
|
48
46
|
/**
|
|
49
47
|
* Reference to internal Tweakpane
|
|
50
48
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
@@ -54,10 +52,9 @@ declare class __sveltets_Render<
|
|
|
54
52
|
* components wrapping `<Binding>`'s functionality.
|
|
55
53
|
*
|
|
56
54
|
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
57
|
-
*
|
|
58
55
|
* @bindable
|
|
59
56
|
* @readonly
|
|
60
|
-
|
|
57
|
+
*/ ref?: V | undefined
|
|
61
58
|
/**
|
|
62
59
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
63
60
|
* the `<Binding>`'s containing `<Pane>`.
|
|
@@ -66,9 +63,8 @@ declare class __sveltets_Render<
|
|
|
66
63
|
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
67
64
|
*
|
|
68
65
|
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
69
|
-
*
|
|
70
66
|
* @default `undefined`
|
|
71
|
-
|
|
67
|
+
*/ plugin?: Plugin | undefined
|
|
72
68
|
}
|
|
73
69
|
events(): {
|
|
74
70
|
/**
|
|
@@ -78,10 +74,9 @@ declare class __sveltets_Render<
|
|
|
78
74
|
*
|
|
79
75
|
* The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
|
|
80
76
|
* and changes resulting from programmatic manipulation of the `object` (`external`).
|
|
81
|
-
*
|
|
82
77
|
* @extends ValueChangeEvent
|
|
83
78
|
* @event
|
|
84
|
-
|
|
79
|
+
*/
|
|
85
80
|
change: BindingChangeEvent
|
|
86
81
|
}
|
|
87
82
|
slots(): {}
|
package/dist/core/Blade.svelte
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script generics="U extends BladeOptions, V extends BladeRef">
|
|
4
|
+
import { BROWSER, DEV } from 'esm-env'
|
|
5
|
+
import { getContext, onDestroy, onMount } from 'svelte'
|
|
4
6
|
import ClsPad from '../internal/ClsPad.svelte'
|
|
5
7
|
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
6
8
|
import { enforceReadonly, getElementIndex, isRootPane } from '../utils.js'
|
|
7
|
-
import { BROWSER, DEV } from 'esm-env'
|
|
8
|
-
import { getContext, onDestroy, onMount } from 'svelte'
|
|
9
9
|
export let options
|
|
10
10
|
export let disabled = false
|
|
11
11
|
export let theme = void 0
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
$: _ref && (_ref.disabled = disabled)
|
|
42
42
|
$: theme &&
|
|
43
43
|
$parentStore &&
|
|
44
|
-
(userCreatedPane
|
|
44
|
+
(userCreatedPane ?? !isRootPane($parentStore)) &&
|
|
45
45
|
console.warn(
|
|
46
46
|
'Set theme on the <Pane> component, not on its children! (Check nested <Blade> components for a theme prop.)',
|
|
47
47
|
)
|
|
@@ -11,17 +11,17 @@ declare class __sveltets_Render<U extends BladeOptions, V extends BladeRef> {
|
|
|
11
11
|
* Blade configuration exposing Tweakpane's internal
|
|
12
12
|
* [`BladeParams`](https://tweakpane.github.io/docs/api/interfaces/BaseBladeParams.html).
|
|
13
13
|
*
|
|
14
|
-
|
|
14
|
+
*/ options: U
|
|
15
15
|
/**
|
|
16
16
|
* Prevent interactivity and gray out the control.
|
|
17
17
|
* @default `false`
|
|
18
|
-
|
|
18
|
+
*/ disabled?: boolean
|
|
19
19
|
/**
|
|
20
20
|
* Custom color scheme.
|
|
21
21
|
* @default `undefined` \
|
|
22
22
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
23
23
|
* set with `setGlobalDefaultTheme()`.
|
|
24
|
-
|
|
24
|
+
*/ theme?: Theme | undefined
|
|
25
25
|
/**
|
|
26
26
|
* Reference to internal Tweakpane
|
|
27
27
|
* [`BladeApi`](https://tweakpane.github.io/docs/api/classes/BladeApi.html) for this blade.
|
|
@@ -30,10 +30,9 @@ declare class __sveltets_Render<U extends BladeOptions, V extends BladeRef> {
|
|
|
30
30
|
* components wrapping `<Blade>`'s functionality.
|
|
31
31
|
*
|
|
32
32
|
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
33
|
-
*
|
|
34
33
|
* @bindable
|
|
35
34
|
* @readonly
|
|
36
|
-
|
|
35
|
+
*/ ref?: V | undefined
|
|
37
36
|
/**
|
|
38
37
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
39
38
|
* the `<Blade>`'s containing `<Pane>`.
|
|
@@ -42,9 +41,8 @@ declare class __sveltets_Render<U extends BladeOptions, V extends BladeRef> {
|
|
|
42
41
|
* components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
|
|
43
42
|
*
|
|
44
43
|
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
45
|
-
*
|
|
46
44
|
* @default `undefined`
|
|
47
|
-
|
|
45
|
+
*/ plugin?: Plugin | undefined
|
|
48
46
|
}
|
|
49
47
|
events(): {} & {
|
|
50
48
|
[evt: string]: CustomEvent<any>
|
package/dist/core/Folder.svelte
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
3
|
-
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
4
|
-
import { getElementIndex, isRootPane, updateCollapsibility } from '../utils.js'
|
|
5
2
|
import { BROWSER } from 'esm-env'
|
|
6
3
|
import { getContext, onDestroy, onMount, setContext } from 'svelte'
|
|
7
4
|
import { writable } from 'svelte/store'
|
|
5
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
6
|
+
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
7
|
+
import { getElementIndex, isRootPane, updateCollapsibility } from '../utils.js'
|
|
8
8
|
export let title = 'Folder'
|
|
9
9
|
export let disabled = false
|
|
10
10
|
export let expanded = true
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
$: folderRef && expanded !== void 0 && (folderRef.expanded = expanded)
|
|
43
43
|
$: theme &&
|
|
44
44
|
$parentStore &&
|
|
45
|
-
(userCreatedPane
|
|
45
|
+
(userCreatedPane ?? !isRootPane($parentStore)) &&
|
|
46
46
|
console.warn(
|
|
47
47
|
'Set theme on the <Pane> component, not on its children! (Check nested <Folder> components for a theme prop.)',
|
|
48
48
|
)
|
|
@@ -8,28 +8,28 @@ declare const __propDef: {
|
|
|
8
8
|
* Unlike a `<Pane>`, a `<Folder>`'s title bar is always visible and the title is always shown.
|
|
9
9
|
* It can be set to an empty string if you want an unadorned title bar.
|
|
10
10
|
* @default `'Folder'`
|
|
11
|
-
|
|
11
|
+
*/ title?: string
|
|
12
12
|
/**
|
|
13
13
|
* Prevent interactivity and gray out the control.
|
|
14
14
|
* @default `false`
|
|
15
|
-
|
|
15
|
+
*/ disabled?: boolean
|
|
16
16
|
/**
|
|
17
17
|
* Expand or collapse folder.
|
|
18
18
|
*
|
|
19
19
|
* When bound it will indicate whether the folder is expanded or collapsed.
|
|
20
20
|
* @default `true`
|
|
21
21
|
* @bindable
|
|
22
|
-
|
|
22
|
+
*/ expanded?: boolean
|
|
23
23
|
/**
|
|
24
24
|
* Allow the user to be collapse and expand the folder by clicking its title bar.
|
|
25
25
|
* @default `true`
|
|
26
|
-
|
|
26
|
+
*/ userExpandable?: boolean
|
|
27
27
|
/**
|
|
28
28
|
* Custom color scheme.
|
|
29
29
|
* @default `undefined` \
|
|
30
30
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
31
31
|
* set with `setGlobalDefaultTheme()`.
|
|
32
|
-
|
|
32
|
+
*/ theme?: Theme | undefined
|
|
33
33
|
}
|
|
34
34
|
events: {
|
|
35
35
|
[evt: string]: CustomEvent<any>
|
package/dist/core/Pane.svelte
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
+
import { BROWSER } from 'esm-env'
|
|
5
|
+
import { beforeUpdate } from 'svelte'
|
|
4
6
|
import InternalPaneDraggable from '../internal/InternalPaneDraggable.svelte'
|
|
5
7
|
import InternalPaneFixed from '../internal/InternalPaneFixed.svelte'
|
|
6
8
|
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
7
|
-
import { removeKeys } from '../utils'
|
|
8
|
-
import { BROWSER } from 'esm-env'
|
|
9
|
-
import { beforeUpdate } from 'svelte'
|
|
9
|
+
import { removeKeys } from '../utils.js'
|
|
10
10
|
export let expanded = void 0
|
|
11
11
|
export let position = void 0
|
|
12
12
|
export let width = void 0
|