svelte-tweakpane-ui 1.5.2 → 1.5.4
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 +30 -30
- package/dist/control/Button.svelte.d.ts +18 -18
- package/dist/control/ButtonGrid.svelte +25 -25
- package/dist/control/ButtonGrid.svelte.d.ts +35 -35
- package/dist/control/Checkbox.svelte +2 -2
- package/dist/control/Checkbox.svelte.d.ts +23 -23
- package/dist/control/Color.svelte +34 -34
- package/dist/control/Color.svelte.d.ts +40 -40
- package/dist/control/CubicBezier.svelte +30 -30
- package/dist/control/CubicBezier.svelte.d.ts +47 -47
- package/dist/control/File.svelte +20 -20
- package/dist/control/File.svelte.d.ts +38 -38
- package/dist/control/Image.svelte +22 -22
- package/dist/control/Image.svelte.d.ts +31 -31
- package/dist/control/IntervalSlider.svelte +24 -24
- package/dist/control/IntervalSlider.svelte.d.ts +39 -39
- package/dist/control/List.svelte +35 -35
- package/dist/control/List.svelte.d.ts +31 -31
- package/dist/control/Point.svelte +31 -31
- package/dist/control/Point.svelte.d.ts +81 -81
- package/dist/control/RadioGrid.svelte +24 -24
- package/dist/control/RadioGrid.svelte.d.ts +40 -40
- package/dist/control/Ring.svelte +9 -9
- package/dist/control/Ring.svelte.d.ts +40 -40
- package/dist/control/RotationEuler.svelte +25 -25
- package/dist/control/RotationEuler.svelte.d.ts +53 -53
- package/dist/control/RotationQuaternion.svelte +24 -24
- package/dist/control/RotationQuaternion.svelte.d.ts +47 -47
- package/dist/control/Slider.svelte +9 -9
- package/dist/control/Slider.svelte.d.ts +32 -32
- package/dist/control/Stepper.svelte +16 -16
- package/dist/control/Stepper.svelte.d.ts +32 -32
- package/dist/control/Text.svelte +13 -13
- package/dist/control/Text.svelte.d.ts +26 -26
- package/dist/control/Textarea.svelte +34 -34
- package/dist/control/Textarea.svelte.d.ts +29 -29
- package/dist/control/Wheel.svelte +8 -8
- package/dist/control/Wheel.svelte.d.ts +32 -32
- package/dist/core/Binding.svelte +60 -60
- package/dist/core/Binding.svelte.d.ts +33 -33
- package/dist/core/Blade.svelte +30 -30
- package/dist/core/Blade.svelte.d.ts +21 -21
- package/dist/core/Folder.svelte +34 -34
- package/dist/core/Folder.svelte.d.ts +22 -22
- package/dist/core/Pane.svelte +17 -17
- package/dist/core/Pane.svelte.d.ts +56 -56
- package/dist/core/Separator.svelte +5 -5
- package/dist/core/Separator.svelte.d.ts +20 -20
- package/dist/core/TabGroup.svelte +29 -29
- package/dist/core/TabGroup.svelte.d.ts +18 -18
- package/dist/core/TabPage.svelte +36 -36
- package/dist/core/TabPage.svelte.d.ts +21 -21
- package/dist/extra/AutoObject.svelte +20 -20
- package/dist/extra/AutoObject.svelte.d.ts +22 -22
- package/dist/extra/AutoValue.svelte +3 -3
- package/dist/extra/AutoValue.svelte.d.ts +26 -26
- package/dist/extra/Element.svelte +10 -10
- package/dist/extra/Element.svelte.d.ts +26 -26
- package/dist/index.d.ts +48 -48
- package/dist/index.js +35 -35
- package/dist/internal/ClsPad.svelte +11 -11
- package/dist/internal/ClsPad.svelte.d.ts +17 -17
- package/dist/internal/GenericBinding.svelte +11 -11
- package/dist/internal/GenericBinding.svelte.d.ts +25 -25
- package/dist/internal/GenericBladeFolding.svelte +19 -19
- package/dist/internal/GenericBladeFolding.svelte.d.ts +20 -20
- package/dist/internal/GenericInput.svelte +7 -7
- package/dist/internal/GenericInput.svelte.d.ts +27 -27
- package/dist/internal/GenericInputFolding.svelte +21 -21
- package/dist/internal/GenericInputFolding.svelte.d.ts +32 -32
- package/dist/internal/GenericMonitor.svelte +10 -10
- package/dist/internal/GenericMonitor.svelte.d.ts +29 -29
- package/dist/internal/GenericPane.svelte +48 -48
- package/dist/internal/GenericPane.svelte.d.ts +22 -22
- package/dist/internal/GenericSlider.svelte +15 -15
- package/dist/internal/GenericSlider.svelte.d.ts +29 -29
- package/dist/internal/InternalMonitorBoolean.svelte +5 -5
- package/dist/internal/InternalMonitorBoolean.svelte.d.ts +31 -31
- package/dist/internal/InternalMonitorNumber.svelte +14 -14
- package/dist/internal/InternalMonitorNumber.svelte.d.ts +37 -37
- package/dist/internal/InternalMonitorString.svelte +9 -9
- package/dist/internal/InternalMonitorString.svelte.d.ts +32 -32
- package/dist/internal/InternalPaneDraggable.svelte +169 -173
- package/dist/internal/InternalPaneDraggable.svelte.d.ts +30 -30
- package/dist/internal/InternalPaneFixed.svelte +13 -13
- package/dist/internal/InternalPaneFixed.svelte.d.ts +23 -23
- package/dist/internal/InternalPaneInline.svelte +14 -14
- package/dist/internal/InternalPaneInline.svelte.d.ts +21 -21
- package/dist/monitor/FpsGraph.svelte +35 -35
- package/dist/monitor/FpsGraph.svelte.d.ts +50 -42
- package/dist/monitor/Monitor.svelte +4 -4
- package/dist/monitor/Monitor.svelte.d.ts +87 -88
- package/dist/monitor/Profiler.svelte +37 -37
- package/dist/monitor/Profiler.svelte.d.ts +78 -76
- package/dist/monitor/WaveformMonitor.svelte +12 -12
- package/dist/monitor/WaveformMonitor.svelte.d.ts +39 -39
- package/dist/theme.d.ts +61 -61
- package/dist/theme.js +49 -53
- package/dist/utils.d.ts +62 -66
- package/dist/utils.js +78 -78
- package/license.txt +1 -1
- package/package.json +105 -120
- package/readme.md +1 -1
package/dist/control/Text.svelte
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import GenericInput from '../internal/GenericInput.svelte'
|
|
5
|
-
import { onDestroy } from 'svelte'
|
|
6
|
-
export let value
|
|
7
|
-
export let live = true
|
|
8
|
-
const options = { view: 'text' }
|
|
9
|
-
let ref
|
|
4
|
+
import GenericInput from '../internal/GenericInput.svelte'
|
|
5
|
+
import { onDestroy } from 'svelte'
|
|
6
|
+
export let value
|
|
7
|
+
export let live = true
|
|
8
|
+
const options = { view: 'text' }
|
|
9
|
+
let ref
|
|
10
10
|
onDestroy(() => {
|
|
11
|
-
updateListeners(live ?? true, true)
|
|
12
|
-
})
|
|
11
|
+
updateListeners(live ?? true, true)
|
|
12
|
+
})
|
|
13
13
|
function onInput(event) {
|
|
14
|
-
event.target?.dispatchEvent(new Event('change'))
|
|
14
|
+
event.target?.dispatchEvent(new Event('change'))
|
|
15
15
|
}
|
|
16
16
|
function updateListeners(live2, destroy = false) {
|
|
17
|
-
const input = ref?.controller.valueController.view.element.querySelector('input')
|
|
18
|
-
input?.removeEventListener('input', onInput)
|
|
19
|
-
!destroy && live2 && input?.addEventListener('input', onInput)
|
|
17
|
+
const input = ref?.controller.valueController.view.element.querySelector('input')
|
|
18
|
+
input?.removeEventListener('input', onInput)
|
|
19
|
+
!destroy && live2 && input?.addEventListener('input', onInput)
|
|
20
20
|
}
|
|
21
|
-
$: ref && live !== void 0 && updateListeners(live)
|
|
21
|
+
$: ref && live !== void 0 && updateListeners(live)
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<GenericInput bind:value bind:ref on:change {options} {...$$restProps} />
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { ValueChangeEvent } from '../utils.js'
|
|
3
|
-
export type TextChangeEvent = ValueChangeEvent<string
|
|
4
|
-
import { type GenericInputRef } from '../internal/GenericInput.svelte'
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { ValueChangeEvent } from '../utils.js'
|
|
3
|
+
export type TextChangeEvent = ValueChangeEvent<string>
|
|
4
|
+
import { type GenericInputRef } from '../internal/GenericInput.svelte'
|
|
5
5
|
declare const __propDef: {
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
8
8
|
* A `string` value to control.
|
|
9
9
|
* @bindable
|
|
10
10
|
* */
|
|
11
|
-
value: string
|
|
11
|
+
value: string
|
|
12
12
|
/**
|
|
13
13
|
* Whether to provide live updates to the bound `value` on every keystroke.
|
|
14
14
|
*
|
|
@@ -16,33 +16,33 @@ declare const __propDef: {
|
|
|
16
16
|
* vanilla JS Tweakpane behavior, which only updates on blur.
|
|
17
17
|
* @default `true`
|
|
18
18
|
* */
|
|
19
|
-
live?: boolean
|
|
19
|
+
live?: boolean
|
|
20
20
|
} & Omit<
|
|
21
21
|
{
|
|
22
22
|
/**
|
|
23
23
|
* A `string` value to control.
|
|
24
24
|
* @bindable
|
|
25
25
|
*/
|
|
26
|
-
value: string
|
|
26
|
+
value: string
|
|
27
27
|
} & Omit<
|
|
28
28
|
{
|
|
29
29
|
/**
|
|
30
30
|
* The binding's target object with values to manipulate.
|
|
31
31
|
* @bindable
|
|
32
32
|
*/
|
|
33
|
-
object: import('@tweakpane/core').Bindable & Record<string, string
|
|
33
|
+
object: import('@tweakpane/core').Bindable & Record<string, string>
|
|
34
34
|
/** The key for the value in the target `object` that the control should manipulate. */
|
|
35
|
-
key: string
|
|
35
|
+
key: string
|
|
36
36
|
/**
|
|
37
37
|
* Prevent interactivity and gray out the control.
|
|
38
38
|
* @default `false`
|
|
39
39
|
*/
|
|
40
|
-
disabled?: boolean
|
|
40
|
+
disabled?: boolean
|
|
41
41
|
/**
|
|
42
42
|
* Text displayed next to control.
|
|
43
43
|
* @default `undefined`
|
|
44
44
|
*/
|
|
45
|
-
label?: string | undefined
|
|
45
|
+
label?: string | undefined
|
|
46
46
|
/**
|
|
47
47
|
* Tweakpane's internal options object.
|
|
48
48
|
*
|
|
@@ -55,7 +55,7 @@ declare const __propDef: {
|
|
|
55
55
|
* Tweakpane UI_.
|
|
56
56
|
* @default `undefined`
|
|
57
57
|
*/
|
|
58
|
-
options?: import('@tweakpane/core').BaseInputParams | undefined
|
|
58
|
+
options?: import('@tweakpane/core').BaseInputParams | undefined
|
|
59
59
|
/**
|
|
60
60
|
* Custom color scheme.
|
|
61
61
|
*
|
|
@@ -63,7 +63,7 @@ declare const __propDef: {
|
|
|
63
63
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
64
64
|
* set with `setGlobalDefaultTheme()`.
|
|
65
65
|
*/
|
|
66
|
-
theme?: import('..').Theme | undefined
|
|
66
|
+
theme?: import('..').Theme | undefined
|
|
67
67
|
/**
|
|
68
68
|
* Reference to internal Tweakpane
|
|
69
69
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
@@ -77,7 +77,7 @@ declare const __propDef: {
|
|
|
77
77
|
* @bindable
|
|
78
78
|
* @readonly
|
|
79
79
|
*/
|
|
80
|
-
ref?: GenericInputRef | undefined
|
|
80
|
+
ref?: GenericInputRef | undefined
|
|
81
81
|
/**
|
|
82
82
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
83
83
|
* the `<Binding>`'s containing `<Pane>`.
|
|
@@ -89,13 +89,13 @@ declare const __propDef: {
|
|
|
89
89
|
*
|
|
90
90
|
* @default `undefined`
|
|
91
91
|
*/
|
|
92
|
-
plugin?: import('../utils.js').Plugin | undefined
|
|
92
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
93
93
|
},
|
|
94
94
|
'object' | 'key'
|
|
95
95
|
>,
|
|
96
96
|
'ref' | 'options' | 'plugin'
|
|
97
|
-
|
|
98
|
-
slots: {}
|
|
97
|
+
>
|
|
98
|
+
slots: {}
|
|
99
99
|
events: {
|
|
100
100
|
/**
|
|
101
101
|
* Fires when `value` changes.
|
|
@@ -108,12 +108,12 @@ declare const __propDef: {
|
|
|
108
108
|
* @extends ValueChangeEvent
|
|
109
109
|
* @event
|
|
110
110
|
* */
|
|
111
|
-
change: TextChangeEvent
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
export type TextProps = typeof __propDef.props
|
|
115
|
-
export type TextEvents = typeof __propDef.events
|
|
116
|
-
export type TextSlots = typeof __propDef.slots
|
|
111
|
+
change: TextChangeEvent
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export type TextProps = typeof __propDef.props
|
|
115
|
+
export type TextEvents = typeof __propDef.events
|
|
116
|
+
export type TextSlots = typeof __propDef.slots
|
|
117
117
|
/**
|
|
118
118
|
* A text field, in the spirit of the HTML `<input type="text">` element.
|
|
119
119
|
*
|
|
@@ -132,9 +132,9 @@ export type TextSlots = typeof __propDef.slots;
|
|
|
132
132
|
* @example
|
|
133
133
|
* ```svelte
|
|
134
134
|
* <script lang="ts">
|
|
135
|
-
* import { Text } from 'svelte-tweakpane-ui'
|
|
135
|
+
* import { Text } from 'svelte-tweakpane-ui'
|
|
136
136
|
*
|
|
137
|
-
* let text = 'Cosmic Manifold'
|
|
137
|
+
* let text = 'Cosmic Manifold'
|
|
138
138
|
* </script>
|
|
139
139
|
*
|
|
140
140
|
* <Text bind:value={text} label="The Message" />
|
|
@@ -145,4 +145,4 @@ export type TextSlots = typeof __propDef.slots;
|
|
|
145
145
|
* [Text.svelte](https://github.com/kitschpatrol/svelte-tweakpane-ui/blob/main/src/lib/control/Text.svelte)
|
|
146
146
|
*/
|
|
147
147
|
export default class Text extends SvelteComponent<TextProps, TextEvents, TextSlots> {}
|
|
148
|
-
export {}
|
|
148
|
+
export {}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import GenericInput from '../internal/GenericInput.svelte'
|
|
5
|
-
import {} from '../utils.js'
|
|
6
|
-
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-textarea'
|
|
7
|
-
import { BROWSER } from 'esm-env'
|
|
8
|
-
import { createEventDispatcher, onDestroy } from 'svelte'
|
|
9
|
-
export let value
|
|
10
|
-
export let live = true
|
|
11
|
-
export let rows = void 0
|
|
12
|
-
export let placeholder = void 0
|
|
13
|
-
const dispatch = createEventDispatcher()
|
|
14
|
-
let _value = value
|
|
15
|
-
let ref
|
|
16
|
-
let options
|
|
4
|
+
import GenericInput from '../internal/GenericInput.svelte'
|
|
5
|
+
import {} from '../utils.js'
|
|
6
|
+
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-textarea'
|
|
7
|
+
import { BROWSER } from 'esm-env'
|
|
8
|
+
import { createEventDispatcher, onDestroy } from 'svelte'
|
|
9
|
+
export let value
|
|
10
|
+
export let live = true
|
|
11
|
+
export let rows = void 0
|
|
12
|
+
export let placeholder = void 0
|
|
13
|
+
const dispatch = createEventDispatcher()
|
|
14
|
+
let _value = value
|
|
15
|
+
let ref
|
|
16
|
+
let options
|
|
17
17
|
onDestroy(() => {
|
|
18
|
-
updateListeners(live ?? true, true)
|
|
19
|
-
})
|
|
18
|
+
updateListeners(live ?? true, true)
|
|
19
|
+
})
|
|
20
20
|
function onBlur(event) {
|
|
21
|
-
value = event.target.value
|
|
22
|
-
lastText = value
|
|
23
|
-
dispatch('change', { value, origin: 'internal' })
|
|
21
|
+
value = event.target.value
|
|
22
|
+
lastText = value
|
|
23
|
+
dispatch('change', { value, origin: 'internal' })
|
|
24
24
|
}
|
|
25
25
|
function onInput(event) {
|
|
26
|
-
value = event.target.value
|
|
27
|
-
lastText = value
|
|
28
|
-
dispatch('change', { value, origin: 'internal' })
|
|
26
|
+
value = event.target.value
|
|
27
|
+
lastText = value
|
|
28
|
+
dispatch('change', { value, origin: 'internal' })
|
|
29
29
|
}
|
|
30
30
|
function updateListeners(live2, destroy = false) {
|
|
31
|
-
const input = ref?.controller.valueController.view.element.querySelector('textarea')
|
|
32
|
-
input?.removeEventListener('blur', onBlur)
|
|
33
|
-
input?.removeEventListener('input', onInput)
|
|
34
|
-
!destroy && live2 && input?.addEventListener('input', onInput)
|
|
35
|
-
!destroy && !live2 && input?.addEventListener('blur', onBlur)
|
|
31
|
+
const input = ref?.controller.valueController.view.element.querySelector('textarea')
|
|
32
|
+
input?.removeEventListener('blur', onBlur)
|
|
33
|
+
input?.removeEventListener('input', onInput)
|
|
34
|
+
!destroy && live2 && input?.addEventListener('input', onInput)
|
|
35
|
+
!destroy && !live2 && input?.addEventListener('blur', onBlur)
|
|
36
36
|
}
|
|
37
|
-
let lastText = value
|
|
37
|
+
let lastText = value
|
|
38
38
|
function onBoundValueChange(text) {
|
|
39
39
|
if (text !== lastText) {
|
|
40
|
-
dispatch('change', { value: text, origin: 'external' })
|
|
41
|
-
lastText = text
|
|
40
|
+
dispatch('change', { value: text, origin: 'external' })
|
|
41
|
+
lastText = text
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
$: _value = value
|
|
45
|
-
$: ref && live !== void 0 && updateListeners(live)
|
|
44
|
+
$: _value = value
|
|
45
|
+
$: ref && live !== void 0 && updateListeners(live)
|
|
46
46
|
$: options = {
|
|
47
47
|
placeholder,
|
|
48
48
|
rows,
|
|
49
|
-
view: 'textarea'
|
|
50
|
-
}
|
|
51
|
-
$: ref && onBoundValueChange(_value)
|
|
49
|
+
view: 'textarea',
|
|
50
|
+
}
|
|
51
|
+
$: ref && onBoundValueChange(_value)
|
|
52
52
|
</script>
|
|
53
53
|
|
|
54
54
|
<GenericInput value={_value} bind:ref {options} plugin={pluginModule} {...$$restProps} />
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { ValueChangeEvent } from '../utils.js'
|
|
3
|
-
export type TextareaChangeEvent = ValueChangeEvent<string
|
|
4
|
-
import type { TextareaPluginInputParams } from '@kitschpatrol/tweakpane-plugin-textarea/dist/types/plugin.js'
|
|
5
|
-
import { type GenericInputRef } from '../internal/GenericInput.svelte'
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { ValueChangeEvent } from '../utils.js'
|
|
3
|
+
export type TextareaChangeEvent = ValueChangeEvent<string>
|
|
4
|
+
import type { TextareaPluginInputParams } from '@kitschpatrol/tweakpane-plugin-textarea/dist/types/plugin.js'
|
|
5
|
+
import { type GenericInputRef } from '../internal/GenericInput.svelte'
|
|
6
6
|
declare const __propDef: {
|
|
7
7
|
props: {
|
|
8
8
|
/**
|
|
9
9
|
* A `string` value to control.
|
|
10
10
|
* @bindable
|
|
11
11
|
* */
|
|
12
|
-
value: string
|
|
12
|
+
value: string
|
|
13
13
|
/**
|
|
14
14
|
* Whether to provide live updates to the bound `value` on every keystroke.
|
|
15
15
|
* @default `true`
|
|
16
16
|
* */
|
|
17
|
-
live?: boolean
|
|
17
|
+
live?: boolean
|
|
18
18
|
/**
|
|
19
19
|
* Placeholder text to display when the `value` is empty.
|
|
20
20
|
* @default `'Enter text here'`
|
|
21
21
|
*/
|
|
22
|
-
placeholder?: string
|
|
22
|
+
placeholder?: string
|
|
23
23
|
/**
|
|
24
24
|
* The number of lines of text to display.
|
|
25
25
|
*
|
|
26
26
|
* If lines of input exceed this value, then the text area will scroll.
|
|
27
27
|
* @default `3`
|
|
28
28
|
*/
|
|
29
|
-
rows?: number
|
|
29
|
+
rows?: number
|
|
30
30
|
} & Omit<
|
|
31
31
|
{
|
|
32
32
|
/**
|
|
33
33
|
* A `string` value to control.
|
|
34
34
|
* @bindable
|
|
35
35
|
*/
|
|
36
|
-
value: string
|
|
36
|
+
value: string
|
|
37
37
|
} & Omit<
|
|
38
38
|
{
|
|
39
39
|
/**
|
|
40
40
|
* The binding's target object with values to manipulate.
|
|
41
41
|
* @bindable
|
|
42
42
|
*/
|
|
43
|
-
object: import('@tweakpane/core').Bindable & Record<string, string
|
|
43
|
+
object: import('@tweakpane/core').Bindable & Record<string, string>
|
|
44
44
|
/** The key for the value in the target `object` that the control should manipulate. */
|
|
45
|
-
key: string
|
|
45
|
+
key: string
|
|
46
46
|
/**
|
|
47
47
|
* Prevent interactivity and gray out the control.
|
|
48
48
|
* @default `false`
|
|
49
49
|
*/
|
|
50
|
-
disabled?: boolean
|
|
50
|
+
disabled?: boolean
|
|
51
51
|
/**
|
|
52
52
|
* Text displayed next to control.
|
|
53
53
|
* @default `undefined`
|
|
54
54
|
*/
|
|
55
|
-
label?: string | undefined
|
|
55
|
+
label?: string | undefined
|
|
56
56
|
/**
|
|
57
57
|
* Tweakpane's internal options object.
|
|
58
58
|
*
|
|
@@ -65,7 +65,7 @@ declare const __propDef: {
|
|
|
65
65
|
* Tweakpane UI_.
|
|
66
66
|
* @default `undefined`
|
|
67
67
|
*/
|
|
68
|
-
options?: TextareaPluginInputParams | undefined
|
|
68
|
+
options?: TextareaPluginInputParams | undefined
|
|
69
69
|
/**
|
|
70
70
|
* Custom color scheme.
|
|
71
71
|
*
|
|
@@ -73,7 +73,7 @@ declare const __propDef: {
|
|
|
73
73
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
74
74
|
* set with `setGlobalDefaultTheme()`.
|
|
75
75
|
*/
|
|
76
|
-
theme?: import('..').Theme | undefined
|
|
76
|
+
theme?: import('..').Theme | undefined
|
|
77
77
|
/**
|
|
78
78
|
* Reference to internal Tweakpane
|
|
79
79
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
@@ -87,7 +87,7 @@ declare const __propDef: {
|
|
|
87
87
|
* @bindable
|
|
88
88
|
* @readonly
|
|
89
89
|
*/
|
|
90
|
-
ref?: GenericInputRef | undefined
|
|
90
|
+
ref?: GenericInputRef | undefined
|
|
91
91
|
/**
|
|
92
92
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
93
93
|
* the `<Binding>`'s containing `<Pane>`.
|
|
@@ -99,13 +99,13 @@ declare const __propDef: {
|
|
|
99
99
|
*
|
|
100
100
|
* @default `undefined`
|
|
101
101
|
*/
|
|
102
|
-
plugin?: import('../utils.js').Plugin | undefined
|
|
102
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
103
103
|
},
|
|
104
104
|
'object' | 'key'
|
|
105
105
|
>,
|
|
106
106
|
'ref' | 'options' | 'plugin'
|
|
107
|
-
|
|
108
|
-
slots: {}
|
|
107
|
+
>
|
|
108
|
+
slots: {}
|
|
109
109
|
events: {
|
|
110
110
|
/**
|
|
111
111
|
* Fires when `value` changes.
|
|
@@ -118,12 +118,12 @@ declare const __propDef: {
|
|
|
118
118
|
* @extends ValueChangeEvent
|
|
119
119
|
* @event
|
|
120
120
|
* */
|
|
121
|
-
change: TextareaChangeEvent
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
export type TextareaProps = typeof __propDef.props
|
|
125
|
-
export type TextareaEvents = typeof __propDef.events
|
|
126
|
-
export type TextareaSlots = typeof __propDef.slots
|
|
121
|
+
change: TextareaChangeEvent
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export type TextareaProps = typeof __propDef.props
|
|
125
|
+
export type TextareaEvents = typeof __propDef.events
|
|
126
|
+
export type TextareaSlots = typeof __propDef.slots
|
|
127
127
|
/**
|
|
128
128
|
* A multi-line text input field, in the spirit of the HTML `<textarea>`
|
|
129
129
|
* element.
|
|
@@ -147,9 +147,9 @@ export type TextareaSlots = typeof __propDef.slots;
|
|
|
147
147
|
* @example
|
|
148
148
|
* ```svelte
|
|
149
149
|
* <script lang="ts">
|
|
150
|
-
* import { Textarea } from 'svelte-tweakpane-ui'
|
|
150
|
+
* import { Textarea } from 'svelte-tweakpane-ui'
|
|
151
151
|
*
|
|
152
|
-
* let text = ''
|
|
152
|
+
* let text = ''
|
|
153
153
|
* </script>
|
|
154
154
|
*
|
|
155
155
|
* <Textarea bind:value={text} placeholder="The void" rows={8} />
|
|
@@ -164,4 +164,4 @@ export default class Textarea extends SvelteComponent<
|
|
|
164
164
|
TextareaEvents,
|
|
165
165
|
TextareaSlots
|
|
166
166
|
> {}
|
|
167
|
-
export {}
|
|
167
|
+
export {}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>
|
|
4
|
-
import GenericSlider from '../internal/GenericSlider.svelte'
|
|
5
|
-
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-camerakit'
|
|
6
|
-
export let value
|
|
7
|
-
export let amount = void 0
|
|
8
|
-
export let wide = void 0
|
|
9
|
-
let options
|
|
4
|
+
import GenericSlider from '../internal/GenericSlider.svelte'
|
|
5
|
+
import * as pluginModule from '@kitschpatrol/tweakpane-plugin-camerakit'
|
|
6
|
+
export let value
|
|
7
|
+
export let amount = void 0
|
|
8
|
+
export let wide = void 0
|
|
9
|
+
let options
|
|
10
10
|
$: options = {
|
|
11
11
|
amount,
|
|
12
12
|
view: 'camerawheel',
|
|
13
|
-
wide
|
|
14
|
-
}
|
|
13
|
+
wide,
|
|
14
|
+
}
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<GenericSlider bind:value on:change {options} plugin={pluginModule} {...$$restProps} />
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type { ValueChangeEvent } from '../utils.js'
|
|
3
|
-
export type WheelChangeEvent = ValueChangeEvent<number
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { ValueChangeEvent } from '../utils.js'
|
|
3
|
+
export type WheelChangeEvent = ValueChangeEvent<number>
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
/**
|
|
7
7
|
* A `number` value to control.
|
|
8
8
|
* @bindable
|
|
9
9
|
* */
|
|
10
|
-
value: number
|
|
10
|
+
value: number
|
|
11
11
|
/** The amount of the value to change per pixel of movement.
|
|
12
12
|
* @default `undefined` \
|
|
13
13
|
* [Dynamic based on magnitude of
|
|
14
14
|
* `value`](https://github.com/cocopon/tweakpane/blob/66dfbea04bfe9b7f031673c955ceda1f92356e75/packages/core/src/common/number/util.ts#L54).
|
|
15
15
|
*/
|
|
16
|
-
amount?: number
|
|
16
|
+
amount?: number
|
|
17
17
|
} & Omit<
|
|
18
18
|
{
|
|
19
19
|
/**
|
|
@@ -22,70 +22,70 @@ declare const __propDef: {
|
|
|
22
22
|
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
23
23
|
* @default `undefined`
|
|
24
24
|
*/
|
|
25
|
-
min?: number
|
|
25
|
+
min?: number
|
|
26
26
|
/**
|
|
27
27
|
* Maximum value.
|
|
28
28
|
*
|
|
29
29
|
* Specifying both a `min` and a `max` prop turns the control into a slider.
|
|
30
30
|
* @default `undefined`
|
|
31
31
|
*/
|
|
32
|
-
max?: number
|
|
32
|
+
max?: number
|
|
33
33
|
/**
|
|
34
34
|
* A function to customize the point value's string representation (e.g. rounding, etc.).
|
|
35
35
|
* @default `undefined` \
|
|
36
36
|
* Normal `.toString()` formatting.
|
|
37
37
|
*/
|
|
38
|
-
format?: ((value: number) => string) | undefined
|
|
38
|
+
format?: ((value: number) => string) | undefined
|
|
39
39
|
/**
|
|
40
40
|
* The unit scale for key-based input for all dimensions (e.g. the up and down arrow keys).
|
|
41
41
|
* @default `1` \
|
|
42
42
|
* Or `stepValue` if defined.
|
|
43
43
|
*/
|
|
44
|
-
keyScale?: number
|
|
44
|
+
keyScale?: number
|
|
45
45
|
/**
|
|
46
46
|
* The unit scale for pointer-based input for all dimensions.
|
|
47
47
|
* @default `undefined` \
|
|
48
48
|
* [Dynamic based on magnitude of
|
|
49
49
|
* `value`](https://github.com/cocopon/tweakpane/blob/66dfbea04bfe9b7f031673c955ceda1f92356e75/packages/core/src/common/number/util.ts#L54).
|
|
50
50
|
*/
|
|
51
|
-
pointerScale?: number
|
|
51
|
+
pointerScale?: number
|
|
52
52
|
/**
|
|
53
53
|
* The minimum step interval.
|
|
54
54
|
* @default `undefined` \
|
|
55
55
|
* No step constraint.
|
|
56
56
|
*/
|
|
57
|
-
step?: number
|
|
57
|
+
step?: number
|
|
58
58
|
/**
|
|
59
59
|
* When `true`, expand the width of the control at the expense of the numeric input
|
|
60
60
|
* field.
|
|
61
61
|
* @default `false`
|
|
62
62
|
*/
|
|
63
|
-
wide?: boolean
|
|
63
|
+
wide?: boolean
|
|
64
64
|
} & {
|
|
65
65
|
/**
|
|
66
66
|
* A `number` value to control.
|
|
67
67
|
* @bindable
|
|
68
68
|
*/
|
|
69
|
-
value: number
|
|
69
|
+
value: number
|
|
70
70
|
} & Omit<
|
|
71
71
|
{
|
|
72
72
|
/**
|
|
73
73
|
* The binding's target object with values to manipulate.
|
|
74
74
|
* @bindable
|
|
75
75
|
*/
|
|
76
|
-
object: import('@tweakpane/core').Bindable & Record<string, number
|
|
76
|
+
object: import('@tweakpane/core').Bindable & Record<string, number>
|
|
77
77
|
/** The key for the value in the target `object` that the control should manipulate. */
|
|
78
|
-
key: string
|
|
78
|
+
key: string
|
|
79
79
|
/**
|
|
80
80
|
* Prevent interactivity and gray out the control.
|
|
81
81
|
* @default `false`
|
|
82
82
|
*/
|
|
83
|
-
disabled?: boolean
|
|
83
|
+
disabled?: boolean
|
|
84
84
|
/**
|
|
85
85
|
* Text displayed next to control.
|
|
86
86
|
* @default `undefined`
|
|
87
87
|
*/
|
|
88
|
-
label?: string | undefined
|
|
88
|
+
label?: string | undefined
|
|
89
89
|
/**
|
|
90
90
|
* Tweakpane's internal options object.
|
|
91
91
|
*
|
|
@@ -98,7 +98,7 @@ declare const __propDef: {
|
|
|
98
98
|
* Tweakpane UI_.
|
|
99
99
|
* @default `undefined`
|
|
100
100
|
*/
|
|
101
|
-
options?: import('tweakpane').NumberInputParams | undefined
|
|
101
|
+
options?: import('tweakpane').NumberInputParams | undefined
|
|
102
102
|
/**
|
|
103
103
|
* Custom color scheme.
|
|
104
104
|
*
|
|
@@ -106,7 +106,7 @@ declare const __propDef: {
|
|
|
106
106
|
* Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
|
|
107
107
|
* set with `setGlobalDefaultTheme()`.
|
|
108
108
|
*/
|
|
109
|
-
theme?: import('..').Theme | undefined
|
|
109
|
+
theme?: import('..').Theme | undefined
|
|
110
110
|
/**
|
|
111
111
|
* Reference to internal Tweakpane
|
|
112
112
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
@@ -120,7 +120,7 @@ declare const __propDef: {
|
|
|
120
120
|
* @bindable
|
|
121
121
|
* @readonly
|
|
122
122
|
*/
|
|
123
|
-
ref?: import('tweakpane').SliderInputBindingApi | undefined
|
|
123
|
+
ref?: import('tweakpane').SliderInputBindingApi | undefined
|
|
124
124
|
/**
|
|
125
125
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
126
126
|
* the `<Binding>`'s containing `<Pane>`.
|
|
@@ -132,13 +132,13 @@ declare const __propDef: {
|
|
|
132
132
|
*
|
|
133
133
|
* @default `undefined`
|
|
134
134
|
*/
|
|
135
|
-
plugin?: import('../utils.js').Plugin | undefined
|
|
135
|
+
plugin?: import('../utils.js').Plugin | undefined
|
|
136
136
|
},
|
|
137
137
|
'object' | 'key'
|
|
138
138
|
>,
|
|
139
139
|
'ref' | 'options' | 'plugin'
|
|
140
|
-
|
|
141
|
-
slots: {}
|
|
140
|
+
>
|
|
141
|
+
slots: {}
|
|
142
142
|
events: {
|
|
143
143
|
/**
|
|
144
144
|
* Fires when `value` changes.
|
|
@@ -151,12 +151,12 @@ declare const __propDef: {
|
|
|
151
151
|
* @extends ValueChangeEvent
|
|
152
152
|
* @event
|
|
153
153
|
* */
|
|
154
|
-
change: WheelChangeEvent
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
export type WheelProps = typeof __propDef.props
|
|
158
|
-
export type WheelEvents = typeof __propDef.events
|
|
159
|
-
export type WheelSlots = typeof __propDef.slots
|
|
154
|
+
change: WheelChangeEvent
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export type WheelProps = typeof __propDef.props
|
|
158
|
+
export type WheelEvents = typeof __propDef.events
|
|
159
|
+
export type WheelSlots = typeof __propDef.slots
|
|
160
160
|
/**
|
|
161
161
|
* A control evoking a dial on a proper camera body.
|
|
162
162
|
*
|
|
@@ -175,9 +175,9 @@ export type WheelSlots = typeof __propDef.slots;
|
|
|
175
175
|
* @example
|
|
176
176
|
* ```svelte
|
|
177
177
|
* <script lang="ts">
|
|
178
|
-
* import { Wheel } from 'svelte-tweakpane-ui'
|
|
178
|
+
* import { Wheel } from 'svelte-tweakpane-ui'
|
|
179
179
|
*
|
|
180
|
-
* let angle = 45
|
|
180
|
+
* let angle = 45
|
|
181
181
|
* </script>
|
|
182
182
|
*
|
|
183
183
|
* <Wheel
|
|
@@ -200,4 +200,4 @@ export type WheelSlots = typeof __propDef.slots;
|
|
|
200
200
|
* [Wheel.svelte](https://github.com/kitschpatrol/svelte-tweakpane-ui/blob/main/src/lib/control/Wheel.svelte)
|
|
201
201
|
*/
|
|
202
202
|
export default class Wheel extends SvelteComponent<WheelProps, WheelEvents, WheelSlots> {}
|
|
203
|
-
export {}
|
|
203
|
+
export {}
|