@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.
@@ -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
+ }
@@ -1,10 +1,3 @@
1
- .editor-visual-editor.is-resizable {
2
- // Hide then editing a pattern/reusable block
3
- .root-block-appender {
4
- display: none;
5
- }
6
- }
7
-
8
1
  .root-block-appender {
9
2
  position: absolute;
10
3
  bottom: 30px;
@@ -1,12 +1,85 @@
1
1
  .block-editor__container {
2
- @import "editor-base";
3
- @import "animation-file-renderer";
4
- @import "icon-picker";
5
- @import "image-wrapper";
6
- @import "link-control";
7
- @import "media-picker";
8
- @import "sortable-select";
9
- @import "responsive-spacing";
10
- @import "new-child-btn";
11
- @import "root-block-appender";
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
  }
@@ -43,7 +43,6 @@ export const cleanSvgString = (svgString) => {
43
43
  return svgString;
44
44
  };
45
45
 
46
-
47
46
  const SVG_MIME_TYPE = 'image/svg+xml';
48
47
 
49
48
  export const getImage = async (mediaData) => {
@@ -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,4 +0,0 @@
1
- export const useUpdateAttribute = (setAttributes) => (attributeName, value) => {
2
- setAttributes({ [attributeName]: value });
3
- };
4
-
@@ -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
- }