svelte-tweakpane-ui 1.5.12 → 1.5.13

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 (93) hide show
  1. package/dist/control/Button.svelte +5 -5
  2. package/dist/control/Button.svelte.d.ts +5 -5
  3. package/dist/control/ButtonGrid.svelte +5 -5
  4. package/dist/control/ButtonGrid.svelte.d.ts +32 -34
  5. package/dist/control/Checkbox.svelte.d.ts +9 -13
  6. package/dist/control/Color.svelte +3 -4
  7. package/dist/control/Color.svelte.d.ts +94 -99
  8. package/dist/control/CubicBezier.svelte +5 -5
  9. package/dist/control/CubicBezier.svelte.d.ts +43 -47
  10. package/dist/control/File.svelte +3 -3
  11. package/dist/control/File.svelte.d.ts +34 -38
  12. package/dist/control/Image.svelte +3 -3
  13. package/dist/control/Image.svelte.d.ts +31 -35
  14. package/dist/control/IntervalSlider.svelte +1 -1
  15. package/dist/control/IntervalSlider.svelte.d.ts +103 -108
  16. package/dist/control/List.svelte +5 -5
  17. package/dist/control/List.svelte.d.ts +24 -28
  18. package/dist/control/Point.svelte +9 -9
  19. package/dist/control/Point.svelte.d.ts +142 -147
  20. package/dist/control/RadioGrid.svelte +3 -4
  21. package/dist/control/RadioGrid.svelte.d.ts +60 -64
  22. package/dist/control/Ring.svelte +1 -1
  23. package/dist/control/Ring.svelte.d.ts +105 -109
  24. package/dist/control/RotationEuler.svelte +5 -5
  25. package/dist/control/RotationEuler.svelte.d.ts +110 -115
  26. package/dist/control/RotationQuaternion.svelte +5 -5
  27. package/dist/control/RotationQuaternion.svelte.d.ts +108 -113
  28. package/dist/control/Slider.svelte +1 -1
  29. package/dist/control/Slider.svelte.d.ts +95 -99
  30. package/dist/control/Stepper.svelte +1 -1
  31. package/dist/control/Stepper.svelte.d.ts +95 -99
  32. package/dist/control/Text.svelte +1 -1
  33. package/dist/control/Text.svelte.d.ts +25 -29
  34. package/dist/control/Textarea.svelte +2 -2
  35. package/dist/control/Textarea.svelte.d.ts +34 -38
  36. package/dist/control/Wheel.svelte +1 -1
  37. package/dist/control/Wheel.svelte.d.ts +101 -104
  38. package/dist/core/Binding.svelte +5 -5
  39. package/dist/core/Binding.svelte.d.ts +9 -14
  40. package/dist/core/Blade.svelte +3 -3
  41. package/dist/core/Blade.svelte.d.ts +5 -7
  42. package/dist/core/Folder.svelte +4 -4
  43. package/dist/core/Folder.svelte.d.ts +5 -5
  44. package/dist/core/Pane.svelte +3 -3
  45. package/dist/core/Pane.svelte.d.ts +217 -221
  46. package/dist/core/Separator.svelte +1 -1
  47. package/dist/core/Separator.svelte.d.ts +0 -2
  48. package/dist/core/TabGroup.svelte +4 -4
  49. package/dist/core/TabGroup.svelte.d.ts +3 -3
  50. package/dist/core/TabPage.svelte +4 -4
  51. package/dist/core/TabPage.svelte.d.ts +4 -4
  52. package/dist/extra/AutoObject.svelte +5 -5
  53. package/dist/extra/AutoObject.svelte.d.ts +4 -5
  54. package/dist/extra/AutoValue.svelte.d.ts +9 -13
  55. package/dist/extra/Element.svelte +1 -1
  56. package/dist/extra/Element.svelte.d.ts +23 -25
  57. package/dist/internal/ClsPad.svelte +3 -2
  58. package/dist/internal/GenericBinding.svelte +2 -2
  59. package/dist/internal/GenericBinding.svelte.d.ts +8 -11
  60. package/dist/internal/GenericBladeFolding.svelte +1 -1
  61. package/dist/internal/GenericBladeFolding.svelte.d.ts +25 -27
  62. package/dist/internal/GenericInput.svelte.d.ts +8 -11
  63. package/dist/internal/GenericInputFolding.svelte.d.ts +78 -81
  64. package/dist/internal/GenericMonitor.svelte.d.ts +76 -79
  65. package/dist/internal/GenericPane.svelte +4 -4
  66. package/dist/internal/GenericPane.svelte.d.ts +6 -7
  67. package/dist/internal/GenericSlider.svelte +1 -1
  68. package/dist/internal/GenericSlider.svelte.d.ts +100 -101
  69. package/dist/internal/InternalMonitorBoolean.svelte +2 -2
  70. package/dist/internal/InternalMonitorBoolean.svelte.d.ts +79 -82
  71. package/dist/internal/InternalMonitorNumber.svelte +3 -3
  72. package/dist/internal/InternalMonitorNumber.svelte.d.ts +100 -103
  73. package/dist/internal/InternalMonitorString.svelte +2 -2
  74. package/dist/internal/InternalMonitorString.svelte.d.ts +84 -87
  75. package/dist/internal/InternalPaneDraggable.svelte +5 -5
  76. package/dist/internal/InternalPaneDraggable.svelte.d.ts +86 -88
  77. package/dist/internal/InternalPaneFixed.svelte.d.ts +26 -27
  78. package/dist/internal/InternalPaneInline.svelte +1 -1
  79. package/dist/internal/InternalPaneInline.svelte.d.ts +13 -14
  80. package/dist/monitor/FpsGraph.svelte +5 -5
  81. package/dist/monitor/FpsGraph.svelte.d.ts +45 -47
  82. package/dist/monitor/Monitor.svelte +1 -1
  83. package/dist/monitor/Monitor.svelte.d.ts +316 -331
  84. package/dist/monitor/Profiler.svelte +3 -3
  85. package/dist/monitor/Profiler.svelte.d.ts +51 -59
  86. package/dist/monitor/WaveformMonitor.svelte +5 -5
  87. package/dist/monitor/WaveformMonitor.svelte.d.ts +102 -105
  88. package/dist/theme.d.ts +1 -1
  89. package/dist/theme.js +0 -2
  90. package/dist/utils.d.ts +5 -5
  91. package/dist/utils.js +2 -4
  92. package/license.txt +1 -1
  93. package/package.json +24 -29
@@ -3,37 +3,8 @@ import type { ValueChangeEvent } from '../utils.js'
3
3
  export type FileValue = File | undefined
4
4
  export type FileChangeEvent = ValueChangeEvent<FileValue>
5
5
  declare const __propDef: {
6
- props: {
7
- /**
8
- * File data, or `undefined` to clear the file input.
9
- * @default `undefined`
10
- * @bindable
11
- */
12
- value?: FileValue
13
- /**
14
- * Array of valid file extensions.
15
- * @default Any file extension
16
- */
17
- extensions?: string[] | undefined
18
- /**
19
- * String shown when the user tries to upload an invalid filetype.
20
- * @default `'Unaccepted file type.'`
21
- */
22
- invalidExtensionMessage?: string | undefined
23
- /**
24
- * Height of the file input drop zone, in rows.
25
- * @default `3`
26
- */
27
- rows?: number | undefined
28
- } & Omit<
29
- {
30
- /**
31
- * File data, or `undefined` to clear the file input.
32
- * @default `undefined`
33
- * @bindable
34
- */
35
- value: string | File | null
36
- } & Omit<
6
+ props: Omit<
7
+ Omit<
37
8
  {
38
9
  /**
39
10
  * The binding's target object with values to manipulate.
@@ -67,7 +38,6 @@ declare const __propDef: {
67
38
  options?: import('@tweakpane/core').BaseInputParams | undefined
68
39
  /**
69
40
  * Custom color scheme.
70
- *
71
41
  * @default `undefined` \
72
42
  * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
73
43
  * set with `setGlobalDefaultTheme()`.
@@ -82,7 +52,6 @@ declare const __propDef: {
82
52
  * components wrapping `<Binding>`'s functionality.
83
53
  *
84
54
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
85
- *
86
55
  * @bindable
87
56
  * @readonly
88
57
  */
@@ -95,15 +64,43 @@ declare const __propDef: {
95
64
  * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
96
65
  *
97
66
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
98
- *
99
67
  * @default `undefined`
100
68
  */
101
69
  plugin?: import('../utils.js').Plugin | undefined
102
70
  },
103
71
  'object' | 'key'
104
- >,
72
+ > & {
73
+ /**
74
+ * File data, or `undefined` to clear the file input.
75
+ * @default `undefined`
76
+ * @bindable
77
+ */
78
+ value: string | File | null
79
+ },
105
80
  'ref' | 'plugin' | 'value'
106
- >
81
+ > & {
82
+ /**
83
+ * File data, or `undefined` to clear the file input.
84
+ * @default `undefined`
85
+ * @bindable
86
+ */
87
+ value?: FileValue
88
+ /**
89
+ * Array of valid file extensions.
90
+ * @default Any file extension
91
+ */
92
+ extensions?: string[] | undefined
93
+ /**
94
+ * String shown when the user tries to upload an invalid filetype.
95
+ * @default `'Unaccepted file type.'`
96
+ */
97
+ invalidExtensionMessage?: string | undefined
98
+ /**
99
+ * Height of the file input drop zone, in rows.
100
+ * @default `3`
101
+ */
102
+ rows?: number | undefined
103
+ }
107
104
  slots: {}
108
105
  events: {
109
106
  /**
@@ -113,10 +110,9 @@ declare const __propDef: {
113
110
  *
114
111
  * The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
115
112
  * and changes resulting from programmatic manipulation of the `value` (`external`).
116
- *
117
113
  * @extends ValueChangeEvent
118
114
  * @event
119
- * */
115
+ */
120
116
  change: FileChangeEvent
121
117
  }
122
118
  }
@@ -1,12 +1,12 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>
4
- import ClsPad from '../internal/ClsPad.svelte'
5
- import GenericInput from '../internal/GenericInput.svelte'
6
- import { fillWith } from '../utils'
7
4
  import * as pluginModule from '@kitschpatrol/tweakpane-plugin-image'
8
5
  import { BROWSER } from 'esm-env'
9
6
  import { shallowEqual } from 'fast-equals'
7
+ import ClsPad from '../internal/ClsPad.svelte'
8
+ import GenericInput from '../internal/GenericInput.svelte'
9
+ import { fillWith } from '../utils.js'
10
10
  export let value = void 0
11
11
  export let fit = void 0
12
12
  export let extensions = void 0
@@ -3,34 +3,8 @@ import type { ValueChangeEvent } from '../utils.js'
3
3
  export type ImageValue = string | undefined
4
4
  export type ImageChangeEvent = ValueChangeEvent<ImageValue>
5
5
  declare const __propDef: {
6
- props: {
7
- /**
8
- * Image data as Base64-encoded string, or `undefined` to clear.
9
- * @default `'undefined'`
10
- * @bindable
11
- */
12
- value?: ImageValue
13
- /**
14
- * Array of image extension types to accept.
15
- * @default `['.jpg', '.png', '.gif']`
16
- */
17
- extensions?: string[]
18
- /**
19
- * How to display the image in the preview pane.
20
- *
21
- * Renamed from `imageFit` in `tweakpane-image-plugin` for concision.
22
- * @default `'cover'`
23
- */
24
- fit?: 'contain' | 'cover'
25
- } & Omit<
26
- {
27
- /**
28
- * Image data as Base64-encoded string, or `undefined` to clear.
29
- * @default `'undefined'`
30
- * @bindable
31
- */
32
- value: string | HTMLImageElement | File | undefined
33
- } & Omit<
6
+ props: Omit<
7
+ Omit<
34
8
  {
35
9
  /**
36
10
  * The binding's target object with values to manipulate.
@@ -65,7 +39,6 @@ declare const __propDef: {
65
39
  options?: import('@tweakpane/core').BaseInputParams | undefined
66
40
  /**
67
41
  * Custom color scheme.
68
- *
69
42
  * @default `undefined` \
70
43
  * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
71
44
  * set with `setGlobalDefaultTheme()`.
@@ -80,7 +53,6 @@ declare const __propDef: {
80
53
  * components wrapping `<Binding>`'s functionality.
81
54
  *
82
55
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
83
- *
84
56
  * @bindable
85
57
  * @readonly
86
58
  */
@@ -93,15 +65,40 @@ declare const __propDef: {
93
65
  * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
94
66
  *
95
67
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
96
- *
97
68
  * @default `undefined`
98
69
  */
99
70
  plugin?: import('../utils.js').Plugin | undefined
100
71
  },
101
72
  'object' | 'key'
102
- >,
73
+ > & {
74
+ /**
75
+ * Image data as Base64-encoded string, or `undefined` to clear.
76
+ * @default `'undefined'`
77
+ * @bindable
78
+ */
79
+ value: string | HTMLImageElement | File | undefined
80
+ },
103
81
  'ref' | 'plugin' | 'value'
104
- >
82
+ > & {
83
+ /**
84
+ * Image data as Base64-encoded string, or `undefined` to clear.
85
+ * @default `'undefined'`
86
+ * @bindable
87
+ */
88
+ value?: ImageValue
89
+ /**
90
+ * Array of image extension types to accept.
91
+ * @default `['.jpg', '.png', '.gif']`
92
+ */
93
+ extensions?: string[]
94
+ /**
95
+ * How to display the image in the preview pane.
96
+ *
97
+ * Renamed from `imageFit` in `tweakpane-image-plugin` for concision.
98
+ * @default `'cover'`
99
+ */
100
+ fit?: 'contain' | 'cover'
101
+ }
105
102
  slots: {}
106
103
  events: {
107
104
  /**
@@ -111,10 +108,9 @@ declare const __propDef: {
111
108
  *
112
109
  * The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
113
110
  * and changes resulting from programmatic manipulation of the `value` (`external`).
114
- *
115
111
  * @extends ValueChangeEvent
116
112
  * @event
117
- * */
113
+ */
118
114
  change: ImageChangeEvent
119
115
  }
120
116
  }
@@ -1,9 +1,9 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>
4
- import GenericSlider from '../internal/GenericSlider.svelte'
5
4
  import * as pluginModule from '@kitschpatrol/tweakpane-plugin-essentials'
6
5
  import { shallowEqual } from 'fast-equals'
6
+ import GenericSlider from '../internal/GenericSlider.svelte'
7
7
  export let value
8
8
  export let meanValue = void 0
9
9
  export let wide = void 0
@@ -1,7 +1,6 @@
1
1
  import { SvelteComponent } from 'svelte'
2
- import type { Simplify } from '../utils'
3
- import type { ValueChangeEvent } from '../utils.js'
4
2
  import type { SliderInputBindingApi as GenericSliderRef } from 'tweakpane'
3
+ import type { Simplify, ValueChangeEvent } from '../utils.js'
5
4
  export type IntervalSliderValueTuple = [min: number, max: number]
6
5
  export type IntervalSliderValueObject = {
7
6
  min: number
@@ -10,35 +9,81 @@ export type IntervalSliderValueObject = {
10
9
  export type IntervalSliderValue = Simplify<IntervalSliderValueObject | IntervalSliderValueTuple>
11
10
  export type IntervalSliderChangeEvent = ValueChangeEvent<IntervalSliderValue>
12
11
  declare const __propDef: {
13
- props: {
14
- /**
15
- * Interval value to control.
16
- *
17
- * Tuples are a convenience addition to the vanilla JS Tweakpane API.
18
- * @bindable
19
- */
20
- value: IntervalSliderValue
21
- /**
22
- * Midpoint of the interval range value.
23
- * @bindable
24
- * */
25
- meanValue?: number
26
- } & Omit<
27
- {
28
- /**
29
- * Minimum value.
30
- *
31
- * Specifying both a `min` and a `max` prop turns the control into a slider.
32
- * @default `undefined`
33
- */
34
- min?: number
12
+ props: Omit<
13
+ Omit<
14
+ {
15
+ /**
16
+ * The binding's target object with values to manipulate.
17
+ * @bindable
18
+ */
19
+ object: import('@tweakpane/core').Bindable & Record<string, IntervalSliderValue>
20
+ /** The key for the value in the target `object` that the control should manipulate. */
21
+ key: string
22
+ /**
23
+ * Prevent interactivity and gray out the control.
24
+ * @default `false`
25
+ */
26
+ disabled?: boolean
27
+ /**
28
+ * Text displayed next to control.
29
+ * @default `undefined`
30
+ */
31
+ label?: string | undefined
32
+ /**
33
+ * Tweakpane's internal options object.
34
+ *
35
+ * See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
36
+ *
37
+ * Valid types are contingent on the type of the value `key` points to in `object`.
38
+ *
39
+ * This is intended internal use, when implementing convenience components wrapping Binding's
40
+ * functionality. Options of interest are instead exposed as top-level props in _Svelte
41
+ * Tweakpane UI_.
42
+ * @default `undefined`
43
+ */
44
+ options?: import('tweakpane').NumberInputParams | undefined
45
+ /**
46
+ * Custom color scheme.
47
+ * @default `undefined` \
48
+ * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
49
+ * set with `setGlobalDefaultTheme()`.
50
+ */
51
+ theme?: import('..').Theme | undefined
52
+ /**
53
+ * Reference to internal Tweakpane
54
+ * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
55
+ * this control.
56
+ *
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
+ * @bindable
62
+ * @readonly
63
+ */
64
+ ref?: GenericSliderRef | undefined
65
+ /**
66
+ * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
67
+ * the `<Binding>`'s containing `<Pane>`.
68
+ *
69
+ * This property is exposed for advanced use cases only, such as when implementing convenience
70
+ * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
71
+ *
72
+ * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
73
+ * @default `undefined`
74
+ */
75
+ plugin?: import('../utils.js').Plugin | undefined
76
+ },
77
+ 'object' | 'key'
78
+ > & {
35
79
  /**
36
- * Maximum value.
80
+ * Interval value to control.
37
81
  *
38
- * Specifying both a `min` and a `max` prop turns the control into a slider.
39
- * @default `undefined`
82
+ * Tuples are a convenience addition to the vanilla JS Tweakpane API.
83
+ * @bindable
40
84
  */
41
- max?: number
85
+ value: IntervalSliderValue
86
+ } & {
42
87
  /**
43
88
  * A function to customize the point value's string representation (e.g. rounding, etc.).
44
89
  * @default `undefined` \
@@ -51,6 +96,20 @@ declare const __propDef: {
51
96
  * Or `stepValue` if defined.
52
97
  */
53
98
  keyScale?: number
99
+ /**
100
+ * Maximum value.
101
+ *
102
+ * Specifying both a `min` and a `max` prop turns the control into a slider.
103
+ * @default `undefined`
104
+ */
105
+ max?: number
106
+ /**
107
+ * Minimum value.
108
+ *
109
+ * Specifying both a `min` and a `max` prop turns the control into a slider.
110
+ * @default `undefined`
111
+ */
112
+ min?: number
54
113
  /**
55
114
  * The unit scale for pointer-based input for all dimensions.
56
115
  * @default `undefined` \
@@ -70,85 +129,22 @@ declare const __propDef: {
70
129
  * @default `false`
71
130
  */
72
131
  wide?: boolean
73
- } & {
74
- /**
75
- * Interval value to control.
76
- *
77
- * Tuples are a convenience addition to the vanilla JS Tweakpane API.
78
- * @bindable
79
- */
80
- value: IntervalSliderValue
81
- } & Omit<
82
- {
83
- /**
84
- * The binding's target object with values to manipulate.
85
- * @bindable
86
- */
87
- object: import('@tweakpane/core').Bindable & Record<string, IntervalSliderValue>
88
- /** The key for the value in the target `object` that the control should manipulate. */
89
- key: string
90
- /**
91
- * Prevent interactivity and gray out the control.
92
- * @default `false`
93
- */
94
- disabled?: boolean
95
- /**
96
- * Text displayed next to control.
97
- * @default `undefined`
98
- */
99
- label?: string | undefined
100
- /**
101
- * Tweakpane's internal options object.
102
- *
103
- * See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
104
- *
105
- * Valid types are contingent on the type of the value `key` points to in `object`.
106
- *
107
- * This is intended internal use, when implementing convenience components wrapping Binding's
108
- * functionality. Options of interest are instead exposed as top-level props in _Svelte
109
- * Tweakpane UI_.
110
- * @default `undefined`
111
- */
112
- options?: import('tweakpane').NumberInputParams | undefined
113
- /**
114
- * Custom color scheme.
115
- *
116
- * @default `undefined` \
117
- * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
118
- * set with `setGlobalDefaultTheme()`.
119
- */
120
- theme?: import('..').Theme | undefined
121
- /**
122
- * Reference to internal Tweakpane
123
- * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
124
- * this control.
125
- *
126
- * This property is exposed for advanced use cases only, such as when implementing convenience
127
- * components wrapping `<Binding>`'s functionality.
128
- *
129
- * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
130
- *
131
- * @bindable
132
- * @readonly
133
- */
134
- ref?: GenericSliderRef | undefined
135
- /**
136
- * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
137
- * the `<Binding>`'s containing `<Pane>`.
138
- *
139
- * This property is exposed for advanced use cases only, such as when implementing convenience
140
- * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
141
- *
142
- * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
143
- *
144
- * @default `undefined`
145
- */
146
- plugin?: import('../utils').Plugin | undefined
147
- },
148
- 'object' | 'key'
149
- >,
132
+ },
150
133
  'ref' | 'options' | 'plugin'
151
- >
134
+ > & {
135
+ /**
136
+ * Interval value to control.
137
+ *
138
+ * Tuples are a convenience addition to the vanilla JS Tweakpane API.
139
+ * @bindable
140
+ */
141
+ value: IntervalSliderValue
142
+ /**
143
+ * Midpoint of the interval range value.
144
+ * @bindable
145
+ */
146
+ meanValue?: number
147
+ }
152
148
  slots: {}
153
149
  events: {
154
150
  /**
@@ -158,10 +154,9 @@ declare const __propDef: {
158
154
  *
159
155
  * The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
160
156
  * and changes resulting from programmatic manipulation of the `value` (`external`).
161
- *
162
157
  * @extends ValueChangeEvent
163
158
  * @event
164
- * */
159
+ */
165
160
  change: IntervalSliderChangeEvent
166
161
  }
167
162
  }
@@ -1,13 +1,13 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script generics="T extends any">
4
- import Blade from '../core/Blade.svelte'
5
- import ClsPad from '../internal/ClsPad.svelte'
6
- import {} from '../utils'
7
4
  import { BROWSER } from 'esm-env'
8
- import copy from 'fast-copy'
5
+ import { copy } from 'fast-copy'
9
6
  import { shallowEqual } from 'fast-equals'
10
7
  import { createEventDispatcher } from 'svelte'
8
+ import Blade from '../core/Blade.svelte'
9
+ import ClsPad from '../internal/ClsPad.svelte'
10
+ import {} from '../utils.js'
11
11
  export let value
12
12
  export let options
13
13
  export let label = void 0
@@ -68,9 +68,9 @@
68
68
  }
69
69
  }
70
70
  $: bladeOptions = {
71
- value: getInitialValue(),
72
71
  label,
73
72
  options: getInternalOptions(options),
73
+ value: getInitialValue(),
74
74
  view: 'list',
75
75
  }
76
76
  $: listBlade && addEvent()
@@ -1,6 +1,5 @@
1
1
  import { SvelteComponent } from 'svelte'
2
- import type { Simplify } from '../utils'
3
- import type { ValueChangeEvent } from '../utils.js'
2
+ import type { Simplify, ValueChangeEvent } from '../utils.js'
4
3
  export type ListOptionsArray<T> = T[]
5
4
  export type ListOptionsObjectArray<T> = Array<{
6
5
  value: T
@@ -13,25 +12,7 @@ export type ListOptions<T> = Simplify<
13
12
  export type ListChangeEvent = ValueChangeEvent<unknown>
14
13
  import type { ListBladeApi, ListBladeParams } from 'tweakpane'
15
14
  declare class __sveltets_Render<T extends any> {
16
- props(): {
17
- /**
18
- * Value of the selected `options` item.
19
- * @bindable
20
- * */
21
- value: T
22
- /**
23
- * Text displayed next to list.
24
- * @default `undefined`
25
- * */
26
- label?: string
27
- /**
28
- * A collection of options to select from.
29
- *
30
- * The arbitrary array list type is a convenience addition to to the vanilla JS Tweakpane
31
- * API.
32
- * */
33
- options: ListOptions<T>
34
- } & Omit<
15
+ props(): Omit<
35
16
  {
36
17
  /**
37
18
  * A collection of options to select from.
@@ -60,7 +41,6 @@ declare class __sveltets_Render<T extends any> {
60
41
  * components wrapping `<Blade>`'s functionality.
61
42
  *
62
43
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
63
- *
64
44
  * @bindable
65
45
  * @readonly
66
46
  */
@@ -73,13 +53,30 @@ declare class __sveltets_Render<T extends any> {
73
53
  * components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
74
54
  *
75
55
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
76
- *
77
56
  * @default `undefined`
78
57
  */
79
- plugin?: import('../utils').Plugin | undefined
58
+ plugin?: import('../utils.js').Plugin | undefined
80
59
  },
81
60
  'ref' | 'options' | 'plugin'
82
- >
61
+ > & {
62
+ /**
63
+ * Value of the selected `options` item.
64
+ * @bindable
65
+ */
66
+ value: T
67
+ /**
68
+ * Text displayed next to list.
69
+ * @default `undefined`
70
+ */
71
+ label?: string
72
+ /**
73
+ * A collection of options to select from.
74
+ *
75
+ * The arbitrary array list type is a convenience addition to to the vanilla JS Tweakpane
76
+ * API.
77
+ */
78
+ options: ListOptions<T>
79
+ }
83
80
  events(): {
84
81
  /**
85
82
  * Fires when `value` changes.
@@ -88,10 +85,9 @@ declare class __sveltets_Render<T extends any> {
88
85
  *
89
86
  * The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
90
87
  * and changes resulting from programmatic manipulation of the `value` (`external`).
91
- *
92
88
  * @extends ValueChangeEvent
93
89
  * @event
94
- * */
90
+ */
95
91
  change: ListChangeEvent
96
92
  }
97
93
  slots(): {}
@@ -123,8 +119,8 @@ export type ListSlots<T extends any> = ReturnType<__sveltets_Render<T>['slots']>
123
119
  * import { List, type ListOptions } from 'svelte-tweakpane-ui'
124
120
  *
125
121
  * const options: ListOptions<number> = {
126
- * b: 2,
127
122
  * a: 1,
123
+ * b: 2,
128
124
  * c: 3,
129
125
  * }
130
126
  * let selection: number = 1
@@ -1,11 +1,11 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script generics="T extends PointValue2d | PointValue3d | PointValue4d">
4
- import ClsPad from '../internal/ClsPad.svelte'
5
- import GenericInputFolding from '../internal/GenericInputFolding.svelte'
6
- import { removeKeys } from '../utils'
7
4
  import { BROWSER } from 'esm-env'
8
5
  import { shallowEqual } from 'fast-equals'
6
+ import ClsPad from '../internal/ClsPad.svelte'
7
+ import GenericInputFolding from '../internal/GenericInputFolding.svelte'
8
+ import { removeKeys } from '../utils.js'
9
9
  export let value
10
10
  export let expanded = $$props.expanded ?? void 0
11
11
  let pointerScale = $$props['pointerScale'] ?? void 0
@@ -54,16 +54,16 @@
54
54
  $: (value, updateInternalValueFromValue())
55
55
  $: (internalValue, updateValueFromInternalValue())
56
56
  $: options = {
57
- x: optionsX,
58
- y: optionsY,
59
- z: optionsZ,
60
- w: optionsW,
61
- min,
62
- max,
63
57
  format,
64
58
  keyScale,
59
+ max,
60
+ min,
65
61
  pointerScale,
66
62
  step,
63
+ w: optionsW,
64
+ x: optionsX,
65
+ y: optionsY,
66
+ z: optionsZ,
67
67
  }
68
68
  </script>
69
69