svelte-tweakpane-ui 1.5.11 → 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 -1
  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 +26 -31
@@ -1,11 +1,11 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>
4
+ import { BROWSER } from 'esm-env'
5
+ import { createEventDispatcher, getContext, onDestroy, onMount } from 'svelte'
4
6
  import ClsPad from '../internal/ClsPad.svelte'
5
7
  import InternalPaneInline from '../internal/InternalPaneInline.svelte'
6
8
  import { getElementIndex, isRootPane } from '../utils.js'
7
- import { BROWSER } from 'esm-env'
8
- import { createEventDispatcher, getContext, onDestroy, onMount } from 'svelte'
9
9
  export let title = 'Button'
10
10
  export let label = void 0
11
11
  export let disabled = false
@@ -18,13 +18,13 @@
18
18
  let index
19
19
  function create() {
20
20
  if (button) button.dispose()
21
- button = $parentStore.addButton({
21
+ button = $parentStore?.addButton({
22
22
  disabled,
23
23
  index,
24
24
  label,
25
25
  title,
26
26
  })
27
- button.on('click', () => {
27
+ button?.on('click', () => {
28
28
  dispatch('click')
29
29
  })
30
30
  }
@@ -40,7 +40,7 @@
40
40
  $: button && (button.disabled = disabled)
41
41
  $: theme &&
42
42
  $parentStore &&
43
- (userCreatedPane || !isRootPane($parentStore)) &&
43
+ (userCreatedPane ?? !isRootPane($parentStore)) &&
44
44
  console.warn(
45
45
  'Set theme on the <Pane> component, not on its children! (Check nested <Button> components for a theme prop.)',
46
46
  )
@@ -6,29 +6,29 @@ declare const __propDef: {
6
6
  /**
7
7
  * Text inside of the button.
8
8
  * @default `'Button'`
9
- * */ title?: string
9
+ */ title?: string
10
10
  /**
11
11
  * Text displayed next to the button.
12
12
  * @default `undefined`
13
- * */ label?: string | undefined
13
+ */ label?: string | undefined
14
14
  /**
15
15
  * Prevent interactivity and gray out the control.
16
16
  * @default `false`
17
- * */ disabled?: boolean
17
+ */ disabled?: boolean
18
18
  /**
19
19
  * Custom color scheme.
20
20
  * @default `undefined` \
21
21
  * Inherits default Tweakpane theme equivalent to
22
22
  * `ThemeUtils.presets.standard`, or the theme set with
23
23
  * `setGlobalDefaultTheme()`.)
24
- * */ theme?: Theme | undefined
24
+ */ theme?: Theme | undefined
25
25
  }
26
26
  slots: {}
27
27
  events: {
28
28
  /**
29
29
  * Fires when the button is clicked.
30
30
  * @event
31
- * */
31
+ */
32
32
  click: ButtonClickEvent
33
33
  }
34
34
  }
@@ -1,13 +1,13 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>
4
- import Blade from '../core/Blade.svelte'
5
- import ClsPad from '../internal/ClsPad.svelte'
6
- import { fillWith } from '../utils'
7
- import { getGridDimensions } from '../utils.js'
8
4
  import * as pluginModule from '@kitschpatrol/tweakpane-plugin-essentials'
9
5
  import { BROWSER } from 'esm-env'
10
6
  import { createEventDispatcher } from 'svelte'
7
+ import Blade from '../core/Blade.svelte'
8
+ import ClsPad from '../internal/ClsPad.svelte'
9
+ import { fillWith } from '../utils.js'
10
+ import { getGridDimensions } from '../utils.js'
11
11
  export let columns = void 0
12
12
  export let rows = void 0
13
13
  export let buttons = []
@@ -20,7 +20,7 @@
20
20
  const index = y * gridDimensions.columns + x
21
21
  if (index >= 0 && index < buttons.length) {
22
22
  return {
23
- title: `${buttons[index]}`,
23
+ title: buttons[index],
24
24
  }
25
25
  }
26
26
  return { title: '' }
@@ -10,35 +10,7 @@ export type ButtonGridClickEvent = CustomEvent<{
10
10
  import type { ButtonGridApi as ButtonGridRef } from '@kitschpatrol/tweakpane-plugin-essentials'
11
11
  import type { ButtonGridBladeParams as ButtonGridOptions } from '@kitschpatrol/tweakpane-plugin-essentials/dist/types/button-grid/plugin.d.ts'
12
12
  declare const __propDef: {
13
- props: {
14
- /**
15
- * Array of names, each of which will become the title of a button in the grid.
16
- * */
17
- buttons: string[]
18
- /**
19
- * Number of columns to arrange the buttons into.
20
- *
21
- * Setting `columns` without setting `rows` will lock the column count and allow the row
22
- * count to change dynamically based on the number of buttons.
23
- * @default `undefined` \
24
- * Dynamic based on quantity of `buttons`.
25
- * */
26
- columns?: number
27
- /**
28
- * Text displayed next to the button grid.
29
- * @default `undefined`
30
- */
31
- label?: string
32
- /**
33
- * Number of rows to arrange the buttons into.
34
- *
35
- * Setting `rows` without setting `columns` will lock the column count and allow the column
36
- * count to change dynamically based on the number of buttons.
37
- * @default `undefined` \
38
- * Dynamic based on quantity of `buttons`.
39
- * */
40
- rows?: number
41
- } & Omit<
13
+ props: Omit<
42
14
  {
43
15
  /**
44
16
  * Blade configuration exposing Tweakpane's internal
@@ -66,7 +38,6 @@ declare const __propDef: {
66
38
  * components wrapping `<Blade>`'s functionality.
67
39
  *
68
40
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
69
- *
70
41
  * @bindable
71
42
  * @readonly
72
43
  */
@@ -79,13 +50,40 @@ declare const __propDef: {
79
50
  * components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
80
51
  *
81
52
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
82
- *
83
53
  * @default `undefined`
84
54
  */
85
- plugin?: import('../utils').Plugin | undefined
55
+ plugin?: import('../utils.js').Plugin | undefined
86
56
  },
87
57
  'ref' | 'options' | 'plugin'
88
- >
58
+ > & {
59
+ /**
60
+ * Array of names, each of which will become the title of a button in the grid.
61
+ */
62
+ buttons: string[]
63
+ /**
64
+ * Number of columns to arrange the buttons into.
65
+ *
66
+ * Setting `columns` without setting `rows` will lock the column count and allow the row
67
+ * count to change dynamically based on the number of buttons.
68
+ * @default `undefined` \
69
+ * Dynamic based on quantity of `buttons`.
70
+ */
71
+ columns?: number
72
+ /**
73
+ * Text displayed next to the button grid.
74
+ * @default `undefined`
75
+ */
76
+ label?: string
77
+ /**
78
+ * Number of rows to arrange the buttons into.
79
+ *
80
+ * Setting `rows` without setting `columns` will lock the column count and allow the column
81
+ * count to change dynamically based on the number of buttons.
82
+ * @default `undefined` \
83
+ * Dynamic based on quantity of `buttons`.
84
+ */
85
+ rows?: number
86
+ }
89
87
  slots: {}
90
88
  events: {
91
89
  /**
@@ -94,7 +92,7 @@ declare const __propDef: {
94
92
  * Note that the values described in the `ButtonGridClickEvent` type are available on the
95
93
  * `event.detail` parameter.
96
94
  * @event
97
- * */
95
+ */
98
96
  click: ButtonGridClickEvent
99
97
  }
100
98
  }
@@ -3,13 +3,7 @@ import type { ValueChangeEvent } from '../utils.js'
3
3
  export type CheckboxChangeEvent = ValueChangeEvent<boolean>
4
4
  declare const __propDef: {
5
5
  props: Omit<
6
- {
7
- /**
8
- * The value to control.
9
- * @bindable
10
- */
11
- value: boolean
12
- } & Omit<
6
+ Omit<
13
7
  {
14
8
  /**
15
9
  * The binding's target object with values to manipulate.
@@ -43,7 +37,6 @@ declare const __propDef: {
43
37
  options?: import('@tweakpane/core').BaseInputParams | undefined
44
38
  /**
45
39
  * Custom color scheme.
46
- *
47
40
  * @default `undefined` \
48
41
  * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
49
42
  * set with `setGlobalDefaultTheme()`.
@@ -58,7 +51,6 @@ declare const __propDef: {
58
51
  * components wrapping `<Binding>`'s functionality.
59
52
  *
60
53
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
61
- *
62
54
  * @bindable
63
55
  * @readonly
64
56
  */
@@ -71,13 +63,18 @@ declare const __propDef: {
71
63
  * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
72
64
  *
73
65
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
74
- *
75
66
  * @default `undefined`
76
67
  */
77
68
  plugin?: import('../utils.js').Plugin | undefined
78
69
  },
79
70
  'object' | 'key'
80
- >,
71
+ > & {
72
+ /**
73
+ * The value to control.
74
+ * @bindable
75
+ */
76
+ value: boolean
77
+ },
81
78
  'ref' | 'options' | 'plugin'
82
79
  >
83
80
  slots: {}
@@ -89,10 +86,9 @@ declare const __propDef: {
89
86
  *
90
87
  * The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
91
88
  * and changes resulting from programmatic manipulation of the `value` (`external`).
92
- *
93
89
  * @extends ValueChangeEvent
94
90
  * @event
95
- * */
91
+ */
96
92
  change: CheckboxChangeEvent
97
93
  }
98
94
  }
@@ -1,13 +1,12 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>
4
- import ClsPad from '../internal/ClsPad.svelte'
5
- import GenericInputFolding from '../internal/GenericInputFolding.svelte'
6
- import { objectToTuple } from '../utils'
7
- import { fillWith } from '../utils'
8
4
  import { isColorObject, isRgbaColorObject, isRgbColorObject } from '@tweakpane/core'
9
5
  import { BROWSER } from 'esm-env'
10
6
  import { shallowEqual } from 'fast-equals'
7
+ import ClsPad from '../internal/ClsPad.svelte'
8
+ import GenericInputFolding from '../internal/GenericInputFolding.svelte'
9
+ import { fillWith, objectToTuple } from '../utils.js'
11
10
  export let value
12
11
  export let expanded = void 0
13
12
  export let type = void 0
@@ -1,10 +1,9 @@
1
1
  import { SvelteComponent } from 'svelte'
2
- import type { Simplify } from '../utils'
3
- import type { ValueChangeEvent } from '../utils.js'
4
2
  import type {
5
3
  RgbaColorObject,
6
4
  RgbColorObject,
7
5
  } from '@tweakpane/core/dist/input-binding/color/model/color.js'
6
+ import type { Simplify, ValueChangeEvent } from '../utils.js'
8
7
  export type ColorValueRgbTuple = [r: number, g: number, b: number]
9
8
  export type ColorValueRgbaTuple = [r: number, g: number, b: number, a: number]
10
9
  export type ColorValueRgbObject = Simplify<RgbColorObject>
@@ -20,22 +19,82 @@ export type ColorValue = Simplify<
20
19
  export type ColorChangeEvent = ValueChangeEvent<ColorValue>
21
20
  import type { ColorInputParams as ColorOptions } from 'tweakpane'
22
21
  declare const __propDef: {
23
- props: {
24
- /**
25
- * A color value to control.
26
- *
27
- * Use either a color-like string (e.g. #ff00ff), or an object with `r`, `b`, `g`, and
28
- * optional `a` keys.
29
- * @bindable
30
- * */
31
- value: ColorValue
32
- /**
33
- * Whether to treat values as floats from 0.0 to 1.0, or integers from 0 to 255.
34
- * @default `'int'`
35
- * */
36
- type?: 'float' | 'int'
37
- } & Omit<
38
- {
22
+ props: Omit<
23
+ Omit<
24
+ {
25
+ /**
26
+ * The binding's target object with values to manipulate.
27
+ * @bindable
28
+ */
29
+ object: import('@tweakpane/core').Bindable & Record<string, ColorValue>
30
+ /** The key for the value in the target `object` that the control should manipulate. */
31
+ key: string
32
+ /**
33
+ * Prevent interactivity and gray out the control.
34
+ * @default `false`
35
+ */
36
+ disabled?: boolean
37
+ /**
38
+ * Text displayed next to control.
39
+ * @default `undefined`
40
+ */
41
+ label?: string | undefined
42
+ /**
43
+ * Tweakpane's internal options object.
44
+ *
45
+ * See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
46
+ *
47
+ * Valid types are contingent on the type of the value `key` points to in `object`.
48
+ *
49
+ * This is intended internal use, when implementing convenience components wrapping Binding's
50
+ * functionality. Options of interest are instead exposed as top-level props in _Svelte
51
+ * Tweakpane UI_.
52
+ * @default `undefined`
53
+ */
54
+ options?: ColorOptions | undefined
55
+ /**
56
+ * Custom color scheme.
57
+ * @default `undefined` \
58
+ * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
59
+ * set with `setGlobalDefaultTheme()`.
60
+ */
61
+ theme?: import('..').Theme | undefined
62
+ /**
63
+ * Reference to internal Tweakpane
64
+ * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
65
+ * this control.
66
+ *
67
+ * This property is exposed for advanced use cases only, such as when implementing convenience
68
+ * components wrapping `<Binding>`'s functionality.
69
+ *
70
+ * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
71
+ * @bindable
72
+ * @readonly
73
+ */
74
+ ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
75
+ /**
76
+ * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
77
+ * the `<Binding>`'s containing `<Pane>`.
78
+ *
79
+ * This property is exposed for advanced use cases only, such as when implementing convenience
80
+ * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
81
+ *
82
+ * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
83
+ * @default `undefined`
84
+ */
85
+ plugin?: import('../utils.js').Plugin | undefined
86
+ },
87
+ 'object' | 'key'
88
+ > & {
89
+ /**
90
+ * A color value to control.
91
+ *
92
+ * Use either a color-like string (e.g. #ff00ff), or an object with `r`, `b`, `g`, and
93
+ * optional `a` keys.
94
+ * @bindable
95
+ */
96
+ value: ColorValue
97
+ } & {
39
98
  /**
40
99
  * DOM class name of the button used to expand and collapse the input's picker.
41
100
  * @default `undefined`
@@ -57,86 +116,23 @@ declare const __propDef: {
57
116
  * @default `true`
58
117
  */
59
118
  userExpandable?: boolean
60
- } & {
61
- /**
62
- * A color value to control.
63
- *
64
- * Use either a color-like string (e.g. #ff00ff), or an object with `r`, `b`, `g`, and
65
- * optional `a` keys.
66
- * @bindable
67
- */
68
- value: ColorValue
69
- } & Omit<
70
- {
71
- /**
72
- * The binding's target object with values to manipulate.
73
- * @bindable
74
- */
75
- object: import('@tweakpane/core').Bindable & Record<string, ColorValue>
76
- /** The key for the value in the target `object` that the control should manipulate. */
77
- key: string
78
- /**
79
- * Prevent interactivity and gray out the control.
80
- * @default `false`
81
- */
82
- disabled?: boolean
83
- /**
84
- * Text displayed next to control.
85
- * @default `undefined`
86
- */
87
- label?: string | undefined
88
- /**
89
- * Tweakpane's internal options object.
90
- *
91
- * See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
92
- *
93
- * Valid types are contingent on the type of the value `key` points to in `object`.
94
- *
95
- * This is intended internal use, when implementing convenience components wrapping Binding's
96
- * functionality. Options of interest are instead exposed as top-level props in _Svelte
97
- * Tweakpane UI_.
98
- * @default `undefined`
99
- */
100
- options?: ColorOptions | undefined
101
- /**
102
- * Custom color scheme.
103
- *
104
- * @default `undefined` \
105
- * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
106
- * set with `setGlobalDefaultTheme()`.
107
- */
108
- theme?: import('..').Theme | undefined
109
- /**
110
- * Reference to internal Tweakpane
111
- * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
112
- * this control.
113
- *
114
- * This property is exposed for advanced use cases only, such as when implementing convenience
115
- * components wrapping `<Binding>`'s functionality.
116
- *
117
- * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
118
- *
119
- * @bindable
120
- * @readonly
121
- */
122
- ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
123
- /**
124
- * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
125
- * the `<Binding>`'s containing `<Pane>`.
126
- *
127
- * This property is exposed for advanced use cases only, such as when implementing convenience
128
- * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
129
- *
130
- * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
131
- *
132
- * @default `undefined`
133
- */
134
- plugin?: import('../utils').Plugin | undefined
135
- },
136
- 'object' | 'key'
137
- >,
119
+ },
138
120
  'ref' | 'options' | 'plugin' | 'buttonClass'
139
- >
121
+ > & {
122
+ /**
123
+ * A color value to control.
124
+ *
125
+ * Use either a color-like string (e.g. #ff00ff), or an object with `r`, `b`, `g`, and
126
+ * optional `a` keys.
127
+ * @bindable
128
+ */
129
+ value: ColorValue
130
+ /**
131
+ * Whether to treat values as floats from 0.0 to 1.0, or integers from 0 to 255.
132
+ * @default `'int'`
133
+ */
134
+ type?: 'float' | 'int'
135
+ }
140
136
  slots: {}
141
137
  events: {
142
138
  /**
@@ -146,10 +142,9 @@ declare const __propDef: {
146
142
  *
147
143
  * The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
148
144
  * and changes resulting from programmatic manipulation of the `value` (`external`).
149
- *
150
145
  * @extends ValueChangeEvent
151
146
  * @event
152
- * */
147
+ */
153
148
  change: ColorChangeEvent
154
149
  }
155
150
  }
@@ -1,15 +1,15 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>
4
- import ClsPad from '../internal/ClsPad.svelte'
5
- import GenericBladeFolding from '../internal/GenericBladeFolding.svelte'
6
- import { fillWith } from '../utils'
7
4
  import * as pluginModule from '@kitschpatrol/tweakpane-plugin-essentials'
8
5
  import { CubicBezier } from '@kitschpatrol/tweakpane-plugin-essentials'
9
6
  import { BROWSER } from 'esm-env'
10
- import copy from 'fast-copy'
7
+ import { copy } from 'fast-copy'
11
8
  import { shallowEqual } from 'fast-equals'
12
9
  import { createEventDispatcher } from 'svelte'
10
+ import ClsPad from '../internal/ClsPad.svelte'
11
+ import GenericBladeFolding from '../internal/GenericBladeFolding.svelte'
12
+ import { fillWith } from '../utils.js'
13
13
  export let value
14
14
  export let label = void 0
15
15
  export let expanded = void 0
@@ -59,8 +59,8 @@
59
59
  })
60
60
  }
61
61
  $: options = {
62
- value: getValue(),
63
62
  label,
63
+ value: getValue(),
64
64
  view: 'cubicbezier',
65
65
  }
66
66
  $: cubicBezierBlade && 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 CubicBezierValueObject = {
5
4
  x1: number
6
5
  y1: number
@@ -13,46 +12,8 @@ export type CubicBezierChangeEvent = ValueChangeEvent<CubicBezierValue>
13
12
  import type { CubicBezierApi as CubicBezierRef } from '@kitschpatrol/tweakpane-plugin-essentials'
14
13
  import type { CubicBezierBladeParams as CubicBezierOptions } from '@kitschpatrol/tweakpane-plugin-essentials/dist/types/cubic-bezier/plugin.d.ts'
15
14
  declare const __propDef: {
16
- props: {
17
- /**
18
- * The cubic bezier value to control.
19
- *
20
- * Object value type is a convenience added by _Svelte Tweakpane UI_, and is not part of the
21
- * original `@tweakpane/plugin-essentials` API.
22
- * @bindable
23
- */
24
- value: CubicBezierValue
25
- /**
26
- * Text displayed next to the control.
27
- * @default `undefined`
28
- * */
29
- label?: string
30
- } & Omit<
15
+ props: Omit<
31
16
  {
32
- /**
33
- * DOM class name of the button used to expand and collapse the blade's picker.
34
- * @default `undefined`
35
- */
36
- buttonClass?: string
37
- /**
38
- * Expand or collapse the blade's picker.
39
- * @default `true`
40
- * @bindable
41
- */
42
- expanded?: boolean
43
- /**
44
- * The style of value "picker" to use in the blade.
45
- * @default `'popup'`
46
- */
47
- picker?: 'inline' | 'popup'
48
- /**
49
- * Allow users to interactively expand / contract the value picker by clicking its icon.
50
- *
51
- * Most useful when `picker` is `inline`.
52
- * @default `true`
53
- */
54
- userExpandable?: boolean
55
- } & {
56
17
  /**
57
18
  * Blade configuration exposing Tweakpane's internal
58
19
  * [`BladeParams`](https://tweakpane.github.io/docs/api/interfaces/BaseBladeParams.html).
@@ -79,7 +40,6 @@ declare const __propDef: {
79
40
  * components wrapping `<Blade>`'s functionality.
80
41
  *
81
42
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
82
- *
83
43
  * @bindable
84
44
  * @readonly
85
45
  */
@@ -92,13 +52,50 @@ declare const __propDef: {
92
52
  * components wrapping `<Blade>`'s functionality in combination with a Tweakpane plugin.
93
53
  *
94
54
  * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
95
- *
96
55
  * @default `undefined`
97
56
  */
98
- plugin?: import('../utils').Plugin | undefined
57
+ plugin?: import('../utils.js').Plugin | undefined
58
+ } & {
59
+ /**
60
+ * DOM class name of the button used to expand and collapse the blade's picker.
61
+ * @default `undefined`
62
+ */
63
+ buttonClass?: string
64
+ /**
65
+ * Expand or collapse the blade's picker.
66
+ * @default `true`
67
+ * @bindable
68
+ */
69
+ expanded?: boolean
70
+ /**
71
+ * The style of value "picker" to use in the blade.
72
+ * @default `'popup'`
73
+ */
74
+ picker?: 'inline' | 'popup'
75
+ /**
76
+ * Allow users to interactively expand / contract the value picker by clicking its icon.
77
+ *
78
+ * Most useful when `picker` is `inline`.
79
+ * @default `true`
80
+ */
81
+ userExpandable?: boolean
99
82
  },
100
83
  'ref' | 'options' | 'plugin' | 'buttonClass'
101
- >
84
+ > & {
85
+ /**
86
+ * The cubic bezier value to control.
87
+ *
88
+ * Object value type is a convenience added by _Svelte Tweakpane UI_, and is not part of the
89
+ * original `@tweakpane/plugin-essentials` API.
90
+ * @bindable
91
+ */
92
+ value: CubicBezierValue
93
+ /**
94
+ * Text displayed next to the control.
95
+ * @default `undefined`
96
+ */
97
+ label?: string
98
+ }
102
99
  slots: {}
103
100
  events: {
104
101
  /**
@@ -108,10 +105,9 @@ declare const __propDef: {
108
105
  *
109
106
  * The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
110
107
  * and changes resulting from programmatic manipulation of the `value` (`external`).
111
- *
112
108
  * @extends ValueChangeEvent
113
109
  * @event
114
- * */
110
+ */
115
111
  change: CubicBezierChangeEvent
116
112
  }
117
113
  }
@@ -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-file-import'
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 rows = void 0
12
12
  export let invalidExtensionMessage = void 0