svelte-tweakpane-ui 1.5.3 → 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.
Files changed (103) hide show
  1. package/dist/control/Button.svelte +30 -30
  2. package/dist/control/Button.svelte.d.ts +18 -18
  3. package/dist/control/ButtonGrid.svelte +25 -25
  4. package/dist/control/ButtonGrid.svelte.d.ts +35 -35
  5. package/dist/control/Checkbox.svelte +2 -2
  6. package/dist/control/Checkbox.svelte.d.ts +23 -23
  7. package/dist/control/Color.svelte +34 -34
  8. package/dist/control/Color.svelte.d.ts +40 -40
  9. package/dist/control/CubicBezier.svelte +30 -30
  10. package/dist/control/CubicBezier.svelte.d.ts +47 -47
  11. package/dist/control/File.svelte +20 -20
  12. package/dist/control/File.svelte.d.ts +38 -38
  13. package/dist/control/Image.svelte +22 -22
  14. package/dist/control/Image.svelte.d.ts +31 -31
  15. package/dist/control/IntervalSlider.svelte +24 -24
  16. package/dist/control/IntervalSlider.svelte.d.ts +39 -39
  17. package/dist/control/List.svelte +35 -35
  18. package/dist/control/List.svelte.d.ts +31 -31
  19. package/dist/control/Point.svelte +31 -31
  20. package/dist/control/Point.svelte.d.ts +81 -81
  21. package/dist/control/RadioGrid.svelte +24 -24
  22. package/dist/control/RadioGrid.svelte.d.ts +40 -40
  23. package/dist/control/Ring.svelte +9 -9
  24. package/dist/control/Ring.svelte.d.ts +40 -40
  25. package/dist/control/RotationEuler.svelte +25 -25
  26. package/dist/control/RotationEuler.svelte.d.ts +53 -53
  27. package/dist/control/RotationQuaternion.svelte +24 -24
  28. package/dist/control/RotationQuaternion.svelte.d.ts +47 -47
  29. package/dist/control/Slider.svelte +9 -9
  30. package/dist/control/Slider.svelte.d.ts +32 -32
  31. package/dist/control/Stepper.svelte +16 -16
  32. package/dist/control/Stepper.svelte.d.ts +32 -32
  33. package/dist/control/Text.svelte +13 -13
  34. package/dist/control/Text.svelte.d.ts +26 -26
  35. package/dist/control/Textarea.svelte +34 -34
  36. package/dist/control/Textarea.svelte.d.ts +29 -29
  37. package/dist/control/Wheel.svelte +8 -8
  38. package/dist/control/Wheel.svelte.d.ts +32 -32
  39. package/dist/core/Binding.svelte +60 -60
  40. package/dist/core/Binding.svelte.d.ts +33 -33
  41. package/dist/core/Blade.svelte +30 -30
  42. package/dist/core/Blade.svelte.d.ts +21 -21
  43. package/dist/core/Folder.svelte +34 -34
  44. package/dist/core/Folder.svelte.d.ts +22 -22
  45. package/dist/core/Pane.svelte +17 -17
  46. package/dist/core/Pane.svelte.d.ts +56 -56
  47. package/dist/core/Separator.svelte +5 -5
  48. package/dist/core/Separator.svelte.d.ts +20 -20
  49. package/dist/core/TabGroup.svelte +29 -29
  50. package/dist/core/TabGroup.svelte.d.ts +18 -18
  51. package/dist/core/TabPage.svelte +36 -36
  52. package/dist/core/TabPage.svelte.d.ts +21 -21
  53. package/dist/extra/AutoObject.svelte +20 -20
  54. package/dist/extra/AutoObject.svelte.d.ts +22 -22
  55. package/dist/extra/AutoValue.svelte +3 -3
  56. package/dist/extra/AutoValue.svelte.d.ts +26 -26
  57. package/dist/extra/Element.svelte +10 -10
  58. package/dist/extra/Element.svelte.d.ts +26 -26
  59. package/dist/index.d.ts +48 -48
  60. package/dist/index.js +35 -35
  61. package/dist/internal/ClsPad.svelte +11 -11
  62. package/dist/internal/ClsPad.svelte.d.ts +17 -17
  63. package/dist/internal/GenericBinding.svelte +11 -11
  64. package/dist/internal/GenericBinding.svelte.d.ts +25 -25
  65. package/dist/internal/GenericBladeFolding.svelte +19 -19
  66. package/dist/internal/GenericBladeFolding.svelte.d.ts +20 -20
  67. package/dist/internal/GenericInput.svelte +7 -7
  68. package/dist/internal/GenericInput.svelte.d.ts +27 -27
  69. package/dist/internal/GenericInputFolding.svelte +21 -21
  70. package/dist/internal/GenericInputFolding.svelte.d.ts +32 -32
  71. package/dist/internal/GenericMonitor.svelte +10 -10
  72. package/dist/internal/GenericMonitor.svelte.d.ts +29 -29
  73. package/dist/internal/GenericPane.svelte +48 -48
  74. package/dist/internal/GenericPane.svelte.d.ts +22 -22
  75. package/dist/internal/GenericSlider.svelte +15 -15
  76. package/dist/internal/GenericSlider.svelte.d.ts +29 -29
  77. package/dist/internal/InternalMonitorBoolean.svelte +5 -5
  78. package/dist/internal/InternalMonitorBoolean.svelte.d.ts +31 -31
  79. package/dist/internal/InternalMonitorNumber.svelte +14 -14
  80. package/dist/internal/InternalMonitorNumber.svelte.d.ts +37 -37
  81. package/dist/internal/InternalMonitorString.svelte +9 -9
  82. package/dist/internal/InternalMonitorString.svelte.d.ts +32 -32
  83. package/dist/internal/InternalPaneDraggable.svelte +169 -173
  84. package/dist/internal/InternalPaneDraggable.svelte.d.ts +30 -30
  85. package/dist/internal/InternalPaneFixed.svelte +13 -13
  86. package/dist/internal/InternalPaneFixed.svelte.d.ts +23 -23
  87. package/dist/internal/InternalPaneInline.svelte +14 -14
  88. package/dist/internal/InternalPaneInline.svelte.d.ts +21 -21
  89. package/dist/monitor/FpsGraph.svelte +35 -35
  90. package/dist/monitor/FpsGraph.svelte.d.ts +50 -42
  91. package/dist/monitor/Monitor.svelte +4 -4
  92. package/dist/monitor/Monitor.svelte.d.ts +87 -88
  93. package/dist/monitor/Profiler.svelte +37 -37
  94. package/dist/monitor/Profiler.svelte.d.ts +78 -76
  95. package/dist/monitor/WaveformMonitor.svelte +12 -12
  96. package/dist/monitor/WaveformMonitor.svelte.d.ts +39 -39
  97. package/dist/theme.d.ts +61 -61
  98. package/dist/theme.js +49 -53
  99. package/dist/utils.d.ts +62 -66
  100. package/dist/utils.js +78 -78
  101. package/license.txt +1 -1
  102. package/package.json +100 -115
  103. package/readme.md +1 -1
@@ -1,6 +1,6 @@
1
- import { SvelteComponent } from 'svelte';
2
- import type { ValueChangeEvent } from '../utils.js';
3
- import type { RingSeries } from '@kitschpatrol/tweakpane-plugin-camerakit/dist/types/util.js';
1
+ import { SvelteComponent } from 'svelte'
2
+ import type { ValueChangeEvent } from '../utils.js'
3
+ import type { RingSeries } from '@kitschpatrol/tweakpane-plugin-camerakit/dist/types/util.js'
4
4
  type RingUnit = {
5
5
  /**
6
6
  * The value for the unit.
@@ -8,7 +8,7 @@ type RingUnit = {
8
8
  * This sets the interval between each `value` labeled on the ring. For example a `value` of
9
9
  * `20` will show value labels 0, 20, 40... etc. spaced according to the `pixels` value.
10
10
  */
11
- value: number;
11
+ value: number
12
12
  /**
13
13
  * The number of pixels per unit.
14
14
  *
@@ -16,34 +16,34 @@ type RingUnit = {
16
16
  * example, if `pixels` is 100 and `value` is 10, you will see a value label on the ring in
17
17
  * the form of 10...(100 pixels)...20...(100 pixels)...30... etc.
18
18
  */
19
- pixels: number;
19
+ pixels: number
20
20
  /**
21
21
  * The number of vertical tick marks between each `value` label on the ring.
22
22
  *
23
23
  * For example, if `pixels` is `100`, `value` is `10, and `ticks` is `10`, you will have a
24
24
  * vertical tick mark every 10 pixels, and a value label every 100 pixels.
25
25
  */
26
- ticks: number;
27
- };
28
- export type { RingSeries, RingUnit };
29
- export type RingChangeEvent = ValueChangeEvent<number>;
26
+ ticks: number
27
+ }
28
+ export type { RingSeries, RingUnit }
29
+ export type RingChangeEvent = ValueChangeEvent<number>
30
30
  declare const __propDef: {
31
31
  props: {
32
32
  /**
33
33
  * A `number` value to control.
34
34
  * @bindable
35
35
  * */
36
- value: number;
36
+ value: number
37
37
  /**
38
38
  * Style variations.
39
39
  * @default `0`
40
40
  * */
41
- series?: RingSeries;
41
+ series?: RingSeries
42
42
  /**
43
43
  * Density and value mapping of the ring's tick marks.
44
44
  * @default `{ ticks: 5, pixels: 40, value: 10 }`
45
45
  * */
46
- unit?: RingUnit;
46
+ unit?: RingUnit
47
47
  } & Omit<
48
48
  {
49
49
  /**
@@ -52,70 +52,70 @@ declare const __propDef: {
52
52
  * Specifying both a `min` and a `max` prop turns the control into a slider.
53
53
  * @default `undefined`
54
54
  */
55
- min?: number;
55
+ min?: number
56
56
  /**
57
57
  * Maximum value.
58
58
  *
59
59
  * Specifying both a `min` and a `max` prop turns the control into a slider.
60
60
  * @default `undefined`
61
61
  */
62
- max?: number;
62
+ max?: number
63
63
  /**
64
64
  * A function to customize the point value's string representation (e.g. rounding, etc.).
65
65
  * @default `undefined` \
66
66
  * Normal `.toString()` formatting.
67
67
  */
68
- format?: ((value: number) => string) | undefined;
68
+ format?: ((value: number) => string) | undefined
69
69
  /**
70
70
  * The unit scale for key-based input for all dimensions (e.g. the up and down arrow keys).
71
71
  * @default `1` \
72
72
  * Or `stepValue` if defined.
73
73
  */
74
- keyScale?: number;
74
+ keyScale?: number
75
75
  /**
76
76
  * The unit scale for pointer-based input for all dimensions.
77
77
  * @default `undefined` \
78
78
  * [Dynamic based on magnitude of
79
79
  * `value`](https://github.com/cocopon/tweakpane/blob/66dfbea04bfe9b7f031673c955ceda1f92356e75/packages/core/src/common/number/util.ts#L54).
80
80
  */
81
- pointerScale?: number;
81
+ pointerScale?: number
82
82
  /**
83
83
  * The minimum step interval.
84
84
  * @default `undefined` \
85
85
  * No step constraint.
86
86
  */
87
- step?: number;
87
+ step?: number
88
88
  /**
89
89
  * When `true`, expand the width of the control at the expense of the numeric input
90
90
  * field.
91
91
  * @default `false`
92
92
  */
93
- wide?: boolean;
93
+ wide?: boolean
94
94
  } & {
95
95
  /**
96
96
  * A `number` value to control.
97
97
  * @bindable
98
98
  */
99
- value: number;
99
+ value: number
100
100
  } & Omit<
101
101
  {
102
102
  /**
103
103
  * The binding's target object with values to manipulate.
104
104
  * @bindable
105
105
  */
106
- object: import('@tweakpane/core').Bindable & Record<string, number>;
106
+ object: import('@tweakpane/core').Bindable & Record<string, number>
107
107
  /** The key for the value in the target `object` that the control should manipulate. */
108
- key: string;
108
+ key: string
109
109
  /**
110
110
  * Prevent interactivity and gray out the control.
111
111
  * @default `false`
112
112
  */
113
- disabled?: boolean;
113
+ disabled?: boolean
114
114
  /**
115
115
  * Text displayed next to control.
116
116
  * @default `undefined`
117
117
  */
118
- label?: string | undefined;
118
+ label?: string | undefined
119
119
  /**
120
120
  * Tweakpane's internal options object.
121
121
  *
@@ -128,7 +128,7 @@ declare const __propDef: {
128
128
  * Tweakpane UI_.
129
129
  * @default `undefined`
130
130
  */
131
- options?: import('tweakpane').NumberInputParams | undefined;
131
+ options?: import('tweakpane').NumberInputParams | undefined
132
132
  /**
133
133
  * Custom color scheme.
134
134
  *
@@ -136,7 +136,7 @@ declare const __propDef: {
136
136
  * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
137
137
  * set with `setGlobalDefaultTheme()`.
138
138
  */
139
- theme?: import('..').Theme | undefined;
139
+ theme?: import('..').Theme | undefined
140
140
  /**
141
141
  * Reference to internal Tweakpane
142
142
  * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
@@ -150,7 +150,7 @@ declare const __propDef: {
150
150
  * @bindable
151
151
  * @readonly
152
152
  */
153
- ref?: import('tweakpane').SliderInputBindingApi | undefined;
153
+ ref?: import('tweakpane').SliderInputBindingApi | undefined
154
154
  /**
155
155
  * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
156
156
  * the `<Binding>`'s containing `<Pane>`.
@@ -162,13 +162,13 @@ declare const __propDef: {
162
162
  *
163
163
  * @default `undefined`
164
164
  */
165
- plugin?: import('../utils.js').Plugin | undefined;
165
+ plugin?: import('../utils.js').Plugin | undefined
166
166
  },
167
167
  'object' | 'key'
168
168
  >,
169
169
  'ref' | 'options' | 'plugin'
170
- >;
171
- slots: {};
170
+ >
171
+ slots: {}
172
172
  events: {
173
173
  /**
174
174
  * Fires when `value` changes.
@@ -181,12 +181,12 @@ declare const __propDef: {
181
181
  * @extends ValueChangeEvent
182
182
  * @event
183
183
  * */
184
- change: RingChangeEvent;
185
- };
186
- };
187
- export type RingProps = typeof __propDef.props;
188
- export type RingEvents = typeof __propDef.events;
189
- export type RingSlots = typeof __propDef.slots;
184
+ change: RingChangeEvent
185
+ }
186
+ }
187
+ export type RingProps = typeof __propDef.props
188
+ export type RingEvents = typeof __propDef.events
189
+ export type RingSlots = typeof __propDef.slots
190
190
  /**
191
191
  * A control evoking the focus ring on a proper camera lens.
192
192
  *
@@ -205,15 +205,15 @@ export type RingSlots = typeof __propDef.slots;
205
205
  * @example
206
206
  * ```svelte
207
207
  * <script lang="ts">
208
- * import { Ring, type RingUnit } from 'svelte-tweakpane-ui';
208
+ * import { Ring, type RingUnit } from 'svelte-tweakpane-ui'
209
209
  *
210
210
  * let unitConfig: RingUnit = {
211
211
  * value: 20,
212
212
  * pixels: 40,
213
- * ticks: 5
214
- * };
213
+ * ticks: 5,
214
+ * }
215
215
  *
216
- * let angle = 45;
216
+ * let angle = 45
217
217
  * </script>
218
218
  *
219
219
  * <Ring
@@ -1,43 +1,43 @@
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 * as pluginModule from '@kitschpatrol/tweakpane-plugin-rotation';
7
- import { BROWSER } from 'esm-env';
8
- import { shallowEqual } from 'fast-equals';
9
- export let value;
10
- export let order = void 0;
11
- export let unit = void 0;
12
- export let optionsX = void 0;
13
- export let optionsY = void 0;
14
- export let optionsZ = void 0;
15
- export let expanded = void 0;
16
- let options;
17
- let internalValue;
18
- const buttonClass = 'tp-rotationswatchv_b';
4
+ import ClsPad from '../internal/ClsPad.svelte'
5
+ import GenericInputFolding from '../internal/GenericInputFolding.svelte'
6
+ import * as pluginModule from '@kitschpatrol/tweakpane-plugin-rotation'
7
+ import { BROWSER } from 'esm-env'
8
+ import { shallowEqual } from 'fast-equals'
9
+ export let value
10
+ export let order = void 0
11
+ export let unit = void 0
12
+ export let optionsX = void 0
13
+ export let optionsY = void 0
14
+ export let optionsZ = void 0
15
+ export let expanded = void 0
16
+ let options
17
+ let internalValue
18
+ const buttonClass = 'tp-rotationswatchv_b'
19
19
  function updateInternalValueFromValue() {
20
20
  if (Array.isArray(value)) {
21
- const newInternalValue = { x: value[0], y: value[1], z: value[2] };
21
+ const newInternalValue = { x: value[0], y: value[1], z: value[2] }
22
22
  if (!shallowEqual(newInternalValue, internalValue)) {
23
- internalValue = newInternalValue;
23
+ internalValue = newInternalValue
24
24
  }
25
25
  } else if (!shallowEqual(value, internalValue)) {
26
- internalValue = { ...value };
26
+ internalValue = { ...value }
27
27
  }
28
28
  }
29
29
  function updateValueFromInternalValue() {
30
30
  if (Array.isArray(value)) {
31
- const newValue = [internalValue.x, internalValue.y, internalValue.z];
31
+ const newValue = [internalValue.x, internalValue.y, internalValue.z]
32
32
  if (!shallowEqual(newValue, value)) {
33
- value = newValue;
33
+ value = newValue
34
34
  }
35
35
  } else if (!shallowEqual(internalValue, value)) {
36
- value = { ...internalValue };
36
+ value = { ...internalValue }
37
37
  }
38
38
  }
39
- $: value, updateInternalValueFromValue();
40
- $: internalValue, updateValueFromInternalValue();
39
+ $: value, updateInternalValueFromValue()
40
+ $: internalValue, updateValueFromInternalValue()
41
41
  $: options = {
42
42
  x: optionsX,
43
43
  y: optionsY,
@@ -45,8 +45,8 @@
45
45
  order,
46
46
  rotationMode: 'euler',
47
47
  unit,
48
- view: 'rotation'
49
- };
48
+ view: 'rotation',
49
+ }
50
50
  </script>
51
51
 
52
52
  <GenericInputFolding
@@ -1,21 +1,21 @@
1
- import { SvelteComponent } from 'svelte';
2
- import type { Simplify } from '../utils';
3
- import type { ValueChangeEvent } from '../utils.js';
4
- import type { EulerOrder } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/EulerOrder.js';
5
- import type { EulerUnit } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/EulerUnit.js';
6
- import type { PointDimensionParams } from '@tweakpane/core';
7
- export type RotationEulerOptions = Simplify<PointDimensionParams>;
8
- export type RotationEulerOrder = EulerOrder;
9
- export type RotationEulerUnit = EulerUnit;
1
+ import { SvelteComponent } from 'svelte'
2
+ import type { Simplify } from '../utils'
3
+ import type { ValueChangeEvent } from '../utils.js'
4
+ import type { EulerOrder } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/EulerOrder.js'
5
+ import type { EulerUnit } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/EulerUnit.js'
6
+ import type { PointDimensionParams } from '@tweakpane/core'
7
+ export type RotationEulerOptions = Simplify<PointDimensionParams>
8
+ export type RotationEulerOrder = EulerOrder
9
+ export type RotationEulerUnit = EulerUnit
10
10
  export type RotationEulerValueObject = {
11
- x: number;
12
- y: number;
13
- z: number;
14
- };
15
- export type RotationEulerValueTuple = [x: number, y: number, z: number];
16
- export type RotationEulerValue = Simplify<RotationEulerValueObject | RotationEulerValueTuple>;
17
- export type RotationEulerChangeEvent = ValueChangeEvent<RotationEulerValue>;
18
- import type { RotationInputPluginEulerParams as RotationEulerOptionsInternal } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/RotationInputPluginEulerParams';
11
+ x: number
12
+ y: number
13
+ z: number
14
+ }
15
+ export type RotationEulerValueTuple = [x: number, y: number, z: number]
16
+ export type RotationEulerValue = Simplify<RotationEulerValueObject | RotationEulerValueTuple>
17
+ export type RotationEulerChangeEvent = ValueChangeEvent<RotationEulerValue>
18
+ import type { RotationInputPluginEulerParams as RotationEulerOptionsInternal } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/RotationInputPluginEulerParams'
19
19
  declare const __propDef: {
20
20
  props: {
21
21
  /**
@@ -27,7 +27,7 @@ declare const __propDef: {
27
27
  * See the `order` prop to specify the sequence in which rotations are applied.
28
28
  * @bindable
29
29
  * */
30
- value: RotationEulerValue;
30
+ value: RotationEulerValue
31
31
  /**
32
32
  * Input parameters specific to the X dimension.
33
33
  *
@@ -35,7 +35,7 @@ declare const __propDef: {
35
35
  * object of options, not a value.
36
36
  * @default `undefined`
37
37
  * */
38
- optionsX?: RotationEulerOptions;
38
+ optionsX?: RotationEulerOptions
39
39
  /**
40
40
  * Input parameters specific to the Y dimension.
41
41
  *
@@ -43,7 +43,7 @@ declare const __propDef: {
43
43
  * object of options, not a value.
44
44
  * @default `undefined`
45
45
  * */
46
- optionsY?: RotationEulerOptions;
46
+ optionsY?: RotationEulerOptions
47
47
  /**
48
48
  * Input parameters specific to the Z dimension.
49
49
  *
@@ -51,7 +51,7 @@ declare const __propDef: {
51
51
  * object of options, not a value.
52
52
  * @default `undefined`
53
53
  * */
54
- optionsZ?: RotationEulerOptions;
54
+ optionsZ?: RotationEulerOptions
55
55
  /**
56
56
  * Order of in which rotations are applied.
57
57
  *
@@ -60,35 +60,35 @@ declare const __propDef: {
60
60
  * behavior.
61
61
  * @default `'XYZ'`
62
62
  * */
63
- order?: RotationEulerOrder;
63
+ order?: RotationEulerOrder
64
64
  /**
65
65
  * Units of rotation.
66
66
  * @default `'rad'`
67
67
  */
68
- unit?: RotationEulerUnit;
68
+ unit?: RotationEulerUnit
69
69
  } & Omit<
70
70
  {
71
71
  /**
72
72
  * DOM class name of the button used to expand and collapse the input's picker.
73
73
  * @default `undefined`
74
74
  */
75
- buttonClass?: string;
75
+ buttonClass?: string
76
76
  /**
77
77
  * Expand or collapse the input's picker.
78
78
  * @default `false`
79
79
  * @bindable
80
80
  */
81
- expanded?: boolean;
81
+ expanded?: boolean
82
82
  /**
83
83
  * The style of value "picker" to use in the input.
84
84
  * @default `'popup'`
85
85
  */
86
- picker?: 'inline' | 'popup';
86
+ picker?: 'inline' | 'popup'
87
87
  /**
88
88
  * Allow users to interactively expand / contract the picker.
89
89
  * @default `true`
90
90
  */
91
- userExpandable?: boolean;
91
+ userExpandable?: boolean
92
92
  } & {
93
93
  /**
94
94
  * The rotation value to control.
@@ -99,26 +99,26 @@ declare const __propDef: {
99
99
  * See the `order` prop to specify the sequence in which rotations are applied.
100
100
  * @bindable
101
101
  */
102
- value: RotationEulerValue;
102
+ value: RotationEulerValue
103
103
  } & Omit<
104
104
  {
105
105
  /**
106
106
  * The binding's target object with values to manipulate.
107
107
  * @bindable
108
108
  */
109
- object: import('@tweakpane/core').Bindable & Record<string, RotationEulerValue>;
109
+ object: import('@tweakpane/core').Bindable & Record<string, RotationEulerValue>
110
110
  /** The key for the value in the target `object` that the control should manipulate. */
111
- key: string;
111
+ key: string
112
112
  /**
113
113
  * Prevent interactivity and gray out the control.
114
114
  * @default `false`
115
115
  */
116
- disabled?: boolean;
116
+ disabled?: boolean
117
117
  /**
118
118
  * Text displayed next to control.
119
119
  * @default `undefined`
120
120
  */
121
- label?: string | undefined;
121
+ label?: string | undefined
122
122
  /**
123
123
  * Tweakpane's internal options object.
124
124
  *
@@ -131,7 +131,7 @@ declare const __propDef: {
131
131
  * Tweakpane UI_.
132
132
  * @default `undefined`
133
133
  */
134
- options?: RotationEulerOptionsInternal | undefined;
134
+ options?: RotationEulerOptionsInternal | undefined
135
135
  /**
136
136
  * Custom color scheme.
137
137
  *
@@ -139,7 +139,7 @@ declare const __propDef: {
139
139
  * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
140
140
  * set with `setGlobalDefaultTheme()`.
141
141
  */
142
- theme?: import('..').Theme | undefined;
142
+ theme?: import('..').Theme | undefined
143
143
  /**
144
144
  * Reference to internal Tweakpane
145
145
  * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
@@ -153,7 +153,7 @@ declare const __propDef: {
153
153
  * @bindable
154
154
  * @readonly
155
155
  */
156
- ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined;
156
+ ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
157
157
  /**
158
158
  * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
159
159
  * the `<Binding>`'s containing `<Pane>`.
@@ -165,13 +165,13 @@ declare const __propDef: {
165
165
  *
166
166
  * @default `undefined`
167
167
  */
168
- plugin?: import('../utils').Plugin | undefined;
168
+ plugin?: import('../utils').Plugin | undefined
169
169
  },
170
170
  'object' | 'key'
171
171
  >,
172
172
  'ref' | 'options' | 'plugin' | 'buttonClass'
173
- >;
174
- slots: {};
173
+ >
174
+ slots: {}
175
175
  events: {
176
176
  /**
177
177
  * Fires when `value` changes.
@@ -184,12 +184,12 @@ declare const __propDef: {
184
184
  * @extends ValueChangeEvent
185
185
  * @event
186
186
  * */
187
- change: RotationEulerChangeEvent;
188
- };
189
- };
190
- export type RotationEulerProps = typeof __propDef.props;
191
- export type RotationEulerEvents = typeof __propDef.events;
192
- export type RotationEulerSlots = typeof __propDef.slots;
187
+ change: RotationEulerChangeEvent
188
+ }
189
+ }
190
+ export type RotationEulerProps = typeof __propDef.props
191
+ export type RotationEulerEvents = typeof __propDef.events
192
+ export type RotationEulerSlots = typeof __propDef.slots
193
193
  /**
194
194
  * Integrates the [euler
195
195
  * rotation](https://github.com/0b5vr/tweakpane-plugin-rotation/blob/dev/src/RotationInputPluginEuler.ts)
@@ -218,35 +218,35 @@ export type RotationEulerSlots = typeof __propDef.slots;
218
218
  * Button,
219
219
  * RotationEuler,
220
220
  * type RotationEulerValueObject,
221
- * Utils
222
- * } from 'svelte-tweakpane-ui';
221
+ * Utils,
222
+ * } from 'svelte-tweakpane-ui'
223
223
  *
224
224
  * // Value could also be a tuple
225
225
  * // e.g. [0, 0, 0]
226
226
  * let value: RotationEulerValueObject = {
227
227
  * x: 0,
228
228
  * y: 0,
229
- * z: 0
230
- * };
229
+ * z: 0,
230
+ * }
231
231
  *
232
- * $: transform = Utils.eulerToCssTransform(value);
232
+ * $: transform = Utils.eulerToCssTransform(value)
233
233
  * $: valueRows = Object.values(value)
234
234
  * .map((v) => `${v >= 0 ? '+' : ''}${v.toFixed(6)}`)
235
- * .join('\n');
235
+ * .join('\n')
236
236
  * </script>
237
237
  *
238
238
  * <RotationEuler
239
239
  * bind:value
240
240
  * expanded={true}
241
241
  * label="CSS Rotation"
242
- * picker={'inline'}
242
+ * picker="inline"
243
243
  * />
244
244
  * <Button
245
245
  * on:click={() =>
246
246
  * (value = {
247
247
  * x: 0,
248
248
  * y: 0,
249
- * z: 0
249
+ * z: 0,
250
250
  * })}
251
251
  * title="Reset"
252
252
  * />
@@ -275,4 +275,4 @@ export default class RotationEuler extends SvelteComponent<
275
275
  RotationEulerEvents,
276
276
  RotationEulerSlots
277
277
  > {}
278
- export {};
278
+ export {}
@@ -1,50 +1,50 @@
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 * as pluginModule from '@kitschpatrol/tweakpane-plugin-rotation';
7
- import { BROWSER } from 'esm-env';
8
- import { shallowEqual } from 'fast-equals';
9
- export let value;
10
- export let optionsX = void 0;
11
- export let optionsY = void 0;
12
- export let optionsZ = void 0;
13
- export let optionsW = void 0;
14
- export let expanded = void 0;
15
- let options;
16
- let internalValue;
17
- const buttonClass = 'tp-rotationswatchv_b';
4
+ import ClsPad from '../internal/ClsPad.svelte'
5
+ import GenericInputFolding from '../internal/GenericInputFolding.svelte'
6
+ import * as pluginModule from '@kitschpatrol/tweakpane-plugin-rotation'
7
+ import { BROWSER } from 'esm-env'
8
+ import { shallowEqual } from 'fast-equals'
9
+ export let value
10
+ export let optionsX = void 0
11
+ export let optionsY = void 0
12
+ export let optionsZ = void 0
13
+ export let optionsW = void 0
14
+ export let expanded = void 0
15
+ let options
16
+ let internalValue
17
+ const buttonClass = 'tp-rotationswatchv_b'
18
18
  function updateInternalValueFromValue() {
19
19
  if (Array.isArray(value)) {
20
- const newInternalValue = { x: value[0], y: value[1], z: value[2], w: value[3] };
20
+ const newInternalValue = { x: value[0], y: value[1], z: value[2], w: value[3] }
21
21
  if (!shallowEqual(newInternalValue, internalValue)) {
22
- internalValue = newInternalValue;
22
+ internalValue = newInternalValue
23
23
  }
24
24
  } else if (!shallowEqual(value, internalValue)) {
25
- internalValue = { ...value };
25
+ internalValue = { ...value }
26
26
  }
27
27
  }
28
28
  function updateValueFromInternalValue() {
29
29
  if (Array.isArray(value)) {
30
- const newValue = [internalValue.x, internalValue.y, internalValue.z, internalValue.w];
30
+ const newValue = [internalValue.x, internalValue.y, internalValue.z, internalValue.w]
31
31
  if (!shallowEqual(newValue, value)) {
32
- value = newValue;
32
+ value = newValue
33
33
  }
34
34
  } else if (!shallowEqual(internalValue, value)) {
35
- value = { ...internalValue };
35
+ value = { ...internalValue }
36
36
  }
37
37
  }
38
- $: value, updateInternalValueFromValue();
39
- $: internalValue, updateValueFromInternalValue();
38
+ $: value, updateInternalValueFromValue()
39
+ $: internalValue, updateValueFromInternalValue()
40
40
  $: options = {
41
41
  x: optionsX,
42
42
  y: optionsY,
43
43
  z: optionsZ,
44
44
  w: optionsW,
45
45
  rotationMode: 'quaternion',
46
- view: 'rotation'
47
- };
46
+ view: 'rotation',
47
+ }
48
48
  </script>
49
49
 
50
50
  <GenericInputFolding