regular-layout 0.2.2 → 0.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.
Files changed (47) hide show
  1. package/README.md +110 -22
  2. package/dist/{layout → core}/types.d.ts +14 -4
  3. package/dist/extensions.d.ts +6 -1
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.js +7 -7
  6. package/dist/index.js.map +4 -4
  7. package/dist/layout/calculate_edge.d.ts +4 -4
  8. package/dist/layout/calculate_intersect.d.ts +1 -1
  9. package/dist/layout/calculate_path.d.ts +12 -0
  10. package/dist/layout/calculate_presize_paths.d.ts +10 -0
  11. package/dist/layout/flatten.d.ts +1 -1
  12. package/dist/layout/generate_grid.d.ts +5 -5
  13. package/dist/layout/generate_overlay.d.ts +18 -2
  14. package/dist/layout/insert_child.d.ts +2 -2
  15. package/dist/layout/redistribute_panel_sizes.d.ts +2 -2
  16. package/dist/layout/remove_child.d.ts +1 -1
  17. package/dist/model/overlay_controller.d.ts +34 -0
  18. package/dist/model/presize_queue.d.ts +17 -0
  19. package/dist/regular-layout-tab.d.ts +1 -1
  20. package/dist/regular-layout.d.ts +44 -9
  21. package/package.json +5 -4
  22. package/src/{layout → core}/constants.ts +2 -2
  23. package/src/{layout → core}/types.ts +17 -5
  24. package/src/extensions.ts +13 -1
  25. package/src/index.ts +3 -1
  26. package/src/layout/calculate_edge.ts +17 -8
  27. package/src/layout/calculate_intersect.ts +13 -4
  28. package/src/layout/calculate_path.ts +53 -0
  29. package/src/layout/calculate_presize_paths.ts +93 -0
  30. package/src/layout/flatten.ts +4 -4
  31. package/src/layout/generate_grid.ts +8 -8
  32. package/src/layout/generate_overlay.ts +48 -16
  33. package/src/layout/insert_child.ts +16 -16
  34. package/src/layout/redistribute_panel_sizes.ts +5 -5
  35. package/src/layout/remove_child.ts +6 -6
  36. package/src/model/overlay_controller.ts +162 -0
  37. package/src/model/presize_queue.ts +79 -0
  38. package/src/regular-layout-frame.ts +3 -3
  39. package/src/regular-layout-tab.ts +1 -1
  40. package/src/regular-layout.ts +180 -133
  41. package/themes/borland.css +103 -0
  42. package/themes/chicago.css +55 -49
  43. package/themes/fluxbox.css +64 -60
  44. package/themes/gibson.css +174 -164
  45. package/themes/hotdog.css +53 -47
  46. package/themes/lorax.css +82 -75
  47. /package/dist/{layout → core}/constants.d.ts +0 -0
package/themes/lorax.css CHANGED
@@ -11,120 +11,127 @@
11
11
  */
12
12
 
13
13
  regular-layout.lorax {
14
- font-family: "ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
14
+ font-family:
15
+ "ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas",
16
+ "Liberation Mono", monospace;
15
17
  }
16
18
 
17
19
  /* Frame */
18
20
  regular-layout.lorax regular-layout-frame {
19
- margin: 3px;
20
- margin-top: 27px;
21
- border-radius: 0 6px 6px 6px;
22
- border: 1px solid #666;
23
- box-shadow: 0px 6px 6px -4px rgba(150, 150, 180);
21
+ margin: 3px;
22
+ margin-top: 27px;
23
+ border-radius: 0 6px 6px 6px;
24
+ border: 1px solid #666;
25
+ box-shadow: 0px 6px 6px -4px rgba(150, 150, 180);
26
+ }
27
+
28
+ regular-layout.lorax regular-layout-frame::part(container) {
29
+ padding: 6px;
24
30
  }
25
31
 
26
32
  regular-layout.lorax regular-layout-frame::part(titlebar) {
27
- display: flex;
28
- align-items: stretch;
29
- margin-left: -1px;
30
- margin-right: -1px;
31
- margin-bottom: 0px;
32
- margin-top: -24px;
33
- padding-right: 6px;
33
+ display: flex;
34
+ align-items: stretch;
35
+ margin-left: -1px;
36
+ margin-right: -1px;
37
+ margin-bottom: 0px;
38
+ margin-top: -24px;
39
+ padding-right: 6px;
34
40
  }
35
41
 
36
42
  regular-layout.lorax regular-layout-frame::part(tab) {
37
- display: flex;
38
- flex: 1 1 150px;
39
- align-items: center;
40
- text-align: center;
41
- font-size: 10px;
42
- padding: 0 6px;
43
- cursor: pointer;
44
- max-width: 150px;
45
- text-overflow: ellipsis;
46
- border: 1px solid #666;
47
- border-radius: 6px 6px 0 0;
48
- opacity: 0.5;
43
+ display: flex;
44
+ flex: 1 1 150px;
45
+ align-items: center;
46
+ text-align: center;
47
+ font-size: 10px;
48
+ padding: 0 6px;
49
+ cursor: pointer;
50
+ max-width: 150px;
51
+ text-overflow: ellipsis;
52
+ border: 1px solid #666;
53
+ border-radius: 6px 6px 0 0;
54
+ opacity: 0.5;
49
55
  }
50
56
 
51
57
  regular-layout.lorax regular-layout-frame::part(active-tab) {
52
- opacity: 1;
58
+ opacity: 1;
53
59
  }
54
60
 
55
61
  regular-layout.lorax regular-layout-frame::part(close) {
56
- border-radius: 7px;
57
- border: 1px solid #666;
58
- background: transparent;
59
- height: 14px;
60
- align-self: center
62
+ border-radius: 7px;
63
+ border: 1px solid #666;
64
+ background: transparent;
65
+ height: 14px;
66
+ align-self: center;
61
67
  }
62
68
 
63
-
64
69
  regular-layout.lorax regular-layout-frame::part(close):hover {
65
- transition: background-color 0.2s;
66
- background-color: rgba(255,0,0,0.2);
70
+ transition: background-color 0.2s;
71
+ background-color: rgba(255, 0, 0, 0.2);
67
72
  }
68
73
 
69
74
  /* Frame in Overlay Mode */
70
75
  regular-layout.lorax regular-layout-frame.overlay {
71
- background-color: rgba(0, 0, 0, 0.2);
72
- border: 1px dashed rgb(0, 0, 0);
73
- border-radius: 6px;
74
- margin: 0;
75
- box-shadow: none;
76
- transition:
77
- top 0.1s ease-in-out,
78
- height 0.1s ease-in-out,
79
- width 0.1s ease-in-out,
80
- left 0.1s ease-in-out;
81
- }
82
-
83
- regular-layout.lorax regular-layout-frame::part(container), regular-layout.lorax regular-layout-frame::part(titlebar) {
84
- display: none;
76
+ background-color: rgba(0, 0, 0, 0.2);
77
+ border: 1px dashed rgb(0, 0, 0);
78
+ border-radius: 6px;
79
+ margin: 3px;
80
+ box-shadow: none;
81
+ transition:
82
+ top 0.1s ease-in-out,
83
+ height 0.1s ease-in-out,
84
+ width 0.1s ease-in-out,
85
+ left 0.1s ease-in-out;
86
+ }
87
+
88
+ regular-layout.lorax regular-layout-frame::part(container),
89
+ regular-layout.lorax regular-layout-frame::part(titlebar) {
90
+ display: none;
85
91
  }
86
92
 
87
- regular-layout.lorax regular-layout-frame:not(.overlay)::part(container), regular-layout.lorax regular-layout-frame:not(.overlay)::part(titlebar) {
88
- display: flex;
93
+ regular-layout.lorax regular-layout-frame:not(.overlay)::part(container),
94
+ regular-layout.lorax regular-layout-frame:not(.overlay)::part(titlebar) {
95
+ display: flex;
89
96
  }
90
97
 
91
98
  /* Colors */
92
- regular-layout.lorax :nth-child(8n+1),
93
- regular-layout.lorax :nth-child(8n+1)::part(tab) {
94
- background-color: #ffadadff;
99
+ regular-layout.lorax :nth-child(8n + 1),
100
+ regular-layout.lorax :nth-child(8n + 1)::part(tab) {
101
+ background-color: #ffadadff;
95
102
  }
96
103
 
97
- regular-layout.lorax :nth-child(8n+2),
98
- regular-layout.lorax :nth-child(8n+2)::part(tab) {
99
- background-color: #ffd6a5ff;
104
+ regular-layout.lorax :nth-child(8n + 2),
105
+ regular-layout.lorax :nth-child(8n + 2)::part(tab) {
106
+ background-color: #ffd6a5ff;
100
107
  }
101
108
 
102
- regular-layout.lorax :nth-child(8n+3),
103
- regular-layout.lorax :nth-child(8n+3)::part(tab) {
104
- background-color: #fdffb6ff;
109
+ regular-layout.lorax :nth-child(8n + 3),
110
+ regular-layout.lorax :nth-child(8n + 3)::part(tab) {
111
+ background-color: #fdffb6ff;
105
112
  }
106
113
 
107
- regular-layout.lorax :nth-child(8n+4),
108
- regular-layout.lorax :nth-child(8n+4)::part(tab) {
109
- background-color: #caffbfff;
114
+ regular-layout.lorax :nth-child(8n + 4),
115
+ regular-layout.lorax :nth-child(8n + 4)::part(tab) {
116
+ background-color: #caffbfff;
110
117
  }
111
118
 
112
- regular-layout.lorax :nth-child(8n+5),
113
- regular-layout.lorax :nth-child(8n+5)::part(tab) {
114
- background-color: #9bf6ffff;
119
+ regular-layout.lorax :nth-child(8n + 5),
120
+ regular-layout.lorax :nth-child(8n + 5)::part(tab) {
121
+ background-color: #9bf6ffff;
115
122
  }
116
123
 
117
- regular-layout.lorax :nth-child(8n+6),
118
- regular-layout.lorax :nth-child(8n+6)::part(tab) {
119
- background-color: #a0c4ffff;
124
+ regular-layout.lorax :nth-child(8n + 6),
125
+ regular-layout.lorax :nth-child(8n + 6)::part(tab) {
126
+ background-color: #a0c4ffff;
120
127
  }
121
128
 
122
- regular-layout.lorax :nth-child(8n+7),
123
- regular-layout.lorax :nth-child(8n+7)::part(tab) {
124
- background-color: #bdb2ffff;
129
+ regular-layout.lorax :nth-child(8n + 7),
130
+ regular-layout.lorax :nth-child(8n + 7)::part(tab) {
131
+ background-color: #bdb2ffff;
125
132
  }
126
133
 
127
- regular-layout.lorax :nth-child(8n+8),
128
- regular-layout.lorax :nth-child(8n+8)::part(tab) {
129
- background-color: #ffc6ffff;
130
- }
134
+ regular-layout.lorax :nth-child(8n + 8),
135
+ regular-layout.lorax :nth-child(8n + 8)::part(tab) {
136
+ background-color: #ffc6ffff;
137
+ }
File without changes