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.
Files changed (51) hide show
  1. package/.storybook/main.js +22 -0
  2. package/.storybook/manager.js +6 -0
  3. package/.storybook/preview.js +13 -0
  4. package/LICENSE +201 -0
  5. package/README.md +80 -0
  6. package/babel.config.js +6 -0
  7. package/dist/cjs/index.js +15 -0
  8. package/dist/cjs/index.js.map +1 -0
  9. package/dist/esm/LayoutWorker.js +494 -0
  10. package/dist/esm/index.js +15 -0
  11. package/dist/esm/index.js.map +1 -0
  12. package/jsconfig.json +13 -0
  13. package/package.json +68 -0
  14. package/rollup.config.mjs +49 -0
  15. package/src/components/LayoutManager/Components/Container/Container.jsx +136 -0
  16. package/src/components/LayoutManager/Components/Container/Container.scss +23 -0
  17. package/src/components/LayoutManager/Components/HandleBar/HandleBar.jsx +183 -0
  18. package/src/components/LayoutManager/Components/HandleBar/HandleBar.scss +74 -0
  19. package/src/components/LayoutManager/Components/LazyLoader/LazyLoader.js +33 -0
  20. package/src/components/LayoutManager/Components/LazyLoader/LazyLoader.scss +7 -0
  21. package/src/components/LayoutManager/Components/RootContainer/RootContainer.jsx +106 -0
  22. package/src/components/LayoutManager/Components/RootContainer/RootContainer.scss +13 -0
  23. package/src/components/LayoutManager/Controller/LAYOUT_WORKER_PROTOCOL.js +11 -0
  24. package/src/components/LayoutManager/Controller/LayoutController.js +201 -0
  25. package/src/components/LayoutManager/Controller/TRANSFORMATION_TYPES.js +6 -0
  26. package/src/components/LayoutManager/Controller/Worker/HandleRulesEnforcer.js +179 -0
  27. package/src/components/LayoutManager/Controller/Worker/LayoutEditor.js +183 -0
  28. package/src/components/LayoutManager/Controller/Worker/LayoutWorker.js +41 -0
  29. package/src/components/LayoutManager/Controller/Worker/ParentRuleEnforcer.js +79 -0
  30. package/src/components/LayoutManager/Controller/Worker/Size.js +29 -0
  31. package/src/components/LayoutManager/LayoutManager.jsx +31 -0
  32. package/src/components/LayoutManager/LayoutManager.scss +0 -0
  33. package/src/components/LayoutManager/Providers/ComponentRegistryContext.js +7 -0
  34. package/src/components/LayoutManager/Providers/LayoutProvider.js +48 -0
  35. package/src/components/LayoutManager/docs/ui_layout_manager_system_diagram.JPG +0 -0
  36. package/src/components/LayoutManager/index.js +1 -0
  37. package/src/index.js +1 -0
  38. package/src/stories/LayoutManager.stories.js +64 -0
  39. package/src/stories/LayoutManager.stories.scss +7 -0
  40. package/src/stories/layouts/vsCode/default.json +195 -0
  41. package/src/stories/layouts/vsCode/sample1.json +151 -0
  42. package/src/stories/sample_components/editor/EditorVSCode.jsx +11 -0
  43. package/src/stories/sample_components/editor/filetree.json +1 -0
  44. package/src/stories/sample_components/flow/Flow.jsx +10 -0
  45. package/src/stories/sample_components/flow/SampleTree.json +8 -0
  46. package/src/stories/sample_components/map/MapSample.jsx +43 -0
  47. package/src/stories/sample_components/map/MapSample.scss +3 -0
  48. package/src/stories/sample_components/stack/Stack.jsx +21 -0
  49. package/tests/LayoutEditor/LayoutEditor.test.js +14 -0
  50. package/tests/LayoutEditor/layouts/default.json +195 -0
  51. 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
+ }
@@ -0,0 +1,8 @@
1
+ // vitest.config.js
2
+ import {defineConfig} from "vitest/config";
3
+
4
+ export default defineConfig({
5
+ test: {
6
+ environment: "node",
7
+ },
8
+ });