polarvo-layout 1.0.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/README.md +70 -0
- package/package.json +41 -0
- package/src/components/FastMenu/DesignFastMenu.vue +83 -0
- package/src/components/FastMenu/DisplayFastMenu.vue +65 -0
- package/src/components/FastMenu/HistoryFastMenu.vue +12 -0
- package/src/components/FastMenu/LayoutFastMenu.vue +98 -0
- package/src/components/IconBar/IconBar.vue +220 -0
- package/src/components/Layout/BaseLayout.vue +119 -0
- package/src/components/Layout/CanvasContainer.vue +45 -0
- package/src/components/Layout/FreeLayout.vue +246 -0
- package/src/components/Layout/GridLayout.vue +146 -0
- package/src/components/Layout/PolarLayout.vue +5 -0
- package/src/components/MiniMenu/LayoutMiniMenu.vue +62 -0
- package/src/components/SideBar/ElementSideBar.vue +76 -0
- package/src/components/SideBar/LayoutSettingSideBar.vue +90 -0
- package/src/components/SideBar/LayoutSideBar.vue +89 -0
- package/src/configs/index.js +23 -0
- package/src/configs/resources/displayResource.js +27 -0
- package/src/configs/resources/dropResource.js +23 -0
- package/src/configs/resources/elementResource.js +54 -0
- package/src/configs/resources/index.js +10 -0
- package/src/configs/resources/layoutResource.js +82 -0
- package/src/core/engines/DisplayEngine.js +171 -0
- package/src/core/engines/FreeDropEngine.js +701 -0
- package/src/core/engines/GridDropEngine.js +461 -0
- package/src/core/engines/HistoryEngine.js +69 -0
- package/src/core/engines/LayoutEngine.js +240 -0
- package/src/core/managers/ApiManager.js +21 -0
- package/src/core/managers/EngineManager.js +648 -0
- package/src/core/managers/EventBus.js +277 -0
- package/src/icons/action/LockIcon.vue +52 -0
- package/src/icons/action/RedoIcon.vue +16 -0
- package/src/icons/action/UndoIcon.vue +16 -0
- package/src/icons/action/UnlockIcon.vue +52 -0
- package/src/icons/display/DesktopIcon.vue +18 -0
- package/src/icons/display/MobileIcon.vue +16 -0
- package/src/icons/display/TabletIcon.vue +16 -0
- package/src/icons/history/RedoIcon.vue +16 -0
- package/src/icons/history/UndoIcon.vue +16 -0
- package/src/icons/layout/LeftRightSplitIcon.vue +6 -0
- package/src/icons/layout/MainBottomSplitIcon.vue +7 -0
- package/src/icons/layout/MainTopSplitIcon.vue +7 -0
- package/src/icons/layout/NoSplitIcon.vue +5 -0
- package/src/icons/layout/ThreeColumnSplitIcon.vue +7 -0
- package/src/icons/layout/ThreeRowSplitIcon.vue +7 -0
- package/src/icons/layout/TopBottomSplitIcon.vue +6 -0
- package/src/icons/menu/AddIcon.vue +23 -0
- package/src/icons/menu/LayoutIcon.vue +17 -0
- package/src/icons/menu/ThemeIcon.vue +21 -0
- package/src/index.js +32 -0
- package/src/library/DisplayLibrary.js +122 -0
- package/src/library/FreeDropLibrary.js +152 -0
- package/src/library/GridDropLibrary.js +151 -0
- package/src/library/HistoryLibrary.js +61 -0
- package/src/library/LayoutLibrary.js +199 -0
- package/src/library/index.js +50 -0
- package/src/styles.scss +5 -0
- package/src/utils/directives/click-outside.js +14 -0
- package/src/utils/directives/index.js +1 -0
- package/src/utils/index.js +1 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// 통합 라이브러리 엔트리 포인트
|
|
2
|
+
import EngineManager from '../core/managers/EngineManager.js';
|
|
3
|
+
import useDisplay from './DisplayLibrary.js';
|
|
4
|
+
import useLayout from './LayoutLibrary.js';
|
|
5
|
+
import useFreeDrop from './FreeDropLibrary.js';
|
|
6
|
+
import useGridDrop from './GridDropLibrary.js';
|
|
7
|
+
import useHistory from './HistoryLibrary.js';
|
|
8
|
+
|
|
9
|
+
async function createPolavoLayout(config = {}) {
|
|
10
|
+
let manager = new EngineManager(config);
|
|
11
|
+
await manager.initialize();
|
|
12
|
+
|
|
13
|
+
let api = manager.getAPI();
|
|
14
|
+
|
|
15
|
+
// 컴포넌트 접근을 위한 통합 객체
|
|
16
|
+
const componentRegistry = {
|
|
17
|
+
sections: new Map(),
|
|
18
|
+
elements: new Map(),
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
display: useDisplay(api),
|
|
23
|
+
layout: useLayout(api),
|
|
24
|
+
freeDrop: useFreeDrop(api),
|
|
25
|
+
gridDrop: useGridDrop(api),
|
|
26
|
+
history: useHistory(api),
|
|
27
|
+
userApi: api.userApi,
|
|
28
|
+
|
|
29
|
+
components: {
|
|
30
|
+
register: (type, key, instance) => componentRegistry[type].set(key, instance),
|
|
31
|
+
unregister: (type, key) => componentRegistry[type].delete(key),
|
|
32
|
+
getElement: (sectionKey, elementId) => componentRegistry.elements.get(`${sectionKey}-${elementId}`),
|
|
33
|
+
getSection: (sectionKey) => componentRegistry.sections.get(sectionKey),
|
|
34
|
+
getAllElements: () => Object.fromEntries(componentRegistry.elements),
|
|
35
|
+
getAllSections: () => Object.fromEntries(componentRegistry.sections),
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
destroy: () => {
|
|
39
|
+
componentRegistry.sections.clear();
|
|
40
|
+
componentRegistry.elements.clear();
|
|
41
|
+
if (manager) {
|
|
42
|
+
manager.destroy();
|
|
43
|
+
manager = null;
|
|
44
|
+
api = null;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default createPolavoLayout;
|
package/src/styles.scss
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
beforeMount(el, binding) {
|
|
3
|
+
el.__clickOutside__ = (event) => {
|
|
4
|
+
if (!(el === event.target || el.contains(event.target))) {
|
|
5
|
+
binding.value(event)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
document.body.addEventListener('click', el.__clickOutside__)
|
|
9
|
+
},
|
|
10
|
+
unmounted(el) {
|
|
11
|
+
document.body.removeEventListener('click', el.__clickOutside__)
|
|
12
|
+
delete el.__clickOutside__
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as clickOutside } from './click-outside';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { clickOutside } from './directives/index.js';
|