svelte-tweakpane-ui 1.2.1 → 1.2.3

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 (41) hide show
  1. package/dist/control/Button.svelte.d.ts +1 -1
  2. package/dist/control/ButtonGrid.svelte.d.ts +3 -3
  3. package/dist/control/Checkbox.svelte.d.ts +4 -5
  4. package/dist/control/Color.svelte.d.ts +3 -3
  5. package/dist/control/CubicBezier.svelte.d.ts +3 -3
  6. package/dist/control/Image.svelte.d.ts +3 -3
  7. package/dist/control/IntervalSlider.svelte.d.ts +3 -3
  8. package/dist/control/List.svelte.d.ts +3 -3
  9. package/dist/control/Point.svelte.d.ts +3 -3
  10. package/dist/control/RadioGrid.svelte.d.ts +3 -3
  11. package/dist/control/Ring.svelte.d.ts +2 -2
  12. package/dist/control/RotationEuler.svelte.d.ts +3 -3
  13. package/dist/control/RotationQuaternion.svelte.d.ts +29 -29
  14. package/dist/control/Slider.svelte.d.ts +9 -9
  15. package/dist/control/Text.svelte.d.ts +3 -3
  16. package/dist/control/Textarea.svelte.d.ts +3 -3
  17. package/dist/control/Wheel.svelte.d.ts +2 -2
  18. package/dist/core/Binding.svelte.d.ts +3 -3
  19. package/dist/core/Blade.svelte.d.ts +1 -1
  20. package/dist/core/Folder.svelte.d.ts +1 -1
  21. package/dist/core/Pane.svelte.d.ts +11 -11
  22. package/dist/core/Separator.svelte.d.ts +1 -1
  23. package/dist/core/TabGroup.svelte.d.ts +1 -1
  24. package/dist/core/TabPage.svelte.d.ts +1 -1
  25. package/dist/extra/AutoObject.svelte.d.ts +1 -1
  26. package/dist/extra/Element.svelte.d.ts +3 -3
  27. package/dist/internal/GenericPane.svelte +1 -1
  28. package/dist/internal/GenericPane.svelte.d.ts +1 -1
  29. package/dist/internal/InternalMonitorBoolean.svelte.d.ts +1 -1
  30. package/dist/internal/InternalMonitorNumber.svelte.d.ts +1 -1
  31. package/dist/internal/InternalMonitorString.svelte.d.ts +1 -1
  32. package/dist/internal/InternalPaneDraggable.svelte.d.ts +2 -2
  33. package/dist/internal/InternalPaneFixed.svelte.d.ts +1 -1
  34. package/dist/internal/InternalPaneInline.svelte.d.ts +1 -1
  35. package/dist/monitor/FpsGraph.svelte.d.ts +3 -3
  36. package/dist/monitor/Monitor.svelte.d.ts +1 -1
  37. package/dist/monitor/Profiler.svelte.d.ts +1 -1
  38. package/dist/monitor/WaveformMonitor.svelte.d.ts +1 -1
  39. package/dist/utils.js +1 -3
  40. package/package.json +35 -34
  41. package/readme.md +21 -2
@@ -40,7 +40,7 @@ export type ButtonSlots = typeof __propDef.slots;
40
40
  *
41
41
  * Wraps the Tweakpane [`addButton`](https://tweakpane.github.io/docs/ui-components/#button) method.
42
42
  *
43
- * Usage outside of a `<Pane>` component will implicitly wrap the button in `<Pane position='inline'>`.
43
+ * Usage outside of a `<Pane>` component will implicitly wrap the button in `<Pane position="inline">`.
44
44
  *
45
45
  * See the `<ButtonGrid>` and `<RadioGrid>` components for a convenient way to lay out multiple
46
46
  * buttons.
@@ -118,10 +118,10 @@ export type ButtonGridSlots = typeof __propDef.slots;
118
118
  *
119
119
  * - If both `rows` _and_ `columns` props area provided, then buttons may be clipped if `rows * columns < values.length`.
120
120
  *
121
- * @emits {ButtonGridClickEvent} click - When a button in the grid is clicked.
122
- *
123
121
  * Usage outside of a `<Pane>` component will implicitly wrap the button grid in `<Pane
124
- * position='inline'>`.
122
+ * position="inline">`.
123
+ *
124
+ * @emits {ButtonGridClickEvent} click - When a button in the grid is clicked.
125
125
  *
126
126
  * @example
127
127
  * ```svelte
@@ -104,17 +104,16 @@ export type CheckboxSlots = typeof __propDef.slots;
104
104
  *
105
105
  * Wraps Tweakpane's [boolean input binding](https://tweakpane.github.io/docs/input-bindings/#boolean).
106
106
  *
107
- * @emits {CheckboxChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
107
+ * Usage outside of a `<Pane>` component will implicitly wrap the checkbox in `<Pane position="inline">`.
108
108
  *
109
- * Usage outside of a `<Pane>` component will implicitly wrap the checkbox in `<Pane
110
- * position='inline'>`.
109
+ * @emits {CheckboxChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
111
110
  *
112
111
  * @example
113
112
  * ```svelte
114
113
  * <script lang="ts">
115
- * import { Checkbox } from 'svelte-tweakpane-ui';
114
+ * import { Checkbox } from 'svelte-tweakpane-ui';
116
115
  *
117
- * let reticulationEnabled: boolean = false;
116
+ * let reticulationEnabled: boolean = false;
118
117
  * </script>
119
118
  *
120
119
  * <Checkbox bind:value={reticulationEnabled} label="Reticulation" />
@@ -161,10 +161,10 @@ export type ColorSlots = typeof __propDef.slots;
161
161
  *
162
162
  * Wraps Tweakpane's [color input binding](https://tweakpane.github.io/docs/input-bindings/#color).
163
163
  *
164
- * @emits {ColorChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
165
- *
166
164
  * Usage outside of a `<Pane>` component will implicitly wrap the color picker in `<Pane
167
- * position='inline'>`.
165
+ * position="inline">`.
166
+ *
167
+ * @emits {ColorChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
168
168
  *
169
169
  * @example
170
170
  * ```svelte
@@ -134,10 +134,8 @@ export type CubicBezierSlots = typeof __propDef.slots;
134
134
  * [transition](https://svelte.dev/docs/svelte-transition), and
135
135
  * [animate](https://svelte.dev/docs/svelte-animate) modules.
136
136
  *
137
- * @emits {CubicBezierChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
138
- *
139
137
  * Usage outside of a `<Pane>` component will implicitly wrap the cubic bezier control in `<Pane
140
- * position='inline'>`.
138
+ * position="inline">`.
141
139
  *
142
140
  * _Note: An issue with unreleased resources has been observed in situations when the `value` prop is
143
141
  * set frequently. A [PR on the Plugin Essentials repo with a
@@ -145,6 +143,8 @@ export type CubicBezierSlots = typeof __propDef.slots;
145
143
  * merge. Consider monitoring the performance of this component in the context of your use case until
146
144
  * this issue is resolved._
147
145
  *
146
+ * @emits {CubicBezierChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
147
+ *
148
148
  * @example
149
149
  * ```svelte
150
150
  * <script lang="ts">
@@ -136,12 +136,12 @@ export type ImageSlots = typeof __propDef.slots;
136
136
  * [pull request](https://github.com/metehus/tweakpane-image-plugin/pull/1) with Tweakpane 4 support is
137
137
  * merged.
138
138
  *
139
- * @emits {ImageChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
140
- *
141
139
  * There is currently a known bug where change events' `origin` values are sometimes incorrect. (This issue is limited to this component.)
142
140
  *
143
141
  * Usage outside of a `<Pane>` component will implicitly wrap the image control in `<Pane
144
- * position='inline'>`.
142
+ * position="inline">`.
143
+ *
144
+ * @emits {ImageChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
145
145
  *
146
146
  * @example
147
147
  * ```svelte
@@ -172,10 +172,10 @@ export type IntervalSliderSlots = typeof __propDef.slots;
172
172
  * to object values. It also exposes a `meanValue` prop for reading or setting the midpoint of the
173
173
  * interval range value.
174
174
  *
175
- * @emits {IntervalSliderChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
176
- *
177
175
  * Usage outside of a `<Pane>` component will implicitly wrap the interval slider in `<Pane
178
- * position='inline'>`.
176
+ * position="inline">`.
177
+ *
178
+ * @emits {IntervalSliderChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
179
179
  *
180
180
  * @example
181
181
  * ```svelte
@@ -112,10 +112,10 @@ export type ListSlots<T extends any> = ReturnType<__sveltets_Render<T>['slots']>
112
112
  * Tweakpane's `addBlade` list variations is used instead of the `addBinding` method to allow for
113
113
  * additional value types. The `value` remains bindable via Svelte's reactivity.
114
114
  *
115
- * @emits {ListChangeEvent} change - When `value` changes. (For advanced use cases. Prefer binding to `value`.)
116
- *
117
115
  * Usage outside of a `<Pane>` component will implicitly wrap the color picker in `<Pane
118
- * position='inline'>`.
116
+ * position="inline">`.
117
+ *
118
+ * @emits {ListChangeEvent} change - When `value` changes. (For advanced use cases. Prefer binding to `value`.)
119
119
  *
120
120
  * @example
121
121
  * ```svelte
@@ -331,10 +331,10 @@ export type PointSlots<T extends PointValue2d | PointValue3d | PointValue4d> = R
331
331
  * `<Point>` is a dynamic component, and the availability of the `optionsZ` and `optionsW` props will
332
332
  * change depending on the number of dimensions in the `value`.
333
333
  *
334
- * @emits {PointChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
335
- *
336
334
  * Usage outside of a `<Pane>` component will implicitly wrap the point picker in a `<Pane
337
- * position='inline'>` component.
335
+ * position="inline">` component.
336
+ *
337
+ * @emits {PointChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
338
338
  *
339
339
  * @example
340
340
  * ```svelte
@@ -187,10 +187,10 @@ export type RadioGridSlots<T extends boolean | number | string> = ReturnType<
187
187
  *
188
188
  * - If both `rows` _and_ `columns` props area provided, then buttons may be clipped if `rows * columns < values.length`.
189
189
  *
190
- * @emits {RadioGridChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
191
- *
192
190
  * Usage outside of a `<Pane>` component will implicitly wrap the radio grid in `<Pane
193
- * position='inline'>`.
191
+ * position="inline">`.
192
+ *
193
+ * @emits {RadioGridChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
194
194
  *
195
195
  * @example
196
196
  * ```svelte
@@ -201,9 +201,9 @@ export type RingSlots = typeof __propDef.slots;
201
201
  * control from Tweakpane-creator [Hiroki Kokubun's](https://cocopon.me) [Camerakit
202
202
  * plugin](https://github.com/tweakpane/plugin-camerakit).
203
203
  *
204
- * @emits {RingChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
204
+ * Usage outside of a `<Pane>` component will implicitly wrap the ring in `<Pane position="inline">`.
205
205
  *
206
- * Usage outside of a `<Pane>` component will implicitly wrap the ring in `<Pane position='inline'>`.
206
+ * @emits {RingChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
207
207
  *
208
208
  * @example
209
209
  * ```svelte
@@ -232,10 +232,10 @@ export type RotationEulerSlots = typeof __propDef.slots;
232
232
  *
233
233
  * See also <RotationQuaternion> if you're feeling gimbal locked.
234
234
  *
235
- * @emits {RotationEulerChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
236
- *
237
235
  * Usage outside of a `<Pane>` component will implicitly wrap the profiler in `<Pane
238
- * position='inline'>`.
236
+ * position="inline">`.
237
+ *
238
+ * @emits {RotationEulerChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
239
239
  *
240
240
  * @example
241
241
  * ```svelte
@@ -230,52 +230,52 @@ export type RotationQuaternionSlots = typeof __propDef.slots;
230
230
  *
231
231
  * See also <RotationEuler> if you're not into the whole `w` thing.
232
232
  *
233
- * @emits {RotationQuaternionChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
234
- *
235
233
  * Usage outside of a `<Pane>` component will implicitly wrap the profiler in `<Pane
236
- * position='inline'>`.
234
+ * position="inline">`.
235
+ *
236
+ * @emits {RotationQuaternionChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
237
237
  *
238
238
  * @example
239
239
  * ```svelte
240
240
  * <script lang="ts">
241
- * import {
242
- * Button,
243
- * RotationQuaternion,
244
- * type RotationQuaternionValue,
245
- * Utils
246
- * } from 'svelte-tweakpane-ui';
241
+ * import {
242
+ * Button,
243
+ * RotationQuaternion,
244
+ * type RotationQuaternionValue,
245
+ * Utils
246
+ * } from 'svelte-tweakpane-ui';
247
247
  *
248
- * // Value could also be an object
249
- * // e.g. {x: 0, y: 0, z: 0, w: 0}
250
- * let value: RotationQuaternionValue = [0, 0, 0, 0];
248
+ * // Value could also be an object
249
+ * // e.g. {x: 0, y: 0, z: 0, w: 0}
250
+ * let value: RotationQuaternionValue = [0, 0, 0, 0];
251
251
  *
252
- * $: transform = Utils.quaternionToCssTransform(value);
253
- * $: valueRows = Array.isArray(value)
254
- * ? value.map((v) => `${v >= 0 ? '+' : ''}${v.toFixed(6)}`).join('\n')
255
- * : '';
252
+ * $: transform = Utils.quaternionToCssTransform(value);
253
+ * $: valueRows = Array.isArray(value)
254
+ * ? value.map((v) => `${v >= 0 ? '+' : ''}${v.toFixed(6)}`).join('\n')
255
+ * : '';
256
256
  * </script>
257
257
  *
258
258
  * <RotationQuaternion
259
- * bind:value
260
- * expanded={true}
261
- * label="CSS Rotation"
262
- * picker={'inline'}
259
+ * bind:value
260
+ * expanded={true}
261
+ * label="CSS Rotation"
262
+ * picker={'inline'}
263
263
  * />
264
264
  * <Button on:click={() => (value = [0, 0, 0, 0])} title="Reset" />
265
265
  *
266
266
  * <div class="billboard" style:transform>
267
- * <pre>{valueRows}</pre>
267
+ * <pre>{valueRows}</pre>
268
268
  * </div>
269
269
  *
270
270
  * <style>
271
- * div.billboard {
272
- * display: flex;
273
- * align-items: center;
274
- * justify-content: center;
275
- * aspect-ratio: 1;
276
- * width: 100%;
277
- * background: linear-gradient(45deg, magenta, orange);
278
- * }
271
+ * div.billboard {
272
+ * display: flex;
273
+ * align-items: center;
274
+ * justify-content: center;
275
+ * aspect-ratio: 1;
276
+ * width: 100%;
277
+ * background: linear-gradient(45deg, magenta, orange);
278
+ * }
279
279
  * </style>
280
280
  * ```
281
281
  *
@@ -155,24 +155,24 @@ export type SliderSlots = typeof __propDef.slots;
155
155
  *
156
156
  * See the `<Interval>` component for a multi-handle range-defining slider.
157
157
  *
158
- * @emits {SliderChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
158
+ * Usage outside of a `<Pane>` component will implicitly wrap the slider in `<Pane position="inline">`.
159
159
  *
160
- * Usage outside of a `<Pane>` component will implicitly wrap the slider in `<Pane position='inline'>`.
160
+ * @emits {SliderChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
161
161
  *
162
162
  * @example
163
163
  * ```svelte
164
164
  * <script lang="ts">
165
- * import { Slider } from 'svelte-tweakpane-ui';
165
+ * import { Slider } from 'svelte-tweakpane-ui';
166
166
  *
167
- * let value = 0;
167
+ * let value = 0;
168
168
  * </script>
169
169
  *
170
170
  * <Slider
171
- * bind:value
172
- * min={-1}
173
- * max={1}
174
- * format={(v) => v.toFixed(2)}
175
- * label="Let it Slide"
171
+ * bind:value
172
+ * min={-1}
173
+ * max={1}
174
+ * format={(v) => v.toFixed(2)}
175
+ * label="Let it Slide"
176
176
  * />
177
177
  * <pre>Value: {value}</pre>
178
178
  * ```
@@ -124,10 +124,10 @@ export type TextSlots = typeof __propDef.slots;
124
124
  *
125
125
  * See `<TextArea>` for a multi-line input variation.
126
126
  *
127
- * @emits {TextChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
128
- *
129
127
  * Usage outside of a `<Pane>` component will implicitly wrap the text field in `<Pane
130
- * position='inline'>`.
128
+ * position="inline">`.
129
+ *
130
+ * @emits {TextChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
131
131
  *
132
132
  * @example
133
133
  * ```svelte
@@ -136,12 +136,12 @@ export type TextareaSlots = typeof __propDef.slots;
136
136
  * Extends the underlying implementation with the `live` property to match the
137
137
  * behavior of the `<Text>` component.
138
138
  *
139
+ * Usage outside of a `<Pane>` component will implicitly wrap the text area in
140
+ * `<Pane position="inline">`.
141
+ *
139
142
  * @emits {TextareaChangeEvent} change - When `value` changes. (This event is
140
143
  * provided for advanced use cases. Prefer binding to `value`.)
141
144
  *
142
- * Usage outside of a `<Pane>` component will implicitly wrap the text area in
143
- * `<Pane position='inline'>`.
144
- *
145
145
  * @example
146
146
  * ```svelte
147
147
  * <script lang="ts">
@@ -166,9 +166,9 @@ export type WheelSlots = typeof __propDef.slots;
166
166
  * control from Tweakpane-creator [Hiroki Kokubun's](https://cocopon.me) [Camerakit
167
167
  * plugin](https://github.com/tweakpane/plugin-camerakit).
168
168
  *
169
- * @emits {WheelChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
169
+ * Usage outside of a `<Pane>` component will implicitly wrap the wheel in `<Pane position="inline">`.
170
170
  *
171
- * Usage outside of a `<Pane>` component will implicitly wrap the wheel in `<Pane position='inline'>`.
171
+ * @emits {WheelChangeEvent} change - When `value` changes. (This event is provided for advanced use cases. Prefer binding to `value`.)
172
172
  *
173
173
  * @example
174
174
  * ```svelte
@@ -109,10 +109,10 @@ export type BindingSlots<
109
109
  * Please consider convenience components like `<Slider>`, `<Color>`, etc. etc. before using this
110
110
  * component directly.
111
111
  *
112
- * @emits {BindingChangeEvent} change - When the value of `object[key]` changes. (This event is provided for advanced use cases. Prefer binding to `object`.)
113
- *
114
112
  * Usage outside of a `<Pane>` component will implicitly wrap the component in `<Pane
115
- * position='inline'>`.
113
+ * position="inline">`.
114
+ *
115
+ * @emits {BindingChangeEvent} change - When the value of `object[key]` changes. (This event is provided for advanced use cases. Prefer binding to `object`.)
116
116
  *
117
117
  * @example
118
118
  * ```svelte
@@ -69,7 +69,7 @@ export type BladeSlots<U extends BladeOptions, V extends BladeRef> = ReturnType<
69
69
  * directly.
70
70
  *
71
71
  * Usage outside of a `<Pane>` component will implicitly wrap the component in `<Pane
72
- * position='inline'>`.
72
+ * position="inline">`.
73
73
  *
74
74
  * Tweakpane's vanilla JS API offers Blades as as a way to create unbound components, but in Svelte the
75
75
  * same is achieved by simply not binding the component's value.
@@ -52,7 +52,7 @@ export type FolderSlots = typeof __propDef.slots;
52
52
  * May also be used to label and group multiple controls without user-collapsibility by setting
53
53
  * `userExpandable` to `false` and `expanded` to true.
54
54
  *
55
- * Usage outside of a `<Pane>` component will implicitly wrap the folder in `<Pane position='inline'>`.
55
+ * Usage outside of a `<Pane>` component will implicitly wrap the folder in `<Pane position="inline">`.
56
56
  *
57
57
  * @example
58
58
  * ```svelte
@@ -7,7 +7,7 @@ declare const __propDef: {
7
7
  /**
8
8
  * Text in the pane's title bar.
9
9
  * @default `Tweakpane` \
10
- * Unless `position='inline'`, in which case the default is `undefined` and no title bar is
10
+ * Unless `position="inline"`, in which case the default is `undefined` and no title bar is
11
11
  * shown.
12
12
  */
13
13
  title?: string | undefined;
@@ -113,7 +113,7 @@ declare const __propDef: {
113
113
  */
114
114
  collapseChildrenToFit?: boolean | undefined;
115
115
  /**
116
- * Identifier to be used if multiple `<Pane position='draggable'>` components with
116
+ * Identifier to be used if multiple `<Pane position="draggable">` components with
117
117
  * `storePositionLocally` set to true are used on the same page.
118
118
  * @default `'1'`
119
119
  */
@@ -176,7 +176,7 @@ declare const __propDef: {
176
176
  /**
177
177
  * Text in the pane's title bar.
178
178
  * @default `Tweakpane` \
179
- * Unless `position='inline'`, in which case the default is `undefined` and no title bar is
179
+ * Unless `position="inline"`, in which case the default is `undefined` and no title bar is
180
180
  * shown.
181
181
  */
182
182
  title?: string | undefined;
@@ -299,7 +299,7 @@ declare const __propDef: {
299
299
  /**
300
300
  * Text in the pane's title bar.
301
301
  * @default `Tweakpane` \
302
- * Unless `position='inline'`, in which case the default is `undefined` and no title bar is
302
+ * Unless `position="inline"`, in which case the default is `undefined` and no title bar is
303
303
  * shown.
304
304
  */
305
305
  title?: string | undefined;
@@ -439,7 +439,7 @@ export type PaneSlots = typeof __propDef.slots;
439
439
  *
440
440
  * Important: Unlike the vanilla JS Tweakpane API, wrapping components in a `<Pane>` is not mandatory.
441
441
  *
442
- * Pane-less components will be automatically nested in a `<Pane position='inline'>` component and
442
+ * Pane-less components will be automatically nested in a `<Pane position="inline">` component and
443
443
  * displayed in the regular block flow of the page. `<Pane>` is only necessary when you want to
444
444
  * explicitly group a number of components, or when you want convenient means to control how and where
445
445
  * the Tweakpane is shown on the page. (See an [important
@@ -455,7 +455,7 @@ export type PaneSlots = typeof __propDef.slots;
455
455
  *
456
456
  * Position mode overview:
457
457
  *
458
- * - **`<Pane position='draggable' ...>`** \
458
+ * - **`<Pane position="draggable" ...>`** \
459
459
  * This is an extension of Tweakpane's core functionality, which reasonably considers pane dragging
460
460
  * outside of the library's scope. See discussion in Tweakpane issues
461
461
  * [#88](https://github.com/cocopon/tweakpane/issues/88) and
@@ -464,26 +464,26 @@ export type PaneSlots = typeof __propDef.slots;
464
464
  * By default, the pane's last position and width will be saved to the browser's local storage and
465
465
  * re-applied across page reloads. (Set the `storePositionLocally` prop to false to prevent this.)
466
466
  * \
467
- * If multiple `<Pane position='draggable' ...>` components are used on the same page with
467
+ * If multiple `<Pane position="draggable" ...>` components are used on the same page with
468
468
  * `storePositionLocally` set to true, then each must have a unique `localStoreId` prop set to avoid
469
469
  * collisions.
470
470
  * \
471
471
  * Double-clicking the width drag handle will expand or contract the pane between to its `minWidth`
472
472
  * and `maxWidth` sizes.
473
473
  *
474
- * - **`<Pane position='inline' ...>`** \
474
+ * - **`<Pane position="inline" ...>`** \
475
475
  * Provides an inline version of the pane component, allowing the Tweakpane window to appear in the
476
476
  * normal flow of the document.
477
477
  * \
478
478
  * All other _Svelte Tweakpane UI_ components which are created without a containing `<Pane>` are
479
- * nested implicitly inside a title-less `<Pane position='inline'>` component. As such, you do not
480
- * necessarily need create `<Pane position='inline'>` components in most cases.
479
+ * nested implicitly inside a title-less `<Pane position="inline">` component. As such, you do not
480
+ * necessarily need create `<Pane position="inline">` components in most cases.
481
481
  * \
482
482
  * This mode's behavior is similar to creating a Pane in the vanilla JS Tweakpane with its
483
483
  * [`container`](https://tweakpane.github.io/docs/misc/#containerElement) property set to a specific
484
484
  * element where you want the Pane to appear.
485
485
  *
486
- * - **`<Pane position='fixed' ...>`** \
486
+ * - **`<Pane position="fixed" ...>`** \
487
487
  * This mode uses the standard vanilla JS Tweakpane behavior of displaying in a fixed position over
488
488
  * the top-right of the page.
489
489
  *
@@ -67,7 +67,7 @@ export type SeparatorSlots = typeof __propDef.slots;
67
67
  * Wraps Tweakpane's [separator blade](https://tweakpane.github.io/docs/blades/#separator).
68
68
  *
69
69
  * Usage outside of a `<Pane>` component will implicitly wrap the separator in `<Pane
70
- * position='inline'>`.
70
+ * position="inline">`.
71
71
  *
72
72
  * @example
73
73
  * ```svelte
@@ -43,7 +43,7 @@ export type TabGroupSlots = typeof __propDef.slots;
43
43
  * changed to `TabGroup` in _Svelte Tweakpane UI_ to clarify it's relationship to the `<TabPage>`
44
44
  * component.
45
45
  *
46
- * Usage outside of a `<Pane>` component will implicitly wrap the tab in `<Pane position='inline'>`.
46
+ * Usage outside of a `<Pane>` component will implicitly wrap the tab in `<Pane position="inline">`.
47
47
  *
48
48
  * @example
49
49
  * ```svelte
@@ -49,7 +49,7 @@ export type TabPageSlots = typeof __propDef.slots;
49
49
  * component.
50
50
  *
51
51
  * Usage outside of a `<TabGroup>` component wouldn't make much sense, but in such cases the
52
- * `<TabPage>` will be implicitly wrapped in a `<TabGroup>` and `<Pane position='inline'>`.
52
+ * `<TabPage>` will be implicitly wrapped in a `<TabGroup>` and `<Pane position="inline">`.
53
53
  *
54
54
  * @example
55
55
  * ```svelte
@@ -62,7 +62,7 @@ export type AutoObjectSlots = typeof __propDef.slots;
62
62
  * shape of color or point objects will show a more specialized control.
63
63
  *
64
64
  * Usage outside of a `<Pane>` component will implicitly wrap the component in `<Pane
65
- * position='inline'>`.
65
+ * position="inline">`.
66
66
  *
67
67
  * `<AutoObject>` was inspired by the
68
68
  * [`<TWPAutoMutable>`](https://github.com/MrFoxPro/solid-tweakpane/blob/master/src/automutable.tsx)
@@ -103,13 +103,13 @@ export type ElementSlots = typeof __propDef.slots;
103
103
  *
104
104
  * In many cases, this component should not be necessary because _Svelte Tweakpane
105
105
  * UI_ already makes it easy to combine tweakpane components with other inline
106
- * elements simply by using stand-alone components or a `<Pane position='inline'>`
106
+ * elements simply by using stand-alone components or a `<Pane position="inline">`
107
107
  * component. `<Element>` should generally be the most useful when you're using
108
- * `<Pane position='draggable'>` or `<Pane position='fixed'>` and you want a custom
108
+ * `<Pane position="draggable">` or `<Pane position="fixed">` and you want a custom
109
109
  * element embedded in the pane.
110
110
  *
111
111
  * Usage outside of a `<Pane>` component doesn't make a ton of sense, but in such a
112
- * case the `<Element>` will be implicitly wrapped in `<Pane position='inline'>`.
112
+ * case the `<Element>` will be implicitly wrapped in `<Pane position="inline">`.
113
113
  *
114
114
  * @example
115
115
  * ```svelte
@@ -58,7 +58,7 @@
58
58
  }
59
59
  }
60
60
  function syncFolded() {
61
- if (tpPane) {
61
+ if (tpPane && tpPane.expanded !== _expanded) {
62
62
  tpPane.expanded = _expanded;
63
63
  }
64
64
  expanded = _expanded;
@@ -6,7 +6,7 @@ declare const __propDef: {
6
6
  /**
7
7
  * Text in the pane's title bar.
8
8
  * @default `Tweakpane` \
9
- * Unless `position='inline'`, in which case the default is `undefined` and no title bar is
9
+ * Unless `position="inline"`, in which case the default is `undefined` and no title bar is
10
10
  * shown.
11
11
  * */ title?: string | undefined;
12
12
  /**
@@ -130,7 +130,7 @@ export type InternalMonitorBooleanSlots = typeof __propDef.slots;
130
130
  * Note that `interval` is not exposed because updates are driven by reactive changes in the `value`.
131
131
  *
132
132
  * Usage outside of a `<Pane>` component will implicitly wrap the monitor in a `<Pane
133
- * position='inline'>` component.
133
+ * position="inline">` component.
134
134
  *
135
135
  * @example
136
136
  * ```svelte
@@ -152,7 +152,7 @@ export type InternalMonitorNumberSlots = typeof __propDef.slots;
152
152
  * the graph's update rate.
153
153
  *
154
154
  * Usage outside of a `<Pane>` component will implicitly wrap the monitor in a `<Pane
155
- * position='inline'>` component.
155
+ * position="inline">` component.
156
156
  *
157
157
  * @example
158
158
  * ```svelte
@@ -135,7 +135,7 @@ export type InternalMonitorStringSlots = typeof __propDef.slots;
135
135
  * Note that `interval` is not exposed because updates are driven by reactive changes in the `value`.
136
136
  *
137
137
  * Usage outside of a `<Pane>` component will implicitly wrap the monitor in a `<Pane
138
- * position='inline'>` component.
138
+ * position="inline">` component.
139
139
  *
140
140
  * @example
141
141
  * ```svelte
@@ -5,7 +5,7 @@ declare const __propDef: {
5
5
  /**
6
6
  * Text in the pane's title bar.
7
7
  * @default `Tweakpane` \
8
- * Unless `position='inline'`, in which case the default is `undefined` and no title bar is
8
+ * Unless `position="inline"`, in which case the default is `undefined` and no title bar is
9
9
  * shown.
10
10
  */
11
11
  title?: string | undefined;
@@ -115,7 +115,7 @@ declare const __propDef: {
115
115
  * */
116
116
  collapseChildrenToFit?: boolean | undefined;
117
117
  /**
118
- * Identifier to be used if multiple `<Pane position='draggable'>` components with
118
+ * Identifier to be used if multiple `<Pane position="draggable">` components with
119
119
  * `storePositionLocally` set to true are used on the same page.
120
120
  * @default `'1'`
121
121
  */
@@ -5,7 +5,7 @@ declare const __propDef: {
5
5
  /**
6
6
  * Text in the pane's title bar.
7
7
  * @default `Tweakpane` \
8
- * Unless `position='inline'`, in which case the default is `undefined` and no title bar is
8
+ * Unless `position="inline"`, in which case the default is `undefined` and no title bar is
9
9
  * shown.
10
10
  */
11
11
  title?: string | undefined;
@@ -4,7 +4,7 @@ declare const __propDef: {
4
4
  /**
5
5
  * Text in the pane's title bar.
6
6
  * @default `Tweakpane` \
7
- * Unless `position='inline'`, in which case the default is `undefined` and no title bar is
7
+ * Unless `position="inline"`, in which case the default is `undefined` and no title bar is
8
8
  * shown.
9
9
  */
10
10
  title?: string | undefined;
@@ -142,10 +142,10 @@ export type FpsGraphSlots = typeof __propDef.slots;
142
142
  * If you'd like to observe or visualize the frame rate data elsewhere, a `change` event is provided to
143
143
  * notify when the FPS value changes.
144
144
  *
145
- * @emits {number} change - When the FPS value changes.
146
- *
147
145
  * Usage outside of a `<Pane>` component will implicitly wrap the FPS graph in `<Pane
148
- * position='inline'>`.
146
+ * position="inline">`.
147
+ *
148
+ * @emits {number} change - When the FPS value changes.
149
149
  *
150
150
  * @example
151
151
  * ```svelte
@@ -500,7 +500,7 @@ export type MonitorSlots<W extends number | string | boolean | unknown> = Return
500
500
  * See also the `<Waveform>` component for a more advanced number visualization.
501
501
  *
502
502
  * Usage outside of a `<Pane>` component will implicitly wrap the monitor in a `<Pane
503
- * position='inline'>` component.
503
+ * position="inline">` component.
504
504
  *
505
505
  * @example
506
506
  * ```svelte
@@ -195,7 +195,7 @@ export type ProfilerSlots = typeof __propDef.slots;
195
195
  * See `<FpsGraph>` for a simpler alternative optimized for framerate visualization.
196
196
  *
197
197
  * Usage outside of a `<Pane>` component will implicitly wrap the profiler in `<Pane
198
- * position='inline'>`.
198
+ * position="inline">`.
199
199
  *
200
200
  * @example
201
201
  * ```svelte
@@ -150,7 +150,7 @@ export type WaveformMonitorSlots = typeof __propDef.slots;
150
150
  * See `<Monitor>` component if you want to graph a single value's change over time.
151
151
  *
152
152
  * Usage outside of a `<Pane>` component will implicitly wrap the waveform monitor in `<Pane
153
- * position='inline'>`.
153
+ * position="inline">`.
154
154
  *
155
155
  * @example
156
156
  * ```svelte
package/dist/utils.js CHANGED
@@ -68,9 +68,7 @@ export function enforceReadonly(
68
68
  const componentString = componentName ? `<${componentName}> ` : '';
69
69
  const propertyString = propertyName ? `property "${propertyName}" ` : '';
70
70
  console.error(
71
- `Svelte component "${componentString}" property "${propertyString}" is intended for readonly use.\nAssigning\n"${String(
72
- external
73
- )}"\nto\n"${String(internal)}"\nis not allowed.`
71
+ `Svelte component "${componentString}" property "${propertyString}" is intended for readonly use.\nAssigning\n"${String(external)}"\nto\n"${String(internal)}"\nis not allowed.`
74
72
  );
75
73
  }
76
74
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "svelte-tweakpane-ui",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "type": "module",
5
- "description": "Wraps UI elements from Tweakpane in a collection of idiomatic Svelte components, and augments Tweakpane with a few extra features for your convenience and enjoyment.",
5
+ "description": "A Svelte component library wrapping UI elements from Tweakpane, plus some additional functionality for convenience and flexibility.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/kitschpatrol/svelte-tweakpane-ui.git"
@@ -18,6 +18,7 @@
18
18
  "url": "https://ericmika.com"
19
19
  },
20
20
  "license": "MIT",
21
+ "packageManager": "pnpm@8.15.5+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589",
21
22
  "engines": {
22
23
  "node": ">=18.0.0",
23
24
  "pnpm": ">=8.0.0"
@@ -170,49 +171,49 @@
170
171
  "tweaks",
171
172
  "parameters",
172
173
  "gui",
173
- "component",
174
174
  "svelte",
175
175
  "sveltekit",
176
176
  "tweakpane",
177
+ "ui-library",
177
178
  "svelte-ui",
178
- "component-library",
179
+ "svelte-components",
179
180
  "ui-components",
180
- "ui-framework",
181
- "components-library"
181
+ "components-library",
182
+ "npm-package"
182
183
  ],
183
184
  "peerDependencies": {
184
185
  "svelte": "^4.0.0"
185
186
  },
186
187
  "dependencies": {
187
- "@0b5vr/tweakpane-plugin-profiler": "^0.4.1",
188
- "@0b5vr/tweakpane-plugin-rotation": "^0.2.0",
189
- "@kitschpatrol/tweakpane-image-plugin": "^2.0.0",
190
- "@pangenerator/tweakpane-textarea-plugin": "^2.0.0",
191
- "@tweakpane/core": "^2.0.3",
192
- "@tweakpane/plugin-camerakit": "^0.3.0",
193
- "@tweakpane/plugin-essentials": "^0.2.1",
194
- "esm-env": "^1.0.0",
195
- "fast-copy": "^3.0.1",
196
- "fast-equals": "^5.0.1",
197
- "nanoid": "^5.0.6",
198
- "svelte-local-storage-store": "^0.6.4",
199
- "tweakpane": "^4.0.3",
200
- "tweakpane-plugin-waveform": "^1.0.0"
188
+ "@0b5vr/tweakpane-plugin-profiler": "0.4.1",
189
+ "@0b5vr/tweakpane-plugin-rotation": "0.2.0",
190
+ "@kitschpatrol/tweakpane-image-plugin": "2.0.0",
191
+ "@pangenerator/tweakpane-textarea-plugin": "2.0.0",
192
+ "@tweakpane/core": "2.0.3",
193
+ "@tweakpane/plugin-camerakit": "0.3.0",
194
+ "@tweakpane/plugin-essentials": "0.2.1",
195
+ "esm-env": "1.0.0",
196
+ "fast-copy": "3.0.1",
197
+ "fast-equals": "5.0.1",
198
+ "nanoid": "5.0.6",
199
+ "svelte-local-storage-store": "0.6.4",
200
+ "tweakpane": "4.0.3",
201
+ "tweakpane-plugin-waveform": "1.0.0"
201
202
  },
202
203
  "devDependencies": {
203
- "@kitschpatrol/shared-config": "^4.4.2",
204
+ "@kitschpatrol/shared-config": "^4.6.1",
204
205
  "@phenomnomnominal/tsquery": "^6.1.3",
205
- "@playwright/test": "^1.41.2",
206
+ "@playwright/test": "^1.42.1",
206
207
  "@stkb/rewrap": "^0.1.0",
207
208
  "@sveltejs/adapter-static": "^3.0.1",
208
- "@sveltejs/kit": "^2.5.1",
209
- "@sveltejs/package": "^2.2.7",
209
+ "@sveltejs/kit": "^2.5.4",
210
+ "@sveltejs/package": "^2.3.0",
210
211
  "@sveltejs/vite-plugin-svelte": "^3.0.2",
211
- "@types/eslint": "^8.56.3",
212
+ "@types/eslint": "^8.56.6",
212
213
  "@types/fs-extra": "^11.0.4",
213
- "@types/node": "^20.11.20",
214
- "bumpp": "^9.3.0",
215
- "eslint": "^8.56.0",
214
+ "@types/node": "^20.11.30",
215
+ "bumpp": "^9.4.0",
216
+ "eslint": "^8.57.0",
216
217
  "fs-extra": "^11.2.0",
217
218
  "glob": "^10.3.10",
218
219
  "npm-run-all": "^4.1.5",
@@ -220,15 +221,15 @@
220
221
  "publint": "^0.2.7",
221
222
  "read-package-up": "^11.0.0",
222
223
  "svelte": "^4.2.12",
223
- "svelte-check": "^3.6.4",
224
- "svelte-language-server": "^0.16.3",
225
- "svelte2tsx": "^0.7.1",
224
+ "svelte-check": "^3.6.8",
225
+ "svelte-language-server": "^0.16.6",
226
+ "svelte2tsx": "^0.7.5",
226
227
  "ts-morph": "^21.0.1",
227
228
  "tslib": "^2.6.2",
228
229
  "tsx": "^4.7.1",
229
- "typescript": "^5.3.3",
230
- "vite": "^5.1.4",
231
- "yaml": "^2.3.4"
230
+ "typescript": "~5.3.3",
231
+ "vite": "^5.2.3",
232
+ "yaml": "^2.4.1"
232
233
  },
233
234
  "scripts": {
234
235
  "build": "run-s --print-label build:*",
package/readme.md CHANGED
@@ -6,11 +6,30 @@
6
6
 
7
7
  <!-- /title -->
8
8
 
9
- <!-- badges { npm: ["svelte-tweakpane-ui"], custom: { "Documentation": { image: "https://img.shields.io/badge/-documentation-ffdd00?logo=readthedocs&logoColor=222222", link: "https://kitschpatrol.com/svelte-tweakpane-ui" }}} -->
9
+ <picture>
10
+ <source media="(prefers-color-scheme: dark)" srcset="./assets/banner-dark.webp">
11
+ <img alt="Svelte Tweakpane UI Banner" src="./assets/banner-light.webp">
12
+ </picture>
13
+
14
+ <!-- badges {
15
+ npm: ["svelte-tweakpane-ui"],
16
+ custom: {
17
+ MadeWithSvelte: {
18
+ image: "https://madewithsvelte.com/storage/repo-shields/4860-shield.svg",
19
+ link: "https://madewithsvelte.com/p/svelte-tweakpane-ui/shield-link",
20
+ },
21
+ Documentation: {
22
+ image:
23
+ "https://img.shields.io/badge/-Documentation-ffdd00?logo=readthedocs&logoColor=222222",
24
+ link: "https://kitschpatrol.com/svelte-tweakpane-ui",
25
+ }
26
+ }
27
+ } -->
10
28
 
11
29
  [![NPM Package svelte-tweakpane-ui](https://img.shields.io/npm/v/svelte-tweakpane-ui.svg)](https://npmjs.com/package/svelte-tweakpane-ui)
12
30
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
13
- [![Documentation](https://img.shields.io/badge/-documentation-ffdd00?logo=readthedocs&logoColor=222222)](https://kitschpatrol.com/svelte-tweakpane-ui)
31
+ [![MadeWithSvelte](https://madewithsvelte.com/storage/repo-shields/4860-shield.svg)](https://madewithsvelte.com/p/svelte-tweakpane-ui/shield-link)
32
+ [![Documentation](https://img.shields.io/badge/-Documentation-ffdd00?logo=readthedocs&logoColor=222222)](https://kitschpatrol.com/svelte-tweakpane-ui)
14
33
 
15
34
  <!-- /badges -->
16
35