@signal9/era-ui 1.15.4 → 1.15.6

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.
@@ -15,6 +15,9 @@
15
15
  // (a shell has a taskbar to restore from, so no dedicated buttons). While the
16
16
  // right button is held the glyph previews the minimize action; a left press
17
17
  // keeps the X, so holding never implies minimize when the release will close.
18
+ // Like a native click, the minimize COMMITS on release, not press: right
19
+ // pointerdown only arms it (contextmenu is suppressed), right pointerup over
20
+ // the button fires it, and dragging off first cancels.
18
21
  let minimizeHint = $state(false);
19
22
 
20
23
  // z-index is set imperatively, NOT via a style="" prop: Pane positions itself
@@ -53,14 +56,13 @@
53
56
  size="icon"
54
57
  tone="destructive"
55
58
  aria-label="Close (right-click to minimize)"
56
- class="rounded-(--era-rd-md)"
57
59
  onclick={() => wm.close(win.id)}
58
- oncontextmenu={(e: MouseEvent) => {
59
- e.preventDefault();
60
- wm.minimize(win.id);
61
- }}
60
+ oncontextmenu={(e: MouseEvent) => e.preventDefault()}
62
61
  onpointerdown={(e: PointerEvent) => (minimizeHint = e.button === 2)}
63
- onpointerup={() => (minimizeHint = false)}
62
+ onpointerup={(e: PointerEvent) => {
63
+ if (e.button === 2 && minimizeHint) wm.minimize(win.id);
64
+ minimizeHint = false;
65
+ }}
64
66
  onpointerleave={() => (minimizeHint = false)}
65
67
  onpointercancel={() => (minimizeHint = false)}
66
68
  >
@@ -2,7 +2,6 @@
2
2
  import type { HTMLButtonAttributes } from 'svelte/elements';
3
3
  import { Button } from '../button';
4
4
  import X from '@lucide/svelte/icons/x';
5
- import { cn } from '../../utils/index.js';
6
5
 
7
6
  let {
8
7
  ref = $bindable(null),
@@ -13,21 +12,12 @@
13
12
  } = $props();
14
13
  </script>
15
14
 
16
- <!-- A raw icon Button (size="icon" = h-xs), a tight SQUARE. No data-pane-control:
17
- it stays in the drag zone, so a press-and-drag moves the pane while a clean
18
- click still closes (neodrag starts a drag only on movement and suppresses the
19
- trailing click after a real drag).
20
- rounded-(--era-rd-md), not the icon default rd-xs: the button sits xs-inset-sm
21
- (sp/2) inside the pane's rd-lg corner, and the radius ladder gives the exact
22
- concentric identity rd-lg sp/2 = rd-md at every density. -->
23
- <Button
24
- bind:ref
25
- icon
26
- size="icon"
27
- tone="destructive"
28
- aria-label="Close"
29
- class={cn('rounded-(--era-rd-md)', className)}
30
- {...restProps}
31
- >
15
+ <!-- A raw icon Button (size="icon" = h-xs, rd-xs), a tight SQUARE. No
16
+ data-pane-control: it stays in the drag zone, so a press-and-drag moves the
17
+ pane while a clean click still closes (neodrag starts a drag only on
18
+ movement and suppresses the trailing click after a real drag). Its natural
19
+ rd-xs is what the PANE's corner radius conforms to (rd-sm see Pane.Root),
20
+ not the other way round. -->
21
+ <Button bind:ref icon size="icon" tone="destructive" aria-label="Close" class={className} {...restProps}>
32
22
  <X class="size-(--era-h-xs)" />
33
23
  </Button>
@@ -270,7 +270,13 @@
270
270
  // can still bleed outward. isolate: own stacking context so the resize layer's
271
271
  // negative z sits below the content but above this background (bar clear of
272
272
  // the rails, without lifting the rails above neighbouring UI).
273
- 'group absolute isolate flex flex-col rounded-(--era-rd-lg) bg-(--era-surface-bg-elevated) shadow-(--era-shadow-lg) glass-blur',
273
+ //
274
+ // rd-sm, NOT rd-lg: a container's radius follows its corner REGION's tier,
275
+ // not its overall size. The pane's corners are formed by the h-sm grab bar,
276
+ // whose h-xs controls (the ×) sit xs-inset-sm (sp/2) from the corner — and
277
+ // the ladder guarantees rd-sm = rd-xs + sp/2 at every density, so the ×'s
278
+ // natural rd-xs is concentric inside rd-sm by construction.
279
+ 'group absolute isolate flex flex-col rounded-(--era-rd-sm) bg-(--era-surface-bg-elevated) shadow-(--era-shadow-lg) glass-blur',
274
280
  // Auto-size to content until an explicit size is set (by the grip or a preset).
275
281
  size ? '' : 'w-max',
276
282
  // While Ctrl is held the whole pane is grabbable: a grab cursor hints it, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signal9/era-ui",
3
- "version": "1.15.4",
3
+ "version": "1.15.6",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host",
6
6
  "build": "vite build && npm run prepack",