svelte-tweakpane-ui 1.1.4 → 1.2.1
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.d.ts +3 -2
- package/dist/control/ButtonGrid.svelte.d.ts +20 -9
- package/dist/control/Checkbox.svelte +3 -1
- package/dist/control/Checkbox.svelte.d.ts +28 -7
- package/dist/control/Color.svelte +1 -0
- package/dist/control/Color.svelte.d.ts +28 -7
- package/dist/control/CubicBezier.svelte +36 -11
- package/dist/control/CubicBezier.svelte.d.ts +40 -13
- package/dist/control/Image.svelte +1 -1
- package/dist/control/Image.svelte.d.ts +32 -7
- package/dist/control/IntervalSlider.svelte +1 -1
- package/dist/control/IntervalSlider.svelte.d.ts +29 -8
- package/dist/control/List.svelte +19 -2
- package/dist/control/List.svelte.d.ts +34 -9
- package/dist/control/Point.svelte +1 -0
- package/dist/control/Point.svelte.d.ts +39 -10
- package/dist/control/RadioGrid.svelte +4 -2
- package/dist/control/RadioGrid.svelte.d.ts +38 -13
- package/dist/control/Ring.svelte +1 -1
- package/dist/control/Ring.svelte.d.ts +36 -10
- package/dist/control/RotationEuler.svelte +1 -0
- package/dist/control/RotationEuler.svelte.d.ts +43 -74
- package/dist/control/RotationQuaternion.svelte +1 -0
- package/dist/control/RotationQuaternion.svelte.d.ts +28 -12
- package/dist/control/Slider.svelte +3 -1
- package/dist/control/Slider.svelte.d.ts +32 -11
- package/dist/control/Text.svelte +7 -9
- package/dist/control/Text.svelte.d.ts +28 -7
- package/dist/control/Textarea.svelte +21 -7
- package/dist/control/Textarea.svelte.d.ts +38 -20
- package/dist/control/Wheel.svelte +3 -1
- package/dist/control/Wheel.svelte.d.ts +30 -9
- package/dist/core/Binding.svelte +39 -7
- package/dist/core/Binding.svelte.d.ts +28 -7
- package/dist/core/Blade.svelte.d.ts +17 -7
- package/dist/core/Pane.svelte +9 -3
- package/dist/core/Pane.svelte.d.ts +98 -71
- package/dist/core/Separator.svelte.d.ts +12 -6
- package/dist/extra/AutoObject.svelte +28 -5
- package/dist/extra/AutoObject.svelte.d.ts +17 -3
- package/dist/extra/AutoValue.svelte +4 -2
- package/dist/extra/AutoValue.svelte.d.ts +29 -9
- package/dist/extra/Element.svelte.d.ts +13 -7
- package/dist/index.d.ts +29 -12
- package/dist/internal/GenericBinding.svelte +1 -1
- package/dist/internal/GenericBinding.svelte.d.ts +14 -6
- package/dist/internal/GenericBladeFolding.svelte.d.ts +12 -6
- package/dist/internal/GenericInput.svelte +1 -1
- package/dist/internal/GenericInput.svelte.d.ts +14 -6
- package/dist/internal/GenericInputFolding.svelte +1 -1
- package/dist/internal/GenericInputFolding.svelte.d.ts +14 -6
- package/dist/internal/GenericMonitor.svelte.d.ts +11 -5
- package/dist/internal/GenericPane.svelte +21 -21
- package/dist/internal/GenericPane.svelte.d.ts +12 -2
- package/dist/internal/GenericSlider.svelte +1 -1
- package/dist/internal/GenericSlider.svelte.d.ts +15 -7
- package/dist/internal/InternalMonitorBoolean.svelte.d.ts +11 -5
- package/dist/internal/InternalMonitorNumber.svelte.d.ts +18 -7
- package/dist/internal/InternalMonitorString.svelte.d.ts +11 -5
- package/dist/internal/InternalPaneDraggable.svelte +18 -12
- package/dist/internal/InternalPaneDraggable.svelte.d.ts +13 -4
- package/dist/internal/InternalPaneFixed.svelte +3 -3
- package/dist/internal/InternalPaneFixed.svelte.d.ts +13 -4
- package/dist/internal/InternalPaneInline.svelte +6 -6
- package/dist/internal/InternalPaneInline.svelte.d.ts +72 -66
- package/dist/monitor/FpsGraph.svelte.d.ts +12 -6
- package/dist/monitor/Monitor.svelte.d.ts +45 -21
- package/dist/monitor/Profiler.svelte.d.ts +22 -9
- package/dist/monitor/WaveformMonitor.svelte.d.ts +11 -5
- package/dist/utils.d.ts +15 -0
- package/license.txt +1 -1
- package/package.json +22 -17
- package/readme.md +31 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { type ButtonClickEvent, default as Button } from './control/Button.svelte';
|
|
2
2
|
export { type ButtonGridClickEvent, default as ButtonGrid } from './control/ButtonGrid.svelte';
|
|
3
|
-
export { default as Checkbox } from './control/Checkbox.svelte';
|
|
3
|
+
export { type CheckboxChangeEvent, default as Checkbox } from './control/Checkbox.svelte';
|
|
4
4
|
export {
|
|
5
|
+
type ColorChangeEvent,
|
|
5
6
|
type ColorValue,
|
|
6
7
|
type ColorValueRgbObject,
|
|
7
8
|
type ColorValueRgbTuple,
|
|
@@ -11,19 +12,22 @@ export {
|
|
|
11
12
|
default as Color
|
|
12
13
|
} from './control/Color.svelte';
|
|
13
14
|
export {
|
|
15
|
+
type CubicBezierChangeEvent,
|
|
14
16
|
type CubicBezierValue,
|
|
15
17
|
type CubicBezierValueObject,
|
|
16
18
|
type CubicBezierValueTuple,
|
|
17
19
|
default as CubicBezier
|
|
18
20
|
} from './control/CubicBezier.svelte';
|
|
19
|
-
export { type ImageValue, default as Image } from './control/Image.svelte';
|
|
21
|
+
export { type ImageChangeEvent, type ImageValue, default as Image } from './control/Image.svelte';
|
|
20
22
|
export {
|
|
23
|
+
type IntervalSliderChangeEvent,
|
|
21
24
|
type IntervalSliderValue,
|
|
22
25
|
type IntervalSliderValueObject,
|
|
23
26
|
type IntervalSliderValueTuple,
|
|
24
27
|
default as IntervalSlider
|
|
25
28
|
} from './control/IntervalSlider.svelte';
|
|
26
29
|
export {
|
|
30
|
+
type ListChangeEvent,
|
|
27
31
|
type ListOptions,
|
|
28
32
|
type ListOptionsArray,
|
|
29
33
|
type ListOptionsObjectArray,
|
|
@@ -31,6 +35,7 @@ export {
|
|
|
31
35
|
default as List
|
|
32
36
|
} from './control/List.svelte';
|
|
33
37
|
export {
|
|
38
|
+
type PointChangeEvent,
|
|
34
39
|
type PointOptions,
|
|
35
40
|
type PointValue2d,
|
|
36
41
|
type PointValue2dObject,
|
|
@@ -43,9 +48,15 @@ export {
|
|
|
43
48
|
type PointValue4dTuple,
|
|
44
49
|
default as Point
|
|
45
50
|
} from './control/Point.svelte';
|
|
46
|
-
export { default as RadioGrid } from './control/RadioGrid.svelte';
|
|
47
|
-
export { type RingSeries, type RingUnit, default as Ring } from './control/Ring.svelte';
|
|
51
|
+
export { type RadioGridChangeEvent, default as RadioGrid } from './control/RadioGrid.svelte';
|
|
48
52
|
export {
|
|
53
|
+
type RingChangeEvent,
|
|
54
|
+
type RingSeries,
|
|
55
|
+
type RingUnit,
|
|
56
|
+
default as Ring
|
|
57
|
+
} from './control/Ring.svelte';
|
|
58
|
+
export {
|
|
59
|
+
type RotationEulerChangeEvent,
|
|
49
60
|
type RotationEulerOptions,
|
|
50
61
|
type RotationEulerOrder,
|
|
51
62
|
type RotationEulerUnit,
|
|
@@ -55,25 +66,31 @@ export {
|
|
|
55
66
|
default as RotationEuler
|
|
56
67
|
} from './control/RotationEuler.svelte';
|
|
57
68
|
export {
|
|
69
|
+
type RotationQuaternionChangeEvent,
|
|
58
70
|
type RotationQuaternionOptions,
|
|
59
71
|
type RotationQuaternionValue,
|
|
60
72
|
type RotationQuaternionValueObject,
|
|
61
73
|
type RotationQuaternionValueTuple,
|
|
62
74
|
default as RotationQuaternion
|
|
63
75
|
} from './control/RotationQuaternion.svelte';
|
|
64
|
-
export { default as Slider } from './control/Slider.svelte';
|
|
65
|
-
export { default as Text } from './control/Text.svelte';
|
|
66
|
-
export { default as Textarea } from './control/Textarea.svelte';
|
|
67
|
-
export { default as Wheel } from './control/Wheel.svelte';
|
|
68
|
-
export {
|
|
76
|
+
export { type SliderChangeEvent, default as Slider } from './control/Slider.svelte';
|
|
77
|
+
export { type TextChangeEvent, default as Text } from './control/Text.svelte';
|
|
78
|
+
export { type TextareaChangeEvent, default as Textarea } from './control/Textarea.svelte';
|
|
79
|
+
export { type WheelChangeEvent, default as Wheel } from './control/Wheel.svelte';
|
|
80
|
+
export {
|
|
81
|
+
type BindingChangeEvent,
|
|
82
|
+
type BindingOptions,
|
|
83
|
+
type BindingRef,
|
|
84
|
+
default as Binding
|
|
85
|
+
} from './core/Binding.svelte';
|
|
69
86
|
export { type BladeOptions, type BladeRef, default as Blade } from './core/Blade.svelte';
|
|
70
87
|
export { default as Folder } from './core/Folder.svelte';
|
|
71
88
|
export { type PanePosition, default as Pane } from './core/Pane.svelte';
|
|
72
89
|
export { default as Separator } from './core/Separator.svelte';
|
|
73
90
|
export { default as TabGroup } from './core/TabGroup.svelte';
|
|
74
91
|
export { default as TabPage } from './core/TabPage.svelte';
|
|
75
|
-
export { default as AutoObject } from './extra/AutoObject.svelte';
|
|
76
|
-
export { default as AutoValue } from './extra/AutoValue.svelte';
|
|
92
|
+
export { type AutoObjectChangeEvent, default as AutoObject } from './extra/AutoObject.svelte';
|
|
93
|
+
export { type AutoValueChangeEvent, default as AutoValue } from './extra/AutoValue.svelte';
|
|
77
94
|
export { default as Element } from './extra/Element.svelte';
|
|
78
95
|
export { type FpsGraphChangeEvent, default as FpsGraph } from './monitor/FpsGraph.svelte';
|
|
79
96
|
export { default as Monitor } from './monitor/Monitor.svelte';
|
|
@@ -90,5 +107,5 @@ export {
|
|
|
90
107
|
} from './monitor/WaveformMonitor.svelte';
|
|
91
108
|
export type { Theme, ThemeColorValue } from './theme.js';
|
|
92
109
|
export { default as ThemeUtils } from './theme.js';
|
|
93
|
-
export type { BindingObject, Plugin } from './utils.js';
|
|
110
|
+
export type { BindingObject, Plugin, ValueChangeEvent } from './utils.js';
|
|
94
111
|
export { default as Utils } from './utils.js';
|
|
@@ -50,18 +50,24 @@ declare class __sveltets_Render<
|
|
|
50
50
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
51
51
|
* this control.
|
|
52
52
|
*
|
|
53
|
-
* This is
|
|
54
|
-
* Binding's functionality.
|
|
53
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
54
|
+
* components wrapping `<Binding>`'s functionality.
|
|
55
|
+
*
|
|
56
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
57
|
+
*
|
|
55
58
|
* @bindable
|
|
56
59
|
* @readonly
|
|
57
60
|
*/
|
|
58
61
|
ref?: V | undefined;
|
|
59
62
|
/**
|
|
60
63
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
61
|
-
* the
|
|
64
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
65
|
+
*
|
|
66
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
67
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
68
|
+
*
|
|
69
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
62
70
|
*
|
|
63
|
-
* This is primarily for internal use, when implementing convenience components wrapping
|
|
64
|
-
* Binding's functionality in combination with a Tweakpane plugin.
|
|
65
71
|
* @default `undefined`
|
|
66
72
|
*/
|
|
67
73
|
plugin?: import('tweakpane').TpPluginBundle | undefined;
|
|
@@ -74,7 +80,9 @@ declare class __sveltets_Render<
|
|
|
74
80
|
* */
|
|
75
81
|
value: T;
|
|
76
82
|
};
|
|
77
|
-
events(): {
|
|
83
|
+
events(): {
|
|
84
|
+
change: import('../core/Binding.svelte').BindingChangeEvent;
|
|
85
|
+
} & {
|
|
78
86
|
[evt: string]: CustomEvent<any>;
|
|
79
87
|
};
|
|
80
88
|
slots(): {};
|
|
@@ -24,18 +24,24 @@ declare class __sveltets_Render<T extends BladeOptions, U extends BladeRef> {
|
|
|
24
24
|
* Reference to internal Tweakpane
|
|
25
25
|
* [`BladeApi`](https://tweakpane.github.io/docs/api/classes/BladeApi.html) for this blade.
|
|
26
26
|
*
|
|
27
|
-
* This is
|
|
28
|
-
* functionality.
|
|
27
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
28
|
+
* components wrapping `<Blade>`'s functionality.
|
|
29
|
+
*
|
|
30
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
31
|
+
*
|
|
29
32
|
* @bindable
|
|
30
33
|
* @readonly
|
|
31
34
|
*/
|
|
32
35
|
ref?: U | undefined;
|
|
33
36
|
/**
|
|
34
|
-
* Imported Tweakpane `TpPluginBundle` (
|
|
35
|
-
* the
|
|
37
|
+
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
38
|
+
* the `<Blade>`'s containing `<Pane>`.
|
|
39
|
+
*
|
|
40
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
41
|
+
* components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
|
|
42
|
+
*
|
|
43
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
36
44
|
*
|
|
37
|
-
* This is primarily for internal use, when implementing convenience components wrapping Blade's
|
|
38
|
-
* functionality in combination with a Tweakpane plugin.
|
|
39
45
|
* @default `undefined`
|
|
40
46
|
*/
|
|
41
47
|
plugin?: import('tweakpane').TpPluginBundle | undefined;
|
|
@@ -52,18 +52,24 @@ declare class __sveltets_Render<
|
|
|
52
52
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
53
53
|
* this control.
|
|
54
54
|
*
|
|
55
|
-
* This is
|
|
56
|
-
* Binding's functionality.
|
|
55
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
56
|
+
* components wrapping `<Binding>`'s functionality.
|
|
57
|
+
*
|
|
58
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
59
|
+
*
|
|
57
60
|
* @bindable
|
|
58
61
|
* @readonly
|
|
59
62
|
*/
|
|
60
63
|
ref?: V | undefined;
|
|
61
64
|
/**
|
|
62
65
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
63
|
-
* the
|
|
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.
|
|
64
72
|
*
|
|
65
|
-
* This is primarily for internal use, when implementing convenience components wrapping
|
|
66
|
-
* Binding's functionality in combination with a Tweakpane plugin.
|
|
67
73
|
* @default `undefined`
|
|
68
74
|
*/
|
|
69
75
|
plugin?: import('@tweakpane/core').TpPluginBundle | undefined;
|
|
@@ -76,7 +82,9 @@ declare class __sveltets_Render<
|
|
|
76
82
|
*/
|
|
77
83
|
value: T;
|
|
78
84
|
};
|
|
79
|
-
events(): {
|
|
85
|
+
events(): {
|
|
86
|
+
change: import('..').BindingChangeEvent;
|
|
87
|
+
} & {
|
|
80
88
|
[evt: string]: CustomEvent<any>;
|
|
81
89
|
};
|
|
82
90
|
slots(): {};
|
|
@@ -54,18 +54,24 @@ declare class __sveltets_Render<
|
|
|
54
54
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
55
55
|
* this control.
|
|
56
56
|
*
|
|
57
|
-
* This is
|
|
58
|
-
* Binding's functionality.
|
|
57
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
58
|
+
* components wrapping `<Binding>`'s functionality.
|
|
59
|
+
*
|
|
60
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
61
|
+
*
|
|
59
62
|
* @bindable
|
|
60
63
|
* @readonly
|
|
61
64
|
*/
|
|
62
65
|
ref?: V | undefined;
|
|
63
66
|
/**
|
|
64
67
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
65
|
-
* the
|
|
68
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
69
|
+
*
|
|
70
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
71
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
72
|
+
*
|
|
73
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
66
74
|
*
|
|
67
|
-
* This is primarily for internal use, when implementing convenience components wrapping
|
|
68
|
-
* Binding's functionality in combination with a Tweakpane plugin.
|
|
69
75
|
* @default `undefined`
|
|
70
76
|
*/
|
|
71
77
|
plugin?: import('tweakpane').TpPluginBundle | undefined;
|
|
@@ -100,7 +106,9 @@ declare class __sveltets_Render<
|
|
|
100
106
|
* */
|
|
101
107
|
userExpandable?: boolean | undefined;
|
|
102
108
|
};
|
|
103
|
-
events(): {
|
|
109
|
+
events(): {
|
|
110
|
+
change: import('..').BindingChangeEvent;
|
|
111
|
+
} & {
|
|
104
112
|
[evt: string]: CustomEvent<any>;
|
|
105
113
|
};
|
|
106
114
|
slots(): {};
|
|
@@ -52,18 +52,24 @@ declare class __sveltets_Render<
|
|
|
52
52
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
53
53
|
* this control.
|
|
54
54
|
*
|
|
55
|
-
* This is
|
|
56
|
-
* Binding's functionality.
|
|
55
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
56
|
+
* components wrapping `<Binding>`'s functionality.
|
|
57
|
+
*
|
|
58
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
59
|
+
*
|
|
57
60
|
* @bindable
|
|
58
61
|
* @readonly
|
|
59
62
|
*/
|
|
60
63
|
ref?: V | undefined;
|
|
61
64
|
/**
|
|
62
65
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
63
|
-
* the
|
|
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.
|
|
64
72
|
*
|
|
65
|
-
* This is primarily for internal use, when implementing convenience components wrapping
|
|
66
|
-
* Binding's functionality in combination with a Tweakpane plugin.
|
|
67
73
|
* @default `undefined`
|
|
68
74
|
*/
|
|
69
75
|
plugin?: import('@tweakpane/core').TpPluginBundle | undefined;
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
export let theme = void 0;
|
|
13
13
|
export let scale = 1;
|
|
14
14
|
export let userCreatedPane = true;
|
|
15
|
-
export let
|
|
15
|
+
export let tpPane = void 0;
|
|
16
16
|
const parentStore = writable();
|
|
17
17
|
const existingParentStore = getContext('parentStore');
|
|
18
18
|
let pluginsRegistered = [];
|
|
19
19
|
const registerPlugin = (plugin) => {
|
|
20
|
-
if (
|
|
21
|
-
console.warn(`
|
|
20
|
+
if (tpPane === void 0) {
|
|
21
|
+
console.warn(`tpPane is undefined, failed to register plugin "${plugin.id}"`);
|
|
22
22
|
} else if (!pluginsRegistered.includes(plugin.id)) {
|
|
23
|
-
|
|
23
|
+
tpPane?.registerPlugin(plugin);
|
|
24
24
|
pluginsRegistered.push(plugin.id);
|
|
25
25
|
}
|
|
26
26
|
};
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
$parentStore.on('fold', () => {
|
|
36
36
|
_expanded = $parentStore.expanded;
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
tpPane = $parentStore;
|
|
39
39
|
setContext('parentStore', parentStore);
|
|
40
40
|
onDestroy(() => {
|
|
41
41
|
$parentStore.dispose();
|
|
@@ -44,32 +44,32 @@
|
|
|
44
44
|
setContext('parentStore', writable(true));
|
|
45
45
|
}
|
|
46
46
|
function setScale(scale2) {
|
|
47
|
-
if (
|
|
47
|
+
if (tpPane) {
|
|
48
48
|
if (scale2 === 1) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
tpPane.element.style.removeProperty('transform-origin');
|
|
50
|
+
tpPane.element.style.removeProperty('transform');
|
|
51
|
+
tpPane.element.style.removeProperty('width');
|
|
52
52
|
} else {
|
|
53
53
|
const clampedScale = Math.max(0, scale2);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
tpPane.element.style.transformOrigin = '0 0';
|
|
55
|
+
tpPane.element.style.transform = `scale(${clampedScale})`;
|
|
56
|
+
tpPane.element.style.width = `${100 / clampedScale}%`;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
function syncFolded() {
|
|
61
|
-
if (
|
|
62
|
-
|
|
61
|
+
if (tpPane) {
|
|
62
|
+
tpPane.expanded = _expanded;
|
|
63
63
|
}
|
|
64
64
|
expanded = _expanded;
|
|
65
65
|
}
|
|
66
|
-
$:
|
|
67
|
-
$:
|
|
68
|
-
$:
|
|
69
|
-
$:
|
|
70
|
-
$:
|
|
71
|
-
$: _expanded,
|
|
72
|
-
$:
|
|
66
|
+
$: tpPane?.element && tpPane?.element.classList.add('svelte-tweakpane-ui');
|
|
67
|
+
$: tpPane && setScale(scale);
|
|
68
|
+
$: tpPane && updateCollapsibility(userExpandable, tpPane.element, 'tp-rotv_b', 'tp-rotv_m');
|
|
69
|
+
$: tpPane && title && (tpPane.title = title);
|
|
70
|
+
$: tpPane && applyTheme(tpPane.element, theme);
|
|
71
|
+
$: _expanded, tpPane && expanded !== void 0 && syncFolded();
|
|
72
|
+
$: tpPane && (_expanded = expanded);
|
|
73
73
|
</script>
|
|
74
74
|
|
|
75
75
|
{#if BROWSER}
|
|
@@ -53,9 +53,19 @@ declare const __propDef: {
|
|
|
53
53
|
*/ scale?: number | undefined;
|
|
54
54
|
/** Internal use only. */ userCreatedPane?: boolean | undefined;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* The internal Tweakpane [`Pane`](https://tweakpane.github.io/docs/api/classes/Pane.html) object.
|
|
57
|
+
*
|
|
58
|
+
* This property is exposed for advanced use cases only.
|
|
59
|
+
*
|
|
60
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
61
|
+
*
|
|
62
|
+
* Note that the `Pane` type for this property comes from the core Tweakpane library.
|
|
63
|
+
* Creating an alias is suggested to avoid confusion with the _Svelte Tweakpane UI_ `Pane`
|
|
64
|
+
* component: e.g. `import { type Pane as TpPane } from 'tweakpane'`
|
|
65
|
+
*
|
|
66
|
+
* @bindable
|
|
57
67
|
* @readonly
|
|
58
|
-
* */
|
|
68
|
+
* */ tpPane?: TpPane | undefined;
|
|
59
69
|
};
|
|
60
70
|
events: {
|
|
61
71
|
[evt: string]: CustomEvent<any>;
|
|
@@ -48,18 +48,24 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
48
48
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
49
49
|
* this control.
|
|
50
50
|
*
|
|
51
|
-
* This is
|
|
52
|
-
* Binding's functionality.
|
|
51
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
52
|
+
* components wrapping `<Binding>`'s functionality.
|
|
53
|
+
*
|
|
54
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
55
|
+
*
|
|
53
56
|
* @bindable
|
|
54
57
|
* @readonly
|
|
55
58
|
*/
|
|
56
59
|
ref?: GenericSliderRef | undefined;
|
|
57
60
|
/**
|
|
58
61
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
59
|
-
* the
|
|
62
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
63
|
+
*
|
|
64
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
65
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
66
|
+
*
|
|
67
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
60
68
|
*
|
|
61
|
-
* This is primarily for internal use, when implementing convenience components wrapping
|
|
62
|
-
* Binding's functionality in combination with a Tweakpane plugin.
|
|
63
69
|
* @default `undefined`
|
|
64
70
|
*/
|
|
65
71
|
plugin?: import('tweakpane').TpPluginBundle | undefined;
|
|
@@ -87,7 +93,7 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
87
93
|
* */
|
|
88
94
|
max?: number | undefined;
|
|
89
95
|
/**
|
|
90
|
-
* A function to customize the point value's
|
|
96
|
+
* A function to customize the point value's string representation (e.g. rounding, etc.).
|
|
91
97
|
* @default `undefined` \
|
|
92
98
|
* Normal `.toString()` formatting.
|
|
93
99
|
* */
|
|
@@ -112,7 +118,9 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
|
|
|
112
118
|
* */
|
|
113
119
|
step?: number | undefined;
|
|
114
120
|
};
|
|
115
|
-
events(): {
|
|
121
|
+
events(): {
|
|
122
|
+
change: import('..').BindingChangeEvent;
|
|
123
|
+
} & {
|
|
116
124
|
[evt: string]: CustomEvent<any>;
|
|
117
125
|
};
|
|
118
126
|
slots(): {};
|
|
@@ -48,18 +48,24 @@ declare const __propDef: {
|
|
|
48
48
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
49
49
|
* this control.
|
|
50
50
|
*
|
|
51
|
-
* This is
|
|
52
|
-
* Binding's functionality.
|
|
51
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
52
|
+
* components wrapping `<Binding>`'s functionality.
|
|
53
|
+
*
|
|
54
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
55
|
+
*
|
|
53
56
|
* @bindable
|
|
54
57
|
* @readonly
|
|
55
58
|
*/
|
|
56
59
|
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined;
|
|
57
60
|
/**
|
|
58
61
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
59
|
-
* the
|
|
62
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
63
|
+
*
|
|
64
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
65
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
66
|
+
*
|
|
67
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
60
68
|
*
|
|
61
|
-
* This is primarily for internal use, when implementing convenience components wrapping
|
|
62
|
-
* Binding's functionality in combination with a Tweakpane plugin.
|
|
63
69
|
* @default `undefined`
|
|
64
70
|
*/
|
|
65
71
|
plugin?: import('@tweakpane/core').TpPluginBundle | undefined;
|
|
@@ -48,18 +48,24 @@ declare const __propDef: {
|
|
|
48
48
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
49
49
|
* this control.
|
|
50
50
|
*
|
|
51
|
-
* This is
|
|
52
|
-
* Binding's functionality.
|
|
51
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
52
|
+
* components wrapping `<Binding>`'s functionality.
|
|
53
|
+
*
|
|
54
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
55
|
+
*
|
|
53
56
|
* @bindable
|
|
54
57
|
* @readonly
|
|
55
58
|
*/
|
|
56
59
|
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined;
|
|
57
60
|
/**
|
|
58
61
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
59
|
-
* the
|
|
62
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
63
|
+
*
|
|
64
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
65
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
66
|
+
*
|
|
67
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
60
68
|
*
|
|
61
|
-
* This is primarily for internal use, when implementing convenience components wrapping
|
|
62
|
-
* Binding's functionality in combination with a Tweakpane plugin.
|
|
63
69
|
* @default `undefined`
|
|
64
70
|
*/
|
|
65
71
|
plugin?: import('@tweakpane/core').TpPluginBundle | undefined;
|
|
@@ -111,7 +117,7 @@ declare const __propDef: {
|
|
|
111
117
|
* */
|
|
112
118
|
max?: number | undefined;
|
|
113
119
|
/**
|
|
114
|
-
* A function to customize the number's
|
|
120
|
+
* A function to customize the number's string representation (e.g. rounding, etc.).
|
|
115
121
|
* @default `undefined` \
|
|
116
122
|
* Normal `.toString()` formatting.
|
|
117
123
|
* */
|
|
@@ -162,7 +168,12 @@ export type InternalMonitorNumberSlots = typeof __propDef.slots;
|
|
|
162
168
|
* }, 100);
|
|
163
169
|
* </script>
|
|
164
170
|
*
|
|
165
|
-
* <InternalMonitorNumber
|
|
171
|
+
* <InternalMonitorNumber
|
|
172
|
+
* value={numberToMonitor}
|
|
173
|
+
* min={-1}
|
|
174
|
+
* max={1}
|
|
175
|
+
* graph={true}
|
|
176
|
+
* />
|
|
166
177
|
* ```
|
|
167
178
|
*
|
|
168
179
|
* @sourceLink
|
|
@@ -48,18 +48,24 @@ declare const __propDef: {
|
|
|
48
48
|
* [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
|
|
49
49
|
* this control.
|
|
50
50
|
*
|
|
51
|
-
* This is
|
|
52
|
-
* Binding's functionality.
|
|
51
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
52
|
+
* components wrapping `<Binding>`'s functionality.
|
|
53
|
+
*
|
|
54
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
55
|
+
*
|
|
53
56
|
* @bindable
|
|
54
57
|
* @readonly
|
|
55
58
|
*/
|
|
56
59
|
ref?: import('./GenericMonitor.svelte').GenericMonitorRef | undefined;
|
|
57
60
|
/**
|
|
58
61
|
* Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
|
|
59
|
-
* the
|
|
62
|
+
* the `<Binding>`'s containing `<Pane>`.
|
|
63
|
+
*
|
|
64
|
+
* This property is exposed for advanced use cases only, such as when implementing convenience
|
|
65
|
+
* components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
|
|
66
|
+
*
|
|
67
|
+
* Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
|
|
60
68
|
*
|
|
61
|
-
* This is primarily for internal use, when implementing convenience components wrapping
|
|
62
|
-
* Binding's functionality in combination with a Tweakpane plugin.
|
|
63
69
|
* @default `undefined`
|
|
64
70
|
*/
|
|
65
71
|
plugin?: import('@tweakpane/core').TpPluginBundle | undefined;
|