svelte-tweakpane-ui 1.5.17 → 1.5.19

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.
@@ -22,40 +22,42 @@
22
22
  }
23
23
  function setValue() {
24
24
  if (
25
- !shallowEqual(getValue(), [
25
+ shallowEqual(getValue(), [
26
26
  cubicBezierBlade.value.x1,
27
27
  cubicBezierBlade.value.y1,
28
28
  cubicBezierBlade.value.x2,
29
29
  cubicBezierBlade.value.y2,
30
30
  ])
31
31
  ) {
32
- cubicBezierBlade.value = Array.isArray(value)
33
- ? new CubicBezier(value[0], value[1], value[2], value[3])
34
- : new CubicBezier(value.x1, value.y1, value.x2, value.y2)
35
- dispatch('change', {
36
- value: copy(value),
37
- origin: 'external',
38
- })
32
+ return
39
33
  }
34
+ cubicBezierBlade.value = Array.isArray(value)
35
+ ? new CubicBezier(value[0], value[1], value[2], value[3])
36
+ : new CubicBezier(value.x1, value.y1, value.x2, value.y2)
37
+ dispatch('change', {
38
+ value: copy(value),
39
+ origin: 'external',
40
+ })
40
41
  }
41
42
  function addEvent() {
42
43
  cubicBezierBlade.on('change', (event) => {
43
44
  if (
44
- !shallowEqual(getValue(), [event.value.x1, event.value.y1, event.value.x2, event.value.y2])
45
+ shallowEqual(getValue(), [event.value.x1, event.value.y1, event.value.x2, event.value.y2])
45
46
  ) {
46
- value = Array.isArray(value)
47
- ? [event.value.x1, event.value.y1, event.value.x2, event.value.y2]
48
- : {
49
- x1: event.value.x1,
50
- y1: event.value.y1,
51
- x2: event.value.x2,
52
- y2: event.value.y2,
53
- }
54
- dispatch('change', {
55
- value: copy(value),
56
- origin: 'internal',
57
- })
47
+ return
58
48
  }
49
+ value = Array.isArray(value)
50
+ ? [event.value.x1, event.value.y1, event.value.x2, event.value.y2]
51
+ : {
52
+ x1: event.value.x1,
53
+ y1: event.value.y1,
54
+ x2: event.value.x2,
55
+ y2: event.value.y2,
56
+ }
57
+ dispatch('change', {
58
+ value: copy(value),
59
+ origin: 'internal',
60
+ })
59
61
  })
60
62
  }
61
63
  $: options = {
@@ -63,8 +65,8 @@
63
65
  value: getValue(),
64
66
  view: 'cubicbezier',
65
67
  }
66
- $: cubicBezierBlade && addEvent()
67
- $: (value, cubicBezierBlade && setValue())
68
+ $: cubicBezierBlade !== void 0 && addEvent()
69
+ $: (value, cubicBezierBlade !== void 0 && setValue())
68
70
  </script>
69
71
 
70
72
  <GenericBladeFolding
@@ -77,7 +79,7 @@
77
79
  />
78
80
  {#if !BROWSER}
79
81
  <ClsPad keysAdd={fillWith('containerUnitSize', 1)} theme={$$props.theme} />
80
- {#if expanded && $$props.picker === 'inline'}
82
+ {#if expanded === true && $$props.picker === 'inline'}
81
83
  <ClsPad keysAdd={fillWith('containerUnitSize', 6)} theme={$$props.theme} />
82
84
  <ClsPad keysAdd={fillWith('containerUnitSpacing', 2)} theme={$$props.theme} />
83
85
  {/if}
@@ -148,7 +148,7 @@ export type ImageSlots = typeof __propDef.slots
148
148
  * _Important: This component has some rough edges, and should be considered experimental._
149
149
  *
150
150
  * Integrates the [tweakpane-image-plugin](https://github.com/metehus/tweakpane-image-plugin),
151
- * incorporating work by [Florian Morel](http://ayamflow.fr), [Matheus
151
+ * incorporating work by [Florian Morel](https://ayamflow.fr), [Matheus
152
152
  * Dias](https://www.linkedin.com/in/matheusdbs/), [Palash Bansal](https://github.com/repalash), and
153
153
  * others.
154
154
  *
@@ -25,24 +25,25 @@
25
25
  }
26
26
  }
27
27
  function updateValueFromMean() {
28
- if (meanValue !== void 0) {
29
- const r = internalValue.max - internalValue.min
30
- const valueFromMean = { min: meanValue - r / 2, max: meanValue + r / 2 }
31
- if (!shallowEqual(valueFromMean, internalValue)) {
32
- internalValue = valueFromMean
33
- }
28
+ if (meanValue === void 0) {
29
+ return
30
+ }
31
+ const r = internalValue.max - internalValue.min
32
+ const valueFromMean = { min: meanValue - r / 2, max: meanValue + r / 2 }
33
+ if (!shallowEqual(valueFromMean, internalValue)) {
34
+ internalValue = valueFromMean
34
35
  }
35
36
  }
36
37
  let ref
37
- function updateWide(wide2) {
38
+ function updateWide(isWide) {
38
39
  const inputField = ref?.element.querySelector('div.tp-rsltxtv_t')
39
- if (wide2) {
40
+ if (isWide) {
40
41
  inputField?.style.setProperty('display', 'none')
41
42
  } else {
42
43
  inputField?.style.removeProperty('display')
43
44
  }
44
45
  }
45
- $: ref && wide !== void 0 && updateWide(wide)
46
+ $: ref !== void 0 && wide !== void 0 && updateWide(wide)
46
47
  $: (value, updateInternalValueFromValue())
47
48
  $: (internalValue, updateValueFromInternalValue())
48
49
  $: meanValue = (internalValue.min + internalValue.max) / 2
@@ -7,7 +7,6 @@
7
7
  import { createEventDispatcher } from 'svelte'
8
8
  import Blade from '../core/Blade.svelte'
9
9
  import ClsPad from '../internal/ClsPad.svelte'
10
- import {} from '../utils.js'
11
10
  export let value
12
11
  export let options
13
12
  export let label = void 0
@@ -16,13 +15,14 @@
16
15
  let bladeOptions
17
16
  function addEvent() {
18
17
  listBlade.on('change', (event) => {
19
- if (!shallowEqual(event.value, value)) {
20
- value = event.value
21
- dispatch('change', {
22
- value: copy(value),
23
- origin: 'internal',
24
- })
18
+ if (shallowEqual(event.value, value)) {
19
+ return
25
20
  }
21
+ value = event.value
22
+ dispatch('change', {
23
+ value: copy(value),
24
+ origin: 'internal',
25
+ })
26
26
  })
27
27
  }
28
28
  function getInitialValue() {
@@ -48,24 +48,23 @@
48
48
  function isObjectStyleListOptions(object) {
49
49
  return typeof object === 'object' && object !== null && !Array.isArray(object)
50
50
  }
51
- function getInternalOptions(options2) {
52
- return isArrayStyleListOptions(options2)
53
- ? options2
54
- : isObjectStyleListOptions(options2)
55
- ? options2
56
- : options2.map((value2) => ({
57
- value: value2,
58
- text: typeof value2 === 'object' ? JSON.stringify(value2) : String(value2),
59
- }))
51
+ function getInternalOptions(listOptions) {
52
+ return isArrayStyleListOptions(listOptions) || isObjectStyleListOptions(listOptions)
53
+ ? listOptions
54
+ : listOptions.map((optionValue) => ({
55
+ value: optionValue,
56
+ text: typeof optionValue === 'object' ? JSON.stringify(optionValue) : String(optionValue),
57
+ }))
60
58
  }
61
59
  function setValue() {
62
- if (!shallowEqual(listBlade.value, value)) {
63
- listBlade.value = value
64
- dispatch('change', {
65
- value: copy(value),
66
- origin: 'external',
67
- })
60
+ if (shallowEqual(listBlade.value, value)) {
61
+ return
68
62
  }
63
+ listBlade.value = value
64
+ dispatch('change', {
65
+ value: copy(value),
66
+ origin: 'external',
67
+ })
69
68
  }
70
69
  $: bladeOptions = {
71
70
  label,
@@ -73,8 +72,8 @@
73
72
  value: getInitialValue(),
74
73
  view: 'list',
75
74
  }
76
- $: listBlade && addEvent()
77
- $: (value, listBlade && setValue())
75
+ $: listBlade !== void 0 && addEvent()
76
+ $: (value, listBlade !== void 0 && setValue())
78
77
  </script>
79
78
 
80
79
  <Blade bind:ref={listBlade} options={bladeOptions} {...$$restProps} />
@@ -58,7 +58,7 @@
58
58
  plugin={pluginModule}
59
59
  {...$$restProps}
60
60
  />
61
- {#if !BROWSER && expanded && $$props.picker === 'inline'}
61
+ {#if !BROWSER && expanded === true && $$props.picker === 'inline'}
62
62
  {#if $$props.label !== undefined}
63
63
  <ClsPad
64
64
  keysAdd={['bladeValueWidth']}
@@ -56,7 +56,7 @@
56
56
  plugin={pluginModule}
57
57
  {...$$restProps}
58
58
  />
59
- {#if !BROWSER && expanded && $$props.picker === 'inline'}
59
+ {#if !BROWSER && expanded === true && $$props.picker === 'inline'}
60
60
  {#if $$props.label !== undefined}
61
61
  <ClsPad
62
62
  keysAdd={['bladeValueWidth']}
@@ -1,20 +1,19 @@
1
1
  <script context="module"></script>
2
2
 
3
3
  <script>
4
- import {} from 'svelte'
5
4
  import GenericSlider from '../internal/GenericSlider.svelte'
6
5
  export let value
7
6
  export let wide = void 0
8
7
  let ref
9
- function updateWide(wide2) {
8
+ function updateWide(isWide) {
10
9
  const inputField = ref?.element.querySelector('div.tp-sldtxtv_t')
11
- if (wide2) {
10
+ if (isWide) {
12
11
  inputField?.style.setProperty('display', 'none')
13
12
  } else {
14
13
  inputField?.style.removeProperty('display')
15
14
  }
16
15
  }
17
- $: ref && wide !== void 0 && updateWide(wide)
16
+ $: ref !== void 0 && wide !== void 0 && updateWide(wide)
18
17
  </script>
19
18
 
20
19
  <GenericSlider bind:value bind:ref on:change {...$$restProps} />
@@ -10,21 +10,21 @@
10
10
  view: 'stepper',
11
11
  }
12
12
  let ref
13
- function updateWide(wide2) {
13
+ function updateWide(isWide) {
14
14
  const inputField = ref?.element.querySelector('div.tp-stepv_t')
15
15
  const buttonContainer = ref?.element.querySelector('div.tp-stepv_s')
16
- const buttons = buttonContainer?.querySelectorAll('button')
17
- if (wide2) {
16
+ const buttons = buttonContainer?.querySelectorAll('button') ?? []
17
+ if (isWide) {
18
18
  inputField?.style.setProperty('display', 'none')
19
19
  buttonContainer?.style.setProperty('flex', '1')
20
- for (const button of buttons ?? []) {
20
+ for (const button of buttons) {
21
21
  button.style.setProperty('flex', '1')
22
22
  }
23
23
  } else {
24
24
  inputField?.style.removeProperty('display')
25
25
  }
26
26
  }
27
- $: ref && wide !== void 0 && updateWide(wide)
27
+ $: ref !== void 0 && wide !== void 0 && updateWide(wide)
28
28
  </script>
29
29
 
30
30
  <GenericSlider bind:value bind:ref on:change {options} plugin={pluginModule} {...$$restProps} />
@@ -13,12 +13,12 @@
13
13
  function onInput(event) {
14
14
  event.target?.dispatchEvent(new Event('change'))
15
15
  }
16
- function updateListeners(live2, destroy = false) {
16
+ function updateListeners(isLive, destroy = false) {
17
17
  const input = ref?.controller.valueController.view.element.querySelector('input')
18
18
  input?.removeEventListener('input', onInput)
19
- !destroy && live2 && input?.addEventListener('input', onInput)
19
+ !destroy && isLive && input?.addEventListener('input', onInput)
20
20
  }
21
- $: ref && live !== void 0 && updateListeners(live)
21
+ $: ref !== void 0 && live !== void 0 && updateListeners(live)
22
22
  </script>
23
23
 
24
24
  <GenericInput bind:value bind:ref on:change {options} {...$$restProps} />
@@ -5,7 +5,6 @@
5
5
  import { BROWSER } from 'esm-env'
6
6
  import { createEventDispatcher, onDestroy } from 'svelte'
7
7
  import GenericInput from '../internal/GenericInput.svelte'
8
- import {} from '../utils.js'
9
8
  export let value
10
9
  export let live = true
11
10
  export let rows = void 0
@@ -27,28 +26,29 @@
27
26
  lastText = value
28
27
  dispatch('change', { value, origin: 'internal' })
29
28
  }
30
- function updateListeners(live2, destroy = false) {
29
+ function updateListeners(isLive, destroy = false) {
31
30
  const input = ref?.controller.valueController.view.element.querySelector('textarea')
32
31
  input?.removeEventListener('blur', onBlur)
33
32
  input?.removeEventListener('input', onInput)
34
- !destroy && live2 && input?.addEventListener('input', onInput)
35
- !destroy && !live2 && input?.addEventListener('blur', onBlur)
33
+ !destroy && isLive && input?.addEventListener('input', onInput)
34
+ !destroy && !isLive && input?.addEventListener('blur', onBlur)
36
35
  }
37
36
  let lastText = value
38
37
  function onBoundValueChange(text) {
39
- if (text !== lastText) {
40
- dispatch('change', { value: text, origin: 'external' })
41
- lastText = text
38
+ if (text === lastText) {
39
+ return
42
40
  }
41
+ dispatch('change', { value: text, origin: 'external' })
42
+ lastText = text
43
43
  }
44
44
  $: _value = value
45
- $: ref && live !== void 0 && updateListeners(live)
45
+ $: ref !== void 0 && live !== void 0 && updateListeners(live)
46
46
  $: options = {
47
47
  placeholder,
48
48
  rows,
49
49
  view: 'textarea',
50
50
  }
51
- $: ref && onBoundValueChange(_value)
51
+ $: ref !== void 0 && onBoundValueChange(_value)
52
52
  </script>
53
53
 
54
54
  <GenericInput value={_value} bind:ref {options} plugin={pluginModule} {...$$restProps} />
@@ -152,7 +152,7 @@ export type TextareaSlots = typeof __propDef.slots
152
152
  *
153
153
  * Integrates the
154
154
  * [tweakpane-textarea-plugin](https://github.com/panGenerator/tweakpane-textarea-plugin)
155
- * by [Krzysztof Goliński](http://www.golinski.org) and [Jakub
155
+ * by [Krzysztof Goliński](https://www.golinski.org) and [Jakub
156
156
  * Koźniewski](https://pangenerator.com).
157
157
  *
158
158
  * Extends the underlying implementation with the `live` property to match the
@@ -23,7 +23,7 @@
23
23
  let indexElement
24
24
  let index
25
25
  function create() {
26
- if (_ref) {
26
+ if (_ref !== void 0) {
27
27
  _ref.dispose()
28
28
  }
29
29
  if (plugin !== void 0) {
@@ -40,7 +40,7 @@
40
40
  _ref.on('change', onTweakpaneChange)
41
41
  }
42
42
  onMount(() => {
43
- index = indexElement ? getElementIndex(indexElement) : 0
43
+ index = indexElement === void 0 ? 0 : getElementIndex(indexElement)
44
44
  })
45
45
  onDestroy(() => {
46
46
  _ref?.dispose()
@@ -54,34 +54,34 @@
54
54
  })
55
55
  }
56
56
  if (BROWSER && value instanceof HTMLImageElement) {
57
- const copy2 = new Image()
58
- copy2.src = value.src
59
- return copy2
57
+ const imageCopy = new Image()
58
+ imageCopy.src = value.src
59
+ return imageCopy
60
60
  }
61
61
  return copy(value)
62
62
  }
63
63
  let lastObject = object
64
64
  let lastValue = safeCopy(object[key])
65
65
  let internalChange = false
66
- function onBoundValueChange(object2) {
67
- if (lastObject !== object2) {
66
+ function onBoundValueChange(newObject) {
67
+ if (lastObject !== newObject) {
68
68
  internalChange = false
69
69
  }
70
- if (!shallowEqual(object2[key], lastValue)) {
71
- lastValue = safeCopy(object2[key])
70
+ if (!shallowEqual(newObject[key], lastValue)) {
71
+ lastValue = safeCopy(newObject[key])
72
72
  dispatch('change', {
73
- value: safeCopy(object2[key]),
73
+ value: safeCopy(newObject[key]),
74
74
  origin: internalChange ? 'internal' : 'external',
75
75
  })
76
- if (!internalChange && _ref) {
76
+ if (!internalChange && _ref !== void 0) {
77
77
  _ref.off('change', onTweakpaneChange)
78
78
  _ref.refresh()
79
79
  _ref.on('change', onTweakpaneChange)
80
80
  }
81
81
  }
82
82
  internalChange = false
83
- if (lastObject !== object2) {
84
- lastObject = object2
83
+ if (lastObject !== newObject) {
84
+ lastObject = newObject
85
85
  create()
86
86
  }
87
87
  }
@@ -18,7 +18,7 @@
18
18
  let index
19
19
  let _ref
20
20
  function create() {
21
- if (_ref) {
21
+ if (_ref !== void 0) {
22
22
  _ref.dispose()
23
23
  }
24
24
  if (plugin !== void 0) {
@@ -33,16 +33,16 @@
33
33
  ref = _ref
34
34
  }
35
35
  onMount(() => {
36
- index = indexElement ? getElementIndex(indexElement) : 0
36
+ index = indexElement === void 0 ? 0 : getElementIndex(indexElement)
37
37
  })
38
38
  onDestroy(() => {
39
39
  _ref?.dispose()
40
40
  })
41
41
  $: DEV && enforceReadonly(_ref, ref, 'Blade', 'ref', true)
42
- $: options && $parentStore && index !== void 0 && create()
43
- $: _ref && (_ref.disabled = disabled)
42
+ $: options !== void 0 && $parentStore !== void 0 && index !== void 0 && create()
43
+ $: _ref !== void 0 && (_ref.disabled = disabled)
44
44
  $: theme &&
45
- $parentStore &&
45
+ $parentStore !== void 0 &&
46
46
  (userCreatedPane ?? !isRootPane($parentStore)) &&
47
47
  console.warn(
48
48
  'Set theme on the <Pane> component, not on its children! (Check nested <Blade> components for a theme prop.)',
@@ -30,18 +30,18 @@
30
30
  folderRef = $folderStore
31
31
  }
32
32
  onMount(() => {
33
- index = indexElement ? getElementIndex(indexElement) : 0
33
+ index = indexElement === void 0 ? 0 : getElementIndex(indexElement)
34
34
  })
35
35
  onDestroy(() => {
36
36
  $folderStore?.dispose()
37
37
  })
38
- $: $parentStore && !folderRef && index !== void 0 && create()
38
+ $: $parentStore !== void 0 && !folderRef && index !== void 0 && create()
39
39
  $: folderRef && updateCollapsibility(userExpandable, folderRef.element, 'tp-fldv_b', 'tp-fldv_m')
40
40
  $: folderRef && (folderRef.title = title)
41
41
  $: folderRef && (folderRef.disabled = disabled)
42
42
  $: folderRef && expanded !== void 0 && (folderRef.expanded = expanded)
43
43
  $: theme &&
44
- $parentStore &&
44
+ $parentStore !== void 0 &&
45
45
  (userCreatedPane ?? !isRootPane($parentStore)) &&
46
46
  console.warn(
47
47
  'Set theme on the <Pane> component, not on its children! (Check nested <Folder> components for a theme prop.)',
@@ -14,12 +14,13 @@
14
14
  export let x = void 0
15
15
  export let y = void 0
16
16
  beforeUpdate(() => {
17
- if ($$props.position === 'inline' || $$props.position === 'fixed') {
18
- x = $$props.x
19
- y = $$props.y
20
- width = $$props.width
21
- expanded = $$props.expanded
17
+ if ($$props.position !== 'inline' && $$props.position !== 'fixed') {
18
+ return
22
19
  }
20
+ x = $$props.x
21
+ y = $$props.y
22
+ width = $$props.width
23
+ expanded = $$props.expanded
23
24
  })
24
25
  </script>
25
26
 
@@ -18,7 +18,7 @@
18
18
  const userCreatedPane = getContext('userCreatedPane')
19
19
  let indexElement
20
20
  onMount(async () => {
21
- $tabIndexStore = userCreatedPane ? getElementIndex(indexElement) : 0
21
+ $tabIndexStore = userCreatedPane === true ? getElementIndex(indexElement) : 0
22
22
  await tick()
23
23
  setSelectedIndex(selectedIndex)
24
24
  $tabGroupInitialized = true
@@ -41,10 +41,10 @@
41
41
  }
42
42
  }
43
43
  $: setUpListeners($tabGroupStore)
44
- $: $tabGroupStore && setSelectedIndex(selectedIndex)
45
- $: $tabGroupStore && ($tabGroupStore.disabled = disabled)
44
+ $: $tabGroupStore !== void 0 && setSelectedIndex(selectedIndex)
45
+ $: $tabGroupStore !== void 0 && ($tabGroupStore.disabled = disabled)
46
46
  $: theme &&
47
- $parentStore &&
47
+ $parentStore !== void 0 &&
48
48
  (userCreatedPane ?? !isRootPane($parentStore)) &&
49
49
  console.warn(
50
50
  'Set theme on the <Pane> component, not on its children! (Check nested <TabGroup> components for a theme prop.)',
@@ -20,10 +20,10 @@
20
20
  let indexElement
21
21
  let index
22
22
  onMount(() => {
23
- index = indexElement ? getElementIndex(indexElement) : 0
23
+ index = indexElement === void 0 ? 0 : getElementIndex(indexElement)
24
24
  })
25
25
  function create() {
26
- if (!$tabGroupStore) {
26
+ if ($tabGroupStore === void 0) {
27
27
  $tabGroupStore = $parentStore.addTab({
28
28
  // Tabs MUST be created with at least one page how to handle tabs with no children?
29
29
  disabled: false,
@@ -35,32 +35,32 @@
35
35
  if (index === initialSelectedIndex) {
36
36
  selected = true
37
37
  }
38
- } else if (!$tabPageStore && $tabGroupStore) {
38
+ } else if ($tabPageStore === void 0 && $tabGroupStore !== void 0) {
39
39
  $tabPageStore = $tabGroupStore.addPage({ index, title })
40
40
  if (index === initialSelectedIndex) {
41
41
  selected = true
42
42
  }
43
43
  }
44
44
  $tabGroupStore?.on('select', () => {
45
- $tabPageStore && (selected = $tabPageStore.selected)
45
+ $tabPageStore !== void 0 && (selected = $tabPageStore.selected)
46
46
  })
47
47
  }
48
48
  onDestroy(() => {
49
49
  $tabPageStore?.dispose()
50
50
  })
51
- $: index !== void 0 && $parentStore && $tabIndexStore !== void 0 && create()
52
- $: $tabPageStore && ($tabPageStore.title = title)
53
- $: $tabPageStore && ($tabPageStore.disabled = disabled)
54
- $: $tabPageStore && ($tabPageStore.selected = selected)
51
+ $: index !== void 0 && $parentStore !== void 0 && $tabIndexStore !== void 0 && create()
52
+ $: $tabPageStore !== void 0 && ($tabPageStore.title = title)
53
+ $: $tabPageStore !== void 0 && ($tabPageStore.disabled = disabled)
54
+ $: $tabPageStore !== void 0 && ($tabPageStore.selected = selected)
55
55
  $: theme &&
56
- $parentStore &&
56
+ $parentStore !== void 0 &&
57
57
  (userCreatedPane ?? !isRootPane($parentStore)) &&
58
58
  console.warn(
59
59
  'Set theme on the <Pane> component, not on its children! (Check nested <TabPage> components for a theme prop.)',
60
60
  )
61
61
  </script>
62
62
 
63
- {#if parentStore && tabIndexStore !== undefined}
63
+ {#if parentStore !== undefined && tabIndexStore !== undefined}
64
64
  {#if BROWSER}
65
65
  <div bind:this={indexElement} style="display: none;">
66
66
  <slot />
@@ -26,10 +26,10 @@
26
26
  return value
27
27
  }
28
28
  return value
29
- .replaceAll(/([\da-z])([A-Z])/g, '$1 $2')
30
- .replaceAll(/[_-]+/g, ' ')
29
+ .replaceAll(/([\da-z])([A-Z])/gu, '$1 $2')
30
+ .replaceAll(/[_-]+/gu, ' ')
31
31
  .toLowerCase()
32
- .replaceAll(/\b[a-z]/g, (letter) => letter.toUpperCase())
32
+ .replaceAll(/\b[a-z]/gu, (letter) => letter.toUpperCase())
33
33
  }
34
34
  function changeEventAggregator(event) {
35
35
  dispatch('change', {