@secretstache/wordpress-gutenberg 0.4.0 → 0.4.2
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/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build/styles.css +182 -93
- package/package.json +1 -1
- package/src/components/EmptyBlockAppender.js +30 -0
- package/src/components/LinkControl.js +3 -2
- package/src/components/ResourcesWrapper.js +16 -9
- package/src/components/index.js +1 -0
- package/src/hooks/index.js +0 -1
- package/src/hooks/useDataQuery.js +7 -7
- package/src/hooks/useSlider.js +5 -1
- package/src/styles/_empty-block-appender.scss +82 -0
- package/src/styles/_link-control.scss +55 -0
- package/src/styles/_root-block-appender.scss +0 -7
- package/src/styles/styles.scss +83 -10
- package/src/utils/helpers.js +0 -1
- package/src/utils/internal/helpers.js +13 -0
- package/src/hooks/useUpdateAttribute.js +0 -4
- package/src/styles/_editor-base.scss +0 -56
@@ -1,6 +1,61 @@
|
|
1
|
+
// Backward compatibility
|
2
|
+
// TODO: remove when the custom LinkControl will be removed
|
1
3
|
.bc-url-input {
|
2
4
|
input {
|
3
5
|
width: 100%;
|
4
6
|
border: 1px solid #949494;
|
5
7
|
}
|
6
8
|
}
|
9
|
+
|
10
|
+
// if the LinkControl is placed inside the BaseControl
|
11
|
+
.components-base-control {
|
12
|
+
.block-editor-link-control {
|
13
|
+
.block-editor-url-input {
|
14
|
+
margin-top: 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
.block-editor-link-control__search-item {
|
18
|
+
padding-top: 0;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
.block-editor-link-control {
|
24
|
+
min-width: 100%;
|
25
|
+
width: 100%;
|
26
|
+
|
27
|
+
.block-editor-url-input__input {
|
28
|
+
width: 100%;
|
29
|
+
}
|
30
|
+
|
31
|
+
.components-base-control {
|
32
|
+
margin-left: 0;
|
33
|
+
margin-right: 0;
|
34
|
+
}
|
35
|
+
|
36
|
+
.block-editor-link-control__search-enter {
|
37
|
+
right: 5px;
|
38
|
+
}
|
39
|
+
|
40
|
+
.components-spinner {
|
41
|
+
top: 50%;
|
42
|
+
transform: translateY(-50%);
|
43
|
+
}
|
44
|
+
|
45
|
+
.block-editor-link-control__tools,
|
46
|
+
.block-editor-link-control__search-actions,
|
47
|
+
.block-editor-link-control__search-results,
|
48
|
+
.block-editor-link-control__search-item {
|
49
|
+
padding-left: 0;
|
50
|
+
padding-right: 0;
|
51
|
+
}
|
52
|
+
|
53
|
+
.components-menu-item__item {
|
54
|
+
min-width: unset;
|
55
|
+
}
|
56
|
+
|
57
|
+
.components-button.block-editor-link-control__drawer-toggle {
|
58
|
+
box-shadow: none;
|
59
|
+
outline: none;
|
60
|
+
}
|
61
|
+
}
|
package/src/styles/styles.scss
CHANGED
@@ -1,12 +1,85 @@
|
|
1
1
|
.block-editor__container {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
.editor-visual-editor {
|
3
|
+
z-index: 1;
|
4
|
+
|
5
|
+
&:not(.is-resizable) {
|
6
|
+
.editor-styles-wrapper::after {
|
7
|
+
display: none;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
&.is-resizable {
|
12
|
+
// Hide then editing a pattern/reusable block
|
13
|
+
.root-block-appender {
|
14
|
+
display: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
& + .edit-post-layout__metaboxes {
|
18
|
+
display: none;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
.editor-styles-wrapper {
|
23
|
+
.edit-post-visual-editor__post-title-wrapper {
|
24
|
+
margin-top: 10px;
|
25
|
+
margin-bottom: 10px;
|
26
|
+
|
27
|
+
h1.editor-post-title {
|
28
|
+
margin: 0;
|
29
|
+
border-bottom: 1px dashed #ddd;
|
30
|
+
padding-bottom: 10px;
|
31
|
+
font-weight: normal;
|
32
|
+
font-size: 30px;
|
33
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
34
|
+
text-align: center;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.is-root-container {
|
39
|
+
@import "root-block-appender";
|
40
|
+
@import "empty-block-appender";
|
41
|
+
|
42
|
+
margin-bottom: 0;
|
43
|
+
padding-bottom: 0;
|
44
|
+
|
45
|
+
&:has(.root-block-appender) {
|
46
|
+
margin-bottom: 3rem;
|
47
|
+
padding-bottom: 200px;
|
48
|
+
}
|
49
|
+
|
50
|
+
&.has-background {
|
51
|
+
transition:
|
52
|
+
background 1s,
|
53
|
+
color 1s;
|
54
|
+
}
|
55
|
+
|
56
|
+
& > .block-list-appender.wp-block:only-child {
|
57
|
+
p {
|
58
|
+
margin-top: 0;
|
59
|
+
margin-bottom: 0;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
& > .block-list-appender.wp-block:only-child,
|
64
|
+
& > p.wp-block:only-child {
|
65
|
+
margin: 2rem 0;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
.editor-sidebar {
|
72
|
+
@import "link-control";
|
73
|
+
@import "animation-file-renderer";
|
74
|
+
@import "icon-picker";
|
75
|
+
@import "image-wrapper";
|
76
|
+
@import "media-picker";
|
77
|
+
@import "sortable-select";
|
78
|
+
@import "responsive-spacing";
|
79
|
+
@import "new-child-btn";
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
.block-editor-inserter__quick-inserter-results .block-editor-block-types-list > [role=presentation] {
|
84
|
+
justify-content: center;
|
12
85
|
}
|
package/src/utils/helpers.js
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
const warnedMessages = new Set();
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Logs a deprecation warning, ensuring each message is only logged once.
|
5
|
+
*
|
6
|
+
* @param {string} message - The deprecation warning message.
|
7
|
+
*/
|
8
|
+
export const deprecationWarning = (message) => {
|
9
|
+
if (!warnedMessages.has(message)) {
|
10
|
+
console.warn(message);
|
11
|
+
warnedMessages.add(message);
|
12
|
+
}
|
13
|
+
}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
.editor-styles-wrapper {
|
2
|
-
.edit-post-visual-editor__post-title-wrapper {
|
3
|
-
margin-top: 10px !important;
|
4
|
-
margin-bottom: 10px !important;
|
5
|
-
|
6
|
-
h1.editor-post-title {
|
7
|
-
margin: 0;
|
8
|
-
border-bottom: 1px dashed #ddd;
|
9
|
-
padding-bottom: 10px;
|
10
|
-
font-weight: normal;
|
11
|
-
font-size: 30px !important;
|
12
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
13
|
-
text-align: center;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
.block-editor-block-list__layout.is-root-container {
|
18
|
-
margin-bottom: 3rem;
|
19
|
-
padding-bottom: 100px;
|
20
|
-
|
21
|
-
&.has-background {
|
22
|
-
transition:
|
23
|
-
background 1s,
|
24
|
-
color 1s;
|
25
|
-
}
|
26
|
-
|
27
|
-
& > .block-list-appender.wp-block:only-child {
|
28
|
-
p {
|
29
|
-
margin-top: 0;
|
30
|
-
margin-bottom: 0;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
& > .block-list-appender.wp-block:only-child,
|
35
|
-
& > p.wp-block:only-child {
|
36
|
-
margin: 2rem 0;
|
37
|
-
}
|
38
|
-
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
.block-editor-block-types-list>[role=presentation] {
|
43
|
-
justify-content: center;
|
44
|
-
}
|
45
|
-
|
46
|
-
.components-base-control {
|
47
|
-
.block-editor-url-input {
|
48
|
-
input.block-editor-url-input__input {
|
49
|
-
width: 100%;
|
50
|
-
}
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
.components-range-control__mark-label {
|
55
|
-
margin-top: 7px !important;
|
56
|
-
}
|