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,20 +1,20 @@
1
- import { SvelteComponent } from 'svelte';
2
- import type { Simplify } from '../utils';
3
- import type { ValueChangeEvent } from '../utils.js';
4
- import type { PointDimensionParams } from '@tweakpane/core';
5
- export type RotationQuaternionOptions = Simplify<PointDimensionParams>;
1
+ import { SvelteComponent } from 'svelte'
2
+ import type { Simplify } from '../utils'
3
+ import type { ValueChangeEvent } from '../utils.js'
4
+ import type { PointDimensionParams } from '@tweakpane/core'
5
+ export type RotationQuaternionOptions = Simplify<PointDimensionParams>
6
6
  export type RotationQuaternionValueObject = {
7
- x: number;
8
- y: number;
9
- z: number;
10
- w: number;
11
- };
12
- export type RotationQuaternionValueTuple = [x: number, y: number, z: number, w: number];
7
+ x: number
8
+ y: number
9
+ z: number
10
+ w: number
11
+ }
12
+ export type RotationQuaternionValueTuple = [x: number, y: number, z: number, w: number]
13
13
  export type RotationQuaternionValue = Simplify<
14
14
  RotationQuaternionValueObject | RotationQuaternionValueTuple
15
- >;
16
- export type RotationQuaternionChangeEvent = ValueChangeEvent<RotationQuaternionValue>;
17
- import type { RotationInputPluginQuaternionParams as RotationQuaternionOptionsInternal } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/RotationInputPluginQuaternionParams';
15
+ >
16
+ export type RotationQuaternionChangeEvent = ValueChangeEvent<RotationQuaternionValue>
17
+ import type { RotationInputPluginQuaternionParams as RotationQuaternionOptionsInternal } from '@kitschpatrol/tweakpane-plugin-rotation/dist/types/RotationInputPluginQuaternionParams'
18
18
  declare const __propDef: {
19
19
  props: {
20
20
  /**
@@ -24,7 +24,7 @@ declare const __propDef: {
24
24
  * original TweakpaneRotationPlugin API.
25
25
  * @bindable
26
26
  * */
27
- value: RotationQuaternionValue;
27
+ value: RotationQuaternionValue
28
28
  /**
29
29
  * Input parameters specific to the X dimension.
30
30
  *
@@ -32,7 +32,7 @@ declare const __propDef: {
32
32
  * options, not a value.
33
33
  * @default `undefined`
34
34
  * */
35
- optionsX?: RotationQuaternionOptions;
35
+ optionsX?: RotationQuaternionOptions
36
36
  /**
37
37
  * Input parameters specific to the Y dimension.
38
38
  *
@@ -40,7 +40,7 @@ declare const __propDef: {
40
40
  * options, not a value.
41
41
  * @default `undefined`
42
42
  * */
43
- optionsY?: RotationQuaternionOptions;
43
+ optionsY?: RotationQuaternionOptions
44
44
  /**
45
45
  * Input parameters specific to the Z dimension.
46
46
  *
@@ -48,7 +48,7 @@ declare const __propDef: {
48
48
  * options, not a value.
49
49
  * @default `undefined`
50
50
  * */
51
- optionsZ?: RotationQuaternionOptions;
51
+ optionsZ?: RotationQuaternionOptions
52
52
  /**
53
53
  * Input parameters specific to the W dimension.
54
54
  *
@@ -56,30 +56,30 @@ declare const __propDef: {
56
56
  * options, not a value.
57
57
  * @default `undefined`
58
58
  * */
59
- optionsW?: RotationQuaternionOptions;
59
+ optionsW?: RotationQuaternionOptions
60
60
  } & Omit<
61
61
  {
62
62
  /**
63
63
  * DOM class name of the button used to expand and collapse the input's picker.
64
64
  * @default `undefined`
65
65
  */
66
- buttonClass?: string;
66
+ buttonClass?: string
67
67
  /**
68
68
  * Expand or collapse the input's picker.
69
69
  * @default `false`
70
70
  * @bindable
71
71
  */
72
- expanded?: boolean;
72
+ expanded?: boolean
73
73
  /**
74
74
  * The style of value "picker" to use in the input.
75
75
  * @default `'popup'`
76
76
  */
77
- picker?: 'inline' | 'popup';
77
+ picker?: 'inline' | 'popup'
78
78
  /**
79
79
  * Allow users to interactively expand / contract the picker.
80
80
  * @default `true`
81
81
  */
82
- userExpandable?: boolean;
82
+ userExpandable?: boolean
83
83
  } & {
84
84
  /**
85
85
  * The quaternion value to control.
@@ -88,26 +88,26 @@ declare const __propDef: {
88
88
  * original TweakpaneRotationPlugin API.
89
89
  * @bindable
90
90
  */
91
- value: RotationQuaternionValue;
91
+ value: RotationQuaternionValue
92
92
  } & Omit<
93
93
  {
94
94
  /**
95
95
  * The binding's target object with values to manipulate.
96
96
  * @bindable
97
97
  */
98
- object: import('@tweakpane/core').Bindable & Record<string, RotationQuaternionValue>;
98
+ object: import('@tweakpane/core').Bindable & Record<string, RotationQuaternionValue>
99
99
  /** The key for the value in the target `object` that the control should manipulate. */
100
- key: string;
100
+ key: string
101
101
  /**
102
102
  * Prevent interactivity and gray out the control.
103
103
  * @default `false`
104
104
  */
105
- disabled?: boolean;
105
+ disabled?: boolean
106
106
  /**
107
107
  * Text displayed next to control.
108
108
  * @default `undefined`
109
109
  */
110
- label?: string | undefined;
110
+ label?: string | undefined
111
111
  /**
112
112
  * Tweakpane's internal options object.
113
113
  *
@@ -120,7 +120,7 @@ declare const __propDef: {
120
120
  * Tweakpane UI_.
121
121
  * @default `undefined`
122
122
  */
123
- options?: RotationQuaternionOptionsInternal | undefined;
123
+ options?: RotationQuaternionOptionsInternal | undefined
124
124
  /**
125
125
  * Custom color scheme.
126
126
  *
@@ -128,7 +128,7 @@ declare const __propDef: {
128
128
  * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
129
129
  * set with `setGlobalDefaultTheme()`.
130
130
  */
131
- theme?: import('..').Theme | undefined;
131
+ theme?: import('..').Theme | undefined
132
132
  /**
133
133
  * Reference to internal Tweakpane
134
134
  * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
@@ -142,7 +142,7 @@ declare const __propDef: {
142
142
  * @bindable
143
143
  * @readonly
144
144
  */
145
- ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined;
145
+ ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
146
146
  /**
147
147
  * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
148
148
  * the `<Binding>`'s containing `<Pane>`.
@@ -154,13 +154,13 @@ declare const __propDef: {
154
154
  *
155
155
  * @default `undefined`
156
156
  */
157
- plugin?: import('../utils').Plugin | undefined;
157
+ plugin?: import('../utils').Plugin | undefined
158
158
  },
159
159
  'object' | 'key'
160
160
  >,
161
161
  'ref' | 'options' | 'plugin' | 'buttonClass'
162
- >;
163
- slots: {};
162
+ >
163
+ slots: {}
164
164
  events: {
165
165
  /**
166
166
  * Fires when `value` changes.
@@ -173,12 +173,12 @@ declare const __propDef: {
173
173
  * @extends ValueChangeEvent
174
174
  * @event
175
175
  * */
176
- change: RotationQuaternionChangeEvent;
177
- };
178
- };
179
- export type RotationQuaternionProps = typeof __propDef.props;
180
- export type RotationQuaternionEvents = typeof __propDef.events;
181
- export type RotationQuaternionSlots = typeof __propDef.slots;
176
+ change: RotationQuaternionChangeEvent
177
+ }
178
+ }
179
+ export type RotationQuaternionProps = typeof __propDef.props
180
+ export type RotationQuaternionEvents = typeof __propDef.events
181
+ export type RotationQuaternionSlots = typeof __propDef.slots
182
182
  /**
183
183
  * Integrates the [quaternion
184
184
  * rotation](https://github.com/0b5vr/tweakpane-plugin-rotation/blob/dev/src/RotationInputPluginQuaternion.ts)
@@ -207,24 +207,24 @@ export type RotationQuaternionSlots = typeof __propDef.slots;
207
207
  * Button,
208
208
  * RotationQuaternion,
209
209
  * type RotationQuaternionValue,
210
- * Utils
211
- * } from 'svelte-tweakpane-ui';
210
+ * Utils,
211
+ * } from 'svelte-tweakpane-ui'
212
212
  *
213
213
  * // Value could also be an object
214
214
  * // e.g. {x: 0, y: 0, z: 0, w: 0}
215
- * let value: RotationQuaternionValue = [0, 0, 0, 0];
215
+ * let value: RotationQuaternionValue = [0, 0, 0, 0]
216
216
  *
217
- * $: transform = Utils.quaternionToCssTransform(value);
217
+ * $: transform = Utils.quaternionToCssTransform(value)
218
218
  * $: valueRows = Array.isArray(value)
219
219
  * ? value.map((v) => `${v >= 0 ? '+' : ''}${v.toFixed(6)}`).join('\n')
220
- * : '';
220
+ * : ''
221
221
  * </script>
222
222
  *
223
223
  * <RotationQuaternion
224
224
  * bind:value
225
225
  * expanded={true}
226
226
  * label="CSS Rotation"
227
- * picker={'inline'}
227
+ * picker="inline"
228
228
  * />
229
229
  * <Button on:click={() => (value = [0, 0, 0, 0])} title="Reset" />
230
230
  *
@@ -252,4 +252,4 @@ export default class RotationQuaternion extends SvelteComponent<
252
252
  RotationQuaternionEvents,
253
253
  RotationQuaternionSlots
254
254
  > {}
255
- export {};
255
+ export {}
@@ -1,20 +1,20 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>
4
- import GenericSlider from '../internal/GenericSlider.svelte';
5
- import {} from 'svelte';
6
- export let value;
7
- export let wide = void 0;
8
- let ref;
4
+ import GenericSlider from '../internal/GenericSlider.svelte'
5
+ import {} from 'svelte'
6
+ export let value
7
+ export let wide = void 0
8
+ let ref
9
9
  function updateWide(wide2) {
10
- const inputField = ref?.element.querySelector('div.tp-sldtxtv_t');
10
+ const inputField = ref?.element.querySelector('div.tp-sldtxtv_t')
11
11
  if (wide2) {
12
- inputField?.style.setProperty('display', 'none');
12
+ inputField?.style.setProperty('display', 'none')
13
13
  } else {
14
- inputField?.style.removeProperty('display');
14
+ inputField?.style.removeProperty('display')
15
15
  }
16
16
  }
17
- $: ref && wide !== void 0 && updateWide(wide);
17
+ $: ref && wide !== void 0 && updateWide(wide)
18
18
  </script>
19
19
 
20
20
  <GenericSlider bind:value bind:ref on:change {...$$restProps} />
@@ -1,14 +1,14 @@
1
- import { SvelteComponent } from 'svelte';
2
- import type { ValueChangeEvent } from '../utils.js';
3
- import type { SliderInputBindingApi as GenericSliderRef } from 'tweakpane';
4
- export type SliderChangeEvent = ValueChangeEvent<number>;
1
+ import { SvelteComponent } from 'svelte'
2
+ import type { ValueChangeEvent } from '../utils.js'
3
+ import type { SliderInputBindingApi as GenericSliderRef } from 'tweakpane'
4
+ export type SliderChangeEvent = ValueChangeEvent<number>
5
5
  declare const __propDef: {
6
6
  props: {
7
7
  /**
8
8
  * A `number` value to control.
9
9
  * @bindable.
10
10
  * */
11
- value: number;
11
+ value: number
12
12
  } & Omit<
13
13
  {
14
14
  /**
@@ -17,70 +17,70 @@ declare const __propDef: {
17
17
  * Specifying both a `min` and a `max` prop turns the control into a slider.
18
18
  * @default `undefined`
19
19
  */
20
- min?: number;
20
+ min?: number
21
21
  /**
22
22
  * Maximum value.
23
23
  *
24
24
  * Specifying both a `min` and a `max` prop turns the control into a slider.
25
25
  * @default `undefined`
26
26
  */
27
- max?: number;
27
+ max?: number
28
28
  /**
29
29
  * A function to customize the point value's string representation (e.g. rounding, etc.).
30
30
  * @default `undefined` \
31
31
  * Normal `.toString()` formatting.
32
32
  */
33
- format?: ((value: number) => string) | undefined;
33
+ format?: ((value: number) => string) | undefined
34
34
  /**
35
35
  * The unit scale for key-based input for all dimensions (e.g. the up and down arrow keys).
36
36
  * @default `1` \
37
37
  * Or `stepValue` if defined.
38
38
  */
39
- keyScale?: number;
39
+ keyScale?: number
40
40
  /**
41
41
  * The unit scale for pointer-based input for all dimensions.
42
42
  * @default `undefined` \
43
43
  * [Dynamic based on magnitude of
44
44
  * `value`](https://github.com/cocopon/tweakpane/blob/66dfbea04bfe9b7f031673c955ceda1f92356e75/packages/core/src/common/number/util.ts#L54).
45
45
  */
46
- pointerScale?: number;
46
+ pointerScale?: number
47
47
  /**
48
48
  * The minimum step interval.
49
49
  * @default `undefined` \
50
50
  * No step constraint.
51
51
  */
52
- step?: number;
52
+ step?: number
53
53
  /**
54
54
  * When `true`, expand the width of the control at the expense of the numeric input
55
55
  * field.
56
56
  * @default `false`
57
57
  */
58
- wide?: boolean;
58
+ wide?: boolean
59
59
  } & {
60
60
  /**
61
61
  * A `number` value to control.
62
62
  * @bindable .
63
63
  */
64
- value: number;
64
+ value: number
65
65
  } & Omit<
66
66
  {
67
67
  /**
68
68
  * The binding's target object with values to manipulate.
69
69
  * @bindable
70
70
  */
71
- object: import('@tweakpane/core').Bindable & Record<string, number>;
71
+ object: import('@tweakpane/core').Bindable & Record<string, number>
72
72
  /** The key for the value in the target `object` that the control should manipulate. */
73
- key: string;
73
+ key: string
74
74
  /**
75
75
  * Prevent interactivity and gray out the control.
76
76
  * @default `false`
77
77
  */
78
- disabled?: boolean;
78
+ disabled?: boolean
79
79
  /**
80
80
  * Text displayed next to control.
81
81
  * @default `undefined`
82
82
  */
83
- label?: string | undefined;
83
+ label?: string | undefined
84
84
  /**
85
85
  * Tweakpane's internal options object.
86
86
  *
@@ -93,7 +93,7 @@ declare const __propDef: {
93
93
  * Tweakpane UI_.
94
94
  * @default `undefined`
95
95
  */
96
- options?: import('tweakpane').NumberInputParams | undefined;
96
+ options?: import('tweakpane').NumberInputParams | undefined
97
97
  /**
98
98
  * Custom color scheme.
99
99
  *
@@ -101,7 +101,7 @@ declare const __propDef: {
101
101
  * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
102
102
  * set with `setGlobalDefaultTheme()`.
103
103
  */
104
- theme?: import('..').Theme | undefined;
104
+ theme?: import('..').Theme | undefined
105
105
  /**
106
106
  * Reference to internal Tweakpane
107
107
  * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
@@ -115,7 +115,7 @@ declare const __propDef: {
115
115
  * @bindable
116
116
  * @readonly
117
117
  */
118
- ref?: GenericSliderRef | undefined;
118
+ ref?: GenericSliderRef | undefined
119
119
  /**
120
120
  * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
121
121
  * the `<Binding>`'s containing `<Pane>`.
@@ -127,13 +127,13 @@ declare const __propDef: {
127
127
  *
128
128
  * @default `undefined`
129
129
  */
130
- plugin?: import('../utils.js').Plugin | undefined;
130
+ plugin?: import('../utils.js').Plugin | undefined
131
131
  },
132
132
  'object' | 'key'
133
133
  >,
134
134
  'ref' | 'options' | 'plugin'
135
- >;
136
- slots: {};
135
+ >
136
+ slots: {}
137
137
  events: {
138
138
  /**
139
139
  * Fires when `value` changes.
@@ -146,12 +146,12 @@ declare const __propDef: {
146
146
  * @extends ValueChangeEvent
147
147
  * @event
148
148
  * */
149
- change: SliderChangeEvent;
150
- };
151
- };
152
- export type SliderProps = typeof __propDef.props;
153
- export type SliderEvents = typeof __propDef.events;
154
- export type SliderSlots = typeof __propDef.slots;
149
+ change: SliderChangeEvent
150
+ }
151
+ }
152
+ export type SliderProps = typeof __propDef.props
153
+ export type SliderEvents = typeof __propDef.events
154
+ export type SliderSlots = typeof __propDef.slots
155
155
  /**
156
156
  * A slider component providing fine-grained control over numeric values.
157
157
  *
@@ -169,9 +169,9 @@ export type SliderSlots = typeof __propDef.slots;
169
169
  * @example
170
170
  * ```svelte
171
171
  * <script lang="ts">
172
- * import { Slider } from 'svelte-tweakpane-ui';
172
+ * import { Slider } from 'svelte-tweakpane-ui'
173
173
  *
174
- * let value = 0;
174
+ * let value = 0
175
175
  * </script>
176
176
  *
177
177
  * <Slider
@@ -188,4 +188,4 @@ export type SliderSlots = typeof __propDef.slots;
188
188
  * [Slider.svelte](https://github.com/kitschpatrol/svelte-tweakpane-ui/blob/main/src/lib/control/Slider.svelte)
189
189
  */
190
190
  export default class Slider extends SvelteComponent<SliderProps, SliderEvents, SliderSlots> {}
191
- export {};
191
+ export {}
@@ -1,30 +1,30 @@
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-inputs';
6
- export let value;
7
- export let wide = void 0;
8
- let options;
4
+ import GenericSlider from '../internal/GenericSlider.svelte'
5
+ import * as pluginModule from '@kitschpatrol/tweakpane-plugin-inputs'
6
+ export let value
7
+ export let wide = void 0
8
+ let options
9
9
  $: options = {
10
- view: 'stepper'
11
- };
12
- let ref;
10
+ view: 'stepper',
11
+ }
12
+ let ref
13
13
  function updateWide(wide2) {
14
- const inputField = ref?.element.querySelector('div.tp-stepv_t');
15
- const buttonContainer = ref?.element.querySelector('div.tp-stepv_s');
16
- const buttons = buttonContainer?.querySelectorAll('button');
14
+ const inputField = ref?.element.querySelector('div.tp-stepv_t')
15
+ const buttonContainer = ref?.element.querySelector('div.tp-stepv_s')
16
+ const buttons = buttonContainer?.querySelectorAll('button')
17
17
  if (wide2) {
18
- inputField?.style.setProperty('display', 'none');
19
- buttonContainer?.style.setProperty('flex', '1');
18
+ inputField?.style.setProperty('display', 'none')
19
+ buttonContainer?.style.setProperty('flex', '1')
20
20
  for (const button of buttons ?? []) {
21
- button.style.setProperty('flex', '1');
21
+ button.style.setProperty('flex', '1')
22
22
  }
23
23
  } else {
24
- inputField?.style.removeProperty('display');
24
+ inputField?.style.removeProperty('display')
25
25
  }
26
26
  }
27
- $: ref && wide !== void 0 && updateWide(wide);
27
+ $: ref && wide !== void 0 && updateWide(wide)
28
28
  </script>
29
29
 
30
30
  <GenericSlider bind:value bind:ref on:change {options} plugin={pluginModule} {...$$restProps} />
@@ -1,14 +1,14 @@
1
- import { SvelteComponent } from 'svelte';
2
- import type { ValueChangeEvent } from '../utils.js';
3
- import type { SliderInputBindingApi as GenericSliderRef } from 'tweakpane';
4
- export type StepperChangeEvent = ValueChangeEvent<number>;
1
+ import { SvelteComponent } from 'svelte'
2
+ import type { ValueChangeEvent } from '../utils.js'
3
+ import type { SliderInputBindingApi as GenericSliderRef } from 'tweakpane'
4
+ export type StepperChangeEvent = ValueChangeEvent<number>
5
5
  declare const __propDef: {
6
6
  props: {
7
7
  /**
8
8
  * A `number` value to control.
9
9
  * @bindable
10
10
  * */
11
- value: number;
11
+ value: number
12
12
  } & Omit<
13
13
  {
14
14
  /**
@@ -17,70 +17,70 @@ declare const __propDef: {
17
17
  * Specifying both a `min` and a `max` prop turns the control into a slider.
18
18
  * @default `undefined`
19
19
  */
20
- min?: number;
20
+ min?: number
21
21
  /**
22
22
  * Maximum value.
23
23
  *
24
24
  * Specifying both a `min` and a `max` prop turns the control into a slider.
25
25
  * @default `undefined`
26
26
  */
27
- max?: number;
27
+ max?: number
28
28
  /**
29
29
  * A function to customize the point value's string representation (e.g. rounding, etc.).
30
30
  * @default `undefined` \
31
31
  * Normal `.toString()` formatting.
32
32
  */
33
- format?: ((value: number) => string) | undefined;
33
+ format?: ((value: number) => string) | undefined
34
34
  /**
35
35
  * The unit scale for key-based input for all dimensions (e.g. the up and down arrow keys).
36
36
  * @default `1` \
37
37
  * Or `stepValue` if defined.
38
38
  */
39
- keyScale?: number;
39
+ keyScale?: number
40
40
  /**
41
41
  * The unit scale for pointer-based input for all dimensions.
42
42
  * @default `undefined` \
43
43
  * [Dynamic based on magnitude of
44
44
  * `value`](https://github.com/cocopon/tweakpane/blob/66dfbea04bfe9b7f031673c955ceda1f92356e75/packages/core/src/common/number/util.ts#L54).
45
45
  */
46
- pointerScale?: number;
46
+ pointerScale?: number
47
47
  /**
48
48
  * The minimum step interval.
49
49
  * @default `undefined` \
50
50
  * No step constraint.
51
51
  */
52
- step?: number;
52
+ step?: number
53
53
  /**
54
54
  * When `true`, expand the width of the control at the expense of the numeric input
55
55
  * field.
56
56
  * @default `false`
57
57
  */
58
- wide?: boolean;
58
+ wide?: boolean
59
59
  } & {
60
60
  /**
61
61
  * A `number` value to control.
62
62
  * @bindable
63
63
  */
64
- value: number;
64
+ value: number
65
65
  } & Omit<
66
66
  {
67
67
  /**
68
68
  * The binding's target object with values to manipulate.
69
69
  * @bindable
70
70
  */
71
- object: import('@tweakpane/core').Bindable & Record<string, number>;
71
+ object: import('@tweakpane/core').Bindable & Record<string, number>
72
72
  /** The key for the value in the target `object` that the control should manipulate. */
73
- key: string;
73
+ key: string
74
74
  /**
75
75
  * Prevent interactivity and gray out the control.
76
76
  * @default `false`
77
77
  */
78
- disabled?: boolean;
78
+ disabled?: boolean
79
79
  /**
80
80
  * Text displayed next to control.
81
81
  * @default `undefined`
82
82
  */
83
- label?: string | undefined;
83
+ label?: string | undefined
84
84
  /**
85
85
  * Tweakpane's internal options object.
86
86
  *
@@ -93,7 +93,7 @@ declare const __propDef: {
93
93
  * Tweakpane UI_.
94
94
  * @default `undefined`
95
95
  */
96
- options?: import('tweakpane').NumberInputParams | undefined;
96
+ options?: import('tweakpane').NumberInputParams | undefined
97
97
  /**
98
98
  * Custom color scheme.
99
99
  *
@@ -101,7 +101,7 @@ declare const __propDef: {
101
101
  * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
102
102
  * set with `setGlobalDefaultTheme()`.
103
103
  */
104
- theme?: import('..').Theme | undefined;
104
+ theme?: import('..').Theme | undefined
105
105
  /**
106
106
  * Reference to internal Tweakpane
107
107
  * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
@@ -115,7 +115,7 @@ declare const __propDef: {
115
115
  * @bindable
116
116
  * @readonly
117
117
  */
118
- ref?: GenericSliderRef | undefined;
118
+ ref?: GenericSliderRef | undefined
119
119
  /**
120
120
  * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
121
121
  * the `<Binding>`'s containing `<Pane>`.
@@ -127,13 +127,13 @@ declare const __propDef: {
127
127
  *
128
128
  * @default `undefined`
129
129
  */
130
- plugin?: import('../utils.js').Plugin | undefined;
130
+ plugin?: import('../utils.js').Plugin | undefined
131
131
  },
132
132
  'object' | 'key'
133
133
  >,
134
134
  'ref' | 'options' | 'plugin' | 'amount'
135
- >;
136
- slots: {};
135
+ >
136
+ slots: {}
137
137
  events: {
138
138
  /**
139
139
  * Fires when `value` changes.
@@ -146,12 +146,12 @@ declare const __propDef: {
146
146
  * @extends ValueChangeEvent
147
147
  * @event
148
148
  * */
149
- change: StepperChangeEvent;
150
- };
151
- };
152
- export type StepperProps = typeof __propDef.props;
153
- export type StepperEvents = typeof __propDef.events;
154
- export type StepperSlots = typeof __propDef.slots;
149
+ change: StepperChangeEvent
150
+ }
151
+ }
152
+ export type StepperProps = typeof __propDef.props
153
+ export type StepperEvents = typeof __propDef.events
154
+ export type StepperSlots = typeof __propDef.slots
155
155
  /**
156
156
  * A control for simple incremental value changes.
157
157
  *
@@ -170,8 +170,8 @@ export type StepperSlots = typeof __propDef.slots;
170
170
  * @example
171
171
  * ```svelte
172
172
  * <script lang="ts">
173
- * import { Stepper } from 'svelte-tweakpane-ui';
174
- * let angle = 45;
173
+ * import { Stepper } from 'svelte-tweakpane-ui'
174
+ * let angle = 45
175
175
  * </script>
176
176
  *
177
177
  * <Stepper bind:value={angle} label="Angle" step={45} />
@@ -191,4 +191,4 @@ export type StepperSlots = typeof __propDef.slots;
191
191
  * [Stepper.svelte](https://github.com/kitschpatrol/svelte-tweakpane-ui/blob/main/src/lib/control/Stepper.svelte)
192
192
  */
193
193
  export default class Stepper extends SvelteComponent<StepperProps, StepperEvents, StepperSlots> {}
194
- export {};
194
+ export {}