@signal9/era-ui 1.12.0 → 1.12.2

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.
@@ -88,20 +88,26 @@
88
88
  // zone once at setup and only refreshes it mid-drag, so after a resize the
89
89
  // widened bar keeps the old (narrow) zone and its new area won't start a drag.
90
90
  // Recompute it by dropping controls (→ null) and re-adding: a Compartment
91
- // null→plugin swap re-runs the plugin's setup, re-measuring the handle — without
92
- // re-initializing the whole draggable. Two states drop it to null:
91
+ // null→plugin swap re-runs the plugin's setup, re-measuring the handle. Two
92
+ // states drop it to null:
93
93
  // • resizing — the grip owns the pointer, you can't drag anyway.
94
- // • Ctrl held — no allow/block restriction means the WHOLE pane is a drag
95
- // handle (ctrl-drag). Resize handles keep resizing because their own
96
- // pointerdown stops propagation before neodrag sees it.
97
- const controlsComp = Compartment.of(() =>
98
- resizing || ctrlHeld
94
+ // • Ctrl held — no allow/block restriction, so the WHOLE pane is a drag handle
95
+ // (ctrl-drag). Resize handles keep resizing because their own pointerdown
96
+ // stops propagation before neodrag sees it.
97
+ // Read BOTH flags into locals first: `resizing || ctrlHeld` would short-circuit
98
+ // while resizing and drop the ctrlHeld reactive dependency, so a resize could
99
+ // leave ctrl-drag un-tracked until something else re-ran this. Assigning both
100
+ // forces the compartment to always depend on both.
101
+ const controlsComp = Compartment.of(() => {
102
+ const isResizing = resizing;
103
+ const isCtrl = ctrlHeld;
104
+ return isResizing || isCtrl
99
105
  ? null
100
106
  : controls({
101
107
  allow: ControlFrom.selector('[data-pane-handle]'),
102
108
  block: ControlFrom.selector('[data-pane-control]')
103
- })
104
- );
109
+ });
110
+ });
105
111
 
106
112
  // Dev aid: tint the grab zones so you can see them while tuning geometry. Off
107
113
  // in production — flip to true when adjusting the handle placement above.
@@ -274,9 +280,11 @@
274
280
  'group absolute isolate flex flex-col rounded-(--era-rd-lg) bg-(--era-surface-bg-elevated) shadow-(--era-shadow-lg) glass-blur',
275
281
  // Auto-size to content until an explicit size is set (by the grip or a preset).
276
282
  size ? '' : 'w-max',
277
- // While Ctrl is held the whole pane is grabbable hint it with a grab cursor
278
- // (resize handles keep their own resize cursors since they're more specific).
279
- ctrlHeld && !resizing ? 'cursor-grab' : '',
283
+ // While Ctrl is held the whole pane is grabbable: a grab cursor hints it, and
284
+ // select-none stops a press on text content from starting a selection that
285
+ // would fight the drag (the handle bar already has select-none; the content
286
+ // doesn't). Resize handles keep their own resize cursors (more specific).
287
+ ctrlHeld && !resizing ? 'cursor-grab select-none' : '',
280
288
  // Promote to its own compositor layer only while dragging, so moves
281
289
  // repaint the layer instead of the page; dropped back to auto at idle.
282
290
  // neodrag animates the `translate` CSS property (not `transform`), so the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signal9/era-ui",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host",
6
6
  "build": "vite build && npm run prepack",