@secretstache/wordpress-gutenberg 0.3.15 → 0.3.17

Sign up to get free protection for your applications and to get access to all the features.
package/build/styles.css CHANGED
@@ -146,6 +146,9 @@
146
146
  box-shadow: inset 0 0 0 1px #1e1e1e;
147
147
  color: #1e1e1e; }
148
148
 
149
+ .block-editor__container .editor-visual-editor.is-resizable .root-block-appender {
150
+ display: none; }
151
+
149
152
  .block-editor__container .root-block-appender {
150
153
  position: absolute;
151
154
  bottom: 30px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secretstache/wordpress-gutenberg",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "description": "",
5
5
  "author": "Secret Stache",
6
6
  "license": "GPL-2.0-or-later",
@@ -1,3 +1,10 @@
1
+ .editor-visual-editor.is-resizable {
2
+ // Hide then editing a pattern/reusable block
3
+ .root-block-appender {
4
+ display: none;
5
+ }
6
+ }
7
+
1
8
  .root-block-appender {
2
9
  position: absolute;
3
10
  bottom: 30px;
@@ -5,7 +5,7 @@ export const linkControlAttribute = {
5
5
  },
6
6
  linkSource: {
7
7
  type: 'string',
8
- default: '#',
8
+ default: '',
9
9
  },
10
10
  linkIsOpenInNewTab: {
11
11
  type: 'boolean',
@@ -17,16 +17,19 @@ export const setRootBlock = (rootBlockName, initAppender = true, appenderTooltip
17
17
  'blocks.registerBlockType',
18
18
  'ssm/with-root-block',
19
19
  (settings, name) => {
20
- // Override the inserter support for blocks that are not the rootBlockName
21
- if (name !== rootBlockName && !settings.ancestor) {
20
+ const isRootBlock = name === rootBlockName;
21
+ const isBaseBlock = name === 'core/block';
22
+ const hasAncestor = !!settings?.ancestor;
23
+
24
+ if (!isRootBlock && !isBaseBlock && !hasAncestor) {
22
25
  settings.ancestor = [rootBlockName];
23
26
  }
24
27
 
25
28
  return settings;
26
- }
29
+ },
27
30
  );
28
31
 
29
32
  if (initAppender) {
30
33
  initRootBlockAppender(rootBlockName, appenderTooltipText);
31
34
  }
32
- }
35
+ };