@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.
Files changed (87) hide show
  1. package/LICENSE +6 -0
  2. package/README.md +23 -0
  3. package/css/bluesea.scss +8244 -0
  4. package/css/canvas-block.scss +20 -0
  5. package/css/canvas-page.scss +62 -0
  6. package/css/canvas-section.scss +51 -0
  7. package/css/canvas-widget.scss +41 -0
  8. package/css/canvas.scss +146 -0
  9. package/css/page-builder-editor.scss +185 -0
  10. package/css/page-builder-viewer.scss +1 -0
  11. package/css/property-editor-image.scss +16 -0
  12. package/css/property-editor-multiline-text.scss +0 -0
  13. package/css/property-editor-product.scss +17 -0
  14. package/css/property-editor-readonly-text.scss +0 -0
  15. package/css/property-editor-select.scss +10 -0
  16. package/css/property-editor-text.scss +10 -0
  17. package/css/property-group-editor-background.scss +40 -0
  18. package/css/property-group-editor-border.scss +25 -0
  19. package/css/property-group-editor-margin.scss +13 -0
  20. package/css/property-group-editor-padding.scss +13 -0
  21. package/css/property-group-editor-position.scss +13 -0
  22. package/css/property-group-editor-size.scss +13 -0
  23. package/css/property-localpart.scss +21 -0
  24. package/css/variable.scss +1 -0
  25. package/dist/PageBuilderEditor.vue.d.ts +21 -0
  26. package/dist/PbPartAddModal-DuLpnV4E.js +50 -0
  27. package/dist/PbPropertyEditorImage-BFIqG-bL.js +42 -0
  28. package/dist/PbPropertyEditorMultilineText-BMeNUGm8.js +42 -0
  29. package/dist/PbPropertyEditorProduct--cf9LI2Z.js +49 -0
  30. package/dist/PbPropertyEditorReadonlyText-Bk0WJxA0.js +31 -0
  31. package/dist/PbPropertyEditorSelect-BJovN1su.js +44 -0
  32. package/dist/PbPropertyEditorText-DNdXl-Tr.js +41 -0
  33. package/dist/PbWidgetAddModal-CQvFYzfU.js +55 -0
  34. package/dist/components/canvas/PbCanvas.vue.d.ts +2 -0
  35. package/dist/components/canvas/PbCanvasFrame.vue.d.ts +2 -0
  36. package/dist/components/depart/PbLoginDepart.vue.d.ts +17 -0
  37. package/dist/components/menu/PbMenu.vue.d.ts +2 -0
  38. package/dist/components/menu/PbToolbar.vue.d.ts +2 -0
  39. package/dist/components/menu/PbToolbarButton.vue.d.ts +17 -0
  40. package/dist/components/menu/PbToolbarButtonGroup.vue.d.ts +17 -0
  41. package/dist/components/modal/PbPartAddModal.vue.d.ts +24 -0
  42. package/dist/components/modal/PbWidgetAddModal.vue.d.ts +24 -0
  43. package/dist/components/navigator/PbNavigator.vue.d.ts +2 -0
  44. package/dist/components/part/PbAddWidgetButton.vue.d.ts +2 -0
  45. package/dist/components/part/PbBlock.vue.d.ts +17 -0
  46. package/dist/components/part/PbPage.vue.d.ts +21 -0
  47. package/dist/components/part/PbSection.vue.d.ts +17 -0
  48. package/dist/components/part/PbWidget.vue.d.ts +17 -0
  49. package/dist/components/sidebar/PbSidebar.vue.d.ts +2 -0
  50. package/dist/components/sidebar/PbSidebarProperties.vue.d.ts +2 -0
  51. package/dist/components/sidebar/PbSidebarPropertyEditor.vue.d.ts +20 -0
  52. package/dist/components/sidebar/PbSidebarPropertyGroupEditor.vue.d.ts +22 -0
  53. package/dist/components/sidebar/property/PbPropertyEditorImage.vue.d.ts +23 -0
  54. package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +23 -0
  55. package/dist/components/sidebar/property/PbPropertyEditorProduct.vue.d.ts +23 -0
  56. package/dist/components/sidebar/property/PbPropertyEditorReadonlyText.vue.d.ts +19 -0
  57. package/dist/components/sidebar/property/PbPropertyEditorSelect.vue.d.ts +23 -0
  58. package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +23 -0
  59. package/dist/components/sidebar/property/PbPropertyGroupEditorBackground.vue.d.ts +20 -0
  60. package/dist/components/sidebar/property/PbPropertyGroupEditorBorder.vue.d.ts +20 -0
  61. package/dist/components/sidebar/property/PbPropertyGroupEditorMargin.vue.d.ts +20 -0
  62. package/dist/components/sidebar/property/PbPropertyGroupEditorPadding.vue.d.ts +20 -0
  63. package/dist/components/sidebar/property/PbPropertyGroupEditorPosition.vue.d.ts +20 -0
  64. package/dist/components/sidebar/property/PbPropertyGroupEditorSize.vue.d.ts +20 -0
  65. package/dist/components/sidebar/property/PbPropertyLocalPart.vue.d.ts +23 -0
  66. package/dist/components/ui/PbColorPicker.vue.d.ts +24 -0
  67. package/dist/directives/vPartHandler.d.ts +26 -0
  68. package/dist/index-BtILenNo.js +13902 -0
  69. package/dist/index.d.ts +3 -0
  70. package/dist/model/command.d.ts +188 -0
  71. package/dist/model/context.d.ts +136 -0
  72. package/dist/model/default-part-property-editor.d.ts +3 -0
  73. package/dist/model/default-part-property-group.d.ts +12 -0
  74. package/dist/model/event.d.ts +71 -0
  75. package/dist/model/model.d.ts +66 -0
  76. package/dist/model/page-builder-editor.d.ts +51 -0
  77. package/dist/model/page-builder-util.d.ts +5 -0
  78. package/dist/model/part-definintion.d.ts +26 -0
  79. package/dist/model/part-manager.d.ts +29 -0
  80. package/dist/model/part-property.d.ts +22 -0
  81. package/dist/model/plugin.d.ts +15 -0
  82. package/dist/model/toolbar.d.ts +27 -0
  83. package/dist/page-builder-editor.js +27 -0
  84. package/dist/page-builder-editor.umd.cjs +14248 -0
  85. package/dist/style.css +173 -0
  86. package/dist/utils/mouse-tracker.d.ts +11 -0
  87. package/package.json +49 -0
@@ -0,0 +1,20 @@
1
+ .pb-block {
2
+ display: flex;
3
+ min-width: 1px;
4
+ position: relative;
5
+ background-position: 50% 50%;
6
+ background-repeat: no-repeat;
7
+ background-size: cover;
8
+ width: 100%;
9
+ outline: 1px dashed #ccc;
10
+
11
+ &:hover:not(:has(.pb-widget:hover)) {
12
+ background-color: #f0f0f0;
13
+ }
14
+
15
+ &.selected {
16
+ outline: 1px solid #8e44ad;
17
+ outline-offset: 1px;
18
+ z-index: 999;
19
+ }
20
+ }
@@ -0,0 +1,62 @@
1
+ .pb-page {
2
+ // @import "pb-simple-carousel";
3
+ // @import "pb-simple-html";
4
+ // @import "pb-simple-media";
5
+ // @import "pb-simple-button";
6
+ // @import "pb-animation";
7
+ // @import "coupon-download";
8
+ // @import "pb-tabs";
9
+ // @import "pb-image-map";
10
+
11
+ margin: 0 auto;
12
+ margin-top: 20px;
13
+ background-position: 50% 50%;
14
+ background-repeat: no-repeat;
15
+ background-size: cover;
16
+ // background-color: white;
17
+
18
+ .pb-page-content {
19
+ &.selected {
20
+ outline: 2px solid #4998f8;
21
+ outline-offset: 5px;
22
+ // z-index: 9999;
23
+ }
24
+ }
25
+
26
+ * {
27
+ box-sizing: border-box;
28
+ }
29
+ }
30
+
31
+ .pb-add-widget-button {
32
+ width: 100%;
33
+ height: 100%;
34
+ min-height: 200px;
35
+ position: relative;
36
+
37
+ button {
38
+ position: absolute;
39
+ top: 50%;
40
+ left: 50%;
41
+ transform: translate(-50%, -50%);
42
+ padding: 8px;
43
+ background: none;
44
+ border: none;
45
+ cursor: pointer;
46
+
47
+ &:hover {
48
+ background-color: #eeeeee;
49
+ }
50
+ }
51
+
52
+ .icon {
53
+ font-size: 1rem;
54
+ vertical-align: middle;
55
+ }
56
+
57
+ .text {
58
+ font-size: 1rem;
59
+ vertical-align: middle;
60
+ margin-left: 0.4rem;
61
+ }
62
+ }
@@ -0,0 +1,51 @@
1
+ .pb-section {
2
+ position: relative;
3
+ background-position: 50% 50%;
4
+ background-repeat: no-repeat;
5
+ background-size: cover;
6
+ outline: 1px dashed #ccc;
7
+ background-color: #fff;
8
+
9
+ &:hover:not(:has(.pb-block:hover)) {
10
+ background-color: #f0f0f0;
11
+ }
12
+
13
+ &.selected {
14
+ outline: 1px solid #e67e22;
15
+ outline-offset: 1px;
16
+ z-index: 999;
17
+ }
18
+
19
+ &.pb-section-static {
20
+ width: 100%;
21
+ //height: 100%;
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+ pointer-events: none;
26
+
27
+ .pb-block {
28
+ .pb-widget {
29
+ //margin: 0 auto;
30
+ }
31
+ }
32
+
33
+ &:after {
34
+ content: '';
35
+ position: absolute;
36
+ left: 0;
37
+ right: 0;
38
+ top: 0;
39
+ bottom: 0;
40
+ background-color: rgba(0, 0, 0, 0.2);
41
+ }
42
+ }
43
+ }
44
+
45
+ .pb-section-static {
46
+ //pointer-events: none;
47
+
48
+ .pb-widget {
49
+ outline: none;
50
+ }
51
+ }
@@ -0,0 +1,41 @@
1
+ .pb-widget {
2
+ position: relative;
3
+ outline: 1px dashed #ccc;
4
+ background-position: 50% 50%;
5
+ background-repeat: no-repeat;
6
+ background-size: cover;
7
+
8
+ &.selected {
9
+ outline: 2px solid #27ae60;
10
+ outline-offset: 1px;
11
+ z-index: 999;
12
+ }
13
+
14
+ .children {
15
+ position: absolute;
16
+ width: 100%;
17
+ height: 100%;
18
+ }
19
+
20
+ .pan-handle {
21
+ position: absolute;
22
+ left: -6px;
23
+ top: -6px;
24
+ width: 12px;
25
+ height: 12px;
26
+ background-color: #27ae60;
27
+ cursor: move;
28
+ }
29
+
30
+ .resize-handle {
31
+ position: absolute;
32
+ right: -6px;
33
+ bottom: -6px;
34
+ width: 12px;
35
+ height: 12px;
36
+ background-color: #27ae60;
37
+ cursor: nwse-resize;
38
+ }
39
+ }
40
+
41
+ @import "@g1cloud/page-builder-viewer/css/widget";
@@ -0,0 +1,146 @@
1
+ @import 'variable';
2
+ @import 'canvas-page';
3
+ @import 'canvas-section';
4
+ @import 'canvas-block';
5
+ @import 'canvas-widget';
6
+
7
+ .font-icon {
8
+ font-family: Material Symbols Outlined, monospace;
9
+ font-size: 1rem;
10
+ max-width: 1em;
11
+ }
12
+
13
+ html, body {
14
+ font-family: Noto Sans, Noto Sans KR, Noto Sans JP, Arial, sans-serif;
15
+ font-size: 12px;
16
+ }
17
+
18
+ body {
19
+ background-color: white;
20
+ height: 100%;
21
+ }
22
+
23
+ .pb-canvas-wrapper {
24
+ padding: 32px 40px 56px 40px;
25
+ height: 100%;
26
+ background-color: $color-canvas-frame-bg;
27
+ overflow: auto;
28
+
29
+ .pb-canvas {
30
+ // background-color: white;
31
+ display: flex;
32
+ flex-direction: row;
33
+ transform-origin: top left;
34
+
35
+ width: fit-content;
36
+ min-width: 40px;
37
+ min-height: 40px;
38
+ // box-shadow: 4px 4px 8px $color-gray;
39
+ margin: 0 auto;
40
+ // margin-bottom: 100px;
41
+ }
42
+ }
43
+
44
+ .pb-position-mark {
45
+ background-color: #ff3333;
46
+ opacity: 0.5;
47
+ border-radius: 2px;
48
+ // z-index: 999;
49
+ }
50
+
51
+ .pb-add-section-handle {
52
+ position: relative;
53
+ // width: 33.33%;
54
+ // background: rgba(230, 126, 34, 0.5);
55
+ // position: relative;
56
+ text-align: center;
57
+ cursor: pointer;
58
+ z-index: 5;
59
+ height: 0;
60
+ // opacity: 0;
61
+ // margin: 0;
62
+
63
+ &.top::before,
64
+ &.bottom::before,
65
+ &.middle::before {
66
+ content: '';
67
+ position: absolute;
68
+ left: 0;
69
+ right: 0;
70
+ top: 0;
71
+ // height: 2px;
72
+ // background: rgba(0, 0, 0, 0.5);
73
+ opacity: 0;
74
+ pointer-events: none;
75
+ }
76
+
77
+ &.top {
78
+ // top: 0;
79
+ // left: 50%;
80
+ // transform: translate(-50%, -50%);
81
+ // margin-top: 24px;
82
+ // margin-bottom: 24px;
83
+ }
84
+
85
+ &.middle {
86
+ // top: 0;
87
+ // left: 50%;
88
+ // transform: translate(-50%, -50%);
89
+ // margin-top: 24px;
90
+ // margin-bottom: 24px;
91
+ }
92
+
93
+ &.bottom {
94
+ // bottom: 0;
95
+ left: 50%;
96
+ bottom: -32px;
97
+ // transform: translate(-50%, 50%);
98
+ // margin-top: 24px;
99
+ }
100
+
101
+ &:hover {
102
+ // opacity: 1;
103
+
104
+ &.top::before,
105
+ &.bottom::before,
106
+ &.middle::before,
107
+ > i {
108
+ opacity: 1;
109
+ }
110
+ }
111
+
112
+ > i {
113
+ vertical-align: middle;
114
+ position: absolute;
115
+ top: 50%;
116
+ // left: 50%;
117
+ left: -20px;
118
+ font-size: 2rem;
119
+ transform: translate(-50%, -50%);
120
+ opacity: 0.2;
121
+ }
122
+ }
123
+
124
+ .pb-button {
125
+ background: none;
126
+ border: none;
127
+ cursor: pointer;
128
+ vertical-align: middle;
129
+ }
130
+
131
+ .pb-guideline {
132
+ position: absolute;
133
+ top: 0;
134
+ left: 0;
135
+ width: 100%;
136
+ height: 100%;
137
+ pointer-events: none;
138
+
139
+ &.selected {
140
+ z-index: 3;
141
+ }
142
+
143
+ &.preselect {
144
+ z-index: 4;
145
+ }
146
+ }
@@ -0,0 +1,185 @@
1
+ @import 'variable';
2
+
3
+ .pb-canvas-frame {
4
+ background-color: $color-canvas-frame-bg;
5
+
6
+ iframe.canvas-frame {
7
+ width: 100%;
8
+ height: 100%;
9
+ border: 0;
10
+ }
11
+ }
12
+
13
+ .pb-menu {
14
+ width: 100%;
15
+
16
+ .pb-toolbar {
17
+ padding: 0 8px;
18
+ margin: 6px 0;
19
+
20
+
21
+ .pb-tool-button-group {
22
+ &::after {
23
+ content: '';
24
+ height: 80%;
25
+ border-right: 1px solid $color-border-light;
26
+ align-self: center;
27
+ }
28
+
29
+ .pb-tool-button {
30
+ padding: 2px;
31
+
32
+ .tool-button {
33
+ width: 28px;
34
+ height: 28px;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ .pb-navigator {
45
+ width: 200px;
46
+ height: 100%;
47
+ overflow: auto;
48
+ border-right: 1px solid $color-border-light;
49
+ }
50
+
51
+ .pb-sidebar {
52
+ width: 300px;
53
+ overflow: auto;
54
+ border-left: 1px solid $color-border-light;
55
+
56
+ .pb-sidebar-properties {
57
+ padding: 4px 0;
58
+
59
+ .pb-sidebar-property-group {
60
+
61
+ padding: 4px 0;
62
+
63
+ .group-title {
64
+ padding: 4px 8px;
65
+ font-size: 90%;
66
+ font-weight: bold;
67
+ }
68
+
69
+ .group-editor {
70
+ padding: 4px 8px;
71
+ font-size: 0.9em;
72
+
73
+ .label {
74
+ padding: 0 0 8px 0;
75
+
76
+ label {
77
+ min-width: 6em;
78
+ max-width: 6em;
79
+ padding-right: 0.5em;
80
+ font-weight: bold;
81
+ }
82
+ }
83
+ }
84
+
85
+ .property-editor {
86
+ padding: 4px 8px;
87
+ font-size: 0.9em;
88
+
89
+ > .label {
90
+ padding: 0 0 8px 0;
91
+
92
+ label {
93
+ min-width: 6em;
94
+ max-width: 6em;
95
+ padding-right: 0.5em;
96
+ font-weight: bold;
97
+ }
98
+ }
99
+ }
100
+
101
+ .property-editor:nth-child(n+2) {
102
+ margin-top: 4px
103
+ }
104
+
105
+ @import "./property-editor-image";
106
+ @import "./property-editor-multiline-text";
107
+ @import "./property-editor-product";
108
+ @import "./property-editor-readonly-text";
109
+ @import "./property-editor-select";
110
+ @import "./property-editor-text";
111
+
112
+ @import "./property-group-editor-background";
113
+ @import "./property-group-editor-border";
114
+ @import "./property-group-editor-position";
115
+ @import "./property-group-editor-size";
116
+
117
+ @import "./property-localpart";
118
+ }
119
+ }
120
+ }
121
+
122
+ .pb-color-picker {
123
+ display: inline-flex;
124
+ position: relative;
125
+
126
+ .buttons {
127
+ display: flex;
128
+ padding: 0;
129
+
130
+ button {
131
+ width: 24px;
132
+ height: 24px;
133
+ display: flex;
134
+ justify-content: center;
135
+ align-items: center;
136
+
137
+ &.none {
138
+ position: relative;
139
+ overflow: hidden;
140
+
141
+ &::after {
142
+ content: "\00A0";
143
+ display: inline-block;
144
+ width: 100px;
145
+ height: 1px;
146
+ background: red;
147
+ position: absolute;
148
+ top: 50%;
149
+ left: 50%;
150
+ transform: translate(-50%, -50%) rotate(45deg);
151
+ }
152
+ }
153
+
154
+ &.picker-button {
155
+ border: 1px solid #cccccc;
156
+ }
157
+
158
+ i {
159
+ font-size: 1.4rem;
160
+ }
161
+ }
162
+ }
163
+
164
+ .sketch-wrap {
165
+ width: 220px;
166
+ position: absolute;
167
+ z-index: 10;
168
+ left: -12px;
169
+ top: 24px;
170
+ white-space: break-spaces;
171
+ text-align: left;
172
+ }
173
+ }
174
+
175
+ .pb-part-add-modal {
176
+ .group {
177
+
178
+ .part {
179
+ @extend .bs-clickable;
180
+ border: 1px solid $color-border-light;
181
+ border-radius: 4px;
182
+ padding: 8px 16px;
183
+ }
184
+ }
185
+ }
@@ -0,0 +1 @@
1
+ @import '@g1cloud/page-builder-viewer/css/page-builder-viewer';
@@ -0,0 +1,16 @@
1
+ .property-editor-image {
2
+ button {
3
+ color: #fff;
4
+ border: none;
5
+ padding: 4px 12px;
6
+ cursor: pointer;
7
+ line-height: 1;
8
+ width: 100px;
9
+ height: 28px;
10
+ background-color: #1f8fff;
11
+ }
12
+
13
+ .input-area {
14
+ height: 24px;
15
+ }
16
+ }
File without changes
@@ -0,0 +1,17 @@
1
+ .property-editor-product {
2
+
3
+ button {
4
+ color: #fff;
5
+ border: none;
6
+ padding: 4px 12px;
7
+ cursor: pointer;
8
+ line-height: 1;
9
+ width: 200px;
10
+ height: 28px;
11
+ background-color: #1f8fff;
12
+ }
13
+
14
+ .input-area {
15
+ height: 24px;
16
+ }
17
+ }
File without changes
@@ -0,0 +1,10 @@
1
+
2
+ .property-editor-select {
3
+ .bs-select {
4
+ display: block
5
+ }
6
+
7
+ .input-area {
8
+ height: 24px;
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ .property-editor-text {
2
+
3
+ .bs-text-input {
4
+ display: block;
5
+ }
6
+
7
+ .input-area {
8
+ height: 24px;
9
+ }
10
+ }
@@ -0,0 +1,40 @@
1
+ .group-editor-background {
2
+ padding: 4px 8px;
3
+ font-size: 0.9em;
4
+
5
+ > div {
6
+ > label {
7
+ min-width: 6em;
8
+ max-width: 6em;
9
+ padding-right: 0.5em;
10
+ font-weight: bold;
11
+ }
12
+ }
13
+
14
+ .color {
15
+ flex: 1;
16
+ display: flex;
17
+ flex-direction: row;
18
+ align-items: center;
19
+
20
+ .bs-text-input {
21
+ flex-grow: 1;
22
+ }
23
+ }
24
+
25
+ .image {
26
+ flex: 1;
27
+ padding-left: 8px;
28
+
29
+ button {
30
+ color: #fff;
31
+ border: none;
32
+ padding: 4px 12px;
33
+ cursor: pointer;
34
+ line-height: 1;
35
+ width: 100px;
36
+ height: 28px;
37
+ background-color: #1f8fff;
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,25 @@
1
+ .group-editor-border {
2
+ padding: 4px 8px;
3
+ font-size: 0.9em;
4
+
5
+ > div {
6
+ > label {
7
+ min-width: 6em;
8
+ max-width: 6em;
9
+ padding-right: 0.5em;
10
+ font-weight: bold;
11
+ }
12
+ }
13
+
14
+ .color {
15
+ width: 50%;
16
+ flex: 1;
17
+ display: flex;
18
+ flex-direction: row;
19
+ align-items: center;
20
+
21
+ .bs-text-input {
22
+ flex-grow: 1;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,13 @@
1
+ .group-editor-margin {
2
+ padding: 4px 8px;
3
+ font-size: 0.9em;
4
+
5
+ > div {
6
+ > label {
7
+ min-width: 6em;
8
+ max-width: 6em;
9
+ padding-right: 0.5em;
10
+ font-weight: bold;
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ .group-editor-padding {
2
+ padding: 4px 8px;
3
+ font-size: 0.9em;
4
+
5
+ > div {
6
+ > label {
7
+ min-width: 6em;
8
+ max-width: 6em;
9
+ padding-right: 0.5em;
10
+ font-weight: bold;
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ .group-editor-position {
2
+ padding: 4px 8px;
3
+ font-size: 0.9em;
4
+
5
+ > div {
6
+ > label {
7
+ min-width: 6em;
8
+ max-width: 6em;
9
+ padding-right: 0.5em;
10
+ font-weight: bold;
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ .group-editor-size {
2
+ padding: 4px 8px;
3
+ font-size: 0.9em;
4
+
5
+ > div {
6
+ > label {
7
+ min-width: 6em;
8
+ max-width: 6em;
9
+ padding-right: 0.5em;
10
+ font-weight: bold;
11
+ }
12
+ }
13
+ }