@vonaffenfels/slate-editor 1.1.71 → 1.2.10
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/.babelrc +43 -43
- package/README.md +5 -5
- package/componentLoader.js +93 -93
- package/dist/BlockEditor.css +4 -1871
- package/dist/BlockEditor.js +336 -3960
- package/dist/BlockEditor.js.LICENSE.txt +61 -0
- package/dist/Renderer.js +2 -2081
- package/dist/Renderer.js.LICENSE.txt +15 -0
- package/dist/fromHTML.js +1 -78
- package/dist/index.css +4 -1871
- package/dist/index.js +336 -4037
- package/dist/index.js.LICENSE.txt +69 -0
- package/dist/toHTML.js +2 -1689
- package/dist/toHTML.js.LICENSE.txt +23 -0
- package/dist/toText.js +2 -1689
- package/dist/toText.js.LICENSE.txt +23 -0
- package/package.json +2 -2
- package/postcss.config.js +6 -6
- package/scss/demo.scss +148 -148
- package/scss/editor.scss +17 -5
- package/scss/sidebarEditor.scss +185 -181
- package/scss/toolbar.scss +161 -161
- package/src/BlockEditor.js +6 -3
- package/src/Blocks/EmptyBlock.js +11 -11
- package/src/Blocks/EmptyWrapper.js +4 -4
- package/src/Blocks/ErrorBoundary.js +40 -40
- package/src/Blocks/LayoutBlock.js +274 -274
- package/src/Blocks/LayoutSlot.js +90 -90
- package/src/CollapsableMenu/CollapsableMenu.js +48 -48
- package/src/Context/StorybookContext.js +6 -6
- package/src/ElementAutocomplete.js +133 -133
- package/src/Loader.js +137 -137
- package/src/Nodes/Default.js +158 -158
- package/src/Nodes/Leaf.js +54 -54
- package/src/Nodes/Text.js +97 -97
- package/src/ObjectId.js +3 -3
- package/src/Renderer.js +73 -73
- package/src/Serializer/Html.js +42 -42
- package/src/Serializer/Serializer.js +371 -371
- package/src/Serializer/Text.js +17 -17
- package/src/Serializer/ads.js +174 -174
- package/src/Serializer/index.js +3 -3
- package/src/SidebarEditor/AssetList.js +181 -181
- package/src/SidebarEditor/Fields/CloudinaryContentSelect.js +89 -89
- package/src/SidebarEditor/Fields/ColorPicker.js +89 -89
- package/src/SidebarEditor/Fields/ContentfulContentSelect.js +62 -62
- package/src/SidebarEditor/Fields/DateTime.js +55 -55
- package/src/SidebarEditor/Fields/MVP.js +66 -66
- package/src/SidebarEditor/Fields/MultiSelect.js +13 -13
- package/src/SidebarEditor/Fields/RemoteMultiSelect.js +40 -40
- package/src/SidebarEditor/Fields/RemoteSelect.js +39 -39
- package/src/SidebarEditor/Fields/Select.js +47 -47
- package/src/SidebarEditor/Fields/StreamSelect.js +15 -15
- package/src/SidebarEditor/Fields/Switch.js +34 -34
- package/src/SidebarEditor/Fields/Textarea.js +21 -21
- package/src/SidebarEditor/Resizable.js +85 -85
- package/src/Storybook.js +151 -151
- package/src/Toolbar/Align.js +64 -64
- package/src/Toolbar/Anchor.js +94 -94
- package/src/Toolbar/Block.js +135 -135
- package/src/Toolbar/Element.js +44 -44
- package/src/Toolbar/Formats.js +71 -71
- package/src/Toolbar/Insert.js +28 -28
- package/src/Toolbar/Layout.js +399 -399
- package/src/Toolbar/Link.js +164 -164
- package/src/Toolbar/Toolbar.js +235 -235
- package/src/Tools/Margin.js +51 -51
- package/src/Translation/TranslationToolbarButton.js +119 -115
- package/src/dev/draftToSlate.json +3147 -3147
- package/src/dev/index.css +2 -2
- package/src/dev/index.html +10 -10
- package/src/dev/index.js +4 -4
- package/src/dev/sampleValue1.json +4294 -4294
- package/src/dev/sampleValueValid.json +410 -410
- package/src/dev/testComponents/TestStory.js +74 -74
- package/src/dev/testComponents/TestStory.stories.js +216 -216
- package/src/dev/testComponents/TestStory2.js +74 -74
- package/src/dev/testComponents/TestStory2.stories.js +197 -197
- package/src/dev/testComponents/TestStory3.js +74 -74
- package/src/dev/testComponents/TestStory3.stories.js +197 -197
- package/src/dev/testSampleValue.json +746 -746
- package/src/fromHTML.js +4 -4
- package/src/helper/array.js +8 -8
- package/src/index.js +10 -10
- package/src/plugins/ListItem.js +48 -48
- package/src/plugins/SoftBreak.js +23 -23
- package/src/toHTML.js +6 -6
- package/src/toText.js +6 -6
- package/src/util/reduceContentfulResponse.js +64 -64
- package/src/util.js +19 -19
- package/storyLoader.js +47 -47
- package/tailwind.config.js +4 -4
- package/webpack.config.build.js +55 -55
- package/webpack.config.dev.js +60 -60
- package/webpack.config.js +130 -130
- package/webpack.config.watch.js +4 -4
package/scss/sidebarEditor.scss
CHANGED
|
@@ -1,182 +1,186 @@
|
|
|
1
|
-
#sidebar-editor-wrapper {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
label {
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
input[type="
|
|
34
|
-
input[type="
|
|
35
|
-
input[type="
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
input[type="
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
color:
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
button[data-test-id="cf-ui-button"]
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
button[data-test-id="cf-ui-button"]
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
button[data-test-id="cf-ui-button"]:hover
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.icon-button:not(.disabled):
|
|
133
|
-
background-color: rgb(
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.icon-button
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
border:
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.
|
|
164
|
-
background-color:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.collapsable-menu-item
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.collapsable-menu-item:not(.disabled):
|
|
180
|
-
background-color: rgb(
|
|
181
|
-
}
|
|
1
|
+
#sidebar-editor-wrapper {
|
|
2
|
+
@media (max-width: 768px) {
|
|
3
|
+
padding-top: 66px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
padding-top: 51px;
|
|
7
|
+
height: 100%;
|
|
8
|
+
flex-basis: 400px;
|
|
9
|
+
flex-shrink: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
#sidebar-editor {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
background-color: rgb(247, 249, 250);
|
|
16
|
+
max-height: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
padding: 16px;
|
|
20
|
+
|
|
21
|
+
* {
|
|
22
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
p, label, b, span {
|
|
26
|
+
color: rgb(90, 101, 124);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
label {
|
|
30
|
+
margin: 0 0 2px 0 !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
input[type="text"],
|
|
34
|
+
input[type="time"],
|
|
35
|
+
input[type="date"],
|
|
36
|
+
input[type="number"],
|
|
37
|
+
input[type="color"],
|
|
38
|
+
input[type="datetime-local"],
|
|
39
|
+
input[type="search"],
|
|
40
|
+
select,
|
|
41
|
+
textarea {
|
|
42
|
+
display: block;
|
|
43
|
+
font-size: 0.875rem !important;
|
|
44
|
+
color: rgb(90, 101, 124) !important;
|
|
45
|
+
background-color: white !important;
|
|
46
|
+
border: 1px solid #cfd9e0 !important;
|
|
47
|
+
border-radius: 6px !important;
|
|
48
|
+
box-shadow: none !important;
|
|
49
|
+
filter: none !important;
|
|
50
|
+
width: 100% !important;
|
|
51
|
+
padding: 8px 0.75rem !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
textarea {
|
|
55
|
+
height: 42px;
|
|
56
|
+
max-height: 200px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
input[type="color"] {
|
|
60
|
+
padding: 4px !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
input[type="range"] {
|
|
64
|
+
display: block;
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
input[type="radio"],
|
|
69
|
+
input[type="checkbox"] {
|
|
70
|
+
margin-right: 8px;
|
|
71
|
+
margin-left: 4px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
option[disabled] {
|
|
75
|
+
color: rgba(0, 0, 0, 0.3)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* button[data-test-id="cf-ui-button"] span {
|
|
79
|
+
color: #036fe3 !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
button[data-test-id="cf-ui-button"] svg {
|
|
83
|
+
fill: #036fe3 !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
button[data-test-id="cf-ui-button"]:hover span {
|
|
87
|
+
color: #FFFFFF !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
button[data-test-id="cf-ui-button"]:hover svg {
|
|
91
|
+
fill: #FFFFFF !important;
|
|
92
|
+
} */
|
|
93
|
+
|
|
94
|
+
.inline-check-wrapper {
|
|
95
|
+
display: inline-block;
|
|
96
|
+
margin-right: 8px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
details {
|
|
100
|
+
display: block;
|
|
101
|
+
font-size: 0.875rem !important;
|
|
102
|
+
color: rgb(90, 101, 124) !important;
|
|
103
|
+
background-color: white !important;
|
|
104
|
+
border: 1px solid #cfd9e0 !important;
|
|
105
|
+
border-radius: 6px !important;
|
|
106
|
+
box-shadow: none !important;
|
|
107
|
+
filter: none !important;
|
|
108
|
+
width: 100% !important;
|
|
109
|
+
padding: 16px !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
summary {
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.disabled {
|
|
117
|
+
opacity: 0.4;
|
|
118
|
+
cursor: not-allowed !important;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.icon-button {
|
|
122
|
+
display: inline-block;
|
|
123
|
+
color: rgb(90, 101, 124) !important;
|
|
124
|
+
background-color: white !important;
|
|
125
|
+
border: 1px solid #cfd9e0 !important;
|
|
126
|
+
border-radius: 6px;
|
|
127
|
+
filter: none !important;
|
|
128
|
+
width: auto !important;
|
|
129
|
+
text-align: center;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.icon-button:not(.disabled):hover {
|
|
133
|
+
background-color: rgb(248, 248, 248) !important;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.icon-button:not(.disabled):active {
|
|
137
|
+
background-color: rgb(237, 237, 237) !important;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.icon-button-group {
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
border-radius: 6px !important;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
border: 1px solid #cfd9e0 !important;
|
|
145
|
+
|
|
146
|
+
.icon-button {
|
|
147
|
+
border-radius: 0 !important;
|
|
148
|
+
border: none !important;
|
|
149
|
+
border-right: 1px solid #cfd9e0 !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.icon-button:last-child {
|
|
153
|
+
border: none !important;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.message {
|
|
158
|
+
font-size: 0.875rem;
|
|
159
|
+
padding: 16px;
|
|
160
|
+
border-radius: 4px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.message.message--negative {
|
|
164
|
+
background-color: rgba(238, 26, 26, 0.2);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.collapsable-menu {
|
|
168
|
+
background-color: white !important;
|
|
169
|
+
border: 1px solid #cfd9e0 !important;
|
|
170
|
+
border-radius: 6px;
|
|
171
|
+
z-index: 2;
|
|
172
|
+
overflow: hidden;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.collapsable-menu-item {
|
|
176
|
+
color: rgb(90, 101, 124) !important;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.collapsable-menu-item:not(.disabled):hover {
|
|
180
|
+
background-color: rgb(248, 248, 248) !important;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.collapsable-menu-item:not(.disabled):active {
|
|
184
|
+
background-color: rgb(237, 237, 237) !important;
|
|
185
|
+
}
|
|
182
186
|
}
|