@g1cloud/page-builder-editor 1.0.0-alpha.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/LICENSE +6 -0
- package/README.md +23 -0
- package/css/bluesea.scss +8244 -0
- package/css/canvas-block.scss +20 -0
- package/css/canvas-page.scss +62 -0
- package/css/canvas-section.scss +51 -0
- package/css/canvas-widget.scss +41 -0
- package/css/canvas.scss +146 -0
- package/css/page-builder-editor.scss +185 -0
- package/css/page-builder-viewer.scss +1 -0
- package/css/property-editor-image.scss +16 -0
- package/css/property-editor-multiline-text.scss +0 -0
- package/css/property-editor-product.scss +17 -0
- package/css/property-editor-readonly-text.scss +0 -0
- package/css/property-editor-select.scss +10 -0
- package/css/property-editor-text.scss +10 -0
- package/css/property-group-editor-background.scss +40 -0
- package/css/property-group-editor-border.scss +25 -0
- package/css/property-group-editor-margin.scss +13 -0
- package/css/property-group-editor-padding.scss +13 -0
- package/css/property-group-editor-position.scss +13 -0
- package/css/property-group-editor-size.scss +13 -0
- package/css/property-localpart.scss +21 -0
- package/css/variable.scss +1 -0
- package/dist/PageBuilderEditor.vue.d.ts +21 -0
- package/dist/PbPartAddModal-DuLpnV4E.js +50 -0
- package/dist/PbPropertyEditorImage-BFIqG-bL.js +42 -0
- package/dist/PbPropertyEditorMultilineText-BMeNUGm8.js +42 -0
- package/dist/PbPropertyEditorProduct--cf9LI2Z.js +49 -0
- package/dist/PbPropertyEditorReadonlyText-Bk0WJxA0.js +31 -0
- package/dist/PbPropertyEditorSelect-BJovN1su.js +44 -0
- package/dist/PbPropertyEditorText-DNdXl-Tr.js +41 -0
- package/dist/PbWidgetAddModal-CQvFYzfU.js +55 -0
- package/dist/components/canvas/PbCanvas.vue.d.ts +2 -0
- package/dist/components/canvas/PbCanvasFrame.vue.d.ts +2 -0
- package/dist/components/depart/PbLoginDepart.vue.d.ts +17 -0
- package/dist/components/menu/PbMenu.vue.d.ts +2 -0
- package/dist/components/menu/PbToolbar.vue.d.ts +2 -0
- package/dist/components/menu/PbToolbarButton.vue.d.ts +17 -0
- package/dist/components/menu/PbToolbarButtonGroup.vue.d.ts +17 -0
- package/dist/components/modal/PbPartAddModal.vue.d.ts +24 -0
- package/dist/components/modal/PbWidgetAddModal.vue.d.ts +24 -0
- package/dist/components/navigator/PbNavigator.vue.d.ts +2 -0
- package/dist/components/part/PbAddWidgetButton.vue.d.ts +2 -0
- package/dist/components/part/PbBlock.vue.d.ts +17 -0
- package/dist/components/part/PbPage.vue.d.ts +21 -0
- package/dist/components/part/PbSection.vue.d.ts +17 -0
- package/dist/components/part/PbWidget.vue.d.ts +17 -0
- package/dist/components/sidebar/PbSidebar.vue.d.ts +2 -0
- package/dist/components/sidebar/PbSidebarProperties.vue.d.ts +2 -0
- package/dist/components/sidebar/PbSidebarPropertyEditor.vue.d.ts +20 -0
- package/dist/components/sidebar/PbSidebarPropertyGroupEditor.vue.d.ts +22 -0
- package/dist/components/sidebar/property/PbPropertyEditorImage.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorProduct.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorReadonlyText.vue.d.ts +19 -0
- package/dist/components/sidebar/property/PbPropertyEditorSelect.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorBackground.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorBorder.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorMargin.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorPadding.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorPosition.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorSize.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyLocalPart.vue.d.ts +23 -0
- package/dist/components/ui/PbColorPicker.vue.d.ts +24 -0
- package/dist/directives/vPartHandler.d.ts +26 -0
- package/dist/index-BtILenNo.js +13902 -0
- package/dist/index.d.ts +3 -0
- package/dist/model/command.d.ts +188 -0
- package/dist/model/context.d.ts +136 -0
- package/dist/model/default-part-property-editor.d.ts +3 -0
- package/dist/model/default-part-property-group.d.ts +12 -0
- package/dist/model/event.d.ts +71 -0
- package/dist/model/model.d.ts +66 -0
- package/dist/model/page-builder-editor.d.ts +51 -0
- package/dist/model/page-builder-util.d.ts +5 -0
- package/dist/model/part-definintion.d.ts +26 -0
- package/dist/model/part-manager.d.ts +29 -0
- package/dist/model/part-property.d.ts +22 -0
- package/dist/model/plugin.d.ts +15 -0
- package/dist/model/toolbar.d.ts +27 -0
- package/dist/page-builder-editor.js +27 -0
- package/dist/page-builder-editor.umd.cjs +14248 -0
- package/dist/style.css +173 -0
- package/dist/utils/mouse-tracker.d.ts +11 -0
- package/package.json +49 -0
package/dist/style.css
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
.pb-page {
|
|
2
|
+
margin: 0 auto;
|
|
3
|
+
margin-top: 20px;
|
|
4
|
+
background-position: 50% 50%;
|
|
5
|
+
background-repeat: no-repeat;
|
|
6
|
+
background-size: cover;
|
|
7
|
+
}
|
|
8
|
+
.pb-page .pb-section {
|
|
9
|
+
position: relative;
|
|
10
|
+
background-position: 50% 50%;
|
|
11
|
+
background-repeat: no-repeat;
|
|
12
|
+
background-size: cover;
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
}
|
|
15
|
+
.pb-page .pb-section .pb-block {
|
|
16
|
+
display: flex;
|
|
17
|
+
min-width: 1px;
|
|
18
|
+
position: relative;
|
|
19
|
+
background-position: 50% 50%;
|
|
20
|
+
background-repeat: no-repeat;
|
|
21
|
+
background-size: cover;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
.pb-page .pb-section .pb-block .pb-widget {
|
|
25
|
+
position: relative;
|
|
26
|
+
background-position: 50% 50%;
|
|
27
|
+
background-repeat: no-repeat;
|
|
28
|
+
background-size: cover;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
.pb-page .pb-section .pb-block .pb-widget .children {
|
|
32
|
+
position: absolute;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
36
|
+
.pb-page .pb-section .pb-block .pb-text-widget {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: fit-content;
|
|
39
|
+
}
|
|
40
|
+
.pb-page .pb-section .pb-block .pb-text-widget .text {
|
|
41
|
+
color: #333;
|
|
42
|
+
}
|
|
43
|
+
.pb-page .pb-section .pb-block .pb-text-widget.empty .text {
|
|
44
|
+
color: #999;
|
|
45
|
+
}
|
|
46
|
+
.pb-page .pb-section .pb-block .pb-image-widget {
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
.pb-page .pb-section .pb-block .pb-image-widget .image {
|
|
50
|
+
width: 100%;
|
|
51
|
+
}
|
|
52
|
+
.pb-page .pb-section .pb-block .pb-image-widget .empty {
|
|
53
|
+
height: 100px;
|
|
54
|
+
background-color: #eee;
|
|
55
|
+
text-align: center;
|
|
56
|
+
}
|
|
57
|
+
.pb-page .pb-section .pb-block .pb-image-widget .empty span {
|
|
58
|
+
font-size: 40px;
|
|
59
|
+
color: #999;
|
|
60
|
+
line-height: 100px;
|
|
61
|
+
vertical-align: middle;
|
|
62
|
+
}
|
|
63
|
+
.pb-page .pb-section .pb-block .pb-product-list-widget {
|
|
64
|
+
width: 100%;
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
justify-content: flex-start;
|
|
69
|
+
align-items: center;
|
|
70
|
+
}
|
|
71
|
+
.pb-page .pb-section .pb-block .pb-product-list-widget .product {
|
|
72
|
+
width: 95%;
|
|
73
|
+
margin: 0 auto;
|
|
74
|
+
padding-top: 8px;
|
|
75
|
+
padding-bottom: 8px;
|
|
76
|
+
}
|
|
77
|
+
.pb-page .pb-section .pb-block .pb-product-list-widget img {
|
|
78
|
+
width: 100%;
|
|
79
|
+
}
|
|
80
|
+
.pb-page .pb-section .pb-block .pb-product-list-widget .name {
|
|
81
|
+
margin-top: 8px;
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
}
|
|
84
|
+
.pb-page .pb-section .pb-block .pb-product-list-widget .price {
|
|
85
|
+
margin-top: 8px;
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
font-weight: bold;
|
|
88
|
+
}
|
|
89
|
+
.pb-page .pb-section .pb-block .pb-product-list-widget .empty {
|
|
90
|
+
height: 200px;
|
|
91
|
+
background-color: #eee;
|
|
92
|
+
text-align: center;
|
|
93
|
+
}
|
|
94
|
+
.pb-page .pb-section .pb-block .pb-product-list-widget .empty span {
|
|
95
|
+
font-size: 40px;
|
|
96
|
+
color: #999;
|
|
97
|
+
line-height: 200px;
|
|
98
|
+
vertical-align: middle;
|
|
99
|
+
}
|
|
100
|
+
.pb-page .pb-section .pb-block .pb-page .mobile .pb-product-list-widget .product-wrapper {
|
|
101
|
+
width: 50%;
|
|
102
|
+
}
|
|
103
|
+
.pb-page .pb-section .pb-block .pb-page .pc .pb-product-list-widget .product-wrapper {
|
|
104
|
+
width: 25%;
|
|
105
|
+
}
|
|
106
|
+
.pb-page .pb-section .pb-block .pb-login-widget {
|
|
107
|
+
height: 200px;
|
|
108
|
+
text-align: center;
|
|
109
|
+
}
|
|
110
|
+
.pb-page .pb-section .pb-block .pb-login-widget h3 {
|
|
111
|
+
font-size: 32px;
|
|
112
|
+
font-weight: bold;
|
|
113
|
+
color: #ccc;
|
|
114
|
+
line-height: 200px;
|
|
115
|
+
vertical-align: middle;
|
|
116
|
+
}
|
|
117
|
+
.pb-page .pb-section .pb-block .pb-editor {
|
|
118
|
+
outline: 1px dashed #ccc;
|
|
119
|
+
}
|
|
120
|
+
.pb-page .pb-section .pb-block:hover:not(:has(.pb-widget:hover)) {
|
|
121
|
+
background-color: #f0f0f0;
|
|
122
|
+
}
|
|
123
|
+
.pb-page .pb-section .pb-block.selected {
|
|
124
|
+
outline: 1px solid #8e44ad;
|
|
125
|
+
outline-offset: 1px;
|
|
126
|
+
z-index: 999;
|
|
127
|
+
}
|
|
128
|
+
.pb-page .pb-section .pb-editor {
|
|
129
|
+
outline: 1px dashed #ccc;
|
|
130
|
+
}
|
|
131
|
+
.pb-page .pb-section:hover:not(:has(.pb-block:hover)) {
|
|
132
|
+
background-color: #f0f0f0;
|
|
133
|
+
}
|
|
134
|
+
.pb-page .pb-section.selected {
|
|
135
|
+
outline: 1px solid #e67e22;
|
|
136
|
+
outline-offset: 1px;
|
|
137
|
+
z-index: 999;
|
|
138
|
+
}
|
|
139
|
+
.pb-page .pb-section.pb-section-static {
|
|
140
|
+
width: 100%;
|
|
141
|
+
display: flex;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
align-items: center;
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
}
|
|
146
|
+
.pb-page .pb-section.pb-section-static:after {
|
|
147
|
+
content: "";
|
|
148
|
+
position: absolute;
|
|
149
|
+
left: 0;
|
|
150
|
+
right: 0;
|
|
151
|
+
top: 0;
|
|
152
|
+
bottom: 0;
|
|
153
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
154
|
+
}
|
|
155
|
+
.pb-page .pb-section-static .pb-widget {
|
|
156
|
+
outline: none;
|
|
157
|
+
}
|
|
158
|
+
.pb-page .pb-page-content.selected {
|
|
159
|
+
outline: 2px solid #4998f8;
|
|
160
|
+
outline-offset: 5px;
|
|
161
|
+
}
|
|
162
|
+
.pb-page * {
|
|
163
|
+
box-sizing: border-box;
|
|
164
|
+
}
|
|
165
|
+
.pb-viewer {
|
|
166
|
+
width: 100%;
|
|
167
|
+
}
|
|
168
|
+
.pb-editor .pb-editor-body {
|
|
169
|
+
height: 100%;
|
|
170
|
+
}
|
|
171
|
+
.pb-editor .pb-editor-body .tab-bar {
|
|
172
|
+
padding: 0;
|
|
173
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
type MouseMoveCallback = (event: MouseEvent) => void;
|
|
4
|
+
export declare class MouseTracker {
|
|
5
|
+
iframe: Ref<HTMLIFrameElement | undefined>;
|
|
6
|
+
constructor(iframe: Ref<HTMLIFrameElement | undefined>);
|
|
7
|
+
capture(callback: MouseMoveCallback): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const provideMouseTracker: (iframe: Ref<HTMLIFrameElement | undefined>) => void;
|
|
10
|
+
export declare const useMouseTracker: () => MouseTracker;
|
|
11
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@g1cloud/page-builder-editor",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.0-alpha.1",
|
|
5
|
+
"engins": {
|
|
6
|
+
"node": ">= 20.0.0"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"css"
|
|
11
|
+
],
|
|
12
|
+
"type": "module",
|
|
13
|
+
"module": "dist/page-builder-editor.js",
|
|
14
|
+
"main": "dist/page-builder-editor.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"author": "zag@g1project.net",
|
|
17
|
+
"license": "LicenseRef-LICENSE",
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@g1cloud/bluesea": "5.0.0-alpha.38"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@ckpack/vue-color": "^1.5.0",
|
|
23
|
+
"dayjs": "^1.11.11",
|
|
24
|
+
"mitt": "^3.0.1",
|
|
25
|
+
"short-unique-id": "^5.0.3",
|
|
26
|
+
"vue": "^3.4.26",
|
|
27
|
+
"vue-router": "^4.3.2",
|
|
28
|
+
"vue3-click-away": "^1.2.4",
|
|
29
|
+
"yjs": "^13.6.14",
|
|
30
|
+
"@g1cloud/page-builder-viewer": "1.0.0-alpha.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "^20.12.7",
|
|
34
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
35
|
+
"jsdom": "^24.0.0",
|
|
36
|
+
"sass": "^1.75.0",
|
|
37
|
+
"typescript": "^5.4.5",
|
|
38
|
+
"vite": "^5.2.11",
|
|
39
|
+
"vite-plugin-dts": "^3.9.0",
|
|
40
|
+
"vitest": "^1.5.0",
|
|
41
|
+
"vitest-canvas-mock": "^0.3.3",
|
|
42
|
+
"vue-tsc": "^1.8.27"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"dev": "vite",
|
|
46
|
+
"build": "vue-tsc && vite build",
|
|
47
|
+
"preview": "vite preview"
|
|
48
|
+
}
|
|
49
|
+
}
|