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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
+
import { BROWSER } from 'esm-env'
|
|
5
|
+
import { createEventDispatcher, getContext, onDestroy, onMount } from 'svelte'
|
|
4
6
|
import ClsPad from '../internal/ClsPad.svelte'
|
|
5
7
|
import InternalPaneInline from '../internal/InternalPaneInline.svelte'
|
|
6
8
|
import { getElementIndex, isRootPane } from '../utils.js'
|
|
7
|
-
import { BROWSER } from 'esm-env'
|
|
8
|
-
import { createEventDispatcher, getContext, onDestroy, onMount } from 'svelte'
|
|
9
9
|
export let title = 'Button'
|
|
10
10
|
export let label = void 0
|
|
11
11
|
export let disabled = false
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
let index
|
|
19
19
|
function create() {
|
|
20
20
|
if (button) button.dispose()
|
|
21
|
-
button = $parentStore
|
|
21
|
+
button = $parentStore?.addButton({
|
|
22
22
|
disabled,
|
|
23
23
|
index,
|
|
24
24
|
label,
|
|
25
25
|
title,
|
|
26
26
|
})
|
|
27
|
-
button
|
|
27
|
+
button?.on('click', () => {
|
|
28
28
|
dispatch('click')
|
|
29
29
|
})
|
|
30
30
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
$: button && (button.disabled = disabled)
|
|
41
41
|
$: theme &&
|
|
42
42
|
$parentStore &&
|
|
43
|
-
(userCreatedPane
|
|
43
|
+
(userCreatedPane ?? !isRootPane($parentStore)) &&
|
|
44
44
|
console.warn(
|
|
45
45
|
'Set theme on the <Pane> component, not on its children! (Check nested <Button> components for a theme prop.)',
|
|
46
46
|
)
|
|
@@ -6,29 +6,29 @@ declare const __propDef: {
|
|
|
6
6
|
/**
|
|
7
7
|
* Text inside of the button.
|
|
8
8
|
* @default `'Button'`
|
|
9
|
-
|
|
9
|
+
*/ title?: string
|
|
10
10
|
/**
|
|
11
11
|
* Text displayed next to the button.
|
|
12
12
|
* @default `undefined`
|
|
13
|
-
|
|
13
|
+
*/ label?: string | undefined
|
|
14
14
|
/**
|
|
15
15
|
* Prevent interactivity and gray out the control.
|
|
16
16
|
* @default `false`
|
|
17
|
-
|
|
17
|
+
*/ disabled?: boolean
|
|
18
18
|
/**
|
|
19
19
|
* Custom color scheme.
|
|
20
20
|
* @default `undefined` \
|
|
21
21
|
* Inherits default Tweakpane theme equivalent to
|
|
22
22
|
* `ThemeUtils.presets.standard`, or the theme set with
|
|
23
23
|
* `setGlobalDefaultTheme()`.)
|
|
24
|
-
|
|
24
|
+
*/ theme?: Theme | undefined
|
|
25
25
|
}
|
|
26
26
|
slots: {}
|
|
27
27
|
events: {
|
|
28
28
|
/**
|
|
29
29
|
* Fires when the button is clicked.
|
|
30
30
|
* @event
|
|
31
|
-
|
|
31
|
+
*/
|
|
32
32
|
click: ButtonClickEvent
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
-
import { getGridDimensions } from '../utils.js'
|
|
8
4
|
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-essentials'
|
|
9
5
|
import { BROWSER } from 'esm-env'
|
|
10
6
|
import { createEventDispatcher } from 'svelte'
|
|
7
|
+
import Blade from '../core/Blade.svelte'
|
|
8
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
9
|
+
import { fillWith } from '../utils.js'
|
|
10
|
+
import { getGridDimensions } from '../utils.js'
|
|
11
11
|
export let columns = void 0
|
|
12
12
|
export let rows = void 0
|
|
13
13
|
export let buttons = []
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
const index = y * gridDimensions.columns + x
|
|
21
21
|
if (index >= 0 && index < buttons.length) {
|
|
22
22
|
return {
|
|
23
|
-
title:
|
|
23
|
+
title: buttons[index],
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
return { title: '' }
|
|
@@ -10,35 +10,7 @@ export type ButtonGridClickEvent = CustomEvent<{
|
|
|
10
10
|
import type { ButtonGridApi as ButtonGridRef } from '@kitschpatrol/tweakpane-plugin-essentials'
|
|
11
11
|
import type { ButtonGridBladeParams as ButtonGridOptions } from '@kitschpatrol/tweakpane-plugin-essentials/dist/types/button-grid/plugin.d.ts'
|
|
12
12
|
declare const __propDef: {
|
|
13
|
-
props:
|
|
14
|
-
/**
|
|
15
|
-
* Array of names, each of which will become the title of a button in the grid.
|
|
16
|
-
* */
|
|
17
|
-
buttons: string[]
|
|
18
|
-
/**
|
|
19
|
-
* Number of columns to arrange the buttons into.
|
|
20
|
-
*
|
|
21
|
-
* Setting `columns` without setting `rows` will lock the column count and allow the row
|
|
22
|
-
* count to change dynamically based on the number of buttons.
|
|
23
|
-
* @default `undefined` \
|
|
24
|
-
* Dynamic based on quantity of `buttons`.
|
|
25
|
-
* */
|
|
26
|
-
columns?: number
|
|
27
|
-
/**
|
|
28
|
-
* Text displayed next to the button grid.
|
|
29
|
-
* @default `undefined`
|
|
30
|
-
*/
|
|
31
|
-
label?: string
|
|
32
|
-
/**
|
|
33
|
-
* Number of rows to arrange the buttons into.
|
|
34
|
-
*
|
|
35
|
-
* Setting `rows` without setting `columns` will lock the column count and allow the column
|
|
36
|
-
* count to change dynamically based on the number of buttons.
|
|
37
|
-
* @default `undefined` \
|
|
38
|
-
* Dynamic based on quantity of `buttons`.
|
|
39
|
-
* */
|
|
40
|
-
rows?: number
|
|
41
|
-
} & Omit<
|
|
13
|
+
props: Omit<
|
|
42
14
|
{
|
|
43
15
|
/**
|
|
44
16
|
* Blade configuration exposing Tweakpane's internal
|
|
@@ -66,7 +38,6 @@ declare const __propDef: {
|
|
|
66
38
|
* components wrapping `<Blade>`'s functionality.
|
|
67
39
|
*
|
|
68
40
|
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
69
|
-
*
|
|
70
41
|
* @bindable
|
|
71
42
|
* @readonly
|
|
72
43
|
*/
|
|
@@ -79,13 +50,40 @@ declare const __propDef: {
|
|
|
79
50
|
* components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
|
|
80
51
|
*
|
|
81
52
|
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
82
|
-
*
|
|
83
53
|
* @default `undefined`
|
|
84
54
|
*/
|
|
85
|
-
plugin?: import('../utils').Plugin | undefined
|
|
55
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
86
56
|
},
|
|
87
57
|
'ref' | 'options' | 'plugin'
|
|
88
|
-
>
|
|
58
|
+
> & {
|
|
59
|
+
/**
|
|
60
|
+
* Array of names, each of which will become the title of a button in the grid.
|
|
61
|
+
*/
|
|
62
|
+
buttons: string[]
|
|
63
|
+
/**
|
|
64
|
+
* Number of columns to arrange the buttons into.
|
|
65
|
+
*
|
|
66
|
+
* Setting `columns` without setting `rows` will lock the column count and allow the row
|
|
67
|
+
* count to change dynamically based on the number of buttons.
|
|
68
|
+
* @default `undefined` \
|
|
69
|
+
* Dynamic based on quantity of `buttons`.
|
|
70
|
+
*/
|
|
71
|
+
columns?: number
|
|
72
|
+
/**
|
|
73
|
+
* Text displayed next to the button grid.
|
|
74
|
+
* @default `undefined`
|
|
75
|
+
*/
|
|
76
|
+
label?: string
|
|
77
|
+
/**
|
|
78
|
+
* Number of rows to arrange the buttons into.
|
|
79
|
+
*
|
|
80
|
+
* Setting `rows` without setting `columns` will lock the column count and allow the column
|
|
81
|
+
* count to change dynamically based on the number of buttons.
|
|
82
|
+
* @default `undefined` \
|
|
83
|
+
* Dynamic based on quantity of `buttons`.
|
|
84
|
+
*/
|
|
85
|
+
rows?: number
|
|
86
|
+
}
|
|
89
87
|
slots: {}
|
|
90
88
|
events: {
|
|
91
89
|
/**
|
|
@@ -94,7 +92,7 @@ declare const __propDef: {
|
|
|
94
92
|
* Note that the values described in the `ButtonGridClickEvent` type are available on the
|
|
95
93
|
* `event.detail` parameter.
|
|
96
94
|
* @event
|
|
97
|
-
|
|
95
|
+
*/
|
|
98
96
|
click: ButtonGridClickEvent
|
|
99
97
|
}
|
|
100
98
|
}
|
|
@@ -3,13 +3,7 @@ import type { ValueChangeEvent } from '../utils.js'
|
|
|
3
3
|
export type CheckboxChangeEvent = ValueChangeEvent<boolean>
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: Omit<
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The value to control.
|
|
9
|
-
* @bindable
|
|
10
|
-
*/
|
|
11
|
-
value: boolean
|
|
12
|
-
} & Omit<
|
|
6
|
+
Omit<
|
|
13
7
|
{
|
|
14
8
|
/**
|
|
15
9
|
* The binding's target object with values to manipulate.
|
|
@@ -43,7 +37,6 @@ declare const __propDef: {
|
|
|
43
37
|
options?: import('@tweakpane/core').BaseInputParams | undefined
|
|
44
38
|
/**
|
|
45
39
|
* Custom color scheme.
|
|
46
|
-
*
|
|
47
40
|
* @default `undefined` \
|
|
48
41
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
49
42
|
* set with `setGlobalDefaultTheme()`.
|
|
@@ -58,7 +51,6 @@ declare const __propDef: {
|
|
|
58
51
|
* components wrapping `<Binding>`'s functionality.
|
|
59
52
|
*
|
|
60
53
|
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
61
|
-
*
|
|
62
54
|
* @bindable
|
|
63
55
|
* @readonly
|
|
64
56
|
*/
|
|
@@ -71,13 +63,18 @@ declare const __propDef: {
|
|
|
71
63
|
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
72
64
|
*
|
|
73
65
|
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
74
|
-
*
|
|
75
66
|
* @default `undefined`
|
|
76
67
|
*/
|
|
77
68
|
plugin?: import('../utils.js').Plugin | undefined
|
|
78
69
|
},
|
|
79
70
|
'object' | 'key'
|
|
80
|
-
|
|
71
|
+
> & {
|
|
72
|
+
/**
|
|
73
|
+
* The value to control.
|
|
74
|
+
* @bindable
|
|
75
|
+
*/
|
|
76
|
+
value: boolean
|
|
77
|
+
},
|
|
81
78
|
'ref' | 'options' | 'plugin'
|
|
82
79
|
>
|
|
83
80
|
slots: {}
|
|
@@ -89,10 +86,9 @@ declare const __propDef: {
|
|
|
89
86
|
*
|
|
90
87
|
* The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
|
|
91
88
|
* and changes resulting from programmatic manipulation of the `value` (`external`).
|
|
92
|
-
*
|
|
93
89
|
* @extends ValueChangeEvent
|
|
94
90
|
* @event
|
|
95
|
-
|
|
91
|
+
*/
|
|
96
92
|
change: CheckboxChangeEvent
|
|
97
93
|
}
|
|
98
94
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import ClsPad from '../internal/ClsPad.svelte'
|
|
5
|
-
import GenericInputFolding from '../internal/GenericInputFolding.svelte'
|
|
6
|
-
import { objectToTuple } from '../utils'
|
|
7
|
-
import { fillWith } from '../utils'
|
|
8
4
|
import { isColorObject, isRgbaColorObject, isRgbColorObject } from '@tweakpane/core'
|
|
9
5
|
import { BROWSER } from 'esm-env'
|
|
10
6
|
import { shallowEqual } from 'fast-equals'
|
|
7
|
+
import ClsPad from '../internal/ClsPad.svelte'
|
|
8
|
+
import GenericInputFolding from '../internal/GenericInputFolding.svelte'
|
|
9
|
+
import { fillWith, objectToTuple } from '../utils.js'
|
|
11
10
|
export let value
|
|
12
11
|
export let expanded = void 0
|
|
13
12
|
export let type = void 0
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { Simplify } from '../utils'
|
|
3
|
-
import type { ValueChangeEvent } from '../utils.js'
|
|
4
2
|
import type {
|
|
5
3
|
RgbaColorObject,
|
|
6
4
|
RgbColorObject,
|
|
7
5
|
} from '@tweakpane/core/dist/input-binding/color/model/color.js'
|
|
6
|
+
import type { Simplify, ValueChangeEvent } from '../utils.js'
|
|
8
7
|
export type ColorValueRgbTuple = [r: number, g: number, b: number]
|
|
9
8
|
export type ColorValueRgbaTuple = [r: number, g: number, b: number, a: number]
|
|
10
9
|
export type ColorValueRgbObject = Simplify<RgbColorObject>
|
|
@@ -20,22 +19,82 @@ export type ColorValue = Simplify<
|
|
|
20
19
|
export type ColorChangeEvent = ValueChangeEvent<ColorValue>
|
|
21
20
|
import type { ColorInputParams as ColorOptions } from 'tweakpane'
|
|
22
21
|
declare const __propDef: {
|
|
23
|
-
props:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
props: Omit<
|
|
23
|
+
Omit<
|
|
24
|
+
{
|
|
25
|
+
/**
|
|
26
|
+
* The binding's target object with values to manipulate.
|
|
27
|
+
* @bindable
|
|
28
|
+
*/
|
|
29
|
+
object: import('@tweakpane/core').Bindable & Record<string, ColorValue>
|
|
30
|
+
/** The key for the value in the target `object` that the control should manipulate. */
|
|
31
|
+
key: string
|
|
32
|
+
/**
|
|
33
|
+
* Prevent interactivity and gray out the control.
|
|
34
|
+
* @default `false`
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean
|
|
37
|
+
/**
|
|
38
|
+
* Text displayed next to control.
|
|
39
|
+
* @default `undefined`
|
|
40
|
+
*/
|
|
41
|
+
label?: string | undefined
|
|
42
|
+
/**
|
|
43
|
+
* Tweakpane's internal options object.
|
|
44
|
+
*
|
|
45
|
+
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
46
|
+
*
|
|
47
|
+
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
48
|
+
*
|
|
49
|
+
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
50
|
+
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
51
|
+
* Tweakpane UI_.
|
|
52
|
+
* @default `undefined`
|
|
53
|
+
*/
|
|
54
|
+
options?: ColorOptions | undefined
|
|
55
|
+
/**
|
|
56
|
+
* Custom color scheme.
|
|
57
|
+
* @default `undefined` \
|
|
58
|
+
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
59
|
+
* set with `setGlobalDefaultTheme()`.
|
|
60
|
+
*/
|
|
61
|
+
theme?: import('..').Theme | undefined
|
|
62
|
+
/**
|
|
63
|
+
* Reference to internal Tweakpane
|
|
64
|
+
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
65
|
+
* this control.
|
|
66
|
+
*
|
|
67
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
68
|
+
* components wrapping `<Binding>`'s functionality.
|
|
69
|
+
*
|
|
70
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
71
|
+
* @bindable
|
|
72
|
+
* @readonly
|
|
73
|
+
*/
|
|
74
|
+
ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
|
|
75
|
+
/**
|
|
76
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
77
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
78
|
+
*
|
|
79
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
80
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
81
|
+
*
|
|
82
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
83
|
+
* @default `undefined`
|
|
84
|
+
*/
|
|
85
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
86
|
+
},
|
|
87
|
+
'object' | 'key'
|
|
88
|
+
> & {
|
|
89
|
+
/**
|
|
90
|
+
* A color value to control.
|
|
91
|
+
*
|
|
92
|
+
* Use either a color-like string (e.g. #ff00ff), or an object with `r`, `b`, `g`, and
|
|
93
|
+
* optional `a` keys.
|
|
94
|
+
* @bindable
|
|
95
|
+
*/
|
|
96
|
+
value: ColorValue
|
|
97
|
+
} & {
|
|
39
98
|
/**
|
|
40
99
|
* DOM class name of the button used to expand and collapse the input's picker.
|
|
41
100
|
* @default `undefined`
|
|
@@ -57,86 +116,23 @@ declare const __propDef: {
|
|
|
57
116
|
* @default `true`
|
|
58
117
|
*/
|
|
59
118
|
userExpandable?: boolean
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* A color value to control.
|
|
63
|
-
*
|
|
64
|
-
* Use either a color-like string (e.g. #ff00ff), or an object with `r`, `b`, `g`, and
|
|
65
|
-
* optional `a` keys.
|
|
66
|
-
* @bindable
|
|
67
|
-
*/
|
|
68
|
-
value: ColorValue
|
|
69
|
-
} & Omit<
|
|
70
|
-
{
|
|
71
|
-
/**
|
|
72
|
-
* The binding's target object with values to manipulate.
|
|
73
|
-
* @bindable
|
|
74
|
-
*/
|
|
75
|
-
object: import('@tweakpane/core').Bindable & Record<string, ColorValue>
|
|
76
|
-
/** The key for the value in the target `object` that the control should manipulate. */
|
|
77
|
-
key: string
|
|
78
|
-
/**
|
|
79
|
-
* Prevent interactivity and gray out the control.
|
|
80
|
-
* @default `false`
|
|
81
|
-
*/
|
|
82
|
-
disabled?: boolean
|
|
83
|
-
/**
|
|
84
|
-
* Text displayed next to control.
|
|
85
|
-
* @default `undefined`
|
|
86
|
-
*/
|
|
87
|
-
label?: string | undefined
|
|
88
|
-
/**
|
|
89
|
-
* Tweakpane's internal options object.
|
|
90
|
-
*
|
|
91
|
-
* See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
|
|
92
|
-
*
|
|
93
|
-
* Valid types are contingent on the type of the value `key` points to in `object`.
|
|
94
|
-
*
|
|
95
|
-
* This is intended internal use, when implementing convenience components wrapping Binding's
|
|
96
|
-
* functionality. Options of interest are instead exposed as top-level props in _Svelte
|
|
97
|
-
* Tweakpane UI_.
|
|
98
|
-
* @default `undefined`
|
|
99
|
-
*/
|
|
100
|
-
options?: ColorOptions | undefined
|
|
101
|
-
/**
|
|
102
|
-
* Custom color scheme.
|
|
103
|
-
*
|
|
104
|
-
* @default `undefined` \
|
|
105
|
-
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
106
|
-
* set with `setGlobalDefaultTheme()`.
|
|
107
|
-
*/
|
|
108
|
-
theme?: import('..').Theme | undefined
|
|
109
|
-
/**
|
|
110
|
-
* Reference to internal Tweakpane
|
|
111
|
-
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
112
|
-
* this control.
|
|
113
|
-
*
|
|
114
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
115
|
-
* components wrapping `<Binding>`'s functionality.
|
|
116
|
-
*
|
|
117
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
118
|
-
*
|
|
119
|
-
* @bindable
|
|
120
|
-
* @readonly
|
|
121
|
-
*/
|
|
122
|
-
ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
|
|
123
|
-
/**
|
|
124
|
-
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
125
|
-
* the `<Binding>`'s containing `<Pane>`.
|
|
126
|
-
*
|
|
127
|
-
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
128
|
-
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
129
|
-
*
|
|
130
|
-
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
131
|
-
*
|
|
132
|
-
* @default `undefined`
|
|
133
|
-
*/
|
|
134
|
-
plugin?: import('../utils').Plugin | undefined
|
|
135
|
-
},
|
|
136
|
-
'object' | 'key'
|
|
137
|
-
>,
|
|
119
|
+
},
|
|
138
120
|
'ref' | 'options' | 'plugin' | 'buttonClass'
|
|
139
|
-
>
|
|
121
|
+
> & {
|
|
122
|
+
/**
|
|
123
|
+
* A color value to control.
|
|
124
|
+
*
|
|
125
|
+
* Use either a color-like string (e.g. #ff00ff), or an object with `r`, `b`, `g`, and
|
|
126
|
+
* optional `a` keys.
|
|
127
|
+
* @bindable
|
|
128
|
+
*/
|
|
129
|
+
value: ColorValue
|
|
130
|
+
/**
|
|
131
|
+
* Whether to treat values as floats from 0.0 to 1.0, or integers from 0 to 255.
|
|
132
|
+
* @default `'int'`
|
|
133
|
+
*/
|
|
134
|
+
type?: 'float' | 'int'
|
|
135
|
+
}
|
|
140
136
|
slots: {}
|
|
141
137
|
events: {
|
|
142
138
|
/**
|
|
@@ -146,10 +142,9 @@ declare const __propDef: {
|
|
|
146
142
|
*
|
|
147
143
|
* The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
|
|
148
144
|
* and changes resulting from programmatic manipulation of the `value` (`external`).
|
|
149
|
-
*
|
|
150
145
|
* @extends ValueChangeEvent
|
|
151
146
|
* @event
|
|
152
|
-
|
|
147
|
+
*/
|
|
153
148
|
change: ColorChangeEvent
|
|
154
149
|
}
|
|
155
150
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
+
import { BROWSER } from 'esm-env'
|
|
4
5
|
import * as pluginModule from 'tweakpane-plugin-color-plus/lite'
|
|
5
6
|
import { ColorPlusModel } from 'tweakpane-plugin-color-plus/lite'
|
|
6
7
|
import ClsPad from '../internal/ClsPad.svelte'
|
|
7
8
|
import GenericInputFolding from '../internal/GenericInputFolding.svelte'
|
|
8
|
-
import { fillWith } from '../utils'
|
|
9
|
-
import { BROWSER } from 'esm-env'
|
|
9
|
+
import { fillWith } from '../utils.js'
|
|
10
10
|
export let value
|
|
11
11
|
export let expanded = void 0
|
|
12
12
|
export let type = void 0
|