svelte-tweakpane-ui 1.0.1 → 1.1.0

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 (55) hide show
  1. package/dist/control/ButtonGrid.svelte +6 -7
  2. package/dist/control/Checkbox.svelte.d.ts +2 -4
  3. package/dist/control/Color.svelte.d.ts +2 -4
  4. package/dist/control/CubicBezier.svelte +2 -2
  5. package/dist/control/Image.svelte.d.ts +2 -4
  6. package/dist/control/IntervalSlider.svelte.d.ts +2 -4
  7. package/dist/control/List.svelte +7 -13
  8. package/dist/control/List.svelte.d.ts +3 -5
  9. package/dist/control/Point.svelte.d.ts +29 -31
  10. package/dist/control/RadioGrid.svelte.d.ts +2 -4
  11. package/dist/control/Ring.svelte.d.ts +2 -4
  12. package/dist/control/RotationEuler.svelte.d.ts +66 -4
  13. package/dist/control/RotationQuaternion.svelte.d.ts +2 -4
  14. package/dist/control/Slider.svelte.d.ts +2 -4
  15. package/dist/control/Text.svelte.d.ts +2 -4
  16. package/dist/control/Textarea.svelte +1 -3
  17. package/dist/control/Textarea.svelte.d.ts +2 -4
  18. package/dist/control/Wheel.svelte.d.ts +3 -9
  19. package/dist/core/Blade.svelte +5 -6
  20. package/dist/core/TabGroup.svelte +4 -5
  21. package/dist/core/TabPage.svelte +2 -2
  22. package/dist/extra/AutoObject.svelte +3 -5
  23. package/dist/extra/AutoValue.svelte.d.ts +6 -4
  24. package/dist/extra/Element.svelte +1 -3
  25. package/dist/index.js +5 -5
  26. package/dist/internal/ClsPad.svelte +2 -6
  27. package/dist/internal/ClsPad.svelte.d.ts +10 -0
  28. package/dist/internal/GenericBinding.svelte.d.ts +2 -4
  29. package/dist/internal/GenericBladeFolding.svelte +1 -1
  30. package/dist/internal/GenericInput.svelte +4 -6
  31. package/dist/internal/GenericInput.svelte.d.ts +2 -4
  32. package/dist/internal/GenericInputFolding.svelte +2 -2
  33. package/dist/internal/GenericInputFolding.svelte.d.ts +2 -4
  34. package/dist/internal/GenericMonitor.svelte +1 -1
  35. package/dist/internal/GenericMonitor.svelte.d.ts +2 -4
  36. package/dist/internal/GenericPane.svelte +26 -15
  37. package/dist/internal/GenericSlider.svelte +10 -12
  38. package/dist/internal/GenericSlider.svelte.d.ts +2 -4
  39. package/dist/internal/InternalMonitorBoolean.svelte.d.ts +2 -4
  40. package/dist/internal/InternalMonitorNumber.svelte.d.ts +2 -4
  41. package/dist/internal/InternalMonitorString.svelte.d.ts +2 -4
  42. package/dist/internal/InternalPaneDraggable.svelte +20 -19
  43. package/dist/internal/InternalPaneFixed.svelte +1 -3
  44. package/dist/internal/InternalPaneInline.svelte +1 -1
  45. package/dist/monitor/FpsGraph.svelte +2 -2
  46. package/dist/monitor/Monitor.svelte.d.ts +23 -31
  47. package/dist/monitor/Profiler.svelte +2 -2
  48. package/dist/monitor/WaveformMonitor.svelte.d.ts +2 -4
  49. package/dist/theme.d.ts +1 -3
  50. package/dist/theme.js +25 -32
  51. package/dist/utils.d.ts +5 -2
  52. package/dist/utils.js +34 -28
  53. package/package.json +17 -11
  54. package/{README.md → readme.md} +1 -1
  55. /package/{LICENSE → license.txt} +0 -0
@@ -91,5 +91,15 @@ declare const __propDef: {
91
91
  export type ClsPadProps = typeof __propDef.props;
92
92
  export type ClsPadEvents = typeof __propDef.events;
93
93
  export type ClsPadSlots = typeof __propDef.slots;
94
+ /**
95
+ * This component is for internal use only.
96
+ *
97
+ * It's a utility to assist in estimating the rendered height of Tweakpane components for use during prerendering in an attempt to minimize layout shift upon hydration.
98
+ *
99
+ * The associated SSR / prerendering CLS prevention feature is experimental.
100
+ *
101
+ * @sourceLink
102
+ * [ClsPad.svelte](https://github.com/kitschpatrol/svelte-tweakpane-ui/blob/main/src/lib/internal/ClsPad.svelte)
103
+ */
94
104
  export default class ClsPad extends SvelteComponent<ClsPadProps, ClsPadEvents, ClsPadSlots> {}
95
105
  export {};
@@ -11,11 +11,9 @@ declare class __sveltets_Render<
11
11
  * The binding's target object with values to manipulate.
12
12
  * @bindable
13
13
  */
14
- object: import('@tweakpane/core').Bindable & {
15
- [x: string]: T;
16
- };
14
+ object: import('@tweakpane/core').Bindable & Record<string, T>;
17
15
  /** The key for the value in the target `object` that the control should manipulate. */
18
- key: string | number;
16
+ key: string;
19
17
  /**
20
18
  * Prevent interactivity and gray out the control.
21
19
  * @default `false`
@@ -22,7 +22,7 @@
22
22
  $: options = {
23
23
  ...options,
24
24
  expanded: initialExpanded,
25
- // only set once
25
+ // Only set once
26
26
  picker
27
27
  };
28
28
  $: ref &&
@@ -4,16 +4,14 @@
4
4
  generics="T extends any, U extends GenericInputOptions = GenericInputOptions, V extends GenericInputRef = GenericInputRef"
5
5
  >
6
6
  import GenericBinding from './GenericBinding.svelte';
7
- import { BROWSER } from 'esm-env';
8
7
  export let options = void 0;
9
8
  export let ref = void 0;
10
9
  export let value;
11
10
  let optionsInternal;
12
- $: BROWSER &&
13
- (optionsInternal = {
14
- ...options,
15
- readonly: false
16
- });
11
+ $: optionsInternal = {
12
+ ...options,
13
+ readonly: false
14
+ };
17
15
  </script>
18
16
 
19
17
  <GenericBinding bind:value bind:ref options={optionsInternal} {...$$restProps} />
@@ -13,11 +13,9 @@ declare class __sveltets_Render<
13
13
  * The binding's target object with values to manipulate.
14
14
  * @bindable
15
15
  */
16
- object: import('@tweakpane/core').Bindable & {
17
- [x: string]: T;
18
- };
16
+ object: import('@tweakpane/core').Bindable & Record<string, T>;
19
17
  /** The key for the value in the target `object` that the control should manipulate. */
20
- key: string | number;
18
+ key: string;
21
19
  /**
22
20
  * Prevent interactivity and gray out the control.
23
21
  * @default `false`
@@ -26,7 +26,7 @@
26
26
  $: optionsInternal = {
27
27
  ...options,
28
28
  expanded: initialExpanded,
29
- // only set once
29
+ // Only set once
30
30
  picker
31
31
  };
32
32
  $: ref && buttonClass && updateCollapsibility(userExpandable ?? true, ref.element, buttonClass);
@@ -34,7 +34,7 @@
34
34
  buttonClass &&
35
35
  expanded !== internalExpanded &&
36
36
  ref.element.querySelectorAll(`.${buttonClass}`).length > 0 &&
37
- ref.element.querySelector(`.${buttonClass}`).click();
37
+ ref.element.querySelector(`.${buttonClass}`)?.click();
38
38
  </script>
39
39
 
40
40
  <GenericInput bind:value bind:ref options={optionsInternal} {...$$restProps} />
@@ -15,11 +15,9 @@ declare class __sveltets_Render<
15
15
  * The binding's target object with values to manipulate.
16
16
  * @bindable
17
17
  */
18
- object: import('@tweakpane/core').Bindable & {
19
- [x: string]: T;
20
- };
18
+ object: import('@tweakpane/core').Bindable & Record<string, T>;
21
19
  /** The key for the value in the target `object` that the control should manipulate. */
22
- key: string | number;
20
+ key: string;
23
21
  /**
24
22
  * Prevent interactivity and gray out the control.
25
23
  * @default `false`
@@ -14,7 +14,7 @@
14
14
  $: optionsInternal = {
15
15
  bufferSize,
16
16
  interval: interval ?? 0,
17
- // zero confirmed as never updating (not same interface as setInterval())
17
+ // Zero confirmed as never updating (not same interface as setInterval())
18
18
  rows,
19
19
  ...options,
20
20
  readonly: true
@@ -13,11 +13,9 @@ declare class __sveltets_Render<
13
13
  * The binding's target object with values to manipulate.
14
14
  * @bindable
15
15
  */
16
- object: import('@tweakpane/core').Bindable & {
17
- [x: string]: T;
18
- };
16
+ object: import('@tweakpane/core').Bindable & Record<string, T>;
19
17
  /** The key for the value in the target `object` that the control should manipulate. */
20
- key: string | number;
18
+ key: string;
21
19
  /**
22
20
  * Prevent interactivity and gray out the control.
23
21
  * @default `false`
@@ -18,13 +18,10 @@
18
18
  let pluginsRegistered = [];
19
19
  const registerPlugin = (plugin) => {
20
20
  if (paneRef === void 0) {
21
- console.warn('`paneRef is undefined, failed to register plugin "${plugin.id}"');
22
- } else {
23
- if (pluginsRegistered.includes(plugin.id)) {
24
- } else {
25
- paneRef?.registerPlugin(plugin);
26
- pluginsRegistered.push(plugin.id);
27
- }
21
+ console.warn(`paneRef is undefined, failed to register plugin "${plugin.id}"`);
22
+ } else if (!pluginsRegistered.includes(plugin.id)) {
23
+ paneRef?.registerPlugin(plugin);
24
+ pluginsRegistered.push(plugin.id);
28
25
  }
29
26
  };
30
27
  setContext('registerPlugin', registerPlugin);
@@ -66,14 +63,13 @@
66
63
  }
67
64
  expanded = _expanded;
68
65
  }
69
- $: BROWSER && paneRef && setScale(scale);
70
- $: BROWSER &&
71
- paneRef &&
72
- updateCollapsibility(userExpandable, paneRef.element, 'tp-rotv_b', 'tp-rotv_m');
73
- $: BROWSER && paneRef && title && (paneRef.title = title);
74
- $: BROWSER && paneRef && applyTheme(paneRef.element, theme);
75
- $: _expanded, BROWSER && paneRef && syncFolded();
76
- $: BROWSER && paneRef && (_expanded = expanded);
66
+ $: paneRef?.element && paneRef?.element.classList.add('svelte-tweakpane-ui');
67
+ $: paneRef && setScale(scale);
68
+ $: paneRef && updateCollapsibility(userExpandable, paneRef.element, 'tp-rotv_b', 'tp-rotv_m');
69
+ $: paneRef && title && (paneRef.title = title);
70
+ $: paneRef && applyTheme(paneRef.element, theme);
71
+ $: _expanded, paneRef && syncFolded();
72
+ $: paneRef && (_expanded = expanded);
77
73
  </script>
78
74
 
79
75
  {#if BROWSER}
@@ -98,3 +94,18 @@
98
94
  {:else}
99
95
  <ClsPad keysAdd={['containerVerticalPadding', 'containerUnitSize']} {theme} />
100
96
  {/if}
97
+
98
+ <style>
99
+ /* Blade labels */
100
+ :global(div.svelte-tweakpane-ui div.tp-lblv_l) {
101
+ overflow: hidden;
102
+ padding-right: var(--cnt-hp);
103
+ text-overflow: ellipsis;
104
+ }
105
+
106
+ /* Pane title label */
107
+ :global(div.svelte-tweakpane-ui div.tp-rotv_t) {
108
+ overflow: hidden;
109
+ text-overflow: ellipsis;
110
+ }
111
+ </style>
@@ -1,6 +1,5 @@
1
1
  <script generics="T extends number | IntervalSliderValue">
2
2
  import GenericInput from './GenericInput.svelte';
3
- import { BROWSER } from 'esm-env';
4
3
  export let value;
5
4
  export let options = void 0;
6
5
  export let min = void 0;
@@ -10,18 +9,17 @@
10
9
  export let keyScale = void 0;
11
10
  export let format = void 0;
12
11
  let formatProxy = format;
13
- $: BROWSER && formatProxy !== format && (formatProxy = format);
12
+ $: formatProxy !== format && (formatProxy = format);
14
13
  let optionsInternal;
15
- $: BROWSER &&
16
- (optionsInternal = {
17
- min,
18
- max,
19
- format: formatProxy,
20
- keyScale,
21
- pointerScale,
22
- step,
23
- ...options
24
- });
14
+ $: optionsInternal = {
15
+ min,
16
+ max,
17
+ format: formatProxy,
18
+ keyScale,
19
+ pointerScale,
20
+ step,
21
+ ...options
22
+ };
25
23
  </script>
26
24
 
27
25
  <GenericInput bind:value options={optionsInternal} {...$$restProps} />
@@ -9,11 +9,9 @@ declare class __sveltets_Render<T extends number | IntervalSliderValue> {
9
9
  * The binding's target object with values to manipulate.
10
10
  * @bindable
11
11
  */
12
- object: import('@tweakpane/core').Bindable & {
13
- [x: string]: T;
14
- };
12
+ object: import('@tweakpane/core').Bindable & Record<string, T>;
15
13
  /** The key for the value in the target `object` that the control should manipulate. */
16
- key: string | number;
14
+ key: string;
17
15
  /**
18
16
  * Prevent interactivity and gray out the control.
19
17
  * @default `false`
@@ -9,11 +9,9 @@ declare const __propDef: {
9
9
  * The binding's target object with values to manipulate.
10
10
  * @bindable
11
11
  */
12
- object: import('@tweakpane/core').Bindable & {
13
- [x: string]: boolean;
14
- };
12
+ object: import('@tweakpane/core').Bindable & Record<string, boolean>;
15
13
  /** The key for the value in the target `object` that the control should manipulate. */
16
- key: string | number;
14
+ key: string;
17
15
  /**
18
16
  * Prevent interactivity and gray out the control.
19
17
  * @default `false`
@@ -9,11 +9,9 @@ declare const __propDef: {
9
9
  * The binding's target object with values to manipulate.
10
10
  * @bindable
11
11
  */
12
- object: import('@tweakpane/core').Bindable & {
13
- [x: string]: number;
14
- };
12
+ object: import('@tweakpane/core').Bindable & Record<string, number>;
15
13
  /** The key for the value in the target `object` that the control should manipulate. */
16
- key: string | number;
14
+ key: string;
17
15
  /**
18
16
  * Prevent interactivity and gray out the control.
19
17
  * @default `false`
@@ -9,11 +9,9 @@ declare const __propDef: {
9
9
  * The binding's target object with values to manipulate.
10
10
  * @bindable
11
11
  */
12
- object: import('@tweakpane/core').Bindable & {
13
- [x: string]: string;
14
- };
12
+ object: import('@tweakpane/core').Bindable & Record<string, string>;
15
13
  /** The key for the value in the target `object` that the control should manipulate. */
16
- key: string | number;
14
+ key: string;
17
15
  /**
18
16
  * Prevent interactivity and gray out the control.
19
17
  * @default `false`
@@ -10,8 +10,8 @@
10
10
  import { clamp, getSwatchButton, pickerIsOpen, removeKeys } from '../utils.js';
11
11
  import { onDestroy, onMount } from 'svelte';
12
12
  import { persisted } from 'svelte-local-storage-store';
13
- const TITLEBAR_WINDOW_SHADE_SINGLE_CLICK = true;
14
- const TITLEBAR_WINDOW_SHADE_DOUBLE_CLICK = false;
13
+ const titlebarWindowShadeSingleClick = true;
14
+ const titlebarWindowShadeDoubleClick = false;
15
15
  export let storePositionLocally = true;
16
16
  export let localStoreId = localStoreDefaultId;
17
17
  let positionStore;
@@ -108,7 +108,7 @@
108
108
  if (event.target) {
109
109
  if (width !== void 0 && event.target === widthHandleElement) {
110
110
  width = width < maxAvailablePanelWidth ? maxAvailablePanelWidth : minWidth;
111
- } else if (TITLEBAR_WINDOW_SHADE_DOUBLE_CLICK && event.target === dragBarElement) {
111
+ } else if (titlebarWindowShadeDoubleClick && event.target === dragBarElement) {
112
112
  paneRef.expanded = !paneRef.expanded;
113
113
  }
114
114
  }
@@ -152,7 +152,7 @@
152
152
  event.target.removeEventListener('pointermove', moveListener);
153
153
  event.target.removeEventListener('pointerup', upListener);
154
154
  if (
155
- TITLEBAR_WINDOW_SHADE_SINGLE_CLICK &&
155
+ titlebarWindowShadeSingleClick &&
156
156
  event.target === dragBarElement &&
157
157
  moveDistance < 3 &&
158
158
  userExpandable
@@ -171,17 +171,20 @@
171
171
  console.warn('no pane ref in draggable');
172
172
  }
173
173
  containerElement.addEventListener('touchmove', touchScrollBlocker, { passive: false });
174
- dragBarElement = containerElement.querySelector('.tp-rotv_t');
175
- dragBarElement.addEventListener('click', clickBlocker);
176
- dragBarElement.addEventListener('dblclick', doubleClickListener);
177
- dragBarElement.addEventListener('pointerdown', downListener);
178
- widthHandleElement = dragBarElement.parentElement?.appendChild(document.createElement('div'));
179
- if (widthHandleElement) {
180
- widthHandleElement.className = 'tp-custom-width-handle';
181
- widthHandleElement.textContent = '\u2194';
182
- widthHandleElement.addEventListener('click', clickBlocker);
183
- widthHandleElement.addEventListener('dblclick', doubleClickListener);
184
- widthHandleElement.addEventListener('pointerdown', downListener);
174
+ const dragBarElementCheck = containerElement.querySelector('.tp-rotv_t');
175
+ if (dragBarElementCheck) {
176
+ dragBarElement = dragBarElementCheck;
177
+ dragBarElement.addEventListener('click', clickBlocker);
178
+ dragBarElement.addEventListener('dblclick', doubleClickListener);
179
+ dragBarElement.addEventListener('pointerdown', downListener);
180
+ widthHandleElement = dragBarElement.parentElement?.appendChild(document.createElement('div'));
181
+ if (widthHandleElement) {
182
+ widthHandleElement.className = 'tp-custom-width-handle';
183
+ widthHandleElement.textContent = '\u2194';
184
+ widthHandleElement.addEventListener('click', clickBlocker);
185
+ widthHandleElement.addEventListener('dblclick', doubleClickListener);
186
+ widthHandleElement.addEventListener('pointerdown', downListener);
187
+ }
185
188
  }
186
189
  });
187
190
  onDestroy(() => {
@@ -280,17 +283,16 @@
280
283
  <svelte:window on:resize={setDocumentSize} />
281
284
 
282
285
  <div
283
- bind:this={containerElement}
284
286
  bind:clientHeight={containerHeight}
285
287
  bind:clientWidth={containerWidth}
288
+ bind:this={containerElement}
286
289
  on:focus|capture={() => {
287
290
  zIndexLocal = ++zIndexGlobal;
288
291
  }}
289
292
  on:pointerdown|capture={() => {
290
293
  zIndexLocal = ++zIndexGlobal;
291
294
  }}
292
- class="svelte-tweakpane-ui
293
- draggable-container"
295
+ class="draggable-container"
294
296
  class:not-collapsable={!userExpandable}
295
297
  class:not-resizable={!resizable}
296
298
  style:left="{x}px"
@@ -327,7 +329,6 @@ draggable-container"
327
329
  /* Ensure draggable hit zone does not collapse if title is missing */
328
330
  /* Fixes #1 */
329
331
  height: 100%;
330
- text-overflow: ellipsis;
331
332
  }
332
333
 
333
334
  div.draggable-container.not-collapsable :global(div.tp-rotv_t) {
@@ -8,9 +8,7 @@
8
8
  export let title = 'Tweakpane';
9
9
  let paneRef;
10
10
  let paneContainer;
11
- $: paneRef !== void 0 &&
12
- paneRef.element.parentElement &&
13
- (paneContainer = paneRef.element.parentElement);
11
+ $: paneRef?.element.parentElement && (paneContainer = paneRef.element.parentElement);
14
12
  $: paneContainer !== void 0 &&
15
13
  x !== void 0 &&
16
14
  (paneContainer.style.setProperty('right', 'unset'),
@@ -7,7 +7,7 @@
7
7
  export let theme = {
8
8
  baseBorderRadius: '0px',
9
9
  baseShadowColor: 'hsla(0, 0%, 0%, 0)'
10
- // bladeBorderRadius: '0px'
10
+ // BladeBorderRadius: '0px'
11
11
  };
12
12
  let paneRef;
13
13
  let containerElement;
@@ -46,13 +46,13 @@
46
46
  function startObservingMeasuredFpsValue() {
47
47
  stopObservingMeasuredFpsValue();
48
48
  const targetNode = fpsBlade.controller.valueController.view.valueElement;
49
- if (!targetNode || !targetNode.innerHTML) return;
49
+ if (!targetNode?.innerHTML) return;
50
50
  observer = new MutationObserver((mutations) => {
51
51
  for (const mutation of mutations) {
52
52
  if (mutation.type === 'characterData' || mutation.type === 'childList') {
53
53
  const fpsText = mutation.target.textContent;
54
54
  if (fpsText !== null) {
55
- const fps = Number.parseInt(fpsText);
55
+ const fps = Number.parseInt(fpsText, 10);
56
56
  !Number.isNaN(fps) && dispatch('change', fps);
57
57
  }
58
58
  }
@@ -7,11 +7,9 @@ declare class __sveltets_Render<W extends number | string | boolean | unknown> {
7
7
  * The binding's target object with values to manipulate.
8
8
  * @bindable
9
9
  */
10
- object: import('@tweakpane/core').Bindable & {
11
- [x: string]: W;
12
- };
10
+ object: import('@tweakpane/core').Bindable & Record<string, W>;
13
11
  /** The key for the value in the target `object` that the control should manipulate. */
14
- key: string | number;
12
+ key: string;
15
13
  /**
16
14
  * Prevent interactivity and gray out the control.
17
15
  * @default `false`
@@ -38,10 +36,10 @@ declare class __sveltets_Render<W extends number | string | boolean | unknown> {
38
36
  | (W extends string
39
37
  ? import('tweakpane').StringMonitorParams
40
38
  : W extends boolean
41
- ? import('tweakpane').BooleanMonitorParams
42
- : W extends number
43
- ? import('tweakpane').NumberMonitorParams
44
- : import('@tweakpane/core').BaseMonitorParams)
39
+ ? import('tweakpane').BooleanMonitorParams
40
+ : W extends number
41
+ ? import('tweakpane').NumberMonitorParams
42
+ : import('@tweakpane/core').BaseMonitorParams)
45
43
  | undefined;
46
44
  /**
47
45
  * Custom color scheme.
@@ -113,11 +111,9 @@ declare class __sveltets_Render<W extends number | string | boolean | unknown> {
113
111
  * The binding's target object with values to manipulate.
114
112
  * @bindable
115
113
  */
116
- object: import('@tweakpane/core').Bindable & {
117
- [x: string]: string;
118
- };
114
+ object: import('@tweakpane/core').Bindable & Record<string, string>;
119
115
  /** The key for the value in the target `object` that the control should manipulate. */
120
- key: string | number;
116
+ key: string;
121
117
  /**
122
118
  * Prevent interactivity and gray out the control.
123
119
  * @default `false`
@@ -202,7 +198,7 @@ declare class __sveltets_Render<W extends number | string | boolean | unknown> {
202
198
  rows?: number | undefined;
203
199
  },
204
200
  'options' | 'ref' | 'plugin' | 'interval'
205
- > & {
201
+ > & {
206
202
  /**
207
203
  * A value to monitor.
208
204
  * @bindable
@@ -213,20 +209,18 @@ declare class __sveltets_Render<W extends number | string | boolean | unknown> {
213
209
  * @default `false`
214
210
  */
215
211
  multiline?: boolean | undefined;
216
- }
212
+ }
217
213
  : W extends boolean
218
- ? Omit<
214
+ ? Omit<
219
215
  Omit<
220
216
  {
221
217
  /**
222
218
  * The binding's target object with values to manipulate.
223
219
  * @bindable
224
220
  */
225
- object: import('@tweakpane/core').Bindable & {
226
- [x: string]: boolean;
227
- };
221
+ object: import('@tweakpane/core').Bindable & Record<string, boolean>;
228
222
  /** The key for the value in the target `object` that the control should manipulate. */
229
- key: string | number;
223
+ key: string;
230
224
  /**
231
225
  * Prevent interactivity and gray out the control.
232
226
  * @default `false`
@@ -311,26 +305,24 @@ declare class __sveltets_Render<W extends number | string | boolean | unknown> {
311
305
  rows?: number | undefined;
312
306
  },
313
307
  'options' | 'ref' | 'plugin' | 'interval'
314
- > & {
308
+ > & {
315
309
  /**
316
310
  * A value to monitor.
317
311
  * @bindable
318
312
  */
319
313
  value: boolean;
320
- }
321
- : W extends number
322
- ? Omit<
314
+ }
315
+ : W extends number
316
+ ? Omit<
323
317
  Omit<
324
318
  {
325
319
  /**
326
320
  * The binding's target object with values to manipulate.
327
321
  * @bindable
328
322
  */
329
- object: import('@tweakpane/core').Bindable & {
330
- [x: string]: number;
331
- };
323
+ object: import('@tweakpane/core').Bindable & Record<string, number>;
332
324
  /** The key for the value in the target `object` that the control should manipulate. */
333
- key: string | number;
325
+ key: string;
334
326
  /**
335
327
  * Prevent interactivity and gray out the control.
336
328
  * @default `false`
@@ -415,7 +407,7 @@ declare class __sveltets_Render<W extends number | string | boolean | unknown> {
415
407
  rows?: number | undefined;
416
408
  },
417
409
  'options' | 'ref' | 'plugin'
418
- > & {
410
+ > & {
419
411
  /**
420
412
  * A value to monitor.
421
413
  * @bindable
@@ -442,14 +434,14 @@ declare class __sveltets_Render<W extends number | string | boolean | unknown> {
442
434
  * @default `false`
443
435
  */
444
436
  graph?: boolean | undefined;
445
- }
446
- : {
437
+ }
438
+ : {
447
439
  /**
448
440
  * A value to monitor.
449
441
  * @bindable
450
442
  * */
451
443
  value: string | number | boolean;
452
- });
444
+ });
453
445
  events(): {} & {
454
446
  [evt: string]: CustomEvent<any>;
455
447
  };
@@ -11,7 +11,7 @@
11
11
  profilerBlade?.measure(name, functionToMeasure);
12
12
  }
13
13
  async function _measureAsync(name, functionToMeasure) {
14
- profilerBlade?.measureAsync(name, functionToMeasure);
14
+ await profilerBlade?.measureAsync(name, functionToMeasure);
15
15
  }
16
16
  export let label = void 0;
17
17
  export let bufferSize = void 0;
@@ -33,7 +33,7 @@
33
33
  function startObservingMeasuredValue() {
34
34
  stopObservingMeasuredValue();
35
35
  const targetNode = profilerBlade.controller.view.valueElement;
36
- if (!targetNode || !targetNode.innerHTML) return;
36
+ if (!targetNode?.innerHTML) return;
37
37
  observer = new MutationObserver((mutations) => {
38
38
  for (const mutation of mutations) {
39
39
  if (mutation.type === 'characterData' || mutation.type === 'childList') {
@@ -9,11 +9,9 @@ declare const __propDef: {
9
9
  * The binding's target object with values to manipulate.
10
10
  * @bindable
11
11
  */
12
- object: import('@tweakpane/core').Bindable & {
13
- [x: string]: WaveformMonitorValue;
14
- };
12
+ object: import('@tweakpane/core').Bindable & Record<string, WaveformMonitorValue>;
15
13
  /** The key for the value in the target `object` that the control should manipulate. */
16
- key: string | number;
14
+ key: string;
17
15
  /**
18
16
  * Prevent interactivity and gray out the control.
19
17
  * @default `false`
package/dist/theme.d.ts CHANGED
@@ -35,9 +35,7 @@ type ThemeKeys = {
35
35
  monitorForegroundColor?: ThemeColorValue;
36
36
  pluginImageDraggingColor?: ThemeColorValue;
37
37
  };
38
- type CustomThemeKeys = {
39
- [key: string]: ThemeColorValue;
40
- };
38
+ type CustomThemeKeys = Record<string, ThemeColorValue>;
41
39
  export declare const keys: Record<string, string>;
42
40
  export declare const presets: {
43
41
  /** Dark blue theme. */