@secretstache/wordpress-gutenberg 0.6.15 → 0.7.0

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 (38) hide show
  1. package/build/editor-canvas.css +1 -1
  2. package/build/index.js +3208 -3187
  3. package/build/index.js.map +1 -1
  4. package/package.json +8 -2
  5. package/src/components/EmptyBlockPlaceholder.jsx +67 -0
  6. package/src/components/IconPicker.jsx +4 -5
  7. package/src/components/MediaControl.jsx +3 -3
  8. package/src/components/PatternAppender.jsx +24 -0
  9. package/src/components/PatternsModal.jsx +33 -35
  10. package/src/components/SpacingControl.jsx +5 -6
  11. package/src/components/index.js +19 -16
  12. package/src/filters/block-categories.js +50 -0
  13. package/src/filters/hide-root-block-for-other.js +53 -0
  14. package/src/filters/index.js +24 -0
  15. package/src/filters/inner-blocks-cleanup.jsx +53 -0
  16. package/src/filters/root-block.js +41 -0
  17. package/src/hooks/useTabs.jsx +2 -2
  18. package/src/icons/index.jsx +74 -38
  19. package/src/index.js +2 -0
  20. package/src/plugins/index.js +22 -0
  21. package/src/plugins/root-block-appender.jsx +51 -0
  22. package/src/plugins/root-pattern-appender.jsx +53 -0
  23. package/src/styles/{_empty-block-appender.scss → _empty-block-placeholder.scss} +6 -1
  24. package/src/styles/_root-block-appender.scss +13 -0
  25. package/src/styles/_root-pattern-appender.scss +58 -0
  26. package/src/styles/editor-canvas.scss +9 -3
  27. package/src/utils/helpers.js +53 -0
  28. package/src/utils/index.js +0 -3
  29. package/src/components/EmptyBlockAppender.jsx +0 -38
  30. package/src/utils/attributes.js +0 -252
  31. package/src/utils/filters.jsx +0 -40
  32. package/src/utils/rootBlock/appender.js +0 -62
  33. package/src/utils/rootBlock/hideRootBlockForInlineInserter.js +0 -24
  34. package/src/utils/rootBlock/index.js +0 -6
  35. package/src/utils/rootBlock/rootBlockVisibilityFilter.js +0 -35
  36. package/src/utils/rootBlock/setRootBlockFilter.js +0 -30
  37. package/src/utils/rootBlock/setRootBlockForPostTypes.js +0 -73
  38. package/src/utils/rootBlock/unsetRootBlockFilter.js +0 -26
@@ -1 +1 @@
1
- .editor-styles-wrapper::after{display:none !important}.editor-styles-wrapper .editor-visual-editor__post-title-wrapper{margin-top:10px !important;margin-bottom:10px !important}.editor-styles-wrapper .editor-visual-editor__post-title-wrapper h1.editor-post-title{margin:0;border-bottom:1px dashed #ddd;padding-bottom:10px;font-weight:normal;font-size:30px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;text-align:center}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container{margin-bottom:0;padding-bottom:0}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-block-appender{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);width:calc(100% - 60px)}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-block-appender::after{content:attr(data-tooltip);position:absolute;left:50%;bottom:-30px;transform:translateX(-50%);z-index:1;visibility:hidden;opacity:0;transition:opacity .3s;width:max-content;max-width:200px;white-space:nowrap;background:#000;border-radius:2px;color:#f0f0f0;font-size:12px;line-height:1.4;padding:4px 8px;text-align:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-block-appender:hover::after{visibility:visible;opacity:1}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-block-appender~.block-list-appender.wp-block{display:none}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender{--button-color: #192f5f;--button-color-hover: var(--wp-admin-theme-color);--button-border: #192f5f;--button-border-hover: var(--wp-admin-theme-color);--button-background: transparent;--button-background-hover: transparent;--text-color: #192f5f;--tr: .3s;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender--light{--button-color: #fff;--button-color-hover: #192f5f;--button-border: #fff;--button-border-hover: #fff;--button-background: transparent;--button-background-hover: #fff;--text-color: #fff}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__content{display:flex;flex-direction:column;align-items:center;text-align:center}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__icon{width:48px;height:48px;color:var(--text-color);margin-bottom:16px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__title{font-size:32px;font-weight:600;line-height:110%;color:var(--text-color);margin-bottom:.5rem}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__text{font-size:1rem;font-weight:400;color:var(--text-color);margin-bottom:1.5rem}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__button .block-editor-button-block-appender{display:inline-flex;justify-content:center;align-items:center;transition:color var(--tr),border-color var(--tr);cursor:pointer;border:2px solid var(--button-border) !important;box-shadow:none;border-radius:10px;background:var(--button-background) !important;padding:12px 24px;min-height:50px;min-width:200px;color:var(--button-color);font-weight:600;font-size:22px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__button .block-editor-button-block-appender:hover,.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__button .block-editor-button-block-appender:focus{color:var(--button-color-hover) !important;border-color:var(--button-border-hover) !important;outline:none !important;box-shadow:none !important;background:var(--button-background-hover) !important}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__button .block-editor-button-block-appender::before,.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__button .block-editor-button-block-appender::after{display:none !important}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-appender__button .block-editor-button-block-appender .block-editor-button-block-appender__content{display:flex;align-items:center;justify-content:center;width:24px;height:24px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-add-new-child-btn{display:flex;margin:20px auto !important;align-items:center;flex-direction:column;height:50px;justify-content:center;width:100%;user-select:text;font-family:inherit;font-size:100%;padding:12px !important;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper{position:relative;height:auto;align-self:start}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__actions{display:none;position:absolute;top:0;left:0;right:0;bottom:0;flex-wrap:nowrap;justify-content:center;align-items:center;gap:20px;padding:5px 15px;z-index:20}@media screen and (max-width: 768px){.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__actions{gap:15px}}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__btn{font-size:14px !important;backdrop-filter:blur(16px) saturate(180%);background:hsla(0,0%,100%,.75);flex-grow:1;justify-content:center;max-width:130px}@media screen and (max-width: 768px){.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__btn{padding:5px}}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__overlay{display:none;position:absolute;top:0;left:0;right:0;bottom:0;z-index:10;background:hsla(0,0%,100%,.3);backdrop-filter:blur(3px)}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper:hover .bc-image-wrapper__actions{display:flex}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper:hover .bc-image-wrapper__overlay{display:block}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container:has(.root-block-appender){margin-bottom:3rem;padding-bottom:200px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container.has-background{transition:background 1s,color 1s}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container>.block-list-appender.wp-block:only-child p{margin-top:0;margin-bottom:0}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container>.block-list-appender.wp-block:only-child,.editor-styles-wrapper .block-editor-block-list__layout.is-root-container>p.wp-block:only-child{margin:2rem 0}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .components-notice{color:#000}
1
+ .editor-styles-wrapper::after{display:none !important}.editor-styles-wrapper .editor-visual-editor__post-title-wrapper{margin-top:10px !important;margin-bottom:10px !important}.editor-styles-wrapper .editor-visual-editor__post-title-wrapper h1.editor-post-title{margin:0;border-bottom:1px dashed #ddd;padding-bottom:10px;font-weight:normal;font-size:30px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;text-align:center}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container{margin-bottom:0;padding-bottom:0}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-block-appender{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);max-width:none !important;width:calc(100% - 60px)}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-block-appender::after{content:attr(data-tooltip);position:absolute;left:50%;bottom:-30px;transform:translateX(-50%);z-index:1;visibility:hidden;opacity:0;transition:opacity .3s;width:max-content;max-width:200px;white-space:nowrap;background:#000;border-radius:2px;color:#f0f0f0;font-size:12px;line-height:1.4;padding:4px 8px;text-align:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-block-appender:hover::after{visibility:visible;opacity:1}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-block-appender~.block-list-appender.wp-block{display:none}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container:has(>.root-block-appender):has(>.root-pattern-appender)>.root-block-appender{left:15%;width:50%;transform:none;max-width:none !important;margin:unset !important;box-shadow:none;border:1px solid #000;border-top-right-radius:0;border-bottom-right-radius:0}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-pattern-appender{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);max-width:none !important;width:calc(100% - 60px)}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-pattern-appender::after{position:absolute;bottom:-30px;left:50%;transform:translateX(-50%);visibility:hidden;opacity:0;z-index:1;transition:opacity .3s;border-radius:2px;background:#000;padding:4px 8px;width:max-content;max-width:200px;content:attr(data-tooltip);color:#f0f0f0;font-size:12px;line-height:1.4;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;text-align:center;white-space:nowrap}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .root-pattern-appender:hover::after{visibility:visible;opacity:1}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container:has(>.root-pattern-appender):has(>.root-block-appender)>.root-pattern-appender{left:65%;width:20%;transform:none;max-width:none !important;margin:unset !important;box-shadow:none;border:1px solid #000;border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder{--button-color: #192f5f;--button-color-hover: var(--wp-admin-theme-color);--button-border: #192f5f;--button-border-hover: var(--wp-admin-theme-color);--button-background: transparent;--button-background-hover: transparent;--text-color: #192f5f;--tr: .3s;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder--light{--button-color: #fff;--button-color-hover: #192f5f;--button-border: #fff;--button-border-hover: #fff;--button-background: transparent;--button-background-hover: #fff;--text-color: #fff}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__buttons-wrapper{display:flex;gap:16px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__content{display:flex;flex-direction:column;align-items:center;text-align:center}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__icon{width:48px;height:48px;color:var(--text-color);margin-bottom:16px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__title{font-size:32px;font-weight:600;line-height:110%;color:var(--text-color);margin-bottom:.5rem}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__text{font-size:1rem;font-weight:400;color:var(--text-color);margin-bottom:1.5rem}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__button .block-editor-button-block-appender{display:inline-flex;justify-content:center;align-items:center;transition:color var(--tr),border-color var(--tr);cursor:pointer;border:2px solid var(--button-border) !important;box-shadow:none;border-radius:10px;background:var(--button-background) !important;padding:12px 24px;min-height:50px;min-width:200px;color:var(--button-color);font-weight:600;font-size:22px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__button .block-editor-button-block-appender:hover,.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__button .block-editor-button-block-appender:focus{color:var(--button-color-hover) !important;border-color:var(--button-border-hover) !important;outline:none !important;box-shadow:none !important;background:var(--button-background-hover) !important}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__button .block-editor-button-block-appender::before,.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__button .block-editor-button-block-appender::after{display:none !important}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .empty-block-placeholder__button .block-editor-button-block-appender .block-editor-button-block-appender__content{display:flex;align-items:center;justify-content:center;width:24px;height:24px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-add-new-child-btn{display:flex;margin:20px auto !important;align-items:center;flex-direction:column;height:50px;justify-content:center;width:100%;user-select:text;font-family:inherit;font-size:100%;padding:12px !important;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper{position:relative;height:auto;align-self:start}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__actions{display:none;position:absolute;top:0;left:0;right:0;bottom:0;flex-wrap:nowrap;justify-content:center;align-items:center;gap:20px;padding:5px 15px;z-index:20}@media screen and (max-width: 768px){.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__actions{gap:15px}}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__btn{font-size:14px !important;backdrop-filter:blur(16px) saturate(180%);background:hsla(0,0%,100%,.75);flex-grow:1;justify-content:center;max-width:130px}@media screen and (max-width: 768px){.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__btn{padding:5px}}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper__overlay{display:none;position:absolute;top:0;left:0;right:0;bottom:0;z-index:10;background:hsla(0,0%,100%,.3);backdrop-filter:blur(3px)}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper:hover .bc-image-wrapper__actions{display:flex}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .bc-image-wrapper:hover .bc-image-wrapper__overlay{display:block}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container:has(.root-block-appender),.editor-styles-wrapper .block-editor-block-list__layout.is-root-container:has(.root-pattern-appender){margin-bottom:3rem;padding-bottom:200px}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container:has(.root-block-appender)>.block-list-appender.wp-block,.editor-styles-wrapper .block-editor-block-list__layout.is-root-container:has(.root-pattern-appender)>.block-list-appender.wp-block{display:none}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container.has-background{transition:background 1s,color 1s}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container>.block-list-appender.wp-block:only-child p{margin-top:0;margin-bottom:0}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container>.block-list-appender.wp-block:only-child,.editor-styles-wrapper .block-editor-block-list__layout.is-root-container>p.wp-block:only-child{margin:2rem 0}.editor-styles-wrapper .block-editor-block-list__layout.is-root-container .components-notice{color:#000}