flexlayout-react 0.8.19 → 0.9.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.
- package/README.md +146 -208
- package/dist/index.js +6523 -6395
- package/package.json +25 -27
- package/style/_base.scss +115 -35
- package/style/_themes.scss +719 -49
- package/style/alpha_dark.css +865 -0
- package/style/alpha_dark.css.map +1 -0
- package/style/alpha_dark.scss +6 -0
- package/style/alpha_light.css +859 -0
- package/style/alpha_light.css.map +1 -0
- package/style/alpha_light.scss +6 -0
- package/style/alpha_rounded.css +813 -0
- package/style/alpha_rounded.css.map +1 -0
- package/style/alpha_rounded.scss +6 -0
- package/style/combined.css +573 -47
- package/style/combined.css.map +1 -1
- package/style/combined.scss +25 -1
- package/style/dark.css +100 -25
- package/style/dark.css.map +1 -1
- package/style/gray.css +101 -26
- package/style/gray.css.map +1 -1
- package/style/light.css +101 -23
- package/style/light.css.map +1 -1
- package/style/rounded.css +112 -28
- package/style/rounded.css.map +1 -1
- package/style/underline.css +104 -25
- package/style/underline.css.map +1 -1
- package/types/index.d.ts +14 -14
- package/types/model/Actions.d.ts +62 -31
- package/types/model/Attributes.d.ts +42 -0
- package/types/model/BorderNode.d.ts +11 -11
- package/types/model/BorderSet.d.ts +2 -2
- package/types/{DropInfo.d.ts → model/DropInfo.d.ts} +2 -2
- package/types/model/IDropTarget.d.ts +2 -2
- package/types/model/IJsonModel.d.ts +72 -50
- package/types/model/Layout.d.ts +41 -0
- package/types/model/Model.d.ts +30 -25
- package/types/model/Node.d.ts +18 -10
- package/types/{Rect.d.ts → model/Rect.d.ts} +6 -4
- package/types/model/RowNode.d.ts +15 -14
- package/types/model/TabNode.d.ts +17 -25
- package/types/model/TabSetNode.d.ts +15 -21
- package/types/view/BorderButton.d.ts +4 -3
- package/types/view/BorderTab.d.ts +3 -3
- package/types/view/BorderTabSet.d.ts +3 -3
- package/types/{Types.d.ts → view/CSSClassNames.d.ts} +11 -3
- package/types/view/DragTabButton.d.ts +11 -0
- package/types/view/FloatWindow.d.ts +12 -0
- package/types/{I18nLabel.d.ts → view/I18nLabel.d.ts} +2 -1
- package/types/view/Icons.d.ts +1 -0
- package/types/view/Layout.d.ts +21 -197
- package/types/view/Overlay.d.ts +2 -2
- package/types/view/PopoutWindow.d.ts +6 -6
- package/types/view/PopupMenu.d.ts +2 -2
- package/types/view/Row.d.ts +3 -3
- package/types/view/Splitter.d.ts +2 -4
- package/types/view/Tab.d.ts +3 -4
- package/types/view/TabButton.d.ts +3 -3
- package/types/view/TabButtonStamp.d.ts +3 -3
- package/types/view/TabContentRenderer.d.ts +14 -0
- package/types/view/TabLayout.d.ts +12 -0
- package/types/view/TabOverflowHook.d.ts +3 -3
- package/types/view/TabSet.d.ts +3 -3
- package/types/view/Utils.d.ts +15 -4
- package/types/view/layout/BorderContainer.d.ts +7 -0
- package/types/view/layout/DragDropManager.d.ts +48 -0
- package/types/view/layout/EdgeIndicators.d.ts +5 -0
- package/types/view/layout/FloatingWindowContainer.d.ts +5 -0
- package/types/view/layout/LayoutInternal.d.ts +147 -0
- package/types/view/layout/LayoutTypes.d.ts +51 -0
- package/types/Attribute.d.ts +0 -25
- package/types/AttributeDefinitions.d.ts +0 -18
- package/types/model/Action.d.ts +0 -5
- package/types/model/LayoutWindow.d.ts +0 -44
- package/types/view/DragContainer.d.ts +0 -9
- package/types/view/SizeTracker.d.ts +0 -13
- /package/types/{DockLocation.d.ts → model/DockLocation.d.ts} +0 -0
- /package/types/{Orientation.d.ts → model/Orientation.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flexlayout-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "A multi-tab docking layout manager",
|
|
5
5
|
"author": "Caplin Systems Ltd",
|
|
6
6
|
"repository": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"docking layout"
|
|
45
45
|
],
|
|
46
46
|
"scripts": {
|
|
47
|
-
"dev": "vite",
|
|
47
|
+
"dev": "vite --host",
|
|
48
48
|
"preview": "vite preview",
|
|
49
49
|
"build": "npm run build:clean && npm run build:demo && npm run css && npm run build:lib && npm run build:types && npm run doc",
|
|
50
50
|
"build:clean": "rimraf demo/dist dist/ types/ typedoc/",
|
|
@@ -53,13 +53,10 @@
|
|
|
53
53
|
"build:lib": "vite build --config vite.config.lib.ts",
|
|
54
54
|
"test": "vitest",
|
|
55
55
|
"playwright": "playwright test --ui",
|
|
56
|
-
"lint": "eslint src
|
|
56
|
+
"lint": "eslint src",
|
|
57
57
|
"doc": "typedoc --out typedoc --exclude \"**/demo/**/*.tsx\" --excludeInternal --disableSources --excludePrivate --excludeProtected --readme none ./src",
|
|
58
58
|
"css": "sass style:style"
|
|
59
59
|
},
|
|
60
|
-
"eslintConfig": {
|
|
61
|
-
"extends": "react-app"
|
|
62
|
-
},
|
|
63
60
|
"peerDependencies": {
|
|
64
61
|
"react": "^18.0.0 || ^19.0.0",
|
|
65
62
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -67,35 +64,36 @@
|
|
|
67
64
|
"devDependencies": {
|
|
68
65
|
"@emotion/react": "^11.14.0",
|
|
69
66
|
"@emotion/styled": "^11.14.1",
|
|
70
|
-
"@eslint/js": "^
|
|
71
|
-
"@mui/material": "^
|
|
72
|
-
"@mui/x-data-grid": "^
|
|
73
|
-
"@playwright/test": "^1.
|
|
74
|
-
"@types/node": "^25.
|
|
67
|
+
"@eslint/js": "^10.0.1",
|
|
68
|
+
"@mui/material": "^9.0.0",
|
|
69
|
+
"@mui/x-data-grid": "^9.0.3",
|
|
70
|
+
"@playwright/test": "^1.59.1",
|
|
71
|
+
"@types/node": "^25.6.0",
|
|
75
72
|
"@types/prismjs": "^1.26.6",
|
|
76
73
|
"@types/react": "^19.2.14",
|
|
77
74
|
"@types/react-dom": "^19.2.3",
|
|
78
|
-
"@vitejs/plugin-react": "^
|
|
79
|
-
"ag-grid-community": "^35.1
|
|
80
|
-
"ag-grid-react": "^35.1
|
|
75
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
76
|
+
"ag-grid-community": "^35.2.1",
|
|
77
|
+
"ag-grid-react": "^35.2.1",
|
|
81
78
|
"chart.js": "^4.5.1",
|
|
82
|
-
"eslint": "^
|
|
79
|
+
"eslint": "^10.2.1",
|
|
83
80
|
"eslint-plugin-react": "^7.37.5",
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
81
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
82
|
+
"globals": "^17.5.0",
|
|
83
|
+
"ol": "^10.9.0",
|
|
84
|
+
"prettier": "^3.8.3",
|
|
87
85
|
"prismjs": "^1.30.0",
|
|
88
|
-
"react": "^19.2.
|
|
86
|
+
"react": "^19.2.5",
|
|
89
87
|
"react-chartjs-2": "^5.3.1",
|
|
90
|
-
"react-dom": "^19.2.
|
|
88
|
+
"react-dom": "^19.2.5",
|
|
91
89
|
"react-scripts": "5.0.1",
|
|
92
90
|
"rimraf": "^6.1.3",
|
|
93
|
-
"sass": "^1.
|
|
94
|
-
"styled-components": "^6.
|
|
95
|
-
"typedoc": "^0.28.
|
|
96
|
-
"typescript": "^
|
|
97
|
-
"typescript-eslint": "^8.
|
|
98
|
-
"vite": "^
|
|
99
|
-
"vitest": "^4.
|
|
91
|
+
"sass": "^1.99.0",
|
|
92
|
+
"styled-components": "^6.4.1",
|
|
93
|
+
"typedoc": "^0.28.19",
|
|
94
|
+
"typescript": "^6.0.3",
|
|
95
|
+
"typescript-eslint": "^8.59.1",
|
|
96
|
+
"vite": "^8.0.10",
|
|
97
|
+
"vitest": "^4.1.5"
|
|
100
98
|
}
|
|
101
99
|
}
|
package/style/_base.scss
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@mixin baseMixin {
|
|
17
|
+
|
|
17
18
|
/*
|
|
18
19
|
base classes
|
|
19
20
|
*/
|
|
@@ -21,9 +22,14 @@
|
|
|
21
22
|
&__layout {
|
|
22
23
|
@include absoluteFill;
|
|
23
24
|
display: flex;
|
|
24
|
-
overflow:hidden;
|
|
25
|
+
// overflow: hidden;
|
|
25
26
|
background-color: var(--color-background);
|
|
26
27
|
|
|
28
|
+
&_metrics {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: -30000px; // offscreen
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
&_overlay {
|
|
28
34
|
@include absoluteFill;
|
|
29
35
|
z-index: 1000;
|
|
@@ -35,10 +41,10 @@
|
|
|
35
41
|
z-index: 100;
|
|
36
42
|
display: flex;
|
|
37
43
|
flex-direction: column;
|
|
38
|
-
align-items: start;
|
|
44
|
+
align-items: flex-start;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
|
-
&
|
|
47
|
+
&_moveables_home {
|
|
42
48
|
visibility: hidden;
|
|
43
49
|
position: absolute;
|
|
44
50
|
width: 100px; // size is needed to tabs have something to draw into
|
|
@@ -70,6 +76,41 @@
|
|
|
70
76
|
background-color: var(--color-splitter);
|
|
71
77
|
touch-action: none;
|
|
72
78
|
z-index: 10;
|
|
79
|
+
position: relative;
|
|
80
|
+
|
|
81
|
+
&_horz {
|
|
82
|
+
width: var(--splitter-size);
|
|
83
|
+
min-width: var(--splitter-size);
|
|
84
|
+
|
|
85
|
+
&::before {
|
|
86
|
+
content: "";
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: 0;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
/* Center the hit area over the thin line */
|
|
91
|
+
left: 50%;
|
|
92
|
+
width: var(--splitter-active-size);
|
|
93
|
+
transform: translateX(-50%);
|
|
94
|
+
z-index: 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&_vert {
|
|
99
|
+
height: var(--splitter-size);
|
|
100
|
+
min-height: var(--splitter-size);
|
|
101
|
+
|
|
102
|
+
&::before {
|
|
103
|
+
content: "";
|
|
104
|
+
position: absolute;
|
|
105
|
+
left: 0;
|
|
106
|
+
right: 0;
|
|
107
|
+
/* Center the hit area over the thin line */
|
|
108
|
+
top: 50%;
|
|
109
|
+
height: var(--splitter-active-size);
|
|
110
|
+
transform: translateY(-50%);
|
|
111
|
+
z-index: 1;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
73
114
|
|
|
74
115
|
@media (hover: hover) {
|
|
75
116
|
&:hover {
|
|
@@ -80,8 +121,7 @@
|
|
|
80
121
|
}
|
|
81
122
|
}
|
|
82
123
|
|
|
83
|
-
&_border {
|
|
84
|
-
}
|
|
124
|
+
&_border {}
|
|
85
125
|
|
|
86
126
|
&_drag {
|
|
87
127
|
position: absolute;
|
|
@@ -94,8 +134,9 @@
|
|
|
94
134
|
}
|
|
95
135
|
|
|
96
136
|
&_handle {
|
|
97
|
-
background-color:
|
|
137
|
+
background-color: var(--color-splitter-handle);
|
|
98
138
|
border-radius: 3px;
|
|
139
|
+
visibility: var(--splitter-handle-visibility);
|
|
99
140
|
|
|
100
141
|
&_horz {
|
|
101
142
|
width: 3px;
|
|
@@ -197,23 +238,7 @@
|
|
|
197
238
|
}
|
|
198
239
|
|
|
199
240
|
&_leading {
|
|
200
|
-
display:flex;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&_header {
|
|
204
|
-
// tabset header bar
|
|
205
241
|
display: flex;
|
|
206
|
-
align-items: center;
|
|
207
|
-
padding: 3px 3px 3px 5px;
|
|
208
|
-
box-sizing: border-box;
|
|
209
|
-
border-bottom: 1px solid var(--color-tabset-divider-line);
|
|
210
|
-
color: var(--color-tabset-header);
|
|
211
|
-
background-color: var(--color-tabset-header-background);
|
|
212
|
-
font-size: var(--font-size);
|
|
213
|
-
|
|
214
|
-
&_content {
|
|
215
|
-
flex-grow: 1;
|
|
216
|
-
}
|
|
217
242
|
}
|
|
218
243
|
|
|
219
244
|
&_tabbar {
|
|
@@ -223,7 +248,10 @@
|
|
|
223
248
|
background-color: var(--color-tabset-background);
|
|
224
249
|
overflow: hidden;
|
|
225
250
|
display: flex;
|
|
251
|
+
align-items: center;
|
|
252
|
+
min-height: 1.5em;
|
|
226
253
|
font-size: var(--font-size);
|
|
254
|
+
font-weight: var(--font-weight);
|
|
227
255
|
}
|
|
228
256
|
|
|
229
257
|
&_outer_top {
|
|
@@ -255,6 +283,7 @@
|
|
|
255
283
|
padding-right: 4px;
|
|
256
284
|
box-sizing: border-box;
|
|
257
285
|
white-space: nowrap;
|
|
286
|
+
align-items: center;
|
|
258
287
|
|
|
259
288
|
&_top {
|
|
260
289
|
border-top: 2px solid transparent;
|
|
@@ -310,12 +339,26 @@
|
|
|
310
339
|
background-color: #0000003d;
|
|
311
340
|
}
|
|
312
341
|
|
|
342
|
+
&_layout_container {
|
|
343
|
+
// @include absoluteFill;
|
|
344
|
+
position:relative;
|
|
345
|
+
height: 100%;
|
|
346
|
+
box-sizing: border-box;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&_layout_container_user {
|
|
350
|
+
position:relative;
|
|
351
|
+
flex-grow: 1;
|
|
352
|
+
box-sizing: border-box;
|
|
353
|
+
}
|
|
354
|
+
|
|
313
355
|
&_button {
|
|
314
356
|
display: flex;
|
|
315
357
|
gap: 0.3em;
|
|
316
358
|
align-items: center;
|
|
317
359
|
box-sizing: border-box;
|
|
318
|
-
padding: 3px 0.5em;
|
|
360
|
+
padding: 3px 0.5em;
|
|
361
|
+
font-weight: var(--font-weight);
|
|
319
362
|
|
|
320
363
|
cursor: pointer;
|
|
321
364
|
|
|
@@ -354,11 +397,9 @@
|
|
|
354
397
|
color: var(--color-tab-unselected);
|
|
355
398
|
}
|
|
356
399
|
|
|
357
|
-
&_top {
|
|
358
|
-
}
|
|
400
|
+
&_top {}
|
|
359
401
|
|
|
360
|
-
&_bottom {
|
|
361
|
-
}
|
|
402
|
+
&_bottom {}
|
|
362
403
|
|
|
363
404
|
&_leading {
|
|
364
405
|
display: flex;
|
|
@@ -373,6 +414,7 @@
|
|
|
373
414
|
border: none;
|
|
374
415
|
font-family: var(--font-family);
|
|
375
416
|
font-size: var(--font-size);
|
|
417
|
+
font-weight: var(--font-weight);
|
|
376
418
|
color: var(--color-tab-textbox);
|
|
377
419
|
background-color: var(--color-tab-textbox-background);
|
|
378
420
|
border: 1px inset var(--color-1);
|
|
@@ -473,8 +515,9 @@
|
|
|
473
515
|
box-sizing: border-box;
|
|
474
516
|
overflow: hidden;
|
|
475
517
|
display: flex;
|
|
476
|
-
font-size: var(--font-size);
|
|
477
518
|
font-family: var(--font-family);
|
|
519
|
+
font-size: var(--font-size);
|
|
520
|
+
font-weight: var(--font-weight);
|
|
478
521
|
color: var(--color-border);
|
|
479
522
|
background-color: var(--color-border-background);
|
|
480
523
|
|
|
@@ -483,9 +526,9 @@
|
|
|
483
526
|
overflow: hidden;
|
|
484
527
|
background-color: var(--color-border-tab-content);
|
|
485
528
|
}
|
|
486
|
-
|
|
529
|
+
|
|
487
530
|
&_leading {
|
|
488
|
-
display:flex;
|
|
531
|
+
display: flex;
|
|
489
532
|
}
|
|
490
533
|
|
|
491
534
|
&_top {
|
|
@@ -525,6 +568,7 @@
|
|
|
525
568
|
&_tab_container {
|
|
526
569
|
white-space: nowrap;
|
|
527
570
|
display: flex;
|
|
571
|
+
align-items: center;
|
|
528
572
|
padding-left: 2px;
|
|
529
573
|
padding-right: 2px;
|
|
530
574
|
box-sizing: border-box;
|
|
@@ -556,6 +600,7 @@
|
|
|
556
600
|
margin: 2px 0px;
|
|
557
601
|
box-sizing: border-box;
|
|
558
602
|
white-space: nowrap;
|
|
603
|
+
font-weight: var(--font-weight);
|
|
559
604
|
|
|
560
605
|
&--selected {
|
|
561
606
|
background-color: var(--color-border-tab-selected-background);
|
|
@@ -587,8 +632,7 @@
|
|
|
587
632
|
border-radius: 4px;
|
|
588
633
|
visibility: hidden;
|
|
589
634
|
|
|
590
|
-
&:hover {
|
|
591
|
-
}
|
|
635
|
+
&:hover {}
|
|
592
636
|
}
|
|
593
637
|
|
|
594
638
|
@media (pointer: coarse) {
|
|
@@ -662,6 +706,7 @@
|
|
|
662
706
|
&__popup_menu {
|
|
663
707
|
font-size: var(--font-size);
|
|
664
708
|
font-family: var(--font-family);
|
|
709
|
+
font-weight: var(--font-weight);
|
|
665
710
|
|
|
666
711
|
&_item {
|
|
667
712
|
padding: 2px 0.5em;
|
|
@@ -689,7 +734,7 @@
|
|
|
689
734
|
background: var(--color-popup-unselected-background);
|
|
690
735
|
border-radius: 3px;
|
|
691
736
|
position: absolute;
|
|
692
|
-
z-index:
|
|
737
|
+
z-index: 3000;
|
|
693
738
|
max-height: 50%;
|
|
694
739
|
min-width: 100px;
|
|
695
740
|
overflow: auto;
|
|
@@ -697,6 +742,41 @@
|
|
|
697
742
|
}
|
|
698
743
|
}
|
|
699
744
|
|
|
745
|
+
&__float_window {
|
|
746
|
+
box-sizing: border-box;
|
|
747
|
+
background-color: var(--color-tabset-background);
|
|
748
|
+
border-radius: 5px;
|
|
749
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
|
|
750
|
+
display: flex;
|
|
751
|
+
flex-direction: column;
|
|
752
|
+
overflow: hidden;
|
|
753
|
+
z-index: 2000;
|
|
754
|
+
|
|
755
|
+
&_header {
|
|
756
|
+
display: flex;
|
|
757
|
+
align-items: center;
|
|
758
|
+
padding: 2px 8px;
|
|
759
|
+
background-color: var(--color-float-window-header-background);
|
|
760
|
+
border-bottom: 1px solid var(--color-tabset-divider-line);
|
|
761
|
+
cursor: move;
|
|
762
|
+
user-select: none;
|
|
763
|
+
font-family: var(--font-family);
|
|
764
|
+
font-size: .8em;
|
|
765
|
+
min-height: 15px;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
&_content {
|
|
769
|
+
position: relative;
|
|
770
|
+
overflow: auto;
|
|
771
|
+
flex-grow: 1;
|
|
772
|
+
display: flex;
|
|
773
|
+
flex-direction: column;
|
|
774
|
+
min-height: 0;
|
|
775
|
+
min-width: 0;
|
|
776
|
+
margin: 5px;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
700
780
|
&__floating_window {
|
|
701
781
|
_body {
|
|
702
782
|
height: 100%;
|
|
@@ -724,11 +804,11 @@
|
|
|
724
804
|
|
|
725
805
|
&__border_sizer {
|
|
726
806
|
position: absolute;
|
|
727
|
-
top: -30000px; // offscreen
|
|
728
807
|
padding-top: 6px;
|
|
729
808
|
padding-bottom: 5px;
|
|
730
809
|
font-size: var(--font-size);
|
|
731
810
|
font-family: var(--font-family);
|
|
811
|
+
font-weight: var(--font-weight);
|
|
732
812
|
}
|
|
733
813
|
|
|
734
814
|
&__mini_scrollbar {
|
|
@@ -762,6 +842,6 @@
|
|
|
762
842
|
}
|
|
763
843
|
}
|
|
764
844
|
|
|
765
|
-
/* ======================== End of Base Classes =========================== */
|
|
845
|
+
/* ======================== End of Base Classes =========================== */
|
|
766
846
|
|
|
767
847
|
}
|