ui-layout-manager-dev 0.0.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/.storybook/main.js +22 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/preview.js +13 -0
- package/LICENSE +201 -0
- package/README.md +80 -0
- package/babel.config.js +6 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/LayoutWorker.js +494 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -0
- package/jsconfig.json +13 -0
- package/package.json +68 -0
- package/rollup.config.mjs +49 -0
- package/src/components/LayoutManager/Components/Container/Container.jsx +136 -0
- package/src/components/LayoutManager/Components/Container/Container.scss +23 -0
- package/src/components/LayoutManager/Components/HandleBar/HandleBar.jsx +183 -0
- package/src/components/LayoutManager/Components/HandleBar/HandleBar.scss +74 -0
- package/src/components/LayoutManager/Components/LazyLoader/LazyLoader.js +33 -0
- package/src/components/LayoutManager/Components/LazyLoader/LazyLoader.scss +7 -0
- package/src/components/LayoutManager/Components/RootContainer/RootContainer.jsx +106 -0
- package/src/components/LayoutManager/Components/RootContainer/RootContainer.scss +13 -0
- package/src/components/LayoutManager/Controller/LAYOUT_WORKER_PROTOCOL.js +11 -0
- package/src/components/LayoutManager/Controller/LayoutController.js +201 -0
- package/src/components/LayoutManager/Controller/TRANSFORMATION_TYPES.js +6 -0
- package/src/components/LayoutManager/Controller/Worker/HandleRulesEnforcer.js +179 -0
- package/src/components/LayoutManager/Controller/Worker/LayoutEditor.js +183 -0
- package/src/components/LayoutManager/Controller/Worker/LayoutWorker.js +41 -0
- package/src/components/LayoutManager/Controller/Worker/ParentRuleEnforcer.js +79 -0
- package/src/components/LayoutManager/Controller/Worker/Size.js +29 -0
- package/src/components/LayoutManager/LayoutManager.jsx +31 -0
- package/src/components/LayoutManager/LayoutManager.scss +0 -0
- package/src/components/LayoutManager/Providers/ComponentRegistryContext.js +7 -0
- package/src/components/LayoutManager/Providers/LayoutProvider.js +48 -0
- package/src/components/LayoutManager/docs/ui_layout_manager_system_diagram.JPG +0 -0
- package/src/components/LayoutManager/index.js +1 -0
- package/src/index.js +1 -0
- package/src/stories/LayoutManager.stories.js +64 -0
- package/src/stories/LayoutManager.stories.scss +7 -0
- package/src/stories/layouts/vsCode/default.json +195 -0
- package/src/stories/layouts/vsCode/sample1.json +151 -0
- package/src/stories/sample_components/editor/EditorVSCode.jsx +11 -0
- package/src/stories/sample_components/editor/filetree.json +1 -0
- package/src/stories/sample_components/flow/Flow.jsx +10 -0
- package/src/stories/sample_components/flow/SampleTree.json +8 -0
- package/src/stories/sample_components/map/MapSample.jsx +43 -0
- package/src/stories/sample_components/map/MapSample.scss +3 -0
- package/src/stories/sample_components/stack/Stack.jsx +21 -0
- package/tests/LayoutEditor/LayoutEditor.test.js +14 -0
- package/tests/LayoutEditor/layouts/default.json +195 -0
- package/vitest.config.js +8 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Default Editor",
|
|
3
|
+
"layoutRoot": "root",
|
|
4
|
+
"containers": {
|
|
5
|
+
"root": {
|
|
6
|
+
"id": "root",
|
|
7
|
+
"type": "split",
|
|
8
|
+
"orientation": "vertical",
|
|
9
|
+
"children": [
|
|
10
|
+
{
|
|
11
|
+
"containerId": "header",
|
|
12
|
+
"type": "container",
|
|
13
|
+
"size": { "initial": { "value": 25, "unit": "px", "type": "fixed" }}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"containerId": "mainBody",
|
|
17
|
+
"type": "container",
|
|
18
|
+
"size": { "initial": { "type": "fill" }}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"containerId": "footer",
|
|
22
|
+
"type": "container",
|
|
23
|
+
"size": { "initial": { "value": 25, "unit": "px", "type": "fixed" }},
|
|
24
|
+
"collapse": { "value": 400, "condition": "lessThan", "relative": "parent" }
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"header": {
|
|
29
|
+
"id": "header",
|
|
30
|
+
"background": "#3c3c3c"
|
|
31
|
+
},
|
|
32
|
+
"mainBody": {
|
|
33
|
+
"id": "mainBody",
|
|
34
|
+
"background": "#3c3c3c",
|
|
35
|
+
"type": "split",
|
|
36
|
+
"orientation": "horizontal",
|
|
37
|
+
"children": [
|
|
38
|
+
{
|
|
39
|
+
"containerId": "sidebar",
|
|
40
|
+
"type": "container",
|
|
41
|
+
"size": { "initial": { "value": 50, "unit": "px", "type": "fixed" }},
|
|
42
|
+
"collapse": { "value": 400, "condition": "lessThan", "relative": "parent" },
|
|
43
|
+
"showHandlebar": true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"containerId": "contentContainer",
|
|
47
|
+
"type": "container",
|
|
48
|
+
"size": { "initial": { "type": "fill" }}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"contentContainer": {
|
|
53
|
+
"id": "contentContainer",
|
|
54
|
+
"background": "#3c3c3c",
|
|
55
|
+
"type": "split",
|
|
56
|
+
"orientation": "vertical",
|
|
57
|
+
"children": [
|
|
58
|
+
{
|
|
59
|
+
"containerId": "content",
|
|
60
|
+
"type": "container",
|
|
61
|
+
"size": { "initial": { "type": "fill" }}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "handleBar",
|
|
65
|
+
"sibling1": "content",
|
|
66
|
+
"sibling2": "timeline"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"containerId": "timeline",
|
|
70
|
+
"type": "container",
|
|
71
|
+
"size": {
|
|
72
|
+
"initial": { "value": 200, "unit": "px", "type": "fixed" },
|
|
73
|
+
"min": { "value": 100, "unit": "px"}
|
|
74
|
+
},
|
|
75
|
+
"collapse": { "value": 500, "condition": "lessThan", "relative": "parent" }
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"timeline": {
|
|
80
|
+
"id": "timeline",
|
|
81
|
+
"component": "MapSample",
|
|
82
|
+
"background": "#252526"
|
|
83
|
+
},
|
|
84
|
+
"content": {
|
|
85
|
+
"id": "content",
|
|
86
|
+
"background": "#007acc",
|
|
87
|
+
"type": "split",
|
|
88
|
+
"orientation": "horizontal",
|
|
89
|
+
"children": [
|
|
90
|
+
{
|
|
91
|
+
"containerId": "menuContainer",
|
|
92
|
+
"type": "container",
|
|
93
|
+
"size": {
|
|
94
|
+
"initial": { "value": 400, "unit": "px", "type": "fixed" },
|
|
95
|
+
"min": { "value": 200, "unit": "px"},
|
|
96
|
+
"max": { "value": 500, "unit": "px"}
|
|
97
|
+
},
|
|
98
|
+
"collapse": { "value": 700, "condition": "lessThan", "relative": "parent" }
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "handleBar",
|
|
102
|
+
"sibling1": "menuContainer",
|
|
103
|
+
"sibling2": "editorContainer"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"containerId": "editorContainer",
|
|
107
|
+
"type": "container",
|
|
108
|
+
"size": { "initial": { "type": "fill" }}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "handleBar",
|
|
112
|
+
"sibling1": "editorContainer",
|
|
113
|
+
"sibling2": "editorContainer2"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"containerId": "editorContainer2",
|
|
117
|
+
"type": "container",
|
|
118
|
+
"size": { "initial": { "type": "fill" }}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "handleBar",
|
|
122
|
+
"sibling1": "editorContainer2",
|
|
123
|
+
"sibling2": "rightMenuContainer"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"containerId": "rightMenuContainer",
|
|
127
|
+
"type": "container",
|
|
128
|
+
"size": {
|
|
129
|
+
"initial": { "value": 200, "unit": "px", "type": "fixed" },
|
|
130
|
+
"min": { "value": 100, "unit": "px"},
|
|
131
|
+
"max": { "value": 300, "unit": "px"}
|
|
132
|
+
},
|
|
133
|
+
"collapse": { "value": 900, "condition": "lessThan", "relative": "parent" }
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"footer": {
|
|
138
|
+
"id": "footer",
|
|
139
|
+
"background": "#007acc"
|
|
140
|
+
},
|
|
141
|
+
"sidebar": {
|
|
142
|
+
"id": "sidebar",
|
|
143
|
+
"background": "#333"
|
|
144
|
+
},
|
|
145
|
+
"menuContainer": {
|
|
146
|
+
"id": "menuContainer",
|
|
147
|
+
"background": "#252526",
|
|
148
|
+
"type": "split",
|
|
149
|
+
"orientation": "vertical",
|
|
150
|
+
"children": [
|
|
151
|
+
{
|
|
152
|
+
"containerId": "fileTabsContainer",
|
|
153
|
+
"type": "container",
|
|
154
|
+
"size": {
|
|
155
|
+
"initial": { "value": 200, "unit": "px", "type": "fixed" }
|
|
156
|
+
},
|
|
157
|
+
"collapse": { "value": 500, "condition": "lessThan", "relative": "parent" }
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"type": "handleBar",
|
|
161
|
+
"sibling1": "fileTabsContainer",
|
|
162
|
+
"sibling2": "stackContainer"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"containerId": "stackContainer",
|
|
166
|
+
"type": "container",
|
|
167
|
+
"size": { "initial": { "type": "fill" }}
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"fileTabsContainer": {
|
|
172
|
+
"id": "fileTabsContainer",
|
|
173
|
+
"background": "#1e1e1e"
|
|
174
|
+
},
|
|
175
|
+
"stackContainer": {
|
|
176
|
+
"id": "stackContainer",
|
|
177
|
+
"component": "Stack",
|
|
178
|
+
"background": "#1e1e1e"
|
|
179
|
+
},
|
|
180
|
+
"editorContainer": {
|
|
181
|
+
"id": "editorContainer",
|
|
182
|
+
"component": "EditorVSCode",
|
|
183
|
+
"background": "#1e1e1e"
|
|
184
|
+
},
|
|
185
|
+
"editorContainer2": {
|
|
186
|
+
"id": "editorContainer2",
|
|
187
|
+
"component": "Flow",
|
|
188
|
+
"background": "#1e1e1e"
|
|
189
|
+
},
|
|
190
|
+
"rightMenuContainer": {
|
|
191
|
+
"id": "rightMenuContainer",
|
|
192
|
+
"background": "#252526"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|