react-dockable-desktop 6.3.2 → 6.4.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.
package/dist/styles.css CHANGED
@@ -9,6 +9,11 @@
9
9
  :root {
10
10
  --rdd-styles-loaded: 1; /* sentinel — checked at mount to detect missing CSS import */
11
11
  --rdd-z-base: 1000; /* base for floating windows + all chrome overlays; override via WindowManagerProvider's zIndexBase */
12
+ /* Fonts for the library's own chrome — tabs, title bars, toolbar, sidebar, menus, toasts, drawers,
13
+ modals. Neither Outfit nor Inter is loaded by the library: load one yourself, or override this.
14
+ Set `--rdd-font-family: inherit` to use the host page's font everywhere. */
15
+ --rdd-font-family: 'Outfit', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
16
+ --rdd-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
12
17
  --rdd-bg-primary: #090b11;
13
18
  --rdd-bg-workspace: #0f111a;
14
19
  --rdd-bg-panel: #141722;
@@ -140,12 +145,32 @@ body,
140
145
  overflow: hidden;
141
146
  }
142
147
 
148
+ /* The library's chrome that renders outside .rdd-workspace — the toolbar and sidebar sit beside
149
+ or around it, and menus, flyouts, toasts, drawers and modals are portaled to <body> — so each
150
+ root takes the font token itself rather than inheriting the host page's. */
151
+ .rdd-toolbar-strip,
152
+ .rdd-toolbar-group-flyout,
153
+ .rdd-sidebar-tabs-strip,
154
+ .rdd-sidebar-content-drawer,
155
+ .rdd-toast-container,
156
+ .rdd-side-panel,
157
+ .rdd-modal-overlay,
158
+ .rdd-panel-toolbar-search__dropdown {
159
+ font-family: var(--rdd-font-family);
160
+ }
161
+
162
+ /* Form controls don't inherit a font by default. Only the library's own controls (those with an
163
+ rdd- class) are told to, never the consumer's inputs and buttons inside a panel. */
164
+ :where(button, input, select, textarea)[class*="rdd-"] {
165
+ font-family: inherit;
166
+ }
167
+
143
168
  /* Cosmetic properties are scoped to the library's own root element only — never
144
169
  the consumer's page, html/body, or their own mount div. */
145
170
  .rdd-workspace {
146
171
  background-color: var(--rdd-bg-primary);
147
172
  color: var(--rdd-text-primary);
148
- font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
173
+ font-family: var(--rdd-font-family);
149
174
  -webkit-font-smoothing: antialiased;
150
175
  }
151
176
 
@@ -334,6 +359,54 @@ body,
334
359
  }
335
360
 
336
361
  /* Drag resizer split bars */
362
+ /* Structural layout of the split grid and the sidebar. These used to be inline styles, where
363
+ consumer CSS could neither see nor override them. Per-render values (sizes, flex-basis,
364
+ visibility) stay inline. */
365
+ .rdd-split {
366
+ display: flex;
367
+ width: 100%;
368
+ height: 100%;
369
+ overflow: hidden;
370
+ position: relative;
371
+ }
372
+ .rdd-split--row { flex-direction: row; }
373
+ .rdd-split--column { flex-direction: column; }
374
+ .rdd-split-child {
375
+ overflow: hidden;
376
+ position: relative;
377
+ min-width: 0;
378
+ min-height: 0;
379
+ }
380
+ /* A bar between side-by-side panes is a vertical line, dragged left/right. */
381
+ .rdd-resizer-bar--vertical { cursor: col-resize; width: 1px; height: 100%; flex-shrink: 0; }
382
+ /* A bar between stacked panes is a horizontal line, dragged up/down. */
383
+ .rdd-resizer-bar--horizontal { cursor: row-resize; width: 100%; height: 1px; flex-shrink: 0; }
384
+
385
+ .rdd-sidebar-layout {
386
+ display: flex;
387
+ flex-direction: row;
388
+ width: 100%;
389
+ height: 100%;
390
+ overflow: hidden;
391
+ }
392
+ .rdd-sidebar-content {
393
+ flex: 1 1 0%;
394
+ min-width: 0;
395
+ overflow: hidden;
396
+ }
397
+ /* Collapses the tab strip by animating its width (set inline) to 0. The strip inside must not
398
+ clip, so the active tab's negative margin can reach into the drawer border. */
399
+ .rdd-sidebar-strip-wrap {
400
+ height: 100%;
401
+ overflow: hidden;
402
+ transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
403
+ flex-shrink: 0;
404
+ }
405
+ .rdd-sidebar-pane {
406
+ flex-direction: column;
407
+ height: 100%;
408
+ width: 100%;
409
+ }
337
410
  .rdd-resizer-bar {
338
411
  background-color: var(--rdd-border-panel, rgba(255, 255, 255, 0.08)) !important;
339
412
  transition: background-color 0.15s ease, transform 0.15s ease !important;
@@ -349,7 +422,7 @@ body,
349
422
  }
350
423
 
351
424
  /* Grab hit-box for columns (cursor: col-resize) */
352
- .rdd-resizer-bar[style*="cursor: col-resize"]::before {
425
+ .rdd-resizer-bar--vertical::before {
353
426
  top: 0;
354
427
  bottom: 0;
355
428
  left: -3px;
@@ -359,7 +432,7 @@ body,
359
432
 
360
433
  /* Grab hit-box for rows (cursor: row-resize) — extends upward only (into safe content area),
361
434
  never downward into the tab bar of the panel below */
362
- .rdd-resizer-bar[style*="cursor: row-resize"]::before {
435
+ .rdd-resizer-bar--horizontal::before {
363
436
  left: 0;
364
437
  right: 0;
365
438
  top: -8px;
@@ -375,13 +448,13 @@ body,
375
448
  z-index: 25 !important;
376
449
  }
377
450
 
378
- .rdd-resizer-bar[style*="cursor: col-resize"]:hover,
379
- .rdd-resizer-bar[style*="cursor: col-resize"].rdd-active {
451
+ .rdd-resizer-bar--vertical:hover,
452
+ .rdd-resizer-bar--vertical.rdd-active {
380
453
  transform: scaleX(2);
381
454
  }
382
455
 
383
- .rdd-resizer-bar[style*="cursor: row-resize"]:hover,
384
- .rdd-resizer-bar[style*="cursor: row-resize"].rdd-active {
456
+ .rdd-resizer-bar--horizontal:hover,
457
+ .rdd-resizer-bar--horizontal.rdd-active {
385
458
  transform: scaleY(2);
386
459
  }
387
460
 
@@ -464,6 +537,10 @@ body.rdd-resizing-col-active * {
464
537
  }
465
538
 
466
539
  .rdd-taskbar-footer-container {
540
+ height: 48px;
541
+ /* Floating windows stack at zIndexBase + n. An auto-hide taskbar is overlaid on the bottom edge,
542
+ so it must sit above them or a window parked there hides it; below every popup and overlay. */
543
+ z-index: calc(var(--rdd-z-base, 1000) + 6500);
467
544
  background-color: var(--rdd-taskbar-bg) !important;
468
545
  border-top: 1px solid var(--rdd-border-panel) !important;
469
546
  backdrop-filter: blur(12px) saturate(180%);
@@ -482,7 +559,7 @@ body.rdd-resizing-col-active * {
482
559
  background: transparent;
483
560
  border: none;
484
561
  cursor: pointer;
485
- font-family: monospace;
562
+ font-family: var(--rdd-font-family-mono);
486
563
  padding: 0;
487
564
  text-decoration: none;
488
565
  font-size: 0.875rem;
@@ -546,12 +623,15 @@ body.rdd-resizing-col-active * {
546
623
  }
547
624
 
548
625
  .rdd-taskbar-item-tooltip {
626
+ /* Above floating windows, the taskbar and the toolbar flyout; below menus, modals and toasts.
627
+ Shifts with zIndexBase (it was a fixed inline 999999). */
628
+ z-index: calc(var(--rdd-z-base, 1000) + 8400);
549
629
  background: var(--rdd-bg-panel, #1e1e1e) !important;
550
630
  color: var(--rdd-text-primary, #ffffff) !important;
551
631
  padding: 8px !important;
552
632
  border-radius: 6px;
553
633
  font-size: 11px !important;
554
- font-family: 'Outfit', 'Inter', system-ui, sans-serif;
634
+ font-family: var(--rdd-font-family);
555
635
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
556
636
  border: 1px solid var(--rdd-taskbar-item-border, rgba(255, 255, 255, 0.1)) !important;
557
637
  animation: rdd-tooltip-fade-in 0.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
@@ -670,10 +750,20 @@ body.rdd-resizing-col-active * {
670
750
  backdrop-filter: blur(16px) saturate(180%);
671
751
  -webkit-backdrop-filter: blur(16px) saturate(180%);
672
752
  background-color: var(--rdd-window-bg);
673
- overflow: hidden;
674
753
  transition: box-shadow 0.2s, border-color 0.2s;
675
754
  }
676
755
 
756
+ /* Clips the content to the rounded corners, in place of the window itself — so the resize
757
+ handles, which are the window's children outside this frame, can straddle its edge. */
758
+ .rdd-floating-window-frame {
759
+ display: flex;
760
+ flex-direction: column;
761
+ flex: 1 1 auto;
762
+ min-height: 0;
763
+ overflow: hidden;
764
+ border-radius: inherit;
765
+ }
766
+
677
767
  .rdd-floating-window.rdd-window-focused {
678
768
  box-shadow: var(--rdd-window-shadow-focused), inset 0 1px 0 rgba(255, 255, 255, 0.08);
679
769
  border-color: var(--rdd-window-border-focused);
@@ -704,7 +794,7 @@ body.rdd-resizing-col-active * {
704
794
  }
705
795
 
706
796
  .rdd-floating-window-title {
707
- font-family: 'Outfit', sans-serif;
797
+ font-family: var(--rdd-font-family);
708
798
  font-size: 0.78rem;
709
799
  font-weight: 600;
710
800
  color: var(--rdd-window-text);
@@ -747,7 +837,7 @@ body.rdd-resizing-col-active * {
747
837
  padding: 4px 0;
748
838
  min-width: 220px;
749
839
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
750
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
840
+ font-family: var(--rdd-font-family);
751
841
  font-size: 13px;
752
842
  animation: rdd-context-menu-in 0.1s cubic-bezier(0.16, 1, 0.3, 1);
753
843
  outline: none;
@@ -1854,6 +1944,9 @@ body.rdd-dragging-active {
1854
1944
 
1855
1945
  /* --- Modern Sidebar and Tabs UI Theme Customizations --- */
1856
1946
  .rdd-sidebar-content-drawer {
1947
+ flex-grow: 0;
1948
+ flex-shrink: 1;
1949
+ overflow: hidden;
1857
1950
  background-color: var(--sidebar-bg) !important;
1858
1951
  color: var(--sidebar-text-title) !important;
1859
1952
  height: 100%;
@@ -1948,7 +2041,7 @@ body.rdd-dragging-active {
1948
2041
 
1949
2042
  /* Sidebar Header */
1950
2043
  .rdd-sidebar-header-title {
1951
- font-family: monospace;
2044
+ font-family: var(--rdd-font-family-mono);
1952
2045
  font-weight: 700;
1953
2046
  letter-spacing: 0.05em;
1954
2047
  text-transform: uppercase;
@@ -1970,7 +2063,6 @@ body.rdd-dragging-active {
1970
2063
  position: relative;
1971
2064
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
1972
2065
  cursor: pointer;
1973
- outline: none !important;
1974
2066
  }
1975
2067
 
1976
2068
  /* Micro-interactions & hover tactile feedback for inactive buttons */
@@ -2327,20 +2419,23 @@ html.rdd-no-animations [class*="rdd-"]::after {
2327
2419
 
2328
2420
 
2329
2421
  /*
2330
- * Counteract scale for canvas and its siblings inside Luciad containers.
2422
+ * Counteract scale for canvas and its siblings inside a marked container.
2423
+ *
2424
+ * Put `data-rdd-preview-unscale` on the element that holds a canvas-rendered view (a WebGL map,
2425
+ * a chart).
2331
2426
  *
2332
2427
  * When rendering a panel's mini hover-preview in the taskbar, the parent container
2333
2428
  * is scaled down using CSS transform scale(var(--rdd-preview-scale)). For standard HTML UI,
2334
2429
  * this works natively. However, for web maps (like WebGL / canvas-based engines such as
2335
- * LuciadRIA), scaling down the browser container causes the rendering canvas and its absolute
2430
+ * a WebGL map), scaling down the browser container causes the rendering canvas and its absolute
2336
2431
  * siblings (e.g. HTML overlays, labels, shapes) to blur or offset.
2337
2432
  *
2338
2433
  * To counteract this, we apply a reverse scale transform (1 / scale) and multiply the size
2339
2434
  * of the canvas and its siblings by the scale factor. This forces the map engine to render
2340
2435
  * at full resolution inside the preview container without positioning glitches.
2341
2436
  */
2342
- .rdd-taskbar-item-preview-host .luciad canvas,
2343
- .rdd-taskbar-item-preview-host .luciad canvas ~ * {
2437
+ .rdd-taskbar-item-preview-host [data-rdd-preview-unscale] canvas,
2438
+ .rdd-taskbar-item-preview-host [data-rdd-preview-unscale] canvas ~ * {
2344
2439
  transform: scale(calc(1 / var(--rdd-preview-scale, 1))) !important;
2345
2440
  transform-origin: top left;
2346
2441
  width: calc(100% * var(--rdd-preview-scale, 1)) !important;
@@ -2560,7 +2655,7 @@ html.rdd-no-animations [class*="rdd-"]::after {
2560
2655
  display: flex;
2561
2656
  align-items: center;
2562
2657
  justify-content: center;
2563
- font-family: monospace;
2658
+ font-family: var(--rdd-font-family-mono);
2564
2659
  font-size: 0.875rem;
2565
2660
  color: var(--rdd-text-secondary, #94a3b8);
2566
2661
  }
@@ -2573,7 +2668,7 @@ html.rdd-no-animations [class*="rdd-"]::after {
2573
2668
  align-items: center;
2574
2669
  justify-content: center;
2575
2670
  color: var(--rdd-text-secondary, #94a3b8);
2576
- font-family: monospace;
2671
+ font-family: var(--rdd-font-family-mono);
2577
2672
  font-size: 0.875rem;
2578
2673
  }
2579
2674
 
@@ -2587,7 +2682,7 @@ html.rdd-no-animations [class*="rdd-"]::after {
2587
2682
  justify-content: center;
2588
2683
  background: transparent;
2589
2684
  color: #dc3545;
2590
- font-family: monospace;
2685
+ font-family: var(--rdd-font-family-mono);
2591
2686
  padding: 1rem;
2592
2687
  text-align: center;
2593
2688
  box-sizing: border-box;
@@ -2624,13 +2719,15 @@ html.rdd-no-animations [class*="rdd-"]::after {
2624
2719
 
2625
2720
  /* Drag ghost tab preview (floating label while dragging) */
2626
2721
  .rdd-drag-ghost-tab {
2722
+ /* Follows the pointer above everything while a tab is dragged. Shifts with zIndexBase. */
2723
+ z-index: calc(var(--rdd-z-base, 1000) + 9300);
2627
2724
  position: fixed;
2628
2725
  background: rgba(0, 0, 0, 0.8);
2629
2726
  border: 1px solid var(--rdd-accent-color, #38bdf8);
2630
2727
  border-left: 3px solid var(--rdd-accent-color, #38bdf8);
2631
2728
  border-radius: 4px;
2632
2729
  color: var(--rdd-accent-color, #38bdf8);
2633
- font-family: monospace;
2730
+ font-family: var(--rdd-font-family-mono);
2634
2731
  padding: 0.375rem 1rem;
2635
2732
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
2636
2733
  display: flex;
@@ -2793,7 +2890,6 @@ html.rdd-no-animations [class*="rdd-"]::after {
2793
2890
  color: var(--tab-icon-inactive);
2794
2891
  cursor: pointer;
2795
2892
  flex-shrink: 0;
2796
- outline: none !important;
2797
2893
  position: relative;
2798
2894
  transition: color 0.15s ease, background-color 0.15s ease;
2799
2895
  }
@@ -2995,7 +3091,7 @@ html.rdd-no-animations [class*="rdd-"]::after {
2995
3091
  display: inline-flex;
2996
3092
  align-items: center;
2997
3093
  justify-content: center;
2998
- font-family: monospace;
3094
+ font-family: var(--rdd-font-family-mono);
2999
3095
  font-weight: 500;
3000
3096
  cursor: pointer;
3001
3097
  border-radius: 4px;
@@ -3060,11 +3156,11 @@ html.rdd-no-animations [class*="rdd-"]::after {
3060
3156
 
3061
3157
  /* Phase 2A: Expand resizer hit area to 44px on touch devices */
3062
3158
  @media (pointer: coarse) {
3063
- .rdd-resizer-bar[style*="cursor: col-resize"]::before {
3159
+ .rdd-resizer-bar--vertical::before {
3064
3160
  left: -20px;
3065
3161
  width: 44px;
3066
3162
  }
3067
- .rdd-resizer-bar[style*="cursor: row-resize"]::before {
3163
+ .rdd-resizer-bar--horizontal::before {
3068
3164
  top: -32px;
3069
3165
  height: 33px; /* 32px upward into safe content area, 0px downward into tab bar */
3070
3166
  }
@@ -3510,7 +3606,17 @@ html.rdd-no-animations [class*="rdd-"]::after {
3510
3606
  border: 1px solid var(--rdd-panel-float-border, rgba(255, 255, 255, 0.1));
3511
3607
  box-shadow: var(--rdd-panel-float-shadow, 0 4px 16px rgba(0, 0, 0, 0.35));
3512
3608
  backdrop-filter: blur(8px);
3609
+ }
3610
+
3611
+ /* Clips the content to the rounded corners, in place of the window itself — so the resize
3612
+ handles, which are the window's children outside this frame, can straddle its edge. */
3613
+ .rdd-panel-float__frame {
3614
+ display: flex;
3615
+ flex-direction: column;
3616
+ flex: 1 1 auto;
3617
+ min-height: 0;
3513
3618
  overflow: hidden;
3619
+ border-radius: inherit;
3514
3620
  }
3515
3621
 
3516
3622
  .rdd-panel-float--active {
@@ -3740,3 +3846,15 @@ html.rdd-no-animations [class*="rdd-"]::after {
3740
3846
  /* Toast RTL: flip icon/body order and progress bar collapse direction */
3741
3847
  [dir="rtl"] .rdd-toast { flex-direction: row-reverse; }
3742
3848
  [dir="rtl"] .rdd-toast__progress { transform-origin: right; }
3849
+
3850
+ /* ==========================================================================
3851
+ KEYBOARD FOCUS
3852
+ A visible ring on every library control reached from the keyboard (WCAG 2.4.7). Only
3853
+ :focus-visible, so pointer clicks don't show it; only elements with an rdd- class, so the
3854
+ consumer's own controls inside panels keep their own focus styles. Last in the file so it wins
3855
+ ties with the controls' own rules. Override --rdd-focus-ring to restyle it.
3856
+ ========================================================================== */
3857
+ :where([class*="rdd-"]):focus-visible {
3858
+ outline: var(--rdd-focus-ring, 2px solid var(--rdd-accent-color));
3859
+ outline-offset: -2px;
3860
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dockable-desktop",
3
- "version": "6.3.2",
3
+ "version": "6.4.0",
4
4
  "license": "MIT",
5
5
  "description": "A premium, state-of-the-art window manager and dockable layout engine for React. Supports fluid grid splits, tabbed groups, floating resizable windows, zero-unmount state preservation, context menus, and internationalization.",
6
6
  "main": "dist/index.cjs",
@@ -54,6 +54,7 @@
54
54
  "docs:build": "vitepress build docs-site",
55
55
  "docs:preview": "vitepress preview docs-site",
56
56
  "test": "vitest run",
57
+ "test:browser": "vitest run -c vitest.browser.config.ts",
57
58
  "test:watch": "vitest",
58
59
  "lint": "tsc --noEmit",
59
60
  "version:sync": "node scripts/sync-version.js",
@@ -79,6 +80,7 @@
79
80
  "globals": "^17.6.0",
80
81
  "jsdom": "^29.1.1",
81
82
  "leaflet": "^1.9.4",
83
+ "playwright-core": "^1.63.0",
82
84
  "react": "^19.2.6",
83
85
  "react-bootstrap": "^2.10.10",
84
86
  "react-bootstrap-submenu": "^4.0.0",