svelte-tweakpane-ui 1.6.0-preview.3 → 1.6.0-preview.5

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 (95) 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/ColorPlus.svelte +2 -2
  9. package/dist/control/ColorPlus.svelte.d.ts +95 -99
  10. package/dist/control/CubicBezier.svelte +5 -5
  11. package/dist/control/CubicBezier.svelte.d.ts +43 -47
  12. package/dist/control/File.svelte +3 -3
  13. package/dist/control/File.svelte.d.ts +34 -38
  14. package/dist/control/Image.svelte +3 -3
  15. package/dist/control/Image.svelte.d.ts +31 -35
  16. package/dist/control/IntervalSlider.svelte +1 -1
  17. package/dist/control/IntervalSlider.svelte.d.ts +103 -108
  18. package/dist/control/List.svelte +5 -5
  19. package/dist/control/List.svelte.d.ts +24 -28
  20. package/dist/control/Point.svelte +9 -9
  21. package/dist/control/Point.svelte.d.ts +142 -147
  22. package/dist/control/RadioGrid.svelte +3 -4
  23. package/dist/control/RadioGrid.svelte.d.ts +60 -64
  24. package/dist/control/Ring.svelte +1 -1
  25. package/dist/control/Ring.svelte.d.ts +105 -109
  26. package/dist/control/RotationEuler.svelte +5 -5
  27. package/dist/control/RotationEuler.svelte.d.ts +110 -115
  28. package/dist/control/RotationQuaternion.svelte +5 -5
  29. package/dist/control/RotationQuaternion.svelte.d.ts +108 -113
  30. package/dist/control/Slider.svelte +1 -1
  31. package/dist/control/Slider.svelte.d.ts +95 -99
  32. package/dist/control/Stepper.svelte +1 -1
  33. package/dist/control/Stepper.svelte.d.ts +95 -99
  34. package/dist/control/Text.svelte +1 -1
  35. package/dist/control/Text.svelte.d.ts +25 -29
  36. package/dist/control/Textarea.svelte +2 -2
  37. package/dist/control/Textarea.svelte.d.ts +34 -38
  38. package/dist/control/Wheel.svelte +1 -1
  39. package/dist/control/Wheel.svelte.d.ts +101 -104
  40. package/dist/core/Binding.svelte +5 -5
  41. package/dist/core/Binding.svelte.d.ts +9 -14
  42. package/dist/core/Blade.svelte +3 -3
  43. package/dist/core/Blade.svelte.d.ts +5 -7
  44. package/dist/core/Folder.svelte +4 -4
  45. package/dist/core/Folder.svelte.d.ts +5 -5
  46. package/dist/core/Pane.svelte +3 -3
  47. package/dist/core/Pane.svelte.d.ts +217 -221
  48. package/dist/core/Separator.svelte +1 -1
  49. package/dist/core/Separator.svelte.d.ts +0 -2
  50. package/dist/core/TabGroup.svelte +4 -4
  51. package/dist/core/TabGroup.svelte.d.ts +3 -3
  52. package/dist/core/TabPage.svelte +4 -4
  53. package/dist/core/TabPage.svelte.d.ts +4 -4
  54. package/dist/extra/AutoObject.svelte +5 -5
  55. package/dist/extra/AutoObject.svelte.d.ts +4 -5
  56. package/dist/extra/AutoValue.svelte.d.ts +9 -13
  57. package/dist/extra/Element.svelte +1 -1
  58. package/dist/extra/Element.svelte.d.ts +23 -25
  59. package/dist/internal/ClsPad.svelte +3 -2
  60. package/dist/internal/GenericBinding.svelte +2 -2
  61. package/dist/internal/GenericBinding.svelte.d.ts +8 -11
  62. package/dist/internal/GenericBladeFolding.svelte +1 -1
  63. package/dist/internal/GenericBladeFolding.svelte.d.ts +25 -27
  64. package/dist/internal/GenericInput.svelte.d.ts +8 -11
  65. package/dist/internal/GenericInputFolding.svelte.d.ts +78 -81
  66. package/dist/internal/GenericMonitor.svelte.d.ts +76 -79
  67. package/dist/internal/GenericPane.svelte +4 -4
  68. package/dist/internal/GenericPane.svelte.d.ts +6 -7
  69. package/dist/internal/GenericSlider.svelte +1 -1
  70. package/dist/internal/GenericSlider.svelte.d.ts +100 -101
  71. package/dist/internal/InternalMonitorBoolean.svelte +2 -2
  72. package/dist/internal/InternalMonitorBoolean.svelte.d.ts +79 -82
  73. package/dist/internal/InternalMonitorNumber.svelte +3 -3
  74. package/dist/internal/InternalMonitorNumber.svelte.d.ts +100 -103
  75. package/dist/internal/InternalMonitorString.svelte +2 -2
  76. package/dist/internal/InternalMonitorString.svelte.d.ts +84 -87
  77. package/dist/internal/InternalPaneDraggable.svelte +5 -5
  78. package/dist/internal/InternalPaneDraggable.svelte.d.ts +86 -88
  79. package/dist/internal/InternalPaneFixed.svelte.d.ts +26 -27
  80. package/dist/internal/InternalPaneInline.svelte +1 -1
  81. package/dist/internal/InternalPaneInline.svelte.d.ts +13 -14
  82. package/dist/monitor/FpsGraph.svelte +5 -5
  83. package/dist/monitor/FpsGraph.svelte.d.ts +45 -47
  84. package/dist/monitor/Monitor.svelte +1 -1
  85. package/dist/monitor/Monitor.svelte.d.ts +316 -331
  86. package/dist/monitor/Profiler.svelte +3 -3
  87. package/dist/monitor/Profiler.svelte.d.ts +51 -59
  88. package/dist/monitor/WaveformMonitor.svelte +5 -5
  89. package/dist/monitor/WaveformMonitor.svelte.d.ts +102 -105
  90. package/dist/theme.d.ts +1 -1
  91. package/dist/theme.js +0 -1
  92. package/dist/utils.d.ts +5 -5
  93. package/dist/utils.js +2 -4
  94. package/license.txt +1 -1
  95. package/package.json +27 -32
@@ -1,26 +1,86 @@
1
1
  import { SvelteComponent } from 'svelte'
2
- import type { ValueChangeEvent } from '../utils.js'
3
2
  import type { ColorPlusValue } from 'tweakpane-plugin-color-plus/lite'
3
+ import type { ValueChangeEvent } from '../utils.js'
4
4
  export type { ColorPlusValue } from 'tweakpane-plugin-color-plus/lite'
5
5
  export type ColorPlusChangeEvent = ValueChangeEvent<ColorPlusValue>
6
- import * as pluginModule from 'tweakpane-plugin-color-plus/lite'
6
+ import type { ColorPlusInputParams as ColorPlusOptions } from 'tweakpane-plugin-color-plus/lite'
7
7
  declare const __propDef: {
8
- props: {
9
- /**
10
- * A color value to control.
11
- *
12
- * Use either a color-like string (e.g. #ff00ff), a number, an object with `r`, `b`, `g`, and
13
- * optional `a` keys, or a tuple.
14
- * @bindable
15
- * */
16
- value: ColorPlusValue
17
- /**
18
- * Whether to treat values as floats from 0.0 to 1.0, or integers from 0 to 255.
19
- * @default `'int'`
20
- * */
21
- type?: 'float' | 'int'
22
- } & Omit<
23
- {
8
+ props: Omit<
9
+ Omit<
10
+ {
11
+ /**
12
+ * The binding's target object with values to manipulate.
13
+ * @bindable
14
+ */
15
+ object: import('@tweakpane/core').Bindable & Record<string, ColorPlusValue>
16
+ /** The key for the value in the target `object` that the control should manipulate. */
17
+ key: string
18
+ /**
19
+ * Prevent interactivity and gray out the control.
20
+ * @default `false`
21
+ */
22
+ disabled?: boolean
23
+ /**
24
+ * Text displayed next to control.
25
+ * @default `undefined`
26
+ */
27
+ label?: string | undefined
28
+ /**
29
+ * Tweakpane's internal options object.
30
+ *
31
+ * See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
32
+ *
33
+ * Valid types are contingent on the type of the value `key` points to in `object`.
34
+ *
35
+ * This is intended internal use, when implementing convenience components wrapping Binding's
36
+ * functionality. Options of interest are instead exposed as top-level props in _Svelte
37
+ * Tweakpane UI_.
38
+ * @default `undefined`
39
+ */
40
+ options?: ColorPlusOptions | undefined
41
+ /**
42
+ * Custom color scheme.
43
+ * @default `undefined` \
44
+ * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
45
+ * set with `setGlobalDefaultTheme()`.
46
+ */
47
+ theme?: import('..').Theme | undefined
48
+ /**
49
+ * Reference to internal Tweakpane
50
+ * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
51
+ * this control.
52
+ *
53
+ * This property is exposed for advanced use cases only, such as when implementing convenience
54
+ * components wrapping `<Binding>`'s functionality.
55
+ *
56
+ * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
57
+ * @bindable
58
+ * @readonly
59
+ */
60
+ ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
61
+ /**
62
+ * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
63
+ * the `<Binding>`'s containing `<Pane>`.
64
+ *
65
+ * This property is exposed for advanced use cases only, such as when implementing convenience
66
+ * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
67
+ *
68
+ * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
69
+ * @default `undefined`
70
+ */
71
+ plugin?: import('../utils.js').Plugin | undefined
72
+ },
73
+ 'object' | 'key'
74
+ > & {
75
+ /**
76
+ * A color value to control.
77
+ *
78
+ * Use either a color-like string (e.g. #ff00ff), a number, an object with `r`, `b`, `g`, and
79
+ * optional `a` keys, or a tuple.
80
+ * @bindable
81
+ */
82
+ value: ColorPlusValue
83
+ } & {
24
84
  /**
25
85
  * DOM class name of the button used to expand and collapse the input's picker.
26
86
  * @default `undefined`
@@ -42,86 +102,23 @@ declare const __propDef: {
42
102
  * @default `true`
43
103
  */
44
104
  userExpandable?: boolean
45
- } & {
46
- /**
47
- * A color value to control.
48
- *
49
- * Use either a color-like string (e.g. #ff00ff), a number, an object with `r`, `b`, `g`, and
50
- * optional `a` keys, or a tuple.
51
- * @bindable
52
- */
53
- value: ColorPlusValue
54
- } & Omit<
55
- {
56
- /**
57
- * The binding's target object with values to manipulate.
58
- * @bindable
59
- */
60
- object: import('@tweakpane/core').Bindable & Record<string, ColorPlusValue>
61
- /** The key for the value in the target `object` that the control should manipulate. */
62
- key: string
63
- /**
64
- * Prevent interactivity and gray out the control.
65
- * @default `false`
66
- */
67
- disabled?: boolean
68
- /**
69
- * Text displayed next to control.
70
- * @default `undefined`
71
- */
72
- label?: string | undefined
73
- /**
74
- * Tweakpane's internal options object.
75
- *
76
- * See [`BindingParams`](https://tweakpane.github.io/docs/api/types/BindingParams.html).
77
- *
78
- * Valid types are contingent on the type of the value `key` points to in `object`.
79
- *
80
- * This is intended internal use, when implementing convenience components wrapping Binding's
81
- * functionality. Options of interest are instead exposed as top-level props in _Svelte
82
- * Tweakpane UI_.
83
- * @default `undefined`
84
- */
85
- options?: pluginModule.ColorPlusInputParams | undefined
86
- /**
87
- * Custom color scheme.
88
- *
89
- * @default `undefined` \
90
- * Inherits default Tweakpane theme equivalent to `ThemeUtils.presets.standard`, or the theme
91
- * set with `setGlobalDefaultTheme()`.
92
- */
93
- theme?: import('..').Theme | undefined
94
- /**
95
- * Reference to internal Tweakpane
96
- * [`BindingApi`](https://tweakpane.github.io/docs/api/classes/_internal_.BindingApi.html) for
97
- * this control.
98
- *
99
- * This property is exposed for advanced use cases only, such as when implementing convenience
100
- * components wrapping `<Binding>`'s functionality.
101
- *
102
- * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
103
- *
104
- * @bindable
105
- * @readonly
106
- */
107
- ref?: import('../internal/GenericInput.svelte').GenericInputRef | undefined
108
- /**
109
- * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to automatically register in
110
- * the `<Binding>`'s containing `<Pane>`.
111
- *
112
- * This property is exposed for advanced use cases only, such as when implementing convenience
113
- * components wrapping `<Binding>`'s functionality in combination with a Tweakpane plugin.
114
- *
115
- * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane UI_ abstractions.
116
- *
117
- * @default `undefined`
118
- */
119
- plugin?: import('../utils.js').Plugin | undefined
120
- },
121
- 'object' | 'key'
122
- >,
105
+ },
123
106
  'ref' | 'options' | 'plugin' | 'buttonClass'
124
- >
107
+ > & {
108
+ /**
109
+ * A color value to control.
110
+ *
111
+ * Use either a color-like string (e.g. #ff00ff), a number, an object with `r`, `b`, `g`, and
112
+ * optional `a` keys, or a tuple.
113
+ * @bindable
114
+ */
115
+ value: ColorPlusValue
116
+ /**
117
+ * Whether to treat values as floats from 0.0 to 1.0, or integers from 0 to 255.
118
+ * @default `'int'`
119
+ */
120
+ type?: 'float' | 'int'
121
+ }
125
122
  slots: {}
126
123
  events: {
127
124
  /**
@@ -131,10 +128,9 @@ declare const __propDef: {
131
128
  *
132
129
  * The `event.details` payload includes a copy of the value and an `origin` field to distinguish between user-interactive changes (`internal`)
133
130
  * and changes resulting from programmatic manipulation of the `value` (`external`).
134
- *
135
131
  * @extends ValueChangeEvent
136
132
  * @event
137
- * */
133
+ */
138
134
  change: ColorPlusChangeEvent
139
135
  }
140
136
  }
@@ -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
@@ -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