@streamscloud/kit 0.65.0 → 0.65.1

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.
@@ -11,8 +11,9 @@ const DialogView = $derived(dialog.view);
11
11
  // doesn't always prevent dialog close. Using keydown to block ESC earlier.
12
12
  // Remove when browser bug is fixed.
13
13
  // See: https://issues.chromium.org/issues/41487622
14
+ // On window, not <dialog>: after a stacked dialog unmounts focus is on <body> and Esc natively closes this one.
14
15
  const handleKeydown = (event) => {
15
- if (event.key !== /*@wc-ignore*/ 'Escape') {
16
+ if (event.key !== 'Escape' || !isActive) {
16
17
  return;
17
18
  }
18
19
  if (!canDismiss) {
@@ -62,6 +63,8 @@ const customWidth = $derived(isCustomWidth ? size : null);
62
63
  const isStretchContent = $derived(position === 'full-screen' || position === 'full-height' || position === 'side-left' || position === 'side-right');
63
64
  </script>
64
65
 
66
+ <svelte:window onkeydown={handleKeydown} />
67
+
65
68
  <dialog
66
69
  bind:this={dialogElement}
67
70
  class="dialog-container"
@@ -79,7 +82,6 @@ const isStretchContent = $derived(position === 'full-screen' || position === 'fu
79
82
  class:dialog-container--position-full-height={position === 'full-height'}
80
83
  class:dialog-container--position-side-left={position === 'side-left'}
81
84
  class:dialog-container--position-side-right={position === 'side-right'}
82
- onkeydown={handleKeydown}
83
85
  oncancel={handleCancel}
84
86
  onclick={handleBackdropClick}
85
87
  style:--dialog-container--custom-width={customWidth}>
@@ -52,16 +52,16 @@ const onMouseDown = (e) => {
52
52
  const handleScrubberKeyDown = (event) => {
53
53
  const step = 0.05;
54
54
  let newValue;
55
- if (event.key === /*@wc-ignore*/ 'ArrowLeft') {
55
+ if (event.key === 'ArrowLeft') {
56
56
  newValue = Math.max(0, value - step);
57
57
  }
58
- else if (event.key === /*@wc-ignore*/ 'ArrowRight') {
58
+ else if (event.key === 'ArrowRight') {
59
59
  newValue = Math.min(1, value + step);
60
60
  }
61
- else if (event.key === /*@wc-ignore*/ 'Home') {
61
+ else if (event.key === 'Home') {
62
62
  newValue = 0;
63
63
  }
64
- else if (event.key === /*@wc-ignore*/ 'End') {
64
+ else if (event.key === 'End') {
65
65
  newValue = 1;
66
66
  }
67
67
  if (newValue !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.65.0",
3
+ "version": "0.65.1",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",