├── .github ├── renovate.json └── workflows │ └── nodejs.yml ├── .gitignore ├── .jest └── jest-setup.js ├── .nvmrc ├── .prettierignore ├── .prettierrc.js ├── .storybook ├── global.scss ├── main.js └── preview.js ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── babel.config.js ├── build-browser ├── core.css ├── isolated-block-editor.css ├── isolated-block-editor.js └── isolated-block-editor.js.LICENSE.txt ├── build-module ├── __tests__ │ └── e2e │ │ ├── index.spec.ts │ │ └── toolbar-settings.spec.ts ├── components │ ├── action-area │ │ ├── index.js │ │ └── index.js.map │ ├── api-fetch │ │ ├── index.js │ │ └── index.js.map │ ├── block-editor-container │ │ ├── click-outside.js │ │ ├── click-outside.js.map │ │ ├── hot-swapper.js │ │ ├── hot-swapper.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── style.scss │ │ ├── with-focus-outside.js │ │ └── with-focus-outside.js.map │ ├── block-editor-contents │ │ ├── editor-content.js │ │ ├── editor-content.js.map │ │ ├── index.js │ │ └── index.js.map │ ├── block-editor-toolbar │ │ ├── block-navigation │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ └── style.scss │ │ ├── header-toolbar │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── redo.js │ │ │ ├── redo.js.map │ │ │ ├── style.scss │ │ │ ├── undo.js │ │ │ └── undo.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── inspector │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ └── style.scss │ │ ├── more-menu │ │ │ ├── editor-menu.js │ │ │ ├── editor-menu.js.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── link-menu.js │ │ │ ├── link-menu.js.map │ │ │ ├── writing-menu.js │ │ │ └── writing-menu.js.map │ │ ├── slot.js │ │ ├── slot.js.map │ │ ├── style.scss │ │ ├── toggle-feature │ │ │ ├── index.js │ │ │ └── index.js.map │ │ └── toggle-option │ │ │ ├── index.js │ │ │ └── index.js.map │ ├── block-editor │ │ ├── footer.js │ │ ├── footer.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── inserter-sidebar.js │ │ ├── inserter-sidebar.js.map │ │ ├── list-view-outline.js │ │ ├── list-view-outline.js.map │ │ ├── listview-sidebar.js │ │ ├── listview-sidebar.js.map │ │ ├── post-text-editor.js │ │ ├── post-text-editor.js.map │ │ ├── sidebar-heading.js │ │ ├── sidebar-heading.js.map │ │ ├── sidebar.js │ │ ├── sidebar.js.map │ │ ├── style.scss │ │ ├── text-editor.js │ │ ├── text-editor.js.map │ │ ├── unlock.js │ │ ├── unlock.js.map │ │ ├── visual-editor.js │ │ └── visual-editor.js.map │ ├── complementary-area │ │ ├── complementary-area-header.js │ │ ├── complementary-area-header.js.map │ │ ├── index.js │ │ └── index.js.map │ ├── content-saver │ │ ├── index.js │ │ └── index.js.map │ ├── default-settings │ │ ├── index.js │ │ └── index.js.map │ ├── document │ │ ├── index.js │ │ └── index.js.map │ ├── editor-heading-slot │ │ ├── index.js │ │ └── index.js.map │ ├── editor-loaded │ │ ├── index.js │ │ └── index.js.map │ ├── editor-setup │ │ ├── editor-settings.js │ │ ├── editor-settings.js.map │ │ ├── index.js │ │ └── index.js.map │ ├── footer-slot │ │ ├── index.js │ │ └── index.js.map │ ├── pattern-monitor │ │ ├── index.js │ │ └── index.js.map │ └── with-registry-provider │ │ ├── index.js │ │ ├── index.js.map │ │ ├── interface-store │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map │ │ └── reusable-store │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── constants.js │ │ ├── constants.js.map │ │ ├── controls.js │ │ ├── controls.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map ├── global.d.ts ├── index.js ├── index.js.map ├── store │ ├── blocks │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map │ ├── core-editor │ │ ├── index.js │ │ └── index.js.map │ ├── edit-post │ │ ├── index.js │ │ └── index.js.map │ ├── editor │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map │ ├── index.js │ ├── index.js.map │ ├── options │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map │ ├── plugins │ │ ├── store-hot-swap.js │ │ └── store-hot-swap.js.map │ └── preferences │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map └── style.scss ├── build-types ├── browser │ ├── core.d.ts │ ├── core.d.ts.map │ ├── index.d.ts │ └── index.d.ts.map ├── components │ ├── action-area │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── api-fetch │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── block-editor-container │ │ ├── click-outside.d.ts │ │ ├── click-outside.d.ts.map │ │ ├── hot-swapper.d.ts │ │ ├── hot-swapper.d.ts.map │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── with-focus-outside.d.ts │ │ └── with-focus-outside.d.ts.map │ ├── block-editor-contents │ │ ├── editor-content.d.ts │ │ ├── editor-content.d.ts.map │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── block-editor-toolbar │ │ ├── block-navigation │ │ │ ├── index.d.ts │ │ │ └── index.d.ts.map │ │ ├── header-toolbar │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── redo.d.ts │ │ │ ├── redo.d.ts.map │ │ │ ├── undo.d.ts │ │ │ └── undo.d.ts.map │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── inspector │ │ │ ├── index.d.ts │ │ │ └── index.d.ts.map │ │ ├── more-menu │ │ │ ├── editor-menu.d.ts │ │ │ ├── editor-menu.d.ts.map │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── link-menu.d.ts │ │ │ ├── link-menu.d.ts.map │ │ │ ├── writing-menu.d.ts │ │ │ └── writing-menu.d.ts.map │ │ ├── slot.d.ts │ │ ├── slot.d.ts.map │ │ ├── toggle-feature │ │ │ ├── index.d.ts │ │ │ └── index.d.ts.map │ │ └── toggle-option │ │ │ ├── index.d.ts │ │ │ └── index.d.ts.map │ ├── block-editor │ │ ├── footer.d.ts │ │ ├── footer.d.ts.map │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── inserter-sidebar.d.ts │ │ ├── inserter-sidebar.d.ts.map │ │ ├── list-view-outline.d.ts │ │ ├── list-view-outline.d.ts.map │ │ ├── listview-sidebar.d.ts │ │ ├── listview-sidebar.d.ts.map │ │ ├── post-text-editor.d.ts │ │ ├── post-text-editor.d.ts.map │ │ ├── sidebar-heading.d.ts │ │ ├── sidebar-heading.d.ts.map │ │ ├── sidebar.d.ts │ │ ├── sidebar.d.ts.map │ │ ├── text-editor.d.ts │ │ ├── text-editor.d.ts.map │ │ ├── unlock.d.ts │ │ ├── unlock.d.ts.map │ │ ├── visual-editor.d.ts │ │ └── visual-editor.d.ts.map │ ├── complementary-area │ │ ├── complementary-area-header.d.ts │ │ ├── complementary-area-header.d.ts.map │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── content-saver │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── default-settings │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── document │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── editor-heading-slot │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── editor-loaded │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── editor-setup │ │ ├── editor-settings.d.ts │ │ ├── editor-settings.d.ts.map │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── footer-slot │ │ ├── index.d.ts │ │ └── index.d.ts.map │ ├── pattern-monitor │ │ ├── index.d.ts │ │ └── index.d.ts.map │ └── with-registry-provider │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── interface-store │ │ ├── actions.d.ts │ │ ├── actions.d.ts.map │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── reducer.d.ts │ │ ├── reducer.d.ts.map │ │ ├── selectors.d.ts │ │ └── selectors.d.ts.map │ │ └── reusable-store │ │ ├── actions.d.ts │ │ ├── actions.d.ts.map │ │ ├── constants.d.ts │ │ ├── constants.d.ts.map │ │ ├── controls.d.ts │ │ ├── controls.d.ts.map │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── reducer.d.ts │ │ ├── reducer.d.ts.map │ │ ├── selectors.d.ts │ │ └── selectors.d.ts.map ├── index.d.ts ├── index.d.ts.map └── store │ ├── blocks │ ├── actions.d.ts │ ├── actions.d.ts.map │ ├── reducer.d.ts │ ├── reducer.d.ts.map │ ├── selectors.d.ts │ └── selectors.d.ts.map │ ├── core-editor │ ├── index.d.ts │ └── index.d.ts.map │ ├── edit-post │ ├── index.d.ts │ └── index.d.ts.map │ ├── editor │ ├── actions.d.ts │ ├── actions.d.ts.map │ ├── reducer.d.ts │ ├── reducer.d.ts.map │ ├── selectors.d.ts │ └── selectors.d.ts.map │ ├── index.d.ts │ ├── index.d.ts.map │ ├── options │ ├── actions.d.ts │ ├── actions.d.ts.map │ ├── reducer.d.ts │ ├── reducer.d.ts.map │ ├── selectors.d.ts │ └── selectors.d.ts.map │ ├── plugins │ ├── store-hot-swap.d.ts │ └── store-hot-swap.d.ts.map │ └── preferences │ ├── actions.d.ts │ ├── actions.d.ts.map │ ├── reducer.d.ts │ ├── reducer.d.ts.map │ ├── selectors.d.ts │ └── selectors.d.ts.map ├── build ├── __tests__ │ └── e2e │ │ ├── index.spec.ts │ │ └── toolbar-settings.spec.ts ├── components │ ├── action-area │ │ ├── index.js │ │ └── index.js.map │ ├── api-fetch │ │ ├── index.js │ │ └── index.js.map │ ├── block-editor-container │ │ ├── click-outside.js │ │ ├── click-outside.js.map │ │ ├── hot-swapper.js │ │ ├── hot-swapper.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── style.scss │ │ ├── with-focus-outside.js │ │ └── with-focus-outside.js.map │ ├── block-editor-contents │ │ ├── editor-content.js │ │ ├── editor-content.js.map │ │ ├── index.js │ │ └── index.js.map │ ├── block-editor-toolbar │ │ ├── block-navigation │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ └── style.scss │ │ ├── header-toolbar │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── redo.js │ │ │ ├── redo.js.map │ │ │ ├── style.scss │ │ │ ├── undo.js │ │ │ └── undo.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── inspector │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ └── style.scss │ │ ├── more-menu │ │ │ ├── editor-menu.js │ │ │ ├── editor-menu.js.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── link-menu.js │ │ │ ├── link-menu.js.map │ │ │ ├── writing-menu.js │ │ │ └── writing-menu.js.map │ │ ├── slot.js │ │ ├── slot.js.map │ │ ├── style.scss │ │ ├── toggle-feature │ │ │ ├── index.js │ │ │ └── index.js.map │ │ └── toggle-option │ │ │ ├── index.js │ │ │ └── index.js.map │ ├── block-editor │ │ ├── footer.js │ │ ├── footer.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── inserter-sidebar.js │ │ ├── inserter-sidebar.js.map │ │ ├── list-view-outline.js │ │ ├── list-view-outline.js.map │ │ ├── listview-sidebar.js │ │ ├── listview-sidebar.js.map │ │ ├── post-text-editor.js │ │ ├── post-text-editor.js.map │ │ ├── sidebar-heading.js │ │ ├── sidebar-heading.js.map │ │ ├── sidebar.js │ │ ├── sidebar.js.map │ │ ├── style.scss │ │ ├── text-editor.js │ │ ├── text-editor.js.map │ │ ├── unlock.js │ │ ├── unlock.js.map │ │ ├── visual-editor.js │ │ └── visual-editor.js.map │ ├── complementary-area │ │ ├── complementary-area-header.js │ │ ├── complementary-area-header.js.map │ │ ├── index.js │ │ └── index.js.map │ ├── content-saver │ │ ├── index.js │ │ └── index.js.map │ ├── default-settings │ │ ├── index.js │ │ └── index.js.map │ ├── document │ │ ├── index.js │ │ └── index.js.map │ ├── editor-heading-slot │ │ ├── index.js │ │ └── index.js.map │ ├── editor-loaded │ │ ├── index.js │ │ └── index.js.map │ ├── editor-setup │ │ ├── editor-settings.js │ │ ├── editor-settings.js.map │ │ ├── index.js │ │ └── index.js.map │ ├── footer-slot │ │ ├── index.js │ │ └── index.js.map │ ├── pattern-monitor │ │ ├── index.js │ │ └── index.js.map │ └── with-registry-provider │ │ ├── index.js │ │ ├── index.js.map │ │ ├── interface-store │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map │ │ └── reusable-store │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── constants.js │ │ ├── constants.js.map │ │ ├── controls.js │ │ ├── controls.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map ├── global.d.ts ├── index.js ├── index.js.map ├── store │ ├── blocks │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map │ ├── core-editor │ │ ├── index.js │ │ └── index.js.map │ ├── edit-post │ │ ├── index.js │ │ └── index.js.map │ ├── editor │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map │ ├── index.js │ ├── index.js.map │ ├── options │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map │ ├── plugins │ │ ├── store-hot-swap.js │ │ └── store-hot-swap.js.map │ └── preferences │ │ ├── actions.js │ │ ├── actions.js.map │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── selectors.js │ │ └── selectors.js.map └── style.scss ├── examples └── wordpress-php │ ├── README.md │ └── iso-gutenberg.php ├── jest.config.js ├── jsconfig.json ├── package.json ├── playwright.config.ts ├── src ├── __tests__ │ ├── e2e │ │ └── index.spec.ts │ └── index.js ├── browser │ ├── README.md │ ├── core.js │ ├── core.scss │ ├── index.html │ ├── index.js │ ├── plain-text-editor.png │ └── style.scss ├── components │ ├── action-area │ │ └── index.js │ ├── api-fetch │ │ └── index.js │ ├── block-editor-container │ │ ├── click-outside.js │ │ ├── hot-swapper.js │ │ ├── index.js │ │ ├── style.scss │ │ └── with-focus-outside.js │ ├── block-editor-contents │ │ ├── __tests__ │ │ │ └── editor-content.js │ │ ├── editor-content.js │ │ └── index.js │ ├── block-editor-toolbar │ │ ├── block-navigation │ │ │ ├── index.js │ │ │ └── style.scss │ │ ├── header-toolbar │ │ │ ├── index.js │ │ │ ├── redo.js │ │ │ ├── style.scss │ │ │ └── undo.js │ │ ├── index.js │ │ ├── inspector │ │ │ ├── index.js │ │ │ └── style.scss │ │ ├── more-menu │ │ │ ├── editor-menu.js │ │ │ ├── index.js │ │ │ ├── link-menu.js │ │ │ └── writing-menu.js │ │ ├── slot.js │ │ ├── style.scss │ │ ├── toggle-feature │ │ │ └── index.js │ │ └── toggle-option │ │ │ └── index.js │ ├── block-editor │ │ ├── footer.js │ │ ├── index.js │ │ ├── inserter-sidebar.js │ │ ├── list-view-outline.js │ │ ├── listview-sidebar.js │ │ ├── post-text-editor.js │ │ ├── sidebar-heading.js │ │ ├── sidebar.js │ │ ├── style.scss │ │ ├── text-editor.js │ │ ├── unlock.js │ │ └── visual-editor.js │ ├── complementary-area │ │ ├── complementary-area-header.js │ │ └── index.js │ ├── content-saver │ │ └── index.js │ ├── default-settings │ │ └── index.js │ ├── document │ │ └── index.js │ ├── editor-heading-slot │ │ └── index.js │ ├── editor-loaded │ │ └── index.js │ ├── editor-setup │ │ ├── editor-settings.js │ │ └── index.js │ ├── footer-slot │ │ └── index.js │ ├── pattern-monitor │ │ └── index.js │ └── with-registry-provider │ │ ├── index.js │ │ ├── interface-store │ │ ├── actions.js │ │ ├── index.js │ │ ├── reducer.js │ │ └── selectors.js │ │ └── reusable-store │ │ ├── actions.js │ │ ├── constants.js │ │ ├── controls.js │ │ ├── index.js │ │ ├── reducer.js │ │ └── selectors.js ├── global.d.ts ├── index.js ├── store │ ├── blocks │ │ ├── actions.js │ │ ├── reducer.js │ │ └── selectors.js │ ├── core-editor │ │ └── index.js │ ├── edit-post │ │ └── index.js │ ├── editor │ │ ├── __tests__ │ │ │ └── reducer.js │ │ ├── actions.js │ │ ├── reducer.js │ │ └── selectors.js │ ├── index.js │ ├── options │ │ ├── actions.js │ │ ├── reducer.js │ │ └── selectors.js │ ├── plugins │ │ └── store-hot-swap.js │ └── preferences │ │ ├── actions.js │ │ ├── reducer.js │ │ └── selectors.js └── style.scss ├── stories └── IsolatedBlockEditor.stories.tsx ├── tsconfig.json ├── webpack.config.browser.js └── yarn.lock /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ "config:base" ], 4 | "enabledManagers": [ "npm" ], 5 | "dependencyDashboard": false, 6 | "lockFileMaintenance": { 7 | "enabled": false 8 | }, 9 | "packageRules": [ 10 | { 11 | "matchPackagePatterns": [ "*" ], 12 | "enabled": false 13 | }, 14 | { 15 | "matchPackagePatterns": [ "^@wordpress" ], 16 | "enabled": true, 17 | "matchDepTypes": [ "dependencies" ], 18 | "separateMajorMinor": false 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | tsconfig.tsbuildinfo 4 | dist 5 | .idea 6 | /test-results/ 7 | /playwright-report/ 8 | /dist-pw/ 9 | -------------------------------------------------------------------------------- /.jest/jest-setup.js: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-dom'; 2 | 3 | // Polyfill for window.requestIdleCallback, used in `@wordpress/priority-queue` 4 | import '@shopify/polyfills/idle-callback.jest'; 5 | import crypto from 'crypto' 6 | 7 | Object.defineProperty( global, 'crypto', { 8 | value: { 9 | getRandomValues: ( arr ) => crypto.randomBytes( arr.length ) 10 | } 11 | } ); 12 | 13 | global.ResizeObserver = require( 'resize-observer-polyfill' ); 14 | 15 | jest.mock( '@wordpress/compose', () => { 16 | return { 17 | ...jest.requireActual( '@wordpress/compose' ), 18 | useViewportMatch: jest.fn(), 19 | }; 20 | } ); -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | build/ 2 | build-*/ 3 | *.d.ts -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | // Import the default config file and expose it in the project root. 2 | // Useful for editor integrations. 3 | module.exports = { 4 | ...require( '@wordpress/prettier-config' ), 5 | printWidth: 120, 6 | }; 7 | -------------------------------------------------------------------------------- /.storybook/global.scss: -------------------------------------------------------------------------------- 1 | @import '@wordpress/base-styles/_variables'; 2 | 3 | body { 4 | font-family: $default-font; 5 | } 6 | -------------------------------------------------------------------------------- /.storybook/main.js: -------------------------------------------------------------------------------- 1 | const path = require( 'path' ); 2 | module.exports = { 3 | stories: [ '../src/**/*.stories.*', '../stories/**/*.stories.*' ], 4 | addons: [ '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/preset-scss', '@storybook/addon-mdx-gfm', '@storybook/preset-typescript' 5 | ], 6 | typescript: { 7 | check: false, 8 | checkOptions: {}, 9 | reactDocgen: 'react-docgen-typescript', 10 | reactDocgenTypescriptOptions: { 11 | shouldExtractLiteralValuesFromEnum: true, 12 | propFilter: ( prop ) => ( prop.parent ? !/node_modules/.test( prop.parent.fileName ) : true ), 13 | }, 14 | }, 15 | framework: { 16 | name: '@storybook/react-webpack5', 17 | options: {} 18 | }, 19 | docs: { 20 | autodocs: true 21 | }, 22 | core: { 23 | disableTelemetry: true, // 👈 Disables telemetry 24 | } 25 | }; -------------------------------------------------------------------------------- /.storybook/preview.js: -------------------------------------------------------------------------------- 1 | import '../build-browser/core.css'; 2 | import './global.scss'; 3 | 4 | export const parameters = { 5 | actions: { argTypesRegex: '^on[A-Z].*' }, 6 | controls: { 7 | matchers: { 8 | color: /(background|color)$/i, 9 | date: /Date$/, 10 | }, 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = ( api ) => { 2 | api.cache( true ); 3 | 4 | if ( process.env.BUILD_ENV === 'es6' ) { 5 | return { 6 | presets: [ '@wordpress/babel-preset-default' ], 7 | }; 8 | } 9 | 10 | if ( process.env.BUILD_ENV === 'cjs' ) { 11 | return { 12 | presets: [ '@wordpress/babel-preset-default', [ '@babel/preset-env', { modules: 'commonjs' } ] ], 13 | plugins: [ [ '@babel/plugin-transform-runtime', { useESModules: false } ] ], 14 | }; 15 | } 16 | 17 | return {}; 18 | }; 19 | -------------------------------------------------------------------------------- /build-module/__tests__/e2e/toolbar-settings.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import { test, expect } from '@playwright/test'; 5 | 6 | test.describe( 'Toolbar settings button', () => { 7 | test( 'should open and close popover', async ( { page } ) => { 8 | await page.goto( '/?path=/story/isolated-block-editor--toolbar-settings' ); 9 | const editor = page.frameLocator( '#storybook-preview-iframe' ); 10 | 11 | await editor.locator( 'role=button[name="Settings"]' ).click(); 12 | 13 | await expect( editor.locator( 'role=button[name="Document (selected)"]' ) ).toBeVisible(); 14 | await expect( editor.locator( 'role=button[name="Block"]' ) ).toBeVisible(); 15 | 16 | await editor.locator( 'role=button[name="Close settings"]' ).click(); 17 | 18 | await expect( editor.locator( 'role=button[name="Document (selected)"]' ) ).not.toBeVisible(); 19 | await expect( editor.locator( 'role=button[name="Block"]' ) ).not.toBeVisible(); 20 | } ); 21 | } ); 22 | -------------------------------------------------------------------------------- /build-module/components/action-area/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { createSlotFill } from '@wordpress/components'; 6 | const { 7 | Fill, 8 | Slot 9 | } = createSlotFill('IsolatedFooter'); 10 | const ActionArea = ({ 11 | children 12 | }) => { 13 | return createElement(Fill, null, children); 14 | }; 15 | ActionArea.Slot = function () { 16 | return createElement(Slot, null, fills => fills); 17 | }; 18 | export default ActionArea; 19 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/action-area/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["createSlotFill","Fill","Slot","ActionArea","children","createElement","fills"],"sources":["../../../src/components/action-area/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'IsolatedFooter' );\n\nconst ActionArea = ( { children } ) => {\n\treturn { children };\n};\n\nActionArea.Slot = function () {\n\treturn { ( fills ) => fills };\n};\n\nexport default ActionArea;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,uBAAuB;AAEtD,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGF,cAAc,CAAE,gBAAiB,CAAC;AAEzD,MAAMG,UAAU,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EACtC,OAAOC,aAAA,CAACJ,IAAI,QAAGG,QAAgB,CAAC;AACjC,CAAC;AAEDD,UAAU,CAACD,IAAI,GAAG,YAAY;EAC7B,OAAOG,aAAA,CAACH,IAAI,QAAKI,KAAK,IAAMA,KAAa,CAAC;AAC3C,CAAC;AAED,eAAeH,UAAU"} -------------------------------------------------------------------------------- /build-module/components/block-editor-container/click-outside.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | 5 | import { Component } from '@wordpress/element'; 6 | 7 | /** 8 | * Internal dependencies 9 | */ 10 | import withFocusOutside from './with-focus-outside.js'; 11 | const ClickOutsideWrapper = withFocusOutside( 12 | // @ts-ignore 13 | class extends Component { 14 | handleFocus(ev) { 15 | this.props.onFocus(); 16 | } 17 | 18 | // Clicks in the media modal or popup components are considered in the editor 19 | isInspectorElement(element) { 20 | // Inside a colour picker popover 21 | if (element.closest('.components-color-picker')) { 22 | return true; 23 | } 24 | 25 | // Inside the inspector 26 | if (element.closest('.block-editor-block-inspector') || element.closest('.iso-inspector')) { 27 | return true; 28 | } 29 | 30 | // In the media modal 31 | if (element.classList.contains('media-modal')) { 32 | return true; 33 | } 34 | return false; 35 | } 36 | handleFocusOutside(ev) { 37 | const target = ev.relatedTarget || ev.target; 38 | if (target && this.isInspectorElement(target)) { 39 | return; 40 | } 41 | this.props.onOutside(); 42 | } 43 | render() { 44 | return this.props.children; 45 | } 46 | }); 47 | export default ClickOutsideWrapper; 48 | //# sourceMappingURL=click-outside.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-container/hot-swapper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { withDispatch, withSelect } from '@wordpress/data'; 5 | import { compose } from '@wordpress/compose'; 6 | import { useEffect } from '@wordpress/element'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import storeHotSwapPlugin from '../../store/plugins/store-hot-swap'; 12 | function HotSwapper({ 13 | isEditing, 14 | hotSwap 15 | }) { 16 | useEffect(() => { 17 | hotSwap(isEditing); 18 | }, [isEditing]); 19 | return null; 20 | } 21 | 22 | // @ts-ignore 23 | export default compose([withSelect(select => { 24 | const { 25 | isEditing 26 | } = select('isolated/editor'); 27 | return { 28 | isEditing: isEditing() 29 | }; 30 | }), withDispatch((dispatch, ownProps, { 31 | select 32 | }) => { 33 | return { 34 | hotSwap: isEditing => { 35 | storeHotSwapPlugin.resetEditor(); 36 | if (isEditing) { 37 | storeHotSwapPlugin.setEditor(select, dispatch); 38 | } 39 | } 40 | }; 41 | })])(HotSwapper); 42 | //# sourceMappingURL=hot-swapper.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-contents/editor-content.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | 5 | import { parse, synchronizeBlocksWithTemplate } from '@wordpress/blocks'; 6 | 7 | /** @typedef {import('../../store/editor/reducer').Pattern} Pattern */ 8 | 9 | const getPattern = (patterns, currentPattern) => patterns && patterns.find(item => item.name === currentPattern); 10 | 11 | /** 12 | * Get the pattern to start an editor with. 13 | * 14 | * @param {Pattern[]} patterns Array of patterns 15 | * @param {string} currentPattern Current pattern name 16 | * @param {object[]} template Current template 17 | * @param {object[]} initialContent Initial content 18 | */ 19 | function getInitialEditorContent(patterns, currentPattern, template, initialContent) { 20 | // No patterns = do nothing 21 | if (patterns === undefined) { 22 | return initialContent; 23 | } 24 | 25 | // Existing content comes before anything 26 | if (initialContent && initialContent.length > 0) { 27 | return initialContent; 28 | } 29 | 30 | // Did we load the page with a template set? 31 | if (currentPattern) { 32 | const pattern = getPattern(patterns, currentPattern); 33 | if (pattern) { 34 | return parse(pattern.content); 35 | } 36 | } 37 | if (template) { 38 | return synchronizeBlocksWithTemplate(initialContent, template); 39 | } 40 | 41 | // No content 42 | return []; 43 | } 44 | export default getInitialEditorContent; 45 | //# sourceMappingURL=editor-content.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/block-navigation/style.scss: -------------------------------------------------------------------------------- 1 | @import '@wordpress/base-styles/_colors'; 2 | @import '@wordpress/base-styles/_variables'; 3 | @import '@wordpress/base-styles/_mixins'; 4 | @import '@wordpress/base-styles/_breakpoints'; 5 | @import '@wordpress/base-styles/_animations'; 6 | @import '@wordpress/base-styles/_z-index'; 7 | 8 | .block-editor-block-navigation__popover { 9 | .components-popover__content { 10 | padding: 0; 11 | } 12 | 13 | .edit-post-editor__document-overview-panel .edit-post-sidebar__panel-tabs { 14 | flex-direction: row; 15 | } 16 | 17 | .edit-post-editor__list-view-container { 18 | max-height: 600px; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/header-toolbar/redo.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { __ } from '@wordpress/i18n'; 6 | import { Button } from '@wordpress/components'; 7 | import { useSelect, useDispatch } from '@wordpress/data'; 8 | import { displayShortcut } from '@wordpress/keycodes'; 9 | import { redo as redoIcon } from '@wordpress/icons'; 10 | import { forwardRef } from '@wordpress/element'; 11 | function EditorHistoryRedo(props, ref) { 12 | // @ts-ignore 13 | const hasRedo = useSelect(select => select('isolated/editor').hasEditorRedo(), []); 14 | const { 15 | redo 16 | } = useDispatch('isolated/editor'); 17 | return createElement(Button, { 18 | ...props, 19 | ref: ref, 20 | icon: redoIcon, 21 | label: __('Redo'), 22 | shortcut: displayShortcut.primaryShift('z') 23 | // If there are no redo levels we don't want to actually disable this 24 | // button, because it will remove focus for keyboard users. 25 | // See: https://github.com/WordPress/gutenberg/issues/3486 26 | , 27 | "aria-disabled": !hasRedo, 28 | onClick: hasRedo ? redo : undefined, 29 | className: "editor-history__redo" 30 | }); 31 | } 32 | export default forwardRef(EditorHistoryRedo); 33 | //# sourceMappingURL=redo.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/header-toolbar/undo.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { __ } from '@wordpress/i18n'; 6 | import { Button } from '@wordpress/components'; 7 | import { useSelect, useDispatch } from '@wordpress/data'; 8 | import { displayShortcut } from '@wordpress/keycodes'; 9 | import { undo as undoIcon } from '@wordpress/icons'; 10 | import { forwardRef } from '@wordpress/element'; 11 | function EditorHistoryUndo(props, ref) { 12 | // @ts-ignore 13 | const hasUndo = useSelect(select => select('isolated/editor').hasEditorUndo(), []); 14 | const { 15 | undo 16 | } = useDispatch('isolated/editor'); 17 | return createElement(Button, { 18 | ...props, 19 | ref: ref, 20 | icon: undoIcon, 21 | label: __('Undo'), 22 | shortcut: displayShortcut.primary('z') 23 | // If there are no undo levels we don't want to actually disable this 24 | // button, because it will remove focus for keyboard users. 25 | // See: https://github.com/WordPress/gutenberg/issues/3486 26 | , 27 | "aria-disabled": !hasUndo, 28 | onClick: hasUndo ? undo : undefined, 29 | className: "editor-history__undo" 30 | }); 31 | } 32 | export default forwardRef(EditorHistoryUndo); 33 | //# sourceMappingURL=undo.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/inspector/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | 6 | import { ComplementaryArea } from '@wordpress/interface'; 7 | import { Popover } from '@wordpress/components'; 8 | 9 | /** 10 | * Internal dependencies 11 | */ 12 | import './style.scss'; 13 | function Inspector({ 14 | button, 15 | onToggle 16 | }) { 17 | function onOutside(ev) { 18 | if (ev.target.closest('.block-editor-block-inspector') === null && !ev.target.classList.contains('iso-inspector')) { 19 | onToggle(false); 20 | ev.preventDefault(); 21 | ev.stopPropagation(); 22 | } 23 | } 24 | return createElement(Popover, { 25 | position: "bottom left", 26 | className: "iso-inspector", 27 | anchor: button?.current, 28 | onFocusOutside: onOutside 29 | }, createElement(ComplementaryArea.Slot, { 30 | scope: "isolated/editor" 31 | })); 32 | } 33 | export default Inspector; 34 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/inspector/style.scss: -------------------------------------------------------------------------------- 1 | @import '@wordpress/base-styles/_colors'; 2 | @import '@wordpress/base-styles/_mixins'; 3 | @import '@wordpress/base-styles/_variables'; 4 | 5 | .iso-editor .popover-slot { 6 | .iso-inspector ul:not(.editor-post-taxonomies__flat-term-most-used-list) li { 7 | margin: 0; 8 | } 9 | 10 | .block-editor-inserter__menu { 11 | min-width: $sidebar-width + 20; 12 | max-height: 55vh; 13 | } 14 | } 15 | 16 | .block-editor-inserter__tabs, 17 | .iso-editor .interface-complementary-area-header { 18 | button { 19 | font-size: 13px; 20 | } 21 | } -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/more-menu/link-menu.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { MenuGroup } from '@wordpress/components'; 6 | import { __ } from '@wordpress/i18n'; 7 | import { MenuItem, ExternalLink } from '@wordpress/components'; 8 | 9 | /** @typedef {import('../../../index').BlockEditorSettings} BlockEditorSettings */ 10 | 11 | /** 12 | * Link menu 13 | * 14 | * @param {Object} props - Component props 15 | * @param {BlockEditorSettings} props.settings - Settings 16 | */ 17 | function LinkMenu({ 18 | settings 19 | }) { 20 | const { 21 | linkMenu = [] 22 | } = settings.iso || {}; 23 | if (linkMenu.length === 0) { 24 | return null; 25 | } 26 | return createElement(MenuGroup, { 27 | label: __('Links') 28 | }, linkMenu.map(({ 29 | title, 30 | url 31 | }) => createElement(MenuItem, { 32 | key: title 33 | }, createElement(ExternalLink, { 34 | href: url 35 | }, title)))); 36 | } 37 | export default LinkMenu; 38 | //# sourceMappingURL=link-menu.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/slot.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { createSlotFill } from '@wordpress/components'; 6 | import { __ } from '@wordpress/i18n'; 7 | const { 8 | Fill, 9 | Slot 10 | } = createSlotFill('IsolatedToolbar'); 11 | 12 | /** 13 | * A Toolbar slot/fill 14 | * 15 | * @param {Object} props Component props 16 | * @param {Object} props.children Child components to insert in the toolbar slot 17 | * @return object 18 | */ 19 | const ToolbarSlot = ({ 20 | children 21 | }) => { 22 | return createElement(Fill, null, children); 23 | }; 24 | ToolbarSlot.Slot = function (props) { 25 | return createElement(Slot, null, fills => fills); 26 | }; 27 | export default ToolbarSlot; 28 | //# sourceMappingURL=slot.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/slot.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"slot.js","names":["createSlotFill","__","Fill","Slot","ToolbarSlot","children","createElement","props","fills"],"sources":["../../../src/components/block-editor-toolbar/slot.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill, Slot } = createSlotFill( 'IsolatedToolbar' );\n\n/**\n * A Toolbar slot/fill\n *\n * @param {Object} props Component props\n * @param {Object} props.children Child components to insert in the toolbar slot\n * @return object\n */\nconst ToolbarSlot = ( { children } ) => {\n\treturn { children };\n};\n\nToolbarSlot.Slot = function ( props ) {\n\treturn { ( fills ) => fills };\n};\n\nexport default ToolbarSlot;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,uBAAuB;AACtD,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGH,cAAc,CAAE,iBAAkB,CAAC;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,WAAW,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EACvC,OAAOC,aAAA,CAACJ,IAAI,QAAGG,QAAgB,CAAC;AACjC,CAAC;AAEDD,WAAW,CAACD,IAAI,GAAG,UAAWI,KAAK,EAAG;EACrC,OAAOD,aAAA,CAACH,IAAI,QAAKK,KAAK,IAAMA,KAAa,CAAC;AAC3C,CAAC;AAED,eAAeJ,WAAW"} -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/style.scss: -------------------------------------------------------------------------------- 1 | @import "@wordpress/base-styles/_colors"; 2 | @import "@wordpress/base-styles/_variables"; 3 | @import "@wordpress/base-styles/_mixins"; 4 | @import "@wordpress/base-styles/_breakpoints"; 5 | @import "@wordpress/base-styles/_animations"; 6 | @import "@wordpress/base-styles/_z-index"; 7 | 8 | .edit-post-header { 9 | // Make toolbar sticky on larger breakpoints 10 | @include break-zoomed-in { 11 | flex-wrap: nowrap; 12 | } 13 | } 14 | 15 | .edit-post-header__settings { 16 | display: inline-flex; 17 | align-items: center; 18 | 19 | button.components-button.has-icon { 20 | margin-right: 0; 21 | } 22 | } 23 | 24 | .edit-post-visual-editor .block-editor-block-contextual-toolbar.is-fixed { 25 | position: static; 26 | margin-left: 0; 27 | min-height: 49px; 28 | 29 | &.is-collapsed { 30 | margin-left: 0; 31 | } 32 | 33 | .block-editor-block-toolbar .components-toolbar-group::after, 34 | > .block-editor-block-toolbar__group-collapse-fixed-toolbar::after { 35 | height: 49px; 36 | margin-top: 0; 37 | margin-bottom: 0; 38 | } 39 | 40 | &.is-collapsed:after { 41 | display: none; 42 | } 43 | } 44 | 45 | .is-fixed ~ .edit-post-visual-editor__content-area { 46 | border-top: 1px solid #e0e0e0; 47 | } 48 | -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/toggle-feature/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * External dependencies 4 | */ 5 | import { flow } from 'lodash'; 6 | 7 | /** 8 | * WordPress dependencies 9 | */ 10 | import { withSelect, withDispatch } from '@wordpress/data'; 11 | import { compose } from '@wordpress/compose'; 12 | import { MenuItem, withSpokenMessages } from '@wordpress/components'; 13 | import { __ } from '@wordpress/i18n'; 14 | import { check } from '@wordpress/icons'; 15 | function FeatureToggle({ 16 | onToggle, 17 | isActive, 18 | label, 19 | info, 20 | messageActivated, 21 | messageDeactivated, 22 | speak 23 | }) { 24 | const speakMessage = () => { 25 | if (isActive) { 26 | speak(messageDeactivated || __('Feature deactivated')); 27 | } else { 28 | speak(messageActivated || __('Feature activated')); 29 | } 30 | }; 31 | return createElement(MenuItem, { 32 | icon: isActive && check, 33 | isSelected: isActive, 34 | onClick: flow(onToggle, speakMessage), 35 | role: "menuitemcheckbox", 36 | info: info 37 | }, label); 38 | } 39 | 40 | // @ts-ignore 41 | export default compose([withSelect((select, { 42 | feature 43 | }) => ({ 44 | isActive: select('isolated/editor').isFeatureActive(feature) 45 | })), withDispatch((dispatch, ownProps) => ({ 46 | onToggle() { 47 | dispatch('isolated/editor').toggleFeature(ownProps.feature); 48 | ownProps.onClose(); 49 | } 50 | })), withSpokenMessages])(FeatureToggle); 51 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor-toolbar/toggle-option/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { withSelect, withDispatch } from '@wordpress/data'; 6 | import { compose } from '@wordpress/compose'; 7 | import { MenuItem, withSpokenMessages } from '@wordpress/components'; 8 | import { check } from '@wordpress/icons'; 9 | function OptionToggle({ 10 | onToggle, 11 | isActive, 12 | label, 13 | info 14 | }) { 15 | return createElement(MenuItem, { 16 | icon: isActive && check, 17 | isSelected: isActive, 18 | onClick: onToggle, 19 | role: "menuitemcheckbox", 20 | info: info 21 | }, label); 22 | } 23 | 24 | // @ts-ignore 25 | export default compose([withSelect((select, { 26 | option 27 | }) => ({ 28 | isActive: select('isolated/editor').isOptionActive(option) 29 | })), withDispatch((dispatch, ownProps) => ({ 30 | onToggle() { 31 | dispatch('isolated/editor').toggleOption(ownProps.option); 32 | ownProps.onClose(); 33 | } 34 | })), withSpokenMessages])(OptionToggle); 35 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor/footer.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { useViewportMatch } from '@wordpress/compose'; 6 | import { useSelect } from '@wordpress/data'; 7 | import { BlockBreadcrumb } from '@wordpress/block-editor'; 8 | import { _x } from '@wordpress/i18n'; 9 | import { store as editorStore } from '@wordpress/editor'; 10 | 11 | /** 12 | * Internal dependencies 13 | */ 14 | 15 | import FooterSection from '../footer-slot'; 16 | const Footer = ({ 17 | editorMode 18 | }) => { 19 | const isMobileViewport = useViewportMatch('medium', '<'); 20 | const { 21 | showBlockBreadcrumbs, 22 | documentLabel 23 | } = useSelect(select => { 24 | // @ts-ignore 25 | const { 26 | getPostTypeLabel 27 | } = select(editorStore); 28 | const postTypeLabel = getPostTypeLabel(); 29 | return { 30 | // TODO: This is currently disabled until it can be better worked in 31 | showBlockBreadcrumbs: false, 32 | //isFeatureActive( 'showBlockBreadcrumbs' ), 33 | // translators: Default label for the Document in the Block Breadcrumb. 34 | documentLabel: postTypeLabel || _x('Document', 'noun') 35 | }; 36 | }, []); 37 | return createElement("div", { 38 | className: "edit-post-layout__footer" 39 | }, showBlockBreadcrumbs && !isMobileViewport && editorMode === 'visual' && createElement(BlockBreadcrumb, { 40 | rootLabelText: documentLabel 41 | }), createElement(FooterSection.Slot, null)); 42 | }; 43 | export default Footer; 44 | //# sourceMappingURL=footer.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor/list-view-outline.js: -------------------------------------------------------------------------------- 1 | import { createElement, Fragment } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { DocumentOutline, WordCount, TimeToRead, CharacterCount } from '@wordpress/editor'; 6 | import { __experimentalText as Text } from '@wordpress/components'; 7 | import { __ } from '@wordpress/i18n'; 8 | export default function ListViewOutline() { 9 | return createElement(Fragment, null, createElement("div", { 10 | className: "editor-list-view-sidebar__outline" 11 | }, createElement("div", null, createElement(Text, null, __('Characters:')), createElement(Text, null, createElement(CharacterCount, null))), createElement("div", null, createElement(Text, null, __('Words:')), createElement(WordCount, null)), createElement("div", null, createElement(Text, null, __('Time to read:')), createElement(TimeToRead, null))), createElement(DocumentOutline, null)); 12 | } 13 | //# sourceMappingURL=list-view-outline.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor/sidebar-heading.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { privateApis as componentsPrivateApis } from '@wordpress/components'; 6 | import { __, _x } from '@wordpress/i18n'; 7 | import { useSelect } from '@wordpress/data'; 8 | 9 | /** 10 | * Internal dependencies 11 | */ 12 | import { unlock } from './unlock'; 13 | export const sidebars = { 14 | document: 'edit-post/document', 15 | block: 'edit-post/block' 16 | }; 17 | const { 18 | Tabs 19 | } = unlock(componentsPrivateApis); 20 | const SettingsHeader = ({ 21 | documentInspector 22 | }) => { 23 | const { 24 | documentLabel 25 | } = useSelect(select => { 26 | const hasCustomLabel = documentInspector && typeof documentInspector === 'string'; 27 | return { 28 | // translators: Default label for the Document sidebar tab, not selected. 29 | documentLabel: hasCustomLabel ? documentInspector : _x('Document', 'noun') 30 | }; 31 | }, []); 32 | 33 | /* Use a list so screen readers will announce how many tabs there are. */ 34 | return createElement(Tabs.TabList, null, !!documentInspector && createElement(Tabs.Tab, { 35 | tabId: sidebars.document 36 | }, documentLabel), createElement(Tabs.Tab, { 37 | tabId: sidebars.block 38 | }, __('Block'))); 39 | }; 40 | export default SettingsHeader; 41 | //# sourceMappingURL=sidebar-heading.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor/text-editor.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | // @ts-nocheck 3 | /** 4 | * Internal dependencies 5 | */ 6 | import PostTextEditor from './post-text-editor'; 7 | import EditorHeading from '../editor-heading-slot'; 8 | import FooterSlot from '../footer-slot'; 9 | 10 | /** 11 | * This is a copy of packages/edit-post/src/components/text-editor/index.js 12 | * 13 | * The original is not exported, and contains code for post titles 14 | */ 15 | function TextEditor({}) { 16 | return createElement("div", { 17 | className: "edit-post-text-editor" 18 | }, createElement("div", { 19 | className: "edit-post-text-editor__body" 20 | }, createElement(EditorHeading.Slot, { 21 | mode: "text" 22 | }), createElement(PostTextEditor, null), createElement(FooterSlot.Slot, { 23 | mode: "text" 24 | }))); 25 | } 26 | export default TextEditor; 27 | //# sourceMappingURL=text-editor.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor/text-editor.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"text-editor.js","names":["PostTextEditor","EditorHeading","FooterSlot","TextEditor","createElement","className","Slot","mode"],"sources":["../../../src/components/block-editor/text-editor.js"],"sourcesContent":["// @ts-nocheck\n/**\n * Internal dependencies\n */\nimport PostTextEditor from './post-text-editor';\nimport EditorHeading from '../editor-heading-slot';\nimport FooterSlot from '../footer-slot';\n\n/**\n * This is a copy of packages/edit-post/src/components/text-editor/index.js\n *\n * The original is not exported, and contains code for post titles\n */\nfunction TextEditor( {} ) {\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t);\n}\n\nexport default TextEditor;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA,OAAOA,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,aAAa,MAAM,wBAAwB;AAClD,OAAOC,UAAU,MAAM,gBAAgB;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAE,CAAC,CAAC,EAAG;EACzB,OACCC,aAAA;IAAKC,SAAS,EAAC;EAAuB,GACrCD,aAAA;IAAKC,SAAS,EAAC;EAA6B,GAC3CD,aAAA,CAACH,aAAa,CAACK,IAAI;IAACC,IAAI,EAAC;EAAM,CAAE,CAAC,EAClCH,aAAA,CAACJ,cAAc,MAAE,CAAC,EAClBI,aAAA,CAACF,UAAU,CAACI,IAAI;IAACC,IAAI,EAAC;EAAM,CAAE,CAC1B,CACD,CAAC;AAER;AAEA,eAAeJ,UAAU"} -------------------------------------------------------------------------------- /build-module/components/block-editor/unlock.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; 5 | export const { 6 | unlock 7 | } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/edit-post'); 8 | //# sourceMappingURL=unlock.js.map -------------------------------------------------------------------------------- /build-module/components/block-editor/unlock.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"unlock.js","names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","unlock"],"sources":["../../../src/components/block-editor/unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { unlock } =\n __dangerousOptInToUnstableAPIsOnlyForCoreModules(\n 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n '@wordpress/edit-post'\n );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAgD,QAAQ,yBAAyB;AAE1F,OAAO,MAAM;EAAEC;AAAO,CAAC,GACnBD,gDAAgD,CAC5C,iHAAiH,EACjH,sBACJ,CAAC"} -------------------------------------------------------------------------------- /build-module/components/document/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { createSlotFill } from '@wordpress/components'; 6 | import { __ } from '@wordpress/i18n'; 7 | const { 8 | Fill, 9 | Slot 10 | } = createSlotFill('PluginDocumentSettingPanel'); 11 | const DocumentSection = ({ 12 | children 13 | }) => { 14 | return createElement(Fill, null, children); 15 | }; 16 | DocumentSection.Slot = function (props) { 17 | return createElement(Slot, null, fills => fills ? fills : createElement("span", { 18 | className: "block-editor-block-inspector__no-blocks" 19 | }, __('Nothing to display'))); 20 | }; 21 | export default DocumentSection; 22 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/document/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["createSlotFill","__","Fill","Slot","DocumentSection","children","createElement","props","fills","className"],"sources":["../../../src/components/document/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\nconst DocumentSection = ( { children } ) => {\n\treturn { children };\n};\n\nDocumentSection.Slot = function ( props ) {\n\treturn (\n\t\t\n\t\t\t{ ( fills ) =>\n\t\t\t\tfills ? (\n\t\t\t\t\tfills\n\t\t\t\t) : (\n\t\t\t\t\t{ __( 'Nothing to display' ) }\n\t\t\t\t)\n\t\t\t}\n\t\t\n\t);\n};\n\nexport default DocumentSection;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,uBAAuB;AACtD,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGH,cAAc,CAAE,4BAA6B,CAAC;AAErE,MAAMI,eAAe,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EAC3C,OAAOC,aAAA,CAACJ,IAAI,QAAGG,QAAgB,CAAC;AACjC,CAAC;AAEDD,eAAe,CAACD,IAAI,GAAG,UAAWI,KAAK,EAAG;EACzC,OACCD,aAAA,CAACH,IAAI,QACAK,KAAK,IACRA,KAAK,GACJA,KAAK,GAELF,aAAA;IAAMG,SAAS,EAAC;EAAyC,GAAGR,EAAE,CAAE,oBAAqB,CAAS,CAG3F,CAAC;AAET,CAAC;AAED,eAAeG,eAAe"} -------------------------------------------------------------------------------- /build-module/components/editor-heading-slot/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | import { createSlotFill } from '@wordpress/components'; 3 | const { 4 | Fill, 5 | Slot 6 | } = createSlotFill('IsolatedEditorHeading'); 7 | const EditorHeading = ({ 8 | children 9 | }) => { 10 | return createElement(Fill, null, children); 11 | }; 12 | EditorHeading.Slot = function (props) { 13 | return createElement(Slot, null, fills => fills); 14 | }; 15 | export default EditorHeading; 16 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/editor-heading-slot/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["createSlotFill","Fill","Slot","EditorHeading","children","createElement","props","fills"],"sources":["../../../src/components/editor-heading-slot/index.js"],"sourcesContent":["import { createSlotFill } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'IsolatedEditorHeading' );\n\nconst EditorHeading = ( { children } ) => {\n\treturn { children };\n};\n\nEditorHeading.Slot = function ( props ) {\n\treturn { ( fills ) => fills };\n};\n\nexport default EditorHeading;"],"mappings":";AAAA,SAASA,cAAc,QAAQ,uBAAuB;AAEtD,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGF,cAAc,CAAE,uBAAwB,CAAC;AAEhE,MAAMG,aAAa,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EACzC,OAAOC,aAAA,CAACJ,IAAI,QAAGG,QAAgB,CAAC;AACjC,CAAC;AAEDD,aAAa,CAACD,IAAI,GAAG,UAAWI,KAAK,EAAG;EACvC,OAAOD,aAAA,CAACH,IAAI,QAAKK,KAAK,IAAMA,KAAa,CAAC;AAC3C,CAAC;AAED,eAAeJ,aAAa"} -------------------------------------------------------------------------------- /build-module/components/editor-loaded/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | 5 | import { useEffect } from '@wordpress/element'; 6 | import { useSelect } from '@wordpress/data'; 7 | 8 | /** 9 | * @callback OnLoad 10 | */ 11 | 12 | /** 13 | * Used by clients to add an optional loading placeholder 14 | * 15 | * @param {Object} props - Component props 16 | * @param {OnLoad} [props.onLoaded] - Callback to signal that the editor has loaded 17 | * @param {OnLoad} [props.onLoading] - Callback to signal that the editor is loading 18 | */ 19 | function EditorLoaded({ 20 | onLoaded, 21 | onLoading 22 | }) { 23 | const { 24 | isEditorReady 25 | } = useSelect(select => ({ 26 | // @ts-ignore 27 | isEditorReady: select('isolated/editor').isEditorReady() 28 | }), []); 29 | useEffect(() => { 30 | if (isEditorReady) { 31 | onLoaded && onLoaded(); 32 | } else { 33 | onLoading && onLoading(); 34 | } 35 | }, [isEditorReady]); 36 | return null; 37 | } 38 | export default EditorLoaded; 39 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/footer-slot/index.js: -------------------------------------------------------------------------------- 1 | import { createElement } from "react"; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | import { createSlotFill } from '@wordpress/components'; 6 | const { 7 | Fill, 8 | Slot 9 | } = createSlotFill('IsolatedFooter'); 10 | const FooterSection = ({ 11 | children 12 | }) => { 13 | return createElement(Fill, null, children); 14 | }; 15 | FooterSection.Slot = function (props) { 16 | return createElement(Slot, null, fills => fills); 17 | }; 18 | export default FooterSection; 19 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/footer-slot/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["createSlotFill","Fill","Slot","FooterSection","children","createElement","props","fills"],"sources":["../../../src/components/footer-slot/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'IsolatedFooter' );\n\nconst FooterSection = ( { children } ) => {\n\treturn { children };\n};\n\nFooterSection.Slot = function( props ) {\n\treturn { ( fills ) => fills };\n};\n\nexport default FooterSection;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,uBAAuB;AAEtD,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGF,cAAc,CAAE,gBAAiB,CAAC;AAEzD,MAAMG,aAAa,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EACzC,OAAOC,aAAA,CAACJ,IAAI,QAAGG,QAAgB,CAAC;AACjC,CAAC;AAEDD,aAAa,CAACD,IAAI,GAAG,UAAUI,KAAK,EAAG;EACtC,OAAOD,aAAA,CAACH,IAAI,QAAKK,KAAK,IAAMA,KAAa,CAAC;AAC3C,CAAC;AAED,eAAeJ,aAAa"} -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/interface-store/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import * as actions from './actions'; 5 | import * as selectors from './selectors'; 6 | import reducer from './reducer'; 7 | 8 | /** 9 | * Store definition for the interface namespace. 10 | * 11 | * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore 12 | * 13 | * @type {Object} 14 | */ 15 | export default { 16 | reducer, 17 | actions, 18 | selectors 19 | }; 20 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/interface-store/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["actions","selectors","reducer"],"sources":["../../../../src/components/with-registry-provider/interface-store/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport reducer from './reducer';\n\n/**\n * Store definition for the interface namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport default {\n\treducer,\n\tactions,\n\tselectors,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,SAAS,MAAM,aAAa;AACxC,OAAOC,OAAO,MAAM,WAAW;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;EACdA,OAAO;EACPF,OAAO;EACPC;AACD,CAAC"} -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/interface-store/reducer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { combineReducers } from '@wordpress/data'; 5 | export function complementaryAreas(state = {}, action) { 6 | switch (action.type) { 7 | case 'SET_DEFAULT_COMPLEMENTARY_AREA': 8 | { 9 | const { 10 | scope, 11 | area 12 | } = action; 13 | 14 | // If there's already an area, don't overwrite it. 15 | if (state[scope]) { 16 | return state; 17 | } 18 | return { 19 | ...state, 20 | [scope]: area 21 | }; 22 | } 23 | case 'ENABLE_COMPLEMENTARY_AREA': 24 | { 25 | const { 26 | scope, 27 | area 28 | } = action; 29 | return { 30 | ...state, 31 | [scope]: area 32 | }; 33 | } 34 | } 35 | return state; 36 | } 37 | export default combineReducers({ 38 | complementaryAreas 39 | }); 40 | //# sourceMappingURL=reducer.js.map -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/interface-store/reducer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.js","names":["combineReducers","complementaryAreas","state","action","type","scope","area"],"sources":["../../../../src/components/with-registry-provider/interface-store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\nexport function complementaryAreas( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEFAULT_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\n\t\t\t// If there's already an area, don't overwrite it.\n\t\t\tif ( state[ scope ] ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t\tcase 'ENABLE_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tcomplementaryAreas,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;AAEjD,OAAO,SAASC,kBAAkBA,CAAEC,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,EAAG;EACxD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,gCAAgC;MAAE;QACtC,MAAM;UAAEC,KAAK;UAAEC;QAAK,CAAC,GAAGH,MAAM;;QAE9B;QACA,IAAKD,KAAK,CAAEG,KAAK,CAAE,EAAG;UACrB,OAAOH,KAAK;QACb;QAEA,OAAO;UACN,GAAGA,KAAK;UACR,CAAEG,KAAK,GAAIC;QACZ,CAAC;MACF;IACA,KAAK,2BAA2B;MAAE;QACjC,MAAM;UAAED,KAAK;UAAEC;QAAK,CAAC,GAAGH,MAAM;QAC9B,OAAO;UACN,GAAGD,KAAK;UACR,CAAEG,KAAK,GAAIC;QACZ,CAAC;MACF;EACD;EAEA,OAAOJ,KAAK;AACb;AAEA,eAAeF,eAAe,CAAE;EAC/BC;AACD,CAAE,CAAC"} -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/actions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { convertBlockToStatic, convertBlocksToReusable, deleteReusableBlock } from './controls'; 5 | 6 | /** 7 | * Returns a generator converting a reusable block into a static block. 8 | * 9 | * @param {string} clientId The client ID of the block to attach. 10 | */ 11 | export function* __experimentalConvertBlockToStatic(clientId) { 12 | yield convertBlockToStatic(clientId); 13 | } 14 | 15 | /** 16 | * Returns a generator converting one or more static blocks into a reusable block. 17 | * 18 | * @param {string[]} clientIds The client IDs of the block to detach. 19 | */ 20 | export function* __experimentalConvertBlocksToReusable(clientIds) { 21 | yield convertBlocksToReusable(clientIds); 22 | } 23 | 24 | /** 25 | * Returns a generator deleting a reusable block. 26 | * 27 | * @param {string} id The ID of the reusable block to delete. 28 | */ 29 | export function* __experimentalDeleteReusableBlock(id) { 30 | yield deleteReusableBlock(id); 31 | } 32 | 33 | /** 34 | * Returns an action descriptor for SET_EDITING_REUSABLE_BLOCK action. 35 | * 36 | * @param {string} clientId The clientID of the reusable block to target. 37 | * @param {boolean} isEditing Whether the block should be in editing state. 38 | * @return {Object} Action descriptor. 39 | */ 40 | export function __experimentalSetEditingReusableBlock(clientId, isEditing) { 41 | return { 42 | type: 'SET_EDITING_REUSABLE_BLOCK', 43 | clientId, 44 | isEditing 45 | }; 46 | } 47 | //# sourceMappingURL=actions.js.map -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/constants.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Constant for the store module (or reducer) key. 3 | * 4 | * @type {string} 5 | */ 6 | export const STORE_KEY = 'core/reusable-blocks'; 7 | //# sourceMappingURL=constants.js.map -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/constants.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"constants.js","names":["STORE_KEY"],"sources":["../../../../src/components/with-registry-provider/reusable-store/constants.js"],"sourcesContent":["/**\n * Constant for the store module (or reducer) key.\n *\n * @type {string}\n */\nexport const STORE_KEY = 'core/reusable-blocks';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,GAAG,sBAAsB"} -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import * as actions from './actions'; 5 | import controls from './controls'; 6 | import reducer from './reducer'; 7 | import * as selectors from './selectors'; 8 | 9 | /** 10 | * Data store configuration. 11 | * 12 | * @see https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#registerStore 13 | * 14 | * @type {Object} 15 | */ 16 | export default { 17 | actions, 18 | controls, 19 | reducer, 20 | selectors 21 | }; 22 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["actions","controls","reducer","selectors"],"sources":["../../../../src/components/with-registry-provider/reusable-store/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport * as actions from './actions';\nimport controls from './controls';\nimport reducer from './reducer';\nimport * as selectors from './selectors';\n\n/**\n * Data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#registerStore\n *\n * @type {Object}\n */\nexport default {\n\tactions,\n\tcontrols,\n\treducer,\n\tselectors,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,WAAW;AACpC,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAO,KAAKC,SAAS,MAAM,aAAa;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;EACdH,OAAO;EACPC,QAAQ;EACRC,OAAO;EACPC;AACD,CAAC"} -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/reducer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { combineReducers } from '@wordpress/data'; 5 | export function isEditingReusableBlock(state = {}, action) { 6 | if (action?.type === 'SET_EDITING_REUSABLE_BLOCK') { 7 | return { 8 | ...state, 9 | [action.clientId]: action.isEditing 10 | }; 11 | } 12 | return state; 13 | } 14 | export default combineReducers({ 15 | isEditingReusableBlock 16 | }); 17 | //# sourceMappingURL=reducer.js.map -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/reducer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.js","names":["combineReducers","isEditingReusableBlock","state","action","type","clientId","isEditing"],"sources":["../../../../src/components/with-registry-provider/reusable-store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\nexport function isEditingReusableBlock( state = {}, action ) {\n\tif ( action?.type === 'SET_EDITING_REUSABLE_BLOCK' ) {\n\t\treturn {\n\t\t\t...state,\n\t\t\t[ action.clientId ]: action.isEditing,\n\t\t};\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tisEditingReusableBlock,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;AAEjD,OAAO,SAASC,sBAAsBA,CAAEC,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,EAAG;EAC5D,IAAKA,MAAM,EAAEC,IAAI,KAAK,4BAA4B,EAAG;IACpD,OAAO;MACN,GAAGF,KAAK;MACR,CAAEC,MAAM,CAACE,QAAQ,GAAIF,MAAM,CAACG;IAC7B,CAAC;EACF;EAEA,OAAOJ,KAAK;AACb;AAEA,eAAeF,eAAe,CAAE;EAC/BC;AACD,CAAE,CAAC"} -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/selectors.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns true if reusable block is in the editing state. 3 | * 4 | * @param {Object} state Global application state. 5 | * @param {number} clientId the clientID of the block. 6 | * @return {boolean} Whether the reusable block is in the editing state. 7 | */ 8 | export function __experimentalIsEditingReusableBlock(state, clientId) { 9 | return state.isEditingReusableBlock[clientId]; 10 | } 11 | //# sourceMappingURL=selectors.js.map -------------------------------------------------------------------------------- /build-module/components/with-registry-provider/reusable-store/selectors.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.js","names":["__experimentalIsEditingReusableBlock","state","clientId","isEditingReusableBlock"],"sources":["../../../../src/components/with-registry-provider/reusable-store/selectors.js"],"sourcesContent":["/**\n * Returns true if reusable block is in the editing state.\n *\n * @param {Object} state Global application state.\n * @param {number} clientId the clientID of the block.\n * @return {boolean} Whether the reusable block is in the editing state.\n */\nexport function __experimentalIsEditingReusableBlock( state, clientId ) {\n\treturn state.isEditingReusableBlock[ clientId ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,oCAAoCA,CAAEC,KAAK,EAAEC,QAAQ,EAAG;EACvE,OAAOD,KAAK,CAACE,sBAAsB,CAAED,QAAQ,CAAE;AAChD"} -------------------------------------------------------------------------------- /build-module/global.d.ts: -------------------------------------------------------------------------------- 1 | interface Window { 2 | isoInitialised: any; 3 | isoInitialisedBlocks: any; 4 | wp: any; 5 | } 6 | -------------------------------------------------------------------------------- /build-module/store/blocks/actions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import { ActionCreators } from 'redux-undo'; 5 | const actions = { 6 | *undo() { 7 | return yield ActionCreators.undo(); 8 | }, 9 | *redo() { 10 | return yield ActionCreators.redo(); 11 | }, 12 | /** 13 | * Update blocks without undo history 14 | * 15 | * @param {object[]} blocks 16 | * @param {Object} options 17 | */ 18 | *updateBlocksWithUndo(blocks, options = {}) { 19 | return yield { 20 | type: 'UPDATE_BLOCKS_WITH_UNDO', 21 | blocks, 22 | ...options 23 | }; 24 | }, 25 | /** 26 | * Update blocks without undo history 27 | * 28 | * @param {object[]} blocks 29 | * @param {Object} options 30 | */ 31 | *updateBlocksWithoutUndo(blocks, options = {}) { 32 | return yield { 33 | type: 'UPDATE_BLOCKS_WITHOUT_UNDO', 34 | blocks, 35 | ...options 36 | }; 37 | } 38 | }; 39 | export default actions; 40 | //# sourceMappingURL=actions.js.map -------------------------------------------------------------------------------- /build-module/store/blocks/selectors.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { getEditorMode } from '../editor/selectors'; 5 | 6 | /** 7 | * Get blocks from edit history 8 | * 9 | * @param {Object} state - Current state 10 | * @return {object[]} 11 | */ 12 | export function getBlocks(state) { 13 | return state.blocks.present.blocks; 14 | } 15 | 16 | /** 17 | * Get selection 18 | * 19 | * @param {Object} state - Current state 20 | * @return {Object} 21 | */ 22 | export function getEditorSelection(state) { 23 | return state.blocks.present.selection; 24 | } 25 | 26 | /** 27 | * Is undo possible? 28 | * 29 | * @param {Object} state - Current state 30 | * @return {boolean} 31 | */ 32 | export function hasEditorUndo(state) { 33 | if (getEditorMode(state) !== 'visual') return false; 34 | return state.blocks.past.length > 0; 35 | } 36 | 37 | /** 38 | * Is redo possible? 39 | * 40 | * @param {Object} state - Current state 41 | * @return {boolean} 42 | */ 43 | export function hasEditorRedo(state) { 44 | if (getEditorMode(state) !== 'visual') return false; 45 | return state.blocks.future.length > 0; 46 | } 47 | 48 | /** 49 | * Get current edit count 50 | * 51 | * @param {Object} state - Current state 52 | * @return {number} 53 | */ 54 | export function getEditCount(state) { 55 | return state.blocks.present.editCount; 56 | } 57 | //# sourceMappingURL=selectors.js.map -------------------------------------------------------------------------------- /build-module/store/core-editor/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | 5 | import { serialize } from '@wordpress/blocks'; 6 | 7 | /** 8 | * Override the default `core/editor` store with functions that return data from `core/block-editor` instead of the post in `core/editor` 9 | * 10 | * @param existingSelectors 11 | * @param newSelect 12 | */ 13 | export default function (existingSelectors, newSelect) { 14 | return { 15 | getEditedPostAttribute: (state, attributeName) => { 16 | if (attributeName === 'content') { 17 | // Content is stored in core/block-editor, not in the post entity 18 | return serialize(newSelect('core/block-editor').getBlocks()); 19 | } 20 | 21 | // Pass everything else through 22 | return existingSelectors.getEditedPostAttribute(state, attributeName); 23 | }, 24 | getEditedPostContent: () => { 25 | return serialize(newSelect('core/block-editor').getBlocks()); 26 | } 27 | }; 28 | } 29 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/store/edit-post/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { registerStore, combineReducers } from '@wordpress/data'; 5 | 6 | /** 7 | * Internal dependencies 8 | */ 9 | 10 | const STORE_KEY = 'core/edit-post'; 11 | 12 | // This is a fake store to prevent errors if anything tries to use `isFeatureActive` 13 | const store = registerStore(STORE_KEY, { 14 | reducer: combineReducers({}), 15 | actions: {}, 16 | selectors: { 17 | isFeatureActive: () => false 18 | } 19 | }); 20 | export default store; 21 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build-module/store/edit-post/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["registerStore","combineReducers","STORE_KEY","store","reducer","actions","selectors","isFeatureActive"],"sources":["../../../src/store/edit-post/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { registerStore, combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\n\nconst STORE_KEY = 'core/edit-post';\n\n// This is a fake store to prevent errors if anything tries to use `isFeatureActive`\nconst store = registerStore( STORE_KEY, {\n\treducer: combineReducers( {} ),\n\tactions: {},\n\tselectors: {\n\t\tisFeatureActive: () => false,\n\t},\n} );\n\nexport default store;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,eAAe,QAAQ,iBAAiB;;AAEhE;AACA;AACA;;AAEA,MAAMC,SAAS,GAAG,gBAAgB;;AAElC;AACA,MAAMC,KAAK,GAAGH,aAAa,CAAEE,SAAS,EAAE;EACvCE,OAAO,EAAEH,eAAe,CAAE,CAAC,CAAE,CAAC;EAC9BI,OAAO,EAAE,CAAC,CAAC;EACXC,SAAS,EAAE;IACVC,eAAe,EAAEA,CAAA,KAAM;EACxB;AACD,CAAE,CAAC;AAEH,eAAeJ,KAAK"} -------------------------------------------------------------------------------- /build-module/store/options/actions.js: -------------------------------------------------------------------------------- 1 | const actions = { 2 | /** 3 | * Toggle the option 4 | * 5 | * @param {string} option Option name 6 | */ 7 | toggleOption(option) { 8 | return { 9 | type: 'TOGGLE_OPTION', 10 | option 11 | }; 12 | } 13 | }; 14 | export default actions; 15 | //# sourceMappingURL=actions.js.map -------------------------------------------------------------------------------- /build-module/store/options/actions.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.js","names":["actions","toggleOption","option","type"],"sources":["../../../src/store/options/actions.js"],"sourcesContent":["const actions = {\n\t/**\n\t * Toggle the option\n\t *\n\t * @param {string} option Option name\n\t */\n\ttoggleOption( option ) {\n\t\treturn {\n\t\t\ttype: 'TOGGLE_OPTION',\n\t\t\toption,\n\t\t};\n\t},\n};\n\nexport default actions;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG;EACf;AACD;AACA;AACA;AACA;EACCC,YAAYA,CAAEC,MAAM,EAAG;IACtB,OAAO;MACNC,IAAI,EAAE,eAAe;MACrBD;IACD,CAAC;EACF;AACD,CAAC;AAED,eAAeF,OAAO"} -------------------------------------------------------------------------------- /build-module/store/options/reducer.js: -------------------------------------------------------------------------------- 1 | const DEFAULT_STATE = {}; 2 | const reducer = (state = DEFAULT_STATE, action) => { 3 | switch (action.type) { 4 | case 'TOGGLE_OPTION': 5 | return { 6 | ...state, 7 | [action.option]: state[action.option] ? !state[action.option] : true 8 | }; 9 | } 10 | return state; 11 | }; 12 | export default reducer; 13 | //# sourceMappingURL=reducer.js.map -------------------------------------------------------------------------------- /build-module/store/options/reducer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.js","names":["DEFAULT_STATE","reducer","state","action","type","option"],"sources":["../../../src/store/options/reducer.js"],"sourcesContent":["const DEFAULT_STATE = {};\n\nconst reducer = ( state = DEFAULT_STATE, action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'TOGGLE_OPTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.option ]: state[ action.option ] ? ! state[ action.option ] : true,\n\t\t\t};\n\t}\n\n\treturn state;\n};\n\nexport default reducer;\n"],"mappings":"AAAA,MAAMA,aAAa,GAAG,CAAC,CAAC;AAExB,MAAMC,OAAO,GAAGA,CAAEC,KAAK,GAAGF,aAAa,EAAEG,MAAM,KAAM;EACpD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,eAAe;MACnB,OAAO;QACN,GAAGF,KAAK;QACR,CAAEC,MAAM,CAACE,MAAM,GAAIH,KAAK,CAAEC,MAAM,CAACE,MAAM,CAAE,GAAG,CAAEH,KAAK,CAAEC,MAAM,CAACE,MAAM,CAAE,GAAG;MACxE,CAAC;EACH;EAEA,OAAOH,KAAK;AACb,CAAC;AAED,eAAeD,OAAO"} -------------------------------------------------------------------------------- /build-module/store/options/selectors.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Get the option value 3 | * 4 | * @param {Object} state - Current state 5 | * @param {string} option - Option name 6 | * @return {boolean} 7 | */ 8 | export function isOptionActive(state, option) { 9 | return state.options[option] ? state.options[option] : false; 10 | } 11 | //# sourceMappingURL=selectors.js.map -------------------------------------------------------------------------------- /build-module/store/options/selectors.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.js","names":["isOptionActive","state","option","options"],"sources":["../../../src/store/options/selectors.js"],"sourcesContent":["/**\n * Get the option value\n *\n * @param {Object} state - Current state\n * @param {string} option - Option name\n * @return {boolean}\n */\nexport function isOptionActive( state, option ) {\n\treturn state.options[ option ] ? state.options[ option ] : false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,cAAcA,CAAEC,KAAK,EAAEC,MAAM,EAAG;EAC/C,OAAOD,KAAK,CAACE,OAAO,CAAED,MAAM,CAAE,GAAGD,KAAK,CAACE,OAAO,CAAED,MAAM,CAAE,GAAG,KAAK;AACjE"} -------------------------------------------------------------------------------- /build-module/store/preferences/actions.js: -------------------------------------------------------------------------------- 1 | const actions = { 2 | /** 3 | * Toggle the feature 4 | * 5 | * @param {string} feature - Feature name 6 | */ 7 | toggleFeature(feature) { 8 | return { 9 | type: 'TOGGLE_FEATURE', 10 | feature 11 | }; 12 | } 13 | }; 14 | export default actions; 15 | //# sourceMappingURL=actions.js.map -------------------------------------------------------------------------------- /build-module/store/preferences/actions.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.js","names":["actions","toggleFeature","feature","type"],"sources":["../../../src/store/preferences/actions.js"],"sourcesContent":["const actions = {\n\t/**\n\t * Toggle the feature\n\t *\n\t * @param {string} feature - Feature name\n\t */\n\ttoggleFeature( feature ) {\n\t\treturn {\n\t\t\ttype: 'TOGGLE_FEATURE',\n\t\t\tfeature,\n\t\t};\n\t},\n};\n\nexport default actions;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG;EACf;AACD;AACA;AACA;AACA;EACCC,aAAaA,CAAEC,OAAO,EAAG;IACxB,OAAO;MACNC,IAAI,EAAE,gBAAgB;MACtBD;IACD,CAAC;EACF;AACD,CAAC;AAED,eAAeF,OAAO"} -------------------------------------------------------------------------------- /build-module/store/preferences/reducer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | 5 | const reducer = (state, action) => { 6 | switch (action.type) { 7 | case 'TOGGLE_FEATURE': 8 | const { 9 | preferencesKey, 10 | ...preferences 11 | } = state; 12 | const updatedPreferences = { 13 | ...preferences, 14 | [action.feature]: state[action.feature] ? !state[action.feature] : true 15 | }; 16 | if (preferencesKey && window.localStorage) { 17 | localStorage.setItem(preferencesKey, JSON.stringify(updatedPreferences)); 18 | } 19 | return { 20 | preferencesKey, 21 | ...updatedPreferences 22 | }; 23 | } 24 | return state; 25 | }; 26 | export default reducer; 27 | //# sourceMappingURL=reducer.js.map -------------------------------------------------------------------------------- /build-module/store/preferences/reducer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.js","names":["reducer","state","action","type","preferencesKey","preferences","updatedPreferences","feature","window","localStorage","setItem","JSON","stringify"],"sources":["../../../src/store/preferences/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nconst reducer = ( state, action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'TOGGLE_FEATURE':\n\t\t\tconst { preferencesKey, ...preferences } = state;\n\t\t\tconst updatedPreferences = {\n\t\t\t\t...preferences,\n\t\t\t\t[ action.feature ]: state[ action.feature ] ? !state[ action.feature ] : true,\n\t\t\t};\n\n\t\t\tif ( preferencesKey && window.localStorage ) {\n\t\t\t\tlocalStorage.setItem( preferencesKey, JSON.stringify( updatedPreferences ) );\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tpreferencesKey,\n\t\t\t\t...updatedPreferences,\n\t\t\t};\n\t}\n\n\treturn state;\n};\n\nexport default reducer;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,MAAMA,OAAO,GAAGA,CAAEC,KAAK,EAAEC,MAAM,KAAM;EACpC,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,gBAAgB;MACpB,MAAM;QAAEC,cAAc;QAAE,GAAGC;MAAY,CAAC,GAAGJ,KAAK;MAChD,MAAMK,kBAAkB,GAAG;QAC1B,GAAGD,WAAW;QACd,CAAEH,MAAM,CAACK,OAAO,GAAIN,KAAK,CAAEC,MAAM,CAACK,OAAO,CAAE,GAAG,CAACN,KAAK,CAAEC,MAAM,CAACK,OAAO,CAAE,GAAG;MAC1E,CAAC;MAED,IAAKH,cAAc,IAAII,MAAM,CAACC,YAAY,EAAG;QAC5CA,YAAY,CAACC,OAAO,CAAEN,cAAc,EAAEO,IAAI,CAACC,SAAS,CAAEN,kBAAmB,CAAE,CAAC;MAC7E;MAEA,OAAO;QACNF,cAAc;QACd,GAAGE;MACJ,CAAC;EACH;EAEA,OAAOL,KAAK;AACb,CAAC;AAED,eAAeD,OAAO"} -------------------------------------------------------------------------------- /build-module/store/preferences/selectors.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Is the feature active? 3 | * 4 | * @param {Object} state - Current state 5 | * @param {string} feature - Feature name 6 | * @param {boolean} [defaultValue=false] - Default value 7 | */ 8 | export function isFeatureActive(state, feature, defaultValue = false) { 9 | return state.preferences[feature] === undefined ? defaultValue : state.preferences[feature]; 10 | } 11 | //# sourceMappingURL=selectors.js.map -------------------------------------------------------------------------------- /build-module/store/preferences/selectors.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.js","names":["isFeatureActive","state","feature","defaultValue","preferences","undefined"],"sources":["../../../src/store/preferences/selectors.js"],"sourcesContent":["/**\n * Is the feature active?\n *\n * @param {Object} state - Current state\n * @param {string} feature - Feature name\n * @param {boolean} [defaultValue=false] - Default value\n */\nexport function isFeatureActive( state, feature, defaultValue = false ) {\n\treturn state.preferences[ feature ] === undefined ? defaultValue : state.preferences[ feature ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAAEC,KAAK,EAAEC,OAAO,EAAEC,YAAY,GAAG,KAAK,EAAG;EACvE,OAAOF,KAAK,CAACG,WAAW,CAAEF,OAAO,CAAE,KAAKG,SAAS,GAAGF,YAAY,GAAGF,KAAK,CAACG,WAAW,CAAEF,OAAO,CAAE;AAChG"} -------------------------------------------------------------------------------- /build-types/browser/core.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | //# sourceMappingURL=core.d.ts.map -------------------------------------------------------------------------------- /build-types/browser/core.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/browser/core.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/browser/index.d.ts: -------------------------------------------------------------------------------- 1 | export type BlockEditorSettings = import('../index').BlockEditorSettings; 2 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/browser/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.js"],"names":[],"mappings":"kCAac,OAAO,UAAU,EAAE,mBAAmB"} -------------------------------------------------------------------------------- /build-types/components/action-area/index.d.ts: -------------------------------------------------------------------------------- 1 | export default ActionArea; 2 | declare function ActionArea({ children }: { 3 | children: any; 4 | }): JSX.Element; 5 | declare namespace ActionArea { 6 | function Slot(): JSX.Element; 7 | } 8 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/action-area/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/action-area/index.js"],"names":[],"mappings":";AAOA;;gBAEC;;IAED,6BAEC"} -------------------------------------------------------------------------------- /build-types/components/api-fetch/index.d.ts: -------------------------------------------------------------------------------- 1 | export default registerApiHandlers; 2 | declare function registerApiHandlers(options: any): void; 3 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/api-fetch/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/api-fetch/index.js"],"names":[],"mappings":";AAqDA,yDAoBC"} -------------------------------------------------------------------------------- /build-types/components/block-editor-container/click-outside.d.ts: -------------------------------------------------------------------------------- 1 | export default ClickOutsideWrapper; 2 | declare const ClickOutsideWrapper: import("react").ComponentType; 3 | //# sourceMappingURL=click-outside.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-container/click-outside.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"click-outside.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor-container/click-outside.js"],"names":[],"mappings":";AAWA,sEAyCE"} -------------------------------------------------------------------------------- /build-types/components/block-editor-container/hot-swapper.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: unknown; 2 | export default _default; 3 | //# sourceMappingURL=hot-swapper.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-container/hot-swapper.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"hot-swapper.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor-container/hot-swapper.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/block-editor-container/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: unknown; 2 | export default _default; 3 | export type BlockEditorSettings = import('../../index').BlockEditorSettings; 4 | export type OnError = import('../../index').OnError; 5 | export type OnMore = import('../../index').OnMore; 6 | export type EditorMode = import('../../store/editor/reducer').EditorMode; 7 | export type OnLoad = import('../../index').OnLoad; 8 | export type OnUpdate = import('../block-editor-contents/index').OnUpdate; 9 | /** 10 | * Set editing callback 11 | */ 12 | export type OnSetEditing = (isEditing: boolean) => any; 13 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-container/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor-container/index.js"],"names":[],"mappings":";;kCAsBc,OAAO,aAAa,EAAE,mBAAmB;sBACzC,OAAO,aAAa,EAAE,OAAO;qBAC7B,OAAO,aAAa,EAAE,MAAM;yBAC5B,OAAO,4BAA4B,EAAE,UAAU;qBAC/C,OAAO,aAAa,EAAE,MAAM;uBAC5B,OAAO,gCAAgC,EAAE,QAAQ;;;;uCAMpD,OAAO"} -------------------------------------------------------------------------------- /build-types/components/block-editor-container/with-focus-outside.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: (Inner: import("react").ComponentType) => import("react").ComponentType; 2 | export default _default; 3 | //# sourceMappingURL=with-focus-outside.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-container/with-focus-outside.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"with-focus-outside.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor-container/with-focus-outside.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/block-editor-contents/editor-content.d.ts: -------------------------------------------------------------------------------- 1 | export default getInitialEditorContent; 2 | export type Pattern = import('../../store/editor/reducer').Pattern; 3 | /** 4 | * Get the pattern to start an editor with. 5 | * 6 | * @param {Pattern[]} patterns Array of patterns 7 | * @param {string} currentPattern Current pattern name 8 | * @param {object[]} template Current template 9 | * @param {object[]} initialContent Initial content 10 | */ 11 | declare function getInitialEditorContent(patterns: Pattern[], currentPattern: string, template: object[], initialContent: object[]): any; 12 | //# sourceMappingURL=editor-content.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-contents/editor-content.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"editor-content.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor-contents/editor-content.js"],"names":[],"mappings":";sBAMc,OAAO,4BAA4B,EAAE,OAAO;AAK1D;;;;;;;GAOG;AACH,mDALW,OAAO,EAAE,kBACT,MAAM,YACN,MAAM,EAAE,kBACR,MAAM,EAAE,OA4BlB"} -------------------------------------------------------------------------------- /build-types/components/block-editor-contents/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: unknown; 2 | export default _default; 3 | export type EditorMode = import('../../store/editor/reducer').EditorMode; 4 | export type BlockEditorSettings = import('../../index').BlockEditorSettings; 5 | export type OnLoad = import('../../index').OnLoad; 6 | export type OnMore = import('../../index').OnMore; 7 | /** 8 | * Get editor selection 9 | */ 10 | export type OnSelection = () => any; 11 | /** 12 | * Update callback 13 | */ 14 | export type OnUpdate = (blocks: object[], settings: any, loader?: any, options?: any) => any; 15 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-contents/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor-contents/index.js"],"names":[],"mappings":";;yBAqBc,OAAO,4BAA4B,EAAE,UAAU;kCAC/C,OAAO,aAAa,EAAE,mBAAmB;qBACzC,OAAO,aAAa,EAAE,MAAM;qBAC5B,OAAO,aAAa,EAAE,MAAM;;;;;;;;gCAY/B,MAAM,EAAE"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/block-navigation/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: import("@wordpress/element/node_modules/@types/react").ForwardRefExoticComponent & import("@wordpress/element/node_modules/@types/react").RefAttributes>; 5 | export default _default; 6 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/block-navigation/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/block-navigation/index.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/header-toolbar/index.d.ts: -------------------------------------------------------------------------------- 1 | export default HeaderToolbar; 2 | declare function HeaderToolbar(props: any): JSX.Element; 3 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/header-toolbar/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/header-toolbar/index.js"],"names":[],"mappings":";AAyBA,wDA6IC"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/header-toolbar/redo.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: import("@wordpress/element/node_modules/@types/react").ForwardRefExoticComponent & import("@wordpress/element/node_modules/@types/react").RefAttributes>; 2 | export default _default; 3 | //# sourceMappingURL=redo.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/header-toolbar/redo.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"redo.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/header-toolbar/redo.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/header-toolbar/undo.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: import("@wordpress/element/node_modules/@types/react").ForwardRefExoticComponent & import("@wordpress/element/node_modules/@types/react").RefAttributes>; 2 | export default _default; 3 | //# sourceMappingURL=undo.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/header-toolbar/undo.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"undo.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/header-toolbar/undo.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/index.d.ts: -------------------------------------------------------------------------------- 1 | export default BlockEditorToolbar; 2 | export type EditorMode = import('../../store/editor/reducer').EditorMode; 3 | export type BlockEditorSettings = import('../../index').BlockEditorSettings; 4 | export type OnMore = import('../../index').OnMore; 5 | /** @typedef {import('../../store/editor/reducer').EditorMode} EditorMode */ 6 | /** @typedef {import('../../index').BlockEditorSettings} BlockEditorSettings */ 7 | /** @typedef {import('../../index').OnMore} OnMore */ 8 | /** 9 | * Block editor toolbar 10 | * 11 | * @param {Object} props - Component props 12 | * @param {BlockEditorSettings} props.settings - Settings 13 | * @param {EditorMode} props.editorMode - Visual or code? 14 | * @param {OnMore} props.renderMoreMenu - Callback to render additional items in the more menu 15 | */ 16 | declare function BlockEditorToolbar(props: { 17 | settings: BlockEditorSettings; 18 | editorMode: EditorMode; 19 | renderMoreMenu: OnMore; 20 | }): JSX.Element; 21 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor-toolbar/index.js"],"names":[],"mappings":";yBA0Bc,OAAO,4BAA4B,EAAE,UAAU;kCAC/C,OAAO,aAAa,EAAE,mBAAmB;qBACzC,OAAO,aAAa,EAAE,MAAM;AAF1C,4EAA4E;AAC5E,+EAA+E;AAC/E,qDAAqD;AAErD;;;;;;;GAOG;AACH;IAJsC,QAAQ,EAAnC,mBAAmB;IACD,UAAU,EAA5B,UAAU;IACI,cAAc,EAA5B,MAAM;gBAkJhB"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/inspector/index.d.ts: -------------------------------------------------------------------------------- 1 | export default Inspector; 2 | declare function Inspector({ button, onToggle }: { 3 | button: any; 4 | onToggle: any; 5 | }): JSX.Element; 6 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/inspector/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/inspector/index.js"],"names":[],"mappings":";AAYA;;;gBAsBC"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/more-menu/editor-menu.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: unknown; 2 | export default _default; 3 | export type OnClose = import('./index').OnClose; 4 | export type BlockEditorSettings = import('../../../index').BlockEditorSettings; 5 | /** 6 | * Close dropdown callback 7 | */ 8 | export type OnSetMode = (mode: string) => any; 9 | //# sourceMappingURL=editor-menu.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/more-menu/editor-menu.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"editor-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/more-menu/editor-menu.js"],"names":[],"mappings":";;sBASc,OAAO,SAAS,EAAE,OAAO;kCACzB,OAAO,gBAAgB,EAAE,mBAAmB;;;;+BAM/C,MAAM"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/more-menu/index.d.ts: -------------------------------------------------------------------------------- 1 | export default MoreMenu; 2 | export type BlockEditorSettings = import('../../../index').BlockEditorSettings; 3 | /** 4 | * Close dropdown callback 5 | */ 6 | export type OnClose = () => any; 7 | /** 8 | * More menu render callback 9 | */ 10 | export type OnMore = (settings: BlockEditorSettings, onClose: OnClose) => any; 11 | /** 12 | * More menu 13 | * 14 | * @param {Object} props - Component props 15 | * @param {BlockEditorSettings} props.settings - Settings 16 | * @param {OnClose} props.onClick 17 | * @param {OnMore} props.renderMoreMenu 18 | */ 19 | declare function MoreMenu({ settings, onClick, renderMoreMenu }: { 20 | settings: BlockEditorSettings; 21 | onClick: OnClose; 22 | renderMoreMenu: OnMore; 23 | }): JSX.Element; 24 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/more-menu/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/more-menu/index.js"],"names":[],"mappings":";kCAgBc,OAAO,gBAAgB,EAAE,mBAAmB;;;;;;;;gCAY/C,mBAAmB,WACnB,OAAO;AAWlB;;;;;;;GAOG;AACH;IAJsC,QAAQ,EAAnC,mBAAmB;IACJ,OAAO,EAAtB,OAAO;IACO,cAAc,EAA5B,MAAM;gBAmBhB"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/more-menu/link-menu.d.ts: -------------------------------------------------------------------------------- 1 | export default LinkMenu; 2 | export type BlockEditorSettings = import('../../../index').BlockEditorSettings; 3 | /** @typedef {import('../../../index').BlockEditorSettings} BlockEditorSettings */ 4 | /** 5 | * Link menu 6 | * 7 | * @param {Object} props - Component props 8 | * @param {BlockEditorSettings} props.settings - Settings 9 | */ 10 | declare function LinkMenu({ settings }: { 11 | settings: BlockEditorSettings; 12 | }): JSX.Element | null; 13 | //# sourceMappingURL=link-menu.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/more-menu/link-menu.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"link-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/more-menu/link-menu.js"],"names":[],"mappings":";kCAOc,OAAO,gBAAgB,EAAE,mBAAmB;AAA1D,kFAAkF;AAElF;;;;;GAKG;AACH;IAFsC,QAAQ,EAAnC,mBAAmB;uBAkB7B"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/more-menu/writing-menu.d.ts: -------------------------------------------------------------------------------- 1 | export default WritingMenu; 2 | export type BlockEditorSettings = import('../../../index').BlockEditorSettings; 3 | export type OnClose = import('./index').OnClose; 4 | /** @typedef {import('../../../index').BlockEditorSettings} BlockEditorSettings */ 5 | /** @typedef {import('./index').OnClose} OnClose */ 6 | /** 7 | * Writing menu 8 | * 9 | * @param {Object} props - Component props 10 | * @param {OnClose} props.onClose - Close the menu 11 | * @param {BlockEditorSettings} props.settings - Settings 12 | */ 13 | declare function WritingMenu({ onClose, settings }: { 14 | onClose: OnClose; 15 | settings: BlockEditorSettings; 16 | }): JSX.Element | null; 17 | //# sourceMappingURL=writing-menu.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/more-menu/writing-menu.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"writing-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/more-menu/writing-menu.js"],"names":[],"mappings":";kCAcc,OAAO,gBAAgB,EAAE,mBAAmB;sBAC5C,OAAO,SAAS,EAAE,OAAO;AADvC,kFAAkF;AAClF,mDAAmD;AAEnD;;;;;;GAMG;AACH;IAH0B,OAAO,EAAtB,OAAO;IACoB,QAAQ,EAAnC,mBAAmB;uBAgD7B"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/slot.d.ts: -------------------------------------------------------------------------------- 1 | export default ToolbarSlot; 2 | /** 3 | * A Toolbar slot/fill 4 | * 5 | * @param {Object} props Component props 6 | * @param {Object} props.children Child components to insert in the toolbar slot 7 | * @return object 8 | */ 9 | declare function ToolbarSlot({ children }: { 10 | children: any; 11 | }): JSX.Element; 12 | declare namespace ToolbarSlot { 13 | function Slot(props: any): JSX.Element; 14 | } 15 | //# sourceMappingURL=slot.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/slot.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor-toolbar/slot.js"],"names":[],"mappings":";AAQA;;;;;;GAMG;AACH;IAHyB,QAAQ;gBAKhC;;IAED,uCAEC"} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/toggle-feature/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: unknown; 2 | export default _default; 3 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/toggle-feature/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/toggle-feature/index.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/toggle-option/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: unknown; 2 | export default _default; 3 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor-toolbar/toggle-option/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/block-editor-toolbar/toggle-option/index.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/block-editor/footer.d.ts: -------------------------------------------------------------------------------- 1 | export default Footer; 2 | declare function Footer({ editorMode }: { 3 | editorMode: any; 4 | }): JSX.Element; 5 | //# sourceMappingURL=footer.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/footer.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/footer.js"],"names":[],"mappings":";AAeA;;gBAwBC"} -------------------------------------------------------------------------------- /build-types/components/block-editor/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: any; 2 | export default _default; 3 | export type EditorMode = import('../../store/editor/reducer').EditorMode; 4 | export type BlockEditorSettings = import('../../index').BlockEditorSettings; 5 | export type OnMore = import('../../index').OnMore; 6 | /** 7 | * Undo/redo 8 | */ 9 | export type OnHistory = () => any; 10 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/index.js"],"names":[],"mappings":";;yBAiCc,OAAO,4BAA4B,EAAE,UAAU;kCAC/C,OAAO,aAAa,EAAE,mBAAmB;qBACzC,OAAO,aAAa,EAAE,MAAM"} -------------------------------------------------------------------------------- /build-types/components/block-editor/inserter-sidebar.d.ts: -------------------------------------------------------------------------------- 1 | export default function InserterSidebar(): JSX.Element; 2 | //# sourceMappingURL=inserter-sidebar.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/inserter-sidebar.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"inserter-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/inserter-sidebar.js"],"names":[],"mappings":"AASA,uDA2BC"} -------------------------------------------------------------------------------- /build-types/components/block-editor/list-view-outline.d.ts: -------------------------------------------------------------------------------- 1 | export default function ListViewOutline(): JSX.Element; 2 | //# sourceMappingURL=list-view-outline.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/list-view-outline.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"list-view-outline.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/list-view-outline.js"],"names":[],"mappings":"AAcA,uDAsBC"} -------------------------------------------------------------------------------- /build-types/components/block-editor/listview-sidebar.d.ts: -------------------------------------------------------------------------------- 1 | export default function ListViewSidebar({ canClose }: { 2 | canClose?: boolean | undefined; 3 | }): JSX.Element; 4 | //# sourceMappingURL=listview-sidebar.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/listview-sidebar.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"listview-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/listview-sidebar.js"],"names":[],"mappings":"AA2BA;;gBAyJC"} -------------------------------------------------------------------------------- /build-types/components/block-editor/post-text-editor.d.ts: -------------------------------------------------------------------------------- 1 | export class PostTextEditor extends Component { 2 | static getDerivedStateFromProps(props: any, state: any): { 3 | value: any; 4 | isDirty: boolean; 5 | } | null; 6 | constructor(props: any); 7 | /** 8 | * Handles a textarea change event to notify the onChange prop callback and 9 | * reflect the new value in the component's own state. This marks the start 10 | * of the user's edits, if not already changed, preventing future props 11 | * changes to value from replacing the rendered value. This is expected to 12 | * be followed by a reset to dirty state via `stopEditing`. 13 | * 14 | * @see stopEditing 15 | * 16 | * @param {Event} event Change event. 17 | */ 18 | edit(event: Event): void; 19 | /** 20 | * Function called when the user has completed their edits, responsible for 21 | * ensuring that changes, if made, are surfaced to the onPersist prop 22 | * callback and resetting dirty state. 23 | */ 24 | stopEditing(): void; 25 | state: {}; 26 | render(): JSX.Element; 27 | } 28 | declare const _default: unknown; 29 | export default _default; 30 | import { Component } from '@wordpress/element'; 31 | //# sourceMappingURL=post-text-editor.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/post-text-editor.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"post-text-editor.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/post-text-editor.js"],"names":[],"mappings":"AAcA;IAUC;;;aASC;IAlBD,wBAOC;IAaD;;;;;;;;;;OAUG;IACH,YAFW,KAAK,QAOf;IAED;;;;OAIG;IACH,oBAKC;IA1CA,UAAe;IA4ChB,sBAqBC;CACD;;;0BA9EyB,oBAAoB"} -------------------------------------------------------------------------------- /build-types/components/block-editor/sidebar-heading.d.ts: -------------------------------------------------------------------------------- 1 | export namespace sidebars { 2 | let document: string; 3 | let block: string; 4 | } 5 | export default SettingsHeader; 6 | declare function SettingsHeader({ documentInspector }: { 7 | documentInspector: any; 8 | }): JSX.Element; 9 | //# sourceMappingURL=sidebar-heading.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/sidebar-heading.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sidebar-heading.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/sidebar-heading.js"],"names":[],"mappings":";;;;;AAmBA;;gBAmBC"} -------------------------------------------------------------------------------- /build-types/components/block-editor/sidebar.d.ts: -------------------------------------------------------------------------------- 1 | export default SettingsSidebar; 2 | declare function SettingsSidebar({ documentInspector }: { 3 | documentInspector: any; 4 | }): JSX.Element; 5 | //# sourceMappingURL=sidebar.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/sidebar.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/sidebar.js"],"names":[],"mappings":";AA8DA;;gBAkCC"} -------------------------------------------------------------------------------- /build-types/components/block-editor/text-editor.d.ts: -------------------------------------------------------------------------------- 1 | export default TextEditor; 2 | /** 3 | * This is a copy of packages/edit-post/src/components/text-editor/index.js 4 | * 5 | * The original is not exported, and contains code for post titles 6 | */ 7 | declare function TextEditor({}: {}): JSX.Element; 8 | //# sourceMappingURL=text-editor.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/text-editor.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"text-editor.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/text-editor.js"],"names":[],"mappings":";AAQA;;;;GAIG;AACH,iDAUC"} -------------------------------------------------------------------------------- /build-types/components/block-editor/unlock.d.ts: -------------------------------------------------------------------------------- 1 | export const unlock: (object: any) => any; 2 | //# sourceMappingURL=unlock.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/unlock.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"unlock.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/unlock.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/block-editor/visual-editor.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a copy of packages/edit-post/src/components/visual-editor/index.js 3 | * 4 | * The original is not exported, and contains code for post titles 5 | * 6 | * @param {Object} args 7 | * @param args.styles 8 | */ 9 | export default function VisualEditor({ styles }: { 10 | styles: any; 11 | }): JSX.Element; 12 | //# sourceMappingURL=visual-editor.d.ts.map -------------------------------------------------------------------------------- /build-types/components/block-editor/visual-editor.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"visual-editor.d.ts","sourceRoot":"","sources":["../../../src/components/block-editor/visual-editor.js"],"names":[],"mappings":"AAiFA;;;;;;;GAOG;AACH;IAFe,MAAM;gBAkVpB"} -------------------------------------------------------------------------------- /build-types/components/complementary-area/complementary-area-header.d.ts: -------------------------------------------------------------------------------- 1 | export default ComplementaryAreaHeader; 2 | declare function ComplementaryAreaHeader({ smallScreenTitle, children, className, toggleButtonProps, }: { 3 | smallScreenTitle: any; 4 | children: any; 5 | className: any; 6 | toggleButtonProps: any; 7 | }): JSX.Element; 8 | //# sourceMappingURL=complementary-area-header.d.ts.map -------------------------------------------------------------------------------- /build-types/components/complementary-area/complementary-area-header.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"complementary-area-header.d.ts","sourceRoot":"","sources":["../../../src/components/complementary-area/complementary-area-header.js"],"names":[],"mappings":";AA+CA;;;;;gBAgCC"} -------------------------------------------------------------------------------- /build-types/components/complementary-area/index.d.ts: -------------------------------------------------------------------------------- 1 | export default function ComplementaryArea({ className, children, header, headerClassName, toggleShortcut, closeLabel, title, identifier, ...props }: { 2 | [x: string]: any; 3 | className: any; 4 | children: any; 5 | header: any; 6 | headerClassName: any; 7 | toggleShortcut: any; 8 | closeLabel: any; 9 | title: any; 10 | identifier: any; 11 | }): JSX.Element | null; 12 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/complementary-area/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/complementary-area/index.js"],"names":[],"mappings":"AA2BA;;;;;;;;;;uBAuCC"} -------------------------------------------------------------------------------- /build-types/components/content-saver/index.d.ts: -------------------------------------------------------------------------------- 1 | export default ContentSaver; 2 | export type OnSaveBlocks = import('../../index').OnSaveBlocks; 3 | export type OnSaveContent = import('../../index').OnSaveContent; 4 | /** @typedef {import('../../index').OnSaveBlocks} OnSaveBlocks */ 5 | /** @typedef {import('../../index').OnSaveContent} OnSaveContent */ 6 | /** 7 | * Content saver 8 | * 9 | * @param {Object} props - Component props 10 | * @param {OnSaveBlocks} [props.onSaveBlocks] - Save blocks callback 11 | * @param {OnSaveContent} [props.onSaveContent] - Save content callback 12 | */ 13 | declare function ContentSaver(props: { 14 | onSaveBlocks?: import("../../index").OnSaveBlocks | undefined; 15 | onSaveContent?: import("../../index").OnSaveContent | undefined; 16 | }): null; 17 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/content-saver/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/content-saver/index.js"],"names":[],"mappings":";2BAQc,OAAO,aAAa,EAAE,YAAY;4BAClC,OAAO,aAAa,EAAE,aAAa;AADjD,iEAAiE;AACjE,mEAAmE;AAEnE;;;;;;GAMG;AACH;IAHgC,YAAY;IACX,aAAa;SA2C7C"} -------------------------------------------------------------------------------- /build-types/components/default-settings/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Apply default settings to the user supplied settings, ensuring we have a full and valid set of settings 3 | * 4 | * @param {BlockEditorSettings} settings - Settings 5 | * @return {BlockEditorSettings} 6 | */ 7 | export default function applyDefaultSettings(settings: BlockEditorSettings): BlockEditorSettings; 8 | export type BlockEditorSettings = import('../../index').BlockEditorSettings; 9 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/default-settings/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/default-settings/index.js"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,uDAHW,mBAAmB,GAClB,mBAAmB,CAgI9B;kCA9Ia,OAAO,aAAa,EAAE,mBAAmB"} -------------------------------------------------------------------------------- /build-types/components/document/index.d.ts: -------------------------------------------------------------------------------- 1 | export default DocumentSection; 2 | declare function DocumentSection({ children }: { 3 | children: any; 4 | }): JSX.Element; 5 | declare namespace DocumentSection { 6 | function Slot(props: any): JSX.Element; 7 | } 8 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/document/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/document/index.js"],"names":[],"mappings":";AAQA;;gBAEC;;IAED,uCAYC"} -------------------------------------------------------------------------------- /build-types/components/editor-heading-slot/index.d.ts: -------------------------------------------------------------------------------- 1 | export default EditorHeading; 2 | declare function EditorHeading({ children }: { 3 | children: any; 4 | }): JSX.Element; 5 | declare namespace EditorHeading { 6 | function Slot(props: any): JSX.Element; 7 | } 8 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/editor-heading-slot/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/editor-heading-slot/index.js"],"names":[],"mappings":";AAIA;;gBAEC;;IAED,uCAEC"} -------------------------------------------------------------------------------- /build-types/components/editor-loaded/index.d.ts: -------------------------------------------------------------------------------- 1 | export default EditorLoaded; 2 | export type OnLoad = () => any; 3 | /** 4 | * @callback OnLoad 5 | */ 6 | /** 7 | * Used by clients to add an optional loading placeholder 8 | * 9 | * @param {Object} props - Component props 10 | * @param {OnLoad} [props.onLoaded] - Callback to signal that the editor has loaded 11 | * @param {OnLoad} [props.onLoading] - Callback to signal that the editor is loading 12 | */ 13 | declare function EditorLoaded({ onLoaded, onLoading }: { 14 | onLoaded?: OnLoad | undefined; 15 | onLoading?: OnLoad | undefined; 16 | }): null; 17 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/editor-loaded/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/editor-loaded/index.js"],"names":[],"mappings":";;AAOA;;GAEG;AAEH;;;;;;GAMG;AACH;IAH0B,QAAQ;IACR,SAAS;SAoBlC"} -------------------------------------------------------------------------------- /build-types/components/editor-setup/editor-settings.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Get editor settings 3 | * 4 | * @param {EditorSettings} editorSettings - Editor settings 5 | * @param {IsoSettings} isoSettings 6 | * @param {object[]} allBlockTypes - All available blocks 7 | * @param {boolean} fixedToolbar - Do we need a fixed toolbar? 8 | * @return {EditorSettings} 9 | */ 10 | export default function getEditorSettings(editorSettings: EditorSettings, isoSettings: IsoSettings, allBlockTypes: object[], fixedToolbar: boolean): EditorSettings; 11 | export type EditorSettings = import('../../index').EditorSettings; 12 | export type IsoSettings = import('../../index').IsoSettings; 13 | //# sourceMappingURL=editor-settings.d.ts.map -------------------------------------------------------------------------------- /build-types/components/editor-setup/editor-settings.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"editor-settings.d.ts","sourceRoot":"","sources":["../../../src/components/editor-setup/editor-settings.js"],"names":[],"mappings":"AAkCA;;;;;;;;GAQG;AACH,0DANW,cAAc,eACd,WAAW,iBACX,MAAM,EAAE,gBACR,OAAO,GACN,cAAc,CAezB;6BAxDa,OAAO,aAAa,EAAE,cAAc;0BACpC,OAAO,aAAa,EAAE,WAAW"} -------------------------------------------------------------------------------- /build-types/components/editor-setup/index.d.ts: -------------------------------------------------------------------------------- 1 | /** @typedef {import('../../index').BlockEditorSettings} BlockEditorSettings */ 2 | /** 3 | * Settings callback 4 | * 5 | * @callback OnSettings 6 | * @param {BlockEditorSettings} settings 7 | */ 8 | /** 9 | * Sets up Gutenberg and the Isolated Block Editor 10 | * 11 | * An initial setup is performed, and is then reset each time the editor is focussed. This ensures we are applying the right 12 | * settings for this particular editor. 13 | * 14 | * @param {BlockEditorSettings} settings - Settings 15 | */ 16 | export default function useEditorSetup(settings: BlockEditorSettings): import("../../index").BlockEditorSettings; 17 | export type BlockEditorSettings = import('../../index').BlockEditorSettings; 18 | /** 19 | * Settings callback 20 | */ 21 | export type OnSettings = (settings: BlockEditorSettings) => any; 22 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/editor-setup/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/editor-setup/index.js"],"names":[],"mappings":"AAcA,+EAA+E;AAE/E;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,iDAFW,mBAAmB,6CAgF7B;kCA/Fa,OAAO,aAAa,EAAE,mBAAmB;;;;oCAM5C,mBAAmB"} -------------------------------------------------------------------------------- /build-types/components/footer-slot/index.d.ts: -------------------------------------------------------------------------------- 1 | export default FooterSection; 2 | declare function FooterSection({ children }: { 3 | children: any; 4 | }): JSX.Element; 5 | declare namespace FooterSection { 6 | function Slot(props: any): JSX.Element; 7 | } 8 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/footer-slot/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/footer-slot/index.js"],"names":[],"mappings":";AAOA;;gBAEC;;IAED,uCAEC"} -------------------------------------------------------------------------------- /build-types/components/pattern-monitor/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: unknown; 2 | export default _default; 3 | export type BlockEditorSettings = import('../../index').BlockEditorSettings; 4 | export type Pattern = import('../../store/editor/reducer').Pattern; 5 | /** 6 | * Update callback 7 | */ 8 | export type OnUpdate = (blocks: object[]) => any; 9 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/pattern-monitor/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/pattern-monitor/index.js"],"names":[],"mappings":";;kCAUc,OAAO,aAAa,EAAE,mBAAmB;sBACzC,OAAO,4BAA4B,EAAE,OAAO;;;;gCAM/C,MAAM,EAAE"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/index.d.ts: -------------------------------------------------------------------------------- 1 | export default withRegistryProvider; 2 | /** 3 | * This is the core of having a multi-editor Gutenberg experience. 4 | * 5 | * We create a sub registry that contains copies of `core/block-editor`, `core/editor`, and STORE_NAME. These are specific to the editor instance and 6 | * provide the content for each editor, as well as overriding some core functions 7 | * 8 | * The key `persistenceKey` from the settings is used as the `localStorage` key to save Gutenberg preferences 9 | */ 10 | declare const withRegistryProvider: (Inner: import("react").FC<{}>) => (props: any) => JSX.Element; 11 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/with-registry-provider/index.js"],"names":[],"mappings":";AAuBA;;;;;;;GAOG;AACH,mGAkFE"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/interface-store/actions.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/interface-store/actions.js"],"names":[],"mappings":"AA6HA;;;;;GAKG;AACH,qCAHW,MAAM,eACN,MAAM;;WAWhB;AAED;;;;;;;;;GASG;AACH,uCANW,MAAM,eACN,MAAM,SACN,OAAO,OAejB;AAED;;;;;;;GAOG;AACH,0CALW,MAAM;QACC,MAAM,GAAE,OAAO;QAahC;AAxKM,mDALI,MAAM,QACN,MAAM,OAQd;AAQI,+CAHI,MAAM,QACN,MAAM;;;WAyBd;AAOI,gDAFI,MAAM;;WAcd;AAUI,+BALI,MAAM,QACN,MAAM,OAyBd;AAQI,iCAHI,MAAM,QACN,MAAM;;WAkBd"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/interface-store/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: any; 2 | export default _default; 3 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/interface-store/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/interface-store/index.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/interface-store/reducer.d.ts: -------------------------------------------------------------------------------- 1 | export function complementaryAreas(state: {} | undefined, action: any): {}; 2 | declare const _default: import("redux").Reducer, import("redux").AnyAction>; 5 | export default _default; 6 | //# sourceMappingURL=reducer.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/interface-store/reducer.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/interface-store/reducer.js"],"names":[],"mappings":"AAKA,2EAyBC"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/interface-store/selectors.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns the complementary area that is active in a given scope. 3 | * 4 | * @param {Object} state Global application state. 5 | * @param {string} scope Item scope. 6 | * 7 | * @return {string | null | undefined} The complementary area that is active in the given scope. 8 | */ 9 | export const getActiveComplementaryArea: Function; 10 | /** 11 | * Returns a boolean indicating if an item is pinned or not. 12 | * 13 | * @param {Object} state Global application state. 14 | * @param {string} scope Scope. 15 | * @param {string} item Item to check. 16 | * 17 | * @return {boolean} True if the item is pinned and false otherwise. 18 | */ 19 | export const isItemPinned: Function; 20 | /** 21 | * Returns a boolean indicating whether a feature is active for a particular 22 | * scope. 23 | * 24 | * @param {Object} state The store state. 25 | * @param {string} scope The scope of the feature (e.g. core/edit-post). 26 | * @param {string} featureName The name of the feature. 27 | * 28 | * @return {boolean} Is the feature enabled? 29 | */ 30 | export const isFeatureActive: Function; 31 | //# sourceMappingURL=selectors.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/interface-store/selectors.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/interface-store/selectors.js"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,kDAqBE;AAEF;;;;;;;;GAQG;AACH,oCAQE;AAEF;;;;;;;;;GASG;AACH,uCAYE"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/actions.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns a generator converting a reusable block into a static block. 3 | * 4 | * @param {string} clientId The client ID of the block to attach. 5 | */ 6 | export function __experimentalConvertBlockToStatic(clientId: string): Generator; 7 | /** 8 | * Returns a generator converting one or more static blocks into a reusable block. 9 | * 10 | * @param {string[]} clientIds The client IDs of the block to detach. 11 | */ 12 | export function __experimentalConvertBlocksToReusable(clientIds: string[]): Generator; 13 | /** 14 | * Returns a generator deleting a reusable block. 15 | * 16 | * @param {string} id The ID of the reusable block to delete. 17 | */ 18 | export function __experimentalDeleteReusableBlock(id: string): Generator; 19 | /** 20 | * Returns an action descriptor for SET_EDITING_REUSABLE_BLOCK action. 21 | * 22 | * @param {string} clientId The clientID of the reusable block to target. 23 | * @param {boolean} isEditing Whether the block should be in editing state. 24 | * @return {Object} Action descriptor. 25 | */ 26 | export function __experimentalSetEditingReusableBlock(clientId: string, isEditing: boolean): any; 27 | //# sourceMappingURL=actions.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/actions.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/reusable-store/actions.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,6DAFW,MAAM,iCAIhB;AAED;;;;GAIG;AACH,iEAFW,MAAM,EAAE,iCAIlB;AAED;;;;GAIG;AACH,sDAFW,MAAM,iCAIhB;AAED;;;;;;GAMG;AACH,gEAJW,MAAM,aACN,OAAO,OASjB"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/constants.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Constant for the store module (or reducer) key. 3 | * 4 | * @type {string} 5 | */ 6 | export const STORE_KEY: string; 7 | //# sourceMappingURL=constants.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/constants.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/reusable-store/constants.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAFU,MAAM,CAEgC"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/controls.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Convert a reusable block to a static block effect handler 3 | * 4 | * @param {string} clientId Block ID. 5 | * @return {Object} control descriptor. 6 | */ 7 | export function convertBlockToStatic(clientId: string): any; 8 | /** 9 | * Convert a static block to a reusable block effect handler 10 | * 11 | * @param {Array} clientIds Block IDs. 12 | * @return {Object} control descriptor. 13 | */ 14 | export function convertBlocksToReusable(clientIds: any[]): any; 15 | /** 16 | * Deletes a reusable block. 17 | * 18 | * @param {string} id Reusable block ID. 19 | * @return {Object} control descriptor. 20 | */ 21 | export function deleteReusableBlock(id: string): any; 22 | export default controls; 23 | declare namespace controls { 24 | let CONVERT_BLOCK_TO_STATIC: Function; 25 | let CONVERT_BLOCKS_TO_REUSABLE: Function; 26 | let DELETE_REUSABLE_BLOCK: Function; 27 | } 28 | //# sourceMappingURL=controls.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/controls.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/reusable-store/controls.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,+CAHW,MAAM,OAQhB;AAED;;;;;GAKG;AACH,+DAKC;AAED;;;;;GAKG;AACH,wCAHW,MAAM,OAQhB"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: any; 2 | export default _default; 3 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/reusable-store/index.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/reducer.d.ts: -------------------------------------------------------------------------------- 1 | export function isEditingReusableBlock(state: {} | undefined, action: any): {}; 2 | declare const _default: import("redux").Reducer, import("redux").AnyAction>; 5 | export default _default; 6 | //# sourceMappingURL=reducer.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/reducer.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/reusable-store/reducer.js"],"names":[],"mappings":"AAKA,+EASC"} -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/selectors.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns true if reusable block is in the editing state. 3 | * 4 | * @param {Object} state Global application state. 5 | * @param {number} clientId the clientID of the block. 6 | * @return {boolean} Whether the reusable block is in the editing state. 7 | */ 8 | export function __experimentalIsEditingReusableBlock(state: any, clientId: number): boolean; 9 | //# sourceMappingURL=selectors.d.ts.map -------------------------------------------------------------------------------- /build-types/components/with-registry-provider/reusable-store/selectors.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../../src/components/with-registry-provider/reusable-store/selectors.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,2EAHW,MAAM,GACL,OAAO,CAIlB"} -------------------------------------------------------------------------------- /build-types/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AAqCA,qFAAqF;AACrF,kEAAkE;AAClE,sFAAsF;AAEtF;;;;;;;;GAQG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH;;;;;GAKG;AAEH;;GAEG;AACH,yCASC;AACD;;;GAGG;AACH;IAF+B,WAAW;SAgBzC;;;qBAlIa,OAAO,6CAA6C,EAAE,MAAM;sBAC5D,OAAO,wBAAwB,EAAE,OAAO;uBACxC,OAAO,0CAA0C,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiD7C,MAAM,EAAE;wBAAkB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAOxC,MAAM;aAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAqB3B,OAAO;;uBAEP,MAAM,EAAE;kBACR,OAAO;qBACP,OAAO;cACP,MAAM,EAAE,GAAC,IAAI;kBACb,IAAI;oBACJ,MAAM,EAAE;YACR,MAAM,EAAE;yBACR,MAAM,EAAE;qBACR,MAAM;;;;;;;;;oCA+CT,MAAM,EAAE,kBACR,MAAM,EAAE;;;;sCAOR,MAAM;;;;gCAON,MAAM,KACL,MAAM,EAAE;;;;6BAOT,OAAO,cACP,OAAO,KACN,MAAM,EAAE,eAAQ;;;;;yBAxKH,4BAA4B;4BANzB,uBAAuB;wBAC3B,wCAAwC;uBAEzC,0BAA0B;8BAInB,kCAAkC;uBALzC,0BAA0B"} -------------------------------------------------------------------------------- /build-types/store/blocks/actions.d.ts: -------------------------------------------------------------------------------- 1 | export default actions; 2 | declare namespace actions { 3 | function undo(): Generator, any, unknown>; 4 | function redo(): Generator, any, unknown>; 5 | /** 6 | * Update blocks without undo history 7 | * 8 | * @param {object[]} blocks 9 | * @param {Object} options 10 | */ 11 | function updateBlocksWithUndo(blocks: any[], options?: any): Generator; 12 | /** 13 | * Update blocks without undo history 14 | * 15 | * @param {object[]} blocks 16 | * @param {Object} options 17 | */ 18 | function updateBlocksWithoutUndo(blocks: any[], options?: any): Generator; 19 | } 20 | //# sourceMappingURL=actions.d.ts.map -------------------------------------------------------------------------------- /build-types/store/blocks/actions.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/store/blocks/actions.js"],"names":[],"mappings":";;IAMC,sEAEC;IACD,sEAEC;IACD;;;;;OAKG;IACH,0FAMC;IACD;;;;;OAKG;IACH,6FAMC"} -------------------------------------------------------------------------------- /build-types/store/blocks/reducer.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const _default: import("redux").Reducer>; 7 | export default _default; 8 | //# sourceMappingURL=reducer.d.ts.map -------------------------------------------------------------------------------- /build-types/store/blocks/reducer.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/blocks/reducer.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /build-types/store/blocks/selectors.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Get blocks from edit history 3 | * 4 | * @param {Object} state - Current state 5 | * @return {object[]} 6 | */ 7 | export function getBlocks(state: any): object[]; 8 | /** 9 | * Get selection 10 | * 11 | * @param {Object} state - Current state 12 | * @return {Object} 13 | */ 14 | export function getEditorSelection(state: any): any; 15 | /** 16 | * Is undo possible? 17 | * 18 | * @param {Object} state - Current state 19 | * @return {boolean} 20 | */ 21 | export function hasEditorUndo(state: any): boolean; 22 | /** 23 | * Is redo possible? 24 | * 25 | * @param {Object} state - Current state 26 | * @return {boolean} 27 | */ 28 | export function hasEditorRedo(state: any): boolean; 29 | /** 30 | * Get current edit count 31 | * 32 | * @param {Object} state - Current state 33 | * @return {number} 34 | */ 35 | export function getEditCount(state: any): number; 36 | //# sourceMappingURL=selectors.d.ts.map -------------------------------------------------------------------------------- /build-types/store/blocks/selectors.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/store/blocks/selectors.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,uCAFY,MAAM,EAAE,CAInB;AAED;;;;;GAKG;AACH,oDAEC;AAED;;;;;GAKG;AACH,2CAFY,OAAO,CAMlB;AAED;;;;;GAKG;AACH,2CAFY,OAAO,CAMlB;AAED;;;;;GAKG;AACH,0CAFY,MAAM,CAIjB"} -------------------------------------------------------------------------------- /build-types/store/core-editor/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Override the default `core/editor` store with functions that return data from `core/block-editor` instead of the post in `core/editor` 3 | * 4 | * @param existingSelectors 5 | * @param newSelect 6 | */ 7 | export default function _default(existingSelectors: any, newSelect: any): { 8 | getEditedPostAttribute: (state: any, attributeName: any) => any; 9 | getEditedPostContent: () => any; 10 | }; 11 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/store/core-editor/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/core-editor/index.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH;;;EAeC"} -------------------------------------------------------------------------------- /build-types/store/edit-post/index.d.ts: -------------------------------------------------------------------------------- 1 | export default store; 2 | declare const store: any; 3 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /build-types/store/edit-post/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/edit-post/index.js"],"names":[],"mappings":";AAYA,yBAMI"} -------------------------------------------------------------------------------- /build-types/store/editor/actions.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/store/editor/actions.js"],"names":[],"mappings":";kCAOc,OAAO,aAAa,EAAE,mBAAmB;yBACzC,OAAO,WAAW,EAAE,UAAU;;IAG3C;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH;;;MAKC;IACD;;;;OAIG;IACH,4EAEC;IACD;;OAEG;IACH,iEAEC;IACD;;;;OAIG;IACH;;;MAKC"} -------------------------------------------------------------------------------- /build-types/store/editor/selectors.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/store/editor/selectors.js"],"names":[],"mappings":"AAWA,+DAA+D;AAC/D,2DAA2D;AAC3D,qDAAqD;AACrD,6DAA6D;AAE7D;;;;;GAKG;AACH,qCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,UAAU,CAIrB;AAED;;;;;GAKG;AACH,yCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,WAAW,CAItB;AAED;;;;;GAKG;AACH,qCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,OAAO,CAIlB;AAED;;;;;GAKG;AACH,6CAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,MAAM,GAAC,IAAI,CAItB;AAED;;;;;GAKG;AACH,yCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,OAAO,GAAC,IAAI,CAcvB;AAED;;;;;GAKG;AACH,yCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,MAAM,EAAE,CAInB;AAED;;;;;;GAMG;AACH,uCAJW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,qBAEpB,OAAO,GAAC,IAAI,CAkBvB;AAED;;;;;GAKG;AACH,wCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,OAAO,CAIlB;AAQD;;;;;GAKG;AACH,iCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,OAAO,CAIlB;AAED;;;;;GAKG;AACH,mCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,OAAO,EAAE,CAIpB;AAED;;;;;GAKG;AACH,wCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,OAAO,CAIlB;AAED;;;;;GAKG;AACH,4CAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,MAAM,CAIjB;AAED;;;;;GAKG;AACH,uCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,OAK/B;AAED;;;;;GAKG;AACH,uCAHW;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACpB,OAAO,CAIlB;AAhED,6CAII;0BAlHU,OAAO,aAAa,EAAE,WAAW;yBACjC,OAAO,WAAW,EAAE,UAAU;sBAC9B,OAAO,WAAW,EAAE,OAAO;0BAC3B,OAAO,WAAW,EAAE,WAAW"} -------------------------------------------------------------------------------- /build-types/store/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.js"],"names":[],"mappings":";;AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAvBA;;WAEG;;QAFH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIH;;WAEG;;;;;;;;;;;EAkDF;iCAvCgC,oBAAoB"} -------------------------------------------------------------------------------- /build-types/store/options/actions.d.ts: -------------------------------------------------------------------------------- 1 | export default actions; 2 | declare namespace actions { 3 | /** 4 | * Toggle the option 5 | * 6 | * @param {string} option Option name 7 | */ 8 | function toggleOption(option: string): { 9 | type: string; 10 | option: string; 11 | }; 12 | } 13 | //# sourceMappingURL=actions.d.ts.map -------------------------------------------------------------------------------- /build-types/store/options/actions.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/store/options/actions.js"],"names":[],"mappings":";;IACC;;;;OAIG;IACH;;;MAKC"} -------------------------------------------------------------------------------- /build-types/store/options/reducer.d.ts: -------------------------------------------------------------------------------- 1 | export default reducer; 2 | declare function reducer(state: {} | undefined, action: any): {}; 3 | //# sourceMappingURL=reducer.d.ts.map -------------------------------------------------------------------------------- /build-types/store/options/reducer.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/options/reducer.js"],"names":[],"mappings":";AAEA,iEAUC"} -------------------------------------------------------------------------------- /build-types/store/options/selectors.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Get the option value 3 | * 4 | * @param {Object} state - Current state 5 | * @param {string} option - Option name 6 | * @return {boolean} 7 | */ 8 | export function isOptionActive(state: any, option: string): boolean; 9 | //# sourceMappingURL=selectors.d.ts.map -------------------------------------------------------------------------------- /build-types/store/options/selectors.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/store/options/selectors.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,mDAHW,MAAM,GACL,OAAO,CAIlB"} -------------------------------------------------------------------------------- /build-types/store/plugins/store-hot-swap.d.ts: -------------------------------------------------------------------------------- 1 | export default storeHotSwapPlugin; 2 | /** 3 | * Swap any access to `core/block-editor` to the currently focussed editor store. This ensures that blocks that directly access 4 | * wp.data still work. 5 | * 6 | * Note that store plugins are currently marked as deprecated. It's unknown what will replace them, and this will need to be updated 7 | * once that happens. 8 | * 9 | * @param {Object} registry 10 | * @param {Object} pluginOptions 11 | */ 12 | declare function storeHotSwapPlugin(registry: any, pluginOptions: any): { 13 | dispatch(reducerKey: any): any; 14 | select(reducerKey: any): any; 15 | }; 16 | declare namespace storeHotSwapPlugin { 17 | let targetSelect: any; 18 | let targetDispatch: any; 19 | function setEditor(select: any, dispatch: any): void; 20 | function resetEditor(): void; 21 | } 22 | //# sourceMappingURL=store-hot-swap.d.ts.map -------------------------------------------------------------------------------- /build-types/store/plugins/store-hot-swap.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"store-hot-swap.d.ts","sourceRoot":"","sources":["../../../src/store/plugins/store-hot-swap.js"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AACH;;;EAoBC;;;;IAKD,qDAGC;IAED,6BAGC"} -------------------------------------------------------------------------------- /build-types/store/preferences/actions.d.ts: -------------------------------------------------------------------------------- 1 | export default actions; 2 | declare namespace actions { 3 | /** 4 | * Toggle the feature 5 | * 6 | * @param {string} feature - Feature name 7 | */ 8 | function toggleFeature(feature: string): { 9 | type: string; 10 | feature: string; 11 | }; 12 | } 13 | //# sourceMappingURL=actions.d.ts.map -------------------------------------------------------------------------------- /build-types/store/preferences/actions.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/store/preferences/actions.js"],"names":[],"mappings":";;IACC;;;;OAIG;IACH;;;MAKC"} -------------------------------------------------------------------------------- /build-types/store/preferences/reducer.d.ts: -------------------------------------------------------------------------------- 1 | export default reducer; 2 | /** 3 | * WordPress dependencies 4 | */ 5 | declare function reducer(state: any, action: any): any; 6 | //# sourceMappingURL=reducer.d.ts.map -------------------------------------------------------------------------------- /build-types/store/preferences/reducer.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/preferences/reducer.js"],"names":[],"mappings":";AAAA;;GAEG;AAEH,uDAoBC"} -------------------------------------------------------------------------------- /build-types/store/preferences/selectors.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Is the feature active? 3 | * 4 | * @param {Object} state - Current state 5 | * @param {string} feature - Feature name 6 | * @param {boolean} [defaultValue=false] - Default value 7 | */ 8 | export function isFeatureActive(state: any, feature: string, defaultValue?: boolean | undefined): any; 9 | //# sourceMappingURL=selectors.d.ts.map -------------------------------------------------------------------------------- /build-types/store/preferences/selectors.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../src/store/preferences/selectors.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,qDAHW,MAAM,2CAKhB"} -------------------------------------------------------------------------------- /build/__tests__/e2e/toolbar-settings.spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import { test, expect } from '@playwright/test'; 5 | 6 | test.describe( 'Toolbar settings button', () => { 7 | test( 'should open and close popover', async ( { page } ) => { 8 | await page.goto( '/?path=/story/isolated-block-editor--toolbar-settings' ); 9 | const editor = page.frameLocator( '#storybook-preview-iframe' ); 10 | 11 | await editor.locator( 'role=button[name="Settings"]' ).click(); 12 | 13 | await expect( editor.locator( 'role=button[name="Document (selected)"]' ) ).toBeVisible(); 14 | await expect( editor.locator( 'role=button[name="Block"]' ) ).toBeVisible(); 15 | 16 | await editor.locator( 'role=button[name="Close settings"]' ).click(); 17 | 18 | await expect( editor.locator( 'role=button[name="Document (selected)"]' ) ).not.toBeVisible(); 19 | await expect( editor.locator( 'role=button[name="Block"]' ) ).not.toBeVisible(); 20 | } ); 21 | } ); 22 | -------------------------------------------------------------------------------- /build/components/action-area/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _components = require("@wordpress/components"); 8 | import { createElement } from "react"; 9 | /** 10 | * WordPress dependencies 11 | */ 12 | 13 | var _createSlotFill = (0, _components.createSlotFill)('IsolatedFooter'), 14 | Fill = _createSlotFill.Fill, 15 | Slot = _createSlotFill.Slot; 16 | var ActionArea = function ActionArea(_ref) { 17 | var children = _ref.children; 18 | return createElement(Fill, null, children); 19 | }; 20 | ActionArea.Slot = function () { 21 | return createElement(Slot, null, function (fills) { 22 | return fills; 23 | }); 24 | }; 25 | var _default = exports["default"] = ActionArea; 26 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/components/action-area/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["_components","require","createElement","_createSlotFill","createSlotFill","Fill","Slot","ActionArea","_ref","children","fills","_default","exports"],"sources":["../../../src/components/action-area/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'IsolatedFooter' );\n\nconst ActionArea = ( { children } ) => {\n\treturn { children };\n};\n\nActionArea.Slot = function () {\n\treturn { ( fills ) => fills };\n};\n\nexport default ActionArea;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAuD,SAAAC,aAAA;AAHvD;AACA;AACA;;AAGA,IAAAC,eAAA,GAAuB,IAAAC,0BAAc,EAAE,gBAAiB,CAAC;EAAjDC,IAAI,GAAAF,eAAA,CAAJE,IAAI;EAAEC,IAAI,GAAAH,eAAA,CAAJG,IAAI;AAElB,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAAuB;EAAA,IAAhBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAC9B,OAAOP,aAAA,CAACG,IAAI,QAAGI,QAAgB,CAAC;AACjC,CAAC;AAEDF,UAAU,CAACD,IAAI,GAAG,YAAY;EAC7B,OAAOJ,aAAA,CAACI,IAAI,QAAG,UAAEI,KAAK;IAAA,OAAMA,KAAK;EAAA,CAAQ,CAAC;AAC3C,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaL,UAAU"} -------------------------------------------------------------------------------- /build/components/block-editor-container/hot-swapper.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports["default"] = void 0; 8 | var _data = require("@wordpress/data"); 9 | var _compose = require("@wordpress/compose"); 10 | var _element = require("@wordpress/element"); 11 | var _storeHotSwap = _interopRequireDefault(require("../../store/plugins/store-hot-swap")); 12 | /** 13 | * WordPress dependencies 14 | */ 15 | 16 | /** 17 | * Internal dependencies 18 | */ 19 | 20 | function HotSwapper(_ref) { 21 | var isEditing = _ref.isEditing, 22 | hotSwap = _ref.hotSwap; 23 | (0, _element.useEffect)(function () { 24 | hotSwap(isEditing); 25 | }, [isEditing]); 26 | return null; 27 | } 28 | 29 | // @ts-ignore 30 | var _default = exports["default"] = (0, _compose.compose)([(0, _data.withSelect)(function (select) { 31 | var _select = select('isolated/editor'), 32 | isEditing = _select.isEditing; 33 | return { 34 | isEditing: isEditing() 35 | }; 36 | }), (0, _data.withDispatch)(function (dispatch, ownProps, _ref2) { 37 | var select = _ref2.select; 38 | return { 39 | hotSwap: function hotSwap(isEditing) { 40 | _storeHotSwap["default"].resetEditor(); 41 | if (isEditing) { 42 | _storeHotSwap["default"].setEditor(select, dispatch); 43 | } 44 | } 45 | }; 46 | })])(HotSwapper); 47 | //# sourceMappingURL=hot-swapper.js.map -------------------------------------------------------------------------------- /build/components/block-editor-toolbar/block-navigation/style.scss: -------------------------------------------------------------------------------- 1 | @import '@wordpress/base-styles/_colors'; 2 | @import '@wordpress/base-styles/_variables'; 3 | @import '@wordpress/base-styles/_mixins'; 4 | @import '@wordpress/base-styles/_breakpoints'; 5 | @import '@wordpress/base-styles/_animations'; 6 | @import '@wordpress/base-styles/_z-index'; 7 | 8 | .block-editor-block-navigation__popover { 9 | .components-popover__content { 10 | padding: 0; 11 | } 12 | 13 | .edit-post-editor__document-overview-panel .edit-post-sidebar__panel-tabs { 14 | flex-direction: row; 15 | } 16 | 17 | .edit-post-editor__list-view-container { 18 | max-height: 600px; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /build/components/block-editor-toolbar/inspector/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _interface = require("@wordpress/interface"); 8 | var _components = require("@wordpress/components"); 9 | require("./style.scss"); 10 | import { createElement } from "react"; 11 | /** 12 | * WordPress dependencies 13 | */ 14 | 15 | /** 16 | * Internal dependencies 17 | */ 18 | 19 | function Inspector(_ref) { 20 | var button = _ref.button, 21 | onToggle = _ref.onToggle; 22 | function onOutside(ev) { 23 | if (ev.target.closest('.block-editor-block-inspector') === null && !ev.target.classList.contains('iso-inspector')) { 24 | onToggle(false); 25 | ev.preventDefault(); 26 | ev.stopPropagation(); 27 | } 28 | } 29 | return createElement(_components.Popover, { 30 | position: "bottom left", 31 | className: "iso-inspector", 32 | anchor: button === null || button === void 0 ? void 0 : button.current, 33 | onFocusOutside: onOutside 34 | }, createElement(_interface.ComplementaryArea.Slot, { 35 | scope: "isolated/editor" 36 | })); 37 | } 38 | var _default = exports["default"] = Inspector; 39 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/components/block-editor-toolbar/inspector/style.scss: -------------------------------------------------------------------------------- 1 | @import '@wordpress/base-styles/_colors'; 2 | @import '@wordpress/base-styles/_mixins'; 3 | @import '@wordpress/base-styles/_variables'; 4 | 5 | .iso-editor .popover-slot { 6 | .iso-inspector ul:not(.editor-post-taxonomies__flat-term-most-used-list) li { 7 | margin: 0; 8 | } 9 | 10 | .block-editor-inserter__menu { 11 | min-width: $sidebar-width + 20; 12 | max-height: 55vh; 13 | } 14 | } 15 | 16 | .block-editor-inserter__tabs, 17 | .iso-editor .interface-complementary-area-header { 18 | button { 19 | font-size: 13px; 20 | } 21 | } -------------------------------------------------------------------------------- /build/components/block-editor-toolbar/more-menu/link-menu.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _components = require("@wordpress/components"); 8 | var _i18n = require("@wordpress/i18n"); 9 | import { createElement } from "react"; 10 | /** 11 | * WordPress dependencies 12 | */ 13 | 14 | /** @typedef {import('../../../index').BlockEditorSettings} BlockEditorSettings */ 15 | /** 16 | * Link menu 17 | * 18 | * @param {Object} props - Component props 19 | * @param {BlockEditorSettings} props.settings - Settings 20 | */ 21 | function LinkMenu(_ref) { 22 | var settings = _ref.settings; 23 | var _ref2 = settings.iso || {}, 24 | _ref2$linkMenu = _ref2.linkMenu, 25 | linkMenu = _ref2$linkMenu === void 0 ? [] : _ref2$linkMenu; 26 | if (linkMenu.length === 0) { 27 | return null; 28 | } 29 | return createElement(_components.MenuGroup, { 30 | label: (0, _i18n.__)('Links') 31 | }, linkMenu.map(function (_ref3) { 32 | var title = _ref3.title, 33 | url = _ref3.url; 34 | return createElement(_components.MenuItem, { 35 | key: title 36 | }, createElement(_components.ExternalLink, { 37 | href: url 38 | }, title)); 39 | })); 40 | } 41 | var _default = exports["default"] = LinkMenu; 42 | //# sourceMappingURL=link-menu.js.map -------------------------------------------------------------------------------- /build/components/block-editor-toolbar/slot.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _components = require("@wordpress/components"); 8 | var _i18n = require("@wordpress/i18n"); 9 | import { createElement } from "react"; 10 | /** 11 | * WordPress dependencies 12 | */ 13 | 14 | var _createSlotFill = (0, _components.createSlotFill)('IsolatedToolbar'), 15 | Fill = _createSlotFill.Fill, 16 | Slot = _createSlotFill.Slot; 17 | 18 | /** 19 | * A Toolbar slot/fill 20 | * 21 | * @param {Object} props Component props 22 | * @param {Object} props.children Child components to insert in the toolbar slot 23 | * @return object 24 | */ 25 | var ToolbarSlot = function ToolbarSlot(_ref) { 26 | var children = _ref.children; 27 | return createElement(Fill, null, children); 28 | }; 29 | ToolbarSlot.Slot = function (props) { 30 | return createElement(Slot, null, function (fills) { 31 | return fills; 32 | }); 33 | }; 34 | var _default = exports["default"] = ToolbarSlot; 35 | //# sourceMappingURL=slot.js.map -------------------------------------------------------------------------------- /build/components/block-editor-toolbar/slot.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"slot.js","names":["_components","require","_i18n","createElement","_createSlotFill","createSlotFill","Fill","Slot","ToolbarSlot","_ref","children","props","fills","_default","exports"],"sources":["../../../src/components/block-editor-toolbar/slot.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill, Slot } = createSlotFill( 'IsolatedToolbar' );\n\n/**\n * A Toolbar slot/fill\n *\n * @param {Object} props Component props\n * @param {Object} props.children Child components to insert in the toolbar slot\n * @return object\n */\nconst ToolbarSlot = ( { children } ) => {\n\treturn { children };\n};\n\nToolbarSlot.Slot = function ( props ) {\n\treturn { ( fills ) => fills };\n};\n\nexport default ToolbarSlot;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAqC,SAAAE,aAAA;AAJrC;AACA;AACA;;AAIA,IAAAC,eAAA,GAAuB,IAAAC,0BAAc,EAAE,iBAAkB,CAAC;EAAlDC,IAAI,GAAAF,eAAA,CAAJE,IAAI;EAAEC,IAAI,GAAAH,eAAA,CAAJG,IAAI;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAuB;EAAA,IAAhBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAC/B,OAAOP,aAAA,CAACG,IAAI,QAAGI,QAAgB,CAAC;AACjC,CAAC;AAEDF,WAAW,CAACD,IAAI,GAAG,UAAWI,KAAK,EAAG;EACrC,OAAOR,aAAA,CAACI,IAAI,QAAG,UAAEK,KAAK;IAAA,OAAMA,KAAK;EAAA,CAAQ,CAAC;AAC3C,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaN,WAAW"} -------------------------------------------------------------------------------- /build/components/block-editor-toolbar/style.scss: -------------------------------------------------------------------------------- 1 | @import "@wordpress/base-styles/_colors"; 2 | @import "@wordpress/base-styles/_variables"; 3 | @import "@wordpress/base-styles/_mixins"; 4 | @import "@wordpress/base-styles/_breakpoints"; 5 | @import "@wordpress/base-styles/_animations"; 6 | @import "@wordpress/base-styles/_z-index"; 7 | 8 | .edit-post-header { 9 | // Make toolbar sticky on larger breakpoints 10 | @include break-zoomed-in { 11 | flex-wrap: nowrap; 12 | } 13 | } 14 | 15 | .edit-post-header__settings { 16 | display: inline-flex; 17 | align-items: center; 18 | 19 | button.components-button.has-icon { 20 | margin-right: 0; 21 | } 22 | } 23 | 24 | .edit-post-visual-editor .block-editor-block-contextual-toolbar.is-fixed { 25 | position: static; 26 | margin-left: 0; 27 | min-height: 49px; 28 | 29 | &.is-collapsed { 30 | margin-left: 0; 31 | } 32 | 33 | .block-editor-block-toolbar .components-toolbar-group::after, 34 | > .block-editor-block-toolbar__group-collapse-fixed-toolbar::after { 35 | height: 49px; 36 | margin-top: 0; 37 | margin-bottom: 0; 38 | } 39 | 40 | &.is-collapsed:after { 41 | display: none; 42 | } 43 | } 44 | 45 | .is-fixed ~ .edit-post-visual-editor__content-area { 46 | border-top: 1px solid #e0e0e0; 47 | } 48 | -------------------------------------------------------------------------------- /build/components/block-editor-toolbar/toggle-option/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _data = require("@wordpress/data"); 8 | var _compose = require("@wordpress/compose"); 9 | var _components = require("@wordpress/components"); 10 | var _icons = require("@wordpress/icons"); 11 | import { createElement } from "react"; 12 | /** 13 | * WordPress dependencies 14 | */ 15 | 16 | function OptionToggle(_ref) { 17 | var onToggle = _ref.onToggle, 18 | isActive = _ref.isActive, 19 | label = _ref.label, 20 | info = _ref.info; 21 | return createElement(_components.MenuItem, { 22 | icon: isActive && _icons.check, 23 | isSelected: isActive, 24 | onClick: onToggle, 25 | role: "menuitemcheckbox", 26 | info: info 27 | }, label); 28 | } 29 | 30 | // @ts-ignore 31 | var _default = exports["default"] = (0, _compose.compose)([(0, _data.withSelect)(function (select, _ref2) { 32 | var option = _ref2.option; 33 | return { 34 | isActive: select('isolated/editor').isOptionActive(option) 35 | }; 36 | }), (0, _data.withDispatch)(function (dispatch, ownProps) { 37 | return { 38 | onToggle: function onToggle() { 39 | dispatch('isolated/editor').toggleOption(ownProps.option); 40 | ownProps.onClose(); 41 | } 42 | }; 43 | }), _components.withSpokenMessages])(OptionToggle); 44 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/components/block-editor/list-view-outline.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = ListViewOutline; 7 | var _editor = require("@wordpress/editor"); 8 | var _components = require("@wordpress/components"); 9 | var _i18n = require("@wordpress/i18n"); 10 | import { createElement, Fragment } from "react"; 11 | /** 12 | * WordPress dependencies 13 | */ 14 | 15 | function ListViewOutline() { 16 | return createElement(Fragment, null, createElement("div", { 17 | className: "editor-list-view-sidebar__outline" 18 | }, createElement("div", null, createElement(_components.__experimentalText, null, (0, _i18n.__)('Characters:')), createElement(_components.__experimentalText, null, createElement(_editor.CharacterCount, null))), createElement("div", null, createElement(_components.__experimentalText, null, (0, _i18n.__)('Words:')), createElement(_editor.WordCount, null)), createElement("div", null, createElement(_components.__experimentalText, null, (0, _i18n.__)('Time to read:')), createElement(_editor.TimeToRead, null))), createElement(_editor.DocumentOutline, null)); 19 | } 20 | //# sourceMappingURL=list-view-outline.js.map -------------------------------------------------------------------------------- /build/components/block-editor/text-editor.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports["default"] = void 0; 8 | var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty")); 9 | var _postTextEditor = _interopRequireDefault(require("./post-text-editor")); 10 | var _editorHeadingSlot = _interopRequireDefault(require("../editor-heading-slot")); 11 | var _footerSlot = _interopRequireDefault(require("../footer-slot")); 12 | import { createElement } from "react"; 13 | // @ts-nocheck 14 | /** 15 | * Internal dependencies 16 | */ 17 | 18 | /** 19 | * This is a copy of packages/edit-post/src/components/text-editor/index.js 20 | * 21 | * The original is not exported, and contains code for post titles 22 | */ 23 | function TextEditor(_ref) { 24 | (0, _objectDestructuringEmpty2["default"])(_ref); 25 | return createElement("div", { 26 | className: "edit-post-text-editor" 27 | }, createElement("div", { 28 | className: "edit-post-text-editor__body" 29 | }, createElement(_editorHeadingSlot["default"].Slot, { 30 | mode: "text" 31 | }), createElement(_postTextEditor["default"], null), createElement(_footerSlot["default"].Slot, { 32 | mode: "text" 33 | }))); 34 | } 35 | var _default = exports["default"] = TextEditor; 36 | //# sourceMappingURL=text-editor.js.map -------------------------------------------------------------------------------- /build/components/block-editor/text-editor.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"text-editor.js","names":["_postTextEditor","_interopRequireDefault","require","_editorHeadingSlot","_footerSlot","createElement","TextEditor","_ref","_objectDestructuringEmpty2","className","Slot","mode","_default","exports"],"sources":["../../../src/components/block-editor/text-editor.js"],"sourcesContent":["// @ts-nocheck\n/**\n * Internal dependencies\n */\nimport PostTextEditor from './post-text-editor';\nimport EditorHeading from '../editor-heading-slot';\nimport FooterSlot from '../footer-slot';\n\n/**\n * This is a copy of packages/edit-post/src/components/text-editor/index.js\n *\n * The original is not exported, and contains code for post titles\n */\nfunction TextEditor( {} ) {\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t);\n}\n\nexport default TextEditor;\n"],"mappings":";;;;;;;;AAIA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAwC,SAAAG,aAAA;AANxC;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAAC,IAAA,EAAO;EAAA,IAAAC,0BAAA,aAAAD,IAAA;EACzB,OACCF,aAAA;IAAKI,SAAS,EAAC;EAAuB,GACrCJ,aAAA;IAAKI,SAAS,EAAC;EAA6B,GAC3CJ,aAAA,CAACF,kBAAA,WAAa,CAACO,IAAI;IAACC,IAAI,EAAC;EAAM,CAAE,CAAC,EAClCN,aAAA,CAACL,eAAA,WAAc,MAAE,CAAC,EAClBK,aAAA,CAACD,WAAA,WAAU,CAACM,IAAI;IAACC,IAAI,EAAC;EAAM,CAAE,CAC1B,CACD,CAAC;AAER;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEcP,UAAU"} -------------------------------------------------------------------------------- /build/components/block-editor/unlock.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.unlock = void 0; 7 | var _privateApis = require("@wordpress/private-apis"); 8 | /** 9 | * WordPress dependencies 10 | */ 11 | 12 | var _dangerousOptInToUns = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/edit-post'), 13 | unlock = exports.unlock = _dangerousOptInToUns.unlock; 14 | //# sourceMappingURL=unlock.js.map -------------------------------------------------------------------------------- /build/components/block-editor/unlock.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"unlock.js","names":["_privateApis","require","_dangerousOptInToUns","__dangerousOptInToUnstableAPIsOnlyForCoreModules","unlock","exports"],"sources":["../../../src/components/block-editor/unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { unlock } =\n __dangerousOptInToUnstableAPIsOnlyForCoreModules(\n 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n '@wordpress/edit-post'\n );\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,IAAAC,oBAAA,GACH,IAAAC,6DAAgD,EAC5C,iHAAiH,EACjH,sBACJ,CAAC;EAJUC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAAF,oBAAA,CAANE,MAAM"} -------------------------------------------------------------------------------- /build/components/document/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _components = require("@wordpress/components"); 8 | var _i18n = require("@wordpress/i18n"); 9 | import { createElement } from "react"; 10 | /** 11 | * WordPress dependencies 12 | */ 13 | 14 | var _createSlotFill = (0, _components.createSlotFill)('PluginDocumentSettingPanel'), 15 | Fill = _createSlotFill.Fill, 16 | Slot = _createSlotFill.Slot; 17 | var DocumentSection = function DocumentSection(_ref) { 18 | var children = _ref.children; 19 | return createElement(Fill, null, children); 20 | }; 21 | DocumentSection.Slot = function (props) { 22 | return createElement(Slot, null, function (fills) { 23 | return fills ? fills : createElement("span", { 24 | className: "block-editor-block-inspector__no-blocks" 25 | }, (0, _i18n.__)('Nothing to display')); 26 | }); 27 | }; 28 | var _default = exports["default"] = DocumentSection; 29 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/components/document/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["_components","require","_i18n","createElement","_createSlotFill","createSlotFill","Fill","Slot","DocumentSection","_ref","children","props","fills","className","__","_default","exports"],"sources":["../../../src/components/document/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\nconst DocumentSection = ( { children } ) => {\n\treturn { children };\n};\n\nDocumentSection.Slot = function ( props ) {\n\treturn (\n\t\t\n\t\t\t{ ( fills ) =>\n\t\t\t\tfills ? (\n\t\t\t\t\tfills\n\t\t\t\t) : (\n\t\t\t\t\t{ __( 'Nothing to display' ) }\n\t\t\t\t)\n\t\t\t}\n\t\t\n\t);\n};\n\nexport default DocumentSection;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAqC,SAAAE,aAAA;AAJrC;AACA;AACA;;AAIA,IAAAC,eAAA,GAAuB,IAAAC,0BAAc,EAAE,4BAA6B,CAAC;EAA7DC,IAAI,GAAAF,eAAA,CAAJE,IAAI;EAAEC,IAAI,GAAAH,eAAA,CAAJG,IAAI;AAElB,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAuB;EAAA,IAAhBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EACnC,OAAOP,aAAA,CAACG,IAAI,QAAGI,QAAgB,CAAC;AACjC,CAAC;AAEDF,eAAe,CAACD,IAAI,GAAG,UAAWI,KAAK,EAAG;EACzC,OACCR,aAAA,CAACI,IAAI,QACF,UAAEK,KAAK;IAAA,OACRA,KAAK,GACJA,KAAK,GAELT,aAAA;MAAMU,SAAS,EAAC;IAAyC,GAAG,IAAAC,QAAE,EAAE,oBAAqB,CAAS,CAC9F;EAAA,CAEG,CAAC;AAET,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaR,eAAe"} -------------------------------------------------------------------------------- /build/components/editor-heading-slot/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _components = require("@wordpress/components"); 8 | import { createElement } from "react"; 9 | var _createSlotFill = (0, _components.createSlotFill)('IsolatedEditorHeading'), 10 | Fill = _createSlotFill.Fill, 11 | Slot = _createSlotFill.Slot; 12 | var EditorHeading = function EditorHeading(_ref) { 13 | var children = _ref.children; 14 | return createElement(Fill, null, children); 15 | }; 16 | EditorHeading.Slot = function (props) { 17 | return createElement(Slot, null, function (fills) { 18 | return fills; 19 | }); 20 | }; 21 | var _default = exports["default"] = EditorHeading; 22 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/components/editor-heading-slot/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["_components","require","createElement","_createSlotFill","createSlotFill","Fill","Slot","EditorHeading","_ref","children","props","fills","_default","exports"],"sources":["../../../src/components/editor-heading-slot/index.js"],"sourcesContent":["import { createSlotFill } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'IsolatedEditorHeading' );\n\nconst EditorHeading = ( { children } ) => {\n\treturn { children };\n};\n\nEditorHeading.Slot = function ( props ) {\n\treturn { ( fills ) => fills };\n};\n\nexport default EditorHeading;"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAuD,SAAAC,aAAA;AAEvD,IAAAC,eAAA,GAAuB,IAAAC,0BAAc,EAAE,uBAAwB,CAAC;EAAxDC,IAAI,GAAAF,eAAA,CAAJE,IAAI;EAAEC,IAAI,GAAAH,eAAA,CAAJG,IAAI;AAElB,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAAuB;EAAA,IAAhBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EACjC,OAAOP,aAAA,CAACG,IAAI,QAAGI,QAAgB,CAAC;AACjC,CAAC;AAEDF,aAAa,CAACD,IAAI,GAAG,UAAWI,KAAK,EAAG;EACvC,OAAOR,aAAA,CAACI,IAAI,QAAG,UAAEK,KAAK;IAAA,OAAMA,KAAK;EAAA,CAAQ,CAAC;AAC3C,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaN,aAAa"} -------------------------------------------------------------------------------- /build/components/editor-loaded/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _element = require("@wordpress/element"); 8 | var _data = require("@wordpress/data"); 9 | /** 10 | * WordPress dependencies 11 | */ 12 | 13 | /** 14 | * @callback OnLoad 15 | */ 16 | /** 17 | * Used by clients to add an optional loading placeholder 18 | * 19 | * @param {Object} props - Component props 20 | * @param {OnLoad} [props.onLoaded] - Callback to signal that the editor has loaded 21 | * @param {OnLoad} [props.onLoading] - Callback to signal that the editor is loading 22 | */ 23 | function EditorLoaded(_ref) { 24 | var onLoaded = _ref.onLoaded, 25 | onLoading = _ref.onLoading; 26 | var _useSelect = (0, _data.useSelect)(function (select) { 27 | return { 28 | // @ts-ignore 29 | isEditorReady: select('isolated/editor').isEditorReady() 30 | }; 31 | }, []), 32 | isEditorReady = _useSelect.isEditorReady; 33 | (0, _element.useEffect)(function () { 34 | if (isEditorReady) { 35 | onLoaded && onLoaded(); 36 | } else { 37 | onLoading && onLoading(); 38 | } 39 | }, [isEditorReady]); 40 | return null; 41 | } 42 | var _default = exports["default"] = EditorLoaded; 43 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/components/footer-slot/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _components = require("@wordpress/components"); 8 | import { createElement } from "react"; 9 | /** 10 | * WordPress dependencies 11 | */ 12 | 13 | var _createSlotFill = (0, _components.createSlotFill)('IsolatedFooter'), 14 | Fill = _createSlotFill.Fill, 15 | Slot = _createSlotFill.Slot; 16 | var FooterSection = function FooterSection(_ref) { 17 | var children = _ref.children; 18 | return createElement(Fill, null, children); 19 | }; 20 | FooterSection.Slot = function (props) { 21 | return createElement(Slot, null, function (fills) { 22 | return fills; 23 | }); 24 | }; 25 | var _default = exports["default"] = FooterSection; 26 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/components/footer-slot/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["_components","require","createElement","_createSlotFill","createSlotFill","Fill","Slot","FooterSection","_ref","children","props","fills","_default","exports"],"sources":["../../../src/components/footer-slot/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'IsolatedFooter' );\n\nconst FooterSection = ( { children } ) => {\n\treturn { children };\n};\n\nFooterSection.Slot = function( props ) {\n\treturn { ( fills ) => fills };\n};\n\nexport default FooterSection;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAuD,SAAAC,aAAA;AAHvD;AACA;AACA;;AAGA,IAAAC,eAAA,GAAuB,IAAAC,0BAAc,EAAE,gBAAiB,CAAC;EAAjDC,IAAI,GAAAF,eAAA,CAAJE,IAAI;EAAEC,IAAI,GAAAH,eAAA,CAAJG,IAAI;AAElB,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAAuB;EAAA,IAAhBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EACjC,OAAOP,aAAA,CAACG,IAAI,QAAGI,QAAgB,CAAC;AACjC,CAAC;AAEDF,aAAa,CAACD,IAAI,GAAG,UAAUI,KAAK,EAAG;EACtC,OAAOR,aAAA,CAACI,IAAI,QAAG,UAAEK,KAAK;IAAA,OAAMA,KAAK;EAAA,CAAQ,CAAC;AAC3C,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaN,aAAa"} -------------------------------------------------------------------------------- /build/components/with-registry-provider/reusable-store/constants.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.STORE_KEY = void 0; 7 | /** 8 | * Constant for the store module (or reducer) key. 9 | * 10 | * @type {string} 11 | */ 12 | var STORE_KEY = exports.STORE_KEY = 'core/reusable-blocks'; 13 | //# sourceMappingURL=constants.js.map -------------------------------------------------------------------------------- /build/components/with-registry-provider/reusable-store/constants.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"constants.js","names":["STORE_KEY","exports"],"sources":["../../../../src/components/with-registry-provider/reusable-store/constants.js"],"sourcesContent":["/**\n * Constant for the store module (or reducer) key.\n *\n * @type {string}\n */\nexport const STORE_KEY = 'core/reusable-blocks';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,IAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,sBAAsB"} -------------------------------------------------------------------------------- /build/components/with-registry-provider/reusable-store/selectors.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.__experimentalIsEditingReusableBlock = __experimentalIsEditingReusableBlock; 7 | /** 8 | * Returns true if reusable block is in the editing state. 9 | * 10 | * @param {Object} state Global application state. 11 | * @param {number} clientId the clientID of the block. 12 | * @return {boolean} Whether the reusable block is in the editing state. 13 | */ 14 | function __experimentalIsEditingReusableBlock(state, clientId) { 15 | return state.isEditingReusableBlock[clientId]; 16 | } 17 | //# sourceMappingURL=selectors.js.map -------------------------------------------------------------------------------- /build/components/with-registry-provider/reusable-store/selectors.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.js","names":["__experimentalIsEditingReusableBlock","state","clientId","isEditingReusableBlock"],"sources":["../../../../src/components/with-registry-provider/reusable-store/selectors.js"],"sourcesContent":["/**\n * Returns true if reusable block is in the editing state.\n *\n * @param {Object} state Global application state.\n * @param {number} clientId the clientID of the block.\n * @return {boolean} Whether the reusable block is in the editing state.\n */\nexport function __experimentalIsEditingReusableBlock( state, clientId ) {\n\treturn state.isEditingReusableBlock[ clientId ];\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,oCAAoCA,CAAEC,KAAK,EAAEC,QAAQ,EAAG;EACvE,OAAOD,KAAK,CAACE,sBAAsB,CAAED,QAAQ,CAAE;AAChD"} -------------------------------------------------------------------------------- /build/global.d.ts: -------------------------------------------------------------------------------- 1 | interface Window { 2 | isoInitialised: any; 3 | isoInitialisedBlocks: any; 4 | wp: any; 5 | } 6 | -------------------------------------------------------------------------------- /build/store/core-editor/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = _default; 7 | var _blocks = require("@wordpress/blocks"); 8 | /** 9 | * WordPress dependencies 10 | */ 11 | 12 | /** 13 | * Override the default `core/editor` store with functions that return data from `core/block-editor` instead of the post in `core/editor` 14 | * 15 | * @param existingSelectors 16 | * @param newSelect 17 | */ 18 | function _default(existingSelectors, newSelect) { 19 | return { 20 | getEditedPostAttribute: function getEditedPostAttribute(state, attributeName) { 21 | if (attributeName === 'content') { 22 | // Content is stored in core/block-editor, not in the post entity 23 | return (0, _blocks.serialize)(newSelect('core/block-editor').getBlocks()); 24 | } 25 | 26 | // Pass everything else through 27 | return existingSelectors.getEditedPostAttribute(state, attributeName); 28 | }, 29 | getEditedPostContent: function getEditedPostContent() { 30 | return (0, _blocks.serialize)(newSelect('core/block-editor').getBlocks()); 31 | } 32 | }; 33 | } 34 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/store/edit-post/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var _data = require("@wordpress/data"); 8 | /** 9 | * WordPress dependencies 10 | */ 11 | 12 | /** 13 | * Internal dependencies 14 | */ 15 | 16 | var STORE_KEY = 'core/edit-post'; 17 | 18 | // This is a fake store to prevent errors if anything tries to use `isFeatureActive` 19 | var store = (0, _data.registerStore)(STORE_KEY, { 20 | reducer: (0, _data.combineReducers)({}), 21 | actions: {}, 22 | selectors: { 23 | isFeatureActive: function isFeatureActive() { 24 | return false; 25 | } 26 | } 27 | }); 28 | var _default = exports["default"] = store; 29 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/store/edit-post/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","names":["_data","require","STORE_KEY","store","registerStore","reducer","combineReducers","actions","selectors","isFeatureActive","_default","exports"],"sources":["../../../src/store/edit-post/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { registerStore, combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\n\nconst STORE_KEY = 'core/edit-post';\n\n// This is a fake store to prevent errors if anything tries to use `isFeatureActive`\nconst store = registerStore( STORE_KEY, {\n\treducer: combineReducers( {} ),\n\tactions: {},\n\tselectors: {\n\t\tisFeatureActive: () => false,\n\t},\n} );\n\nexport default store;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;;AAEA,IAAMC,SAAS,GAAG,gBAAgB;;AAElC;AACA,IAAMC,KAAK,GAAG,IAAAC,mBAAa,EAAEF,SAAS,EAAE;EACvCG,OAAO,EAAE,IAAAC,qBAAe,EAAE,CAAC,CAAE,CAAC;EAC9BC,OAAO,EAAE,CAAC,CAAC;EACXC,SAAS,EAAE;IACVC,eAAe,EAAE,SAAAA,gBAAA;MAAA,OAAM,KAAK;IAAA;EAC7B;AACD,CAAE,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEWR,KAAK"} -------------------------------------------------------------------------------- /build/store/options/actions.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var actions = { 8 | /** 9 | * Toggle the option 10 | * 11 | * @param {string} option Option name 12 | */ 13 | toggleOption: function toggleOption(option) { 14 | return { 15 | type: 'TOGGLE_OPTION', 16 | option: option 17 | }; 18 | } 19 | }; 20 | var _default = exports["default"] = actions; 21 | //# sourceMappingURL=actions.js.map -------------------------------------------------------------------------------- /build/store/options/actions.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.js","names":["actions","toggleOption","option","type","_default","exports"],"sources":["../../../src/store/options/actions.js"],"sourcesContent":["const actions = {\n\t/**\n\t * Toggle the option\n\t *\n\t * @param {string} option Option name\n\t */\n\ttoggleOption( option ) {\n\t\treturn {\n\t\t\ttype: 'TOGGLE_OPTION',\n\t\t\toption,\n\t\t};\n\t},\n};\n\nexport default actions;\n"],"mappings":";;;;;;AAAA,IAAMA,OAAO,GAAG;EACf;AACD;AACA;AACA;AACA;EACCC,YAAY,WAAAA,aAAEC,MAAM,EAAG;IACtB,OAAO;MACNC,IAAI,EAAE,eAAe;MACrBD,MAAM,EAANA;IACD,CAAC;EACF;AACD,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEaL,OAAO"} -------------------------------------------------------------------------------- /build/store/options/reducer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.js","names":["DEFAULT_STATE","reducer","state","arguments","length","undefined","action","type","_objectSpread","_defineProperty2","option","_default","exports"],"sources":["../../../src/store/options/reducer.js"],"sourcesContent":["const DEFAULT_STATE = {};\n\nconst reducer = ( state = DEFAULT_STATE, action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'TOGGLE_OPTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.option ]: state[ action.option ] ? ! state[ action.option ] : true,\n\t\t\t};\n\t}\n\n\treturn state;\n};\n\nexport default reducer;\n"],"mappings":";;;;;;;;;;AAAA,IAAMA,aAAa,GAAG,CAAC,CAAC;AAExB,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAA,EAAwC;EAAA,IAAnCC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGH,aAAa;EAAA,IAAEM,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAC9C,QAASC,MAAM,CAACC,IAAI;IACnB,KAAK,eAAe;MACnB,OAAAC,aAAA,CAAAA,aAAA,KACIN,KAAK,WAAAO,gBAAA,iBACNH,MAAM,CAACI,MAAM,EAAIR,KAAK,CAAEI,MAAM,CAACI,MAAM,CAAE,GAAG,CAAER,KAAK,CAAEI,MAAM,CAACI,MAAM,CAAE,GAAG,IAAI;EAE9E;EAEA,OAAOR,KAAK;AACb,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,cAEaX,OAAO"} -------------------------------------------------------------------------------- /build/store/options/selectors.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.isOptionActive = isOptionActive; 7 | /** 8 | * Get the option value 9 | * 10 | * @param {Object} state - Current state 11 | * @param {string} option - Option name 12 | * @return {boolean} 13 | */ 14 | function isOptionActive(state, option) { 15 | return state.options[option] ? state.options[option] : false; 16 | } 17 | //# sourceMappingURL=selectors.js.map -------------------------------------------------------------------------------- /build/store/options/selectors.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.js","names":["isOptionActive","state","option","options"],"sources":["../../../src/store/options/selectors.js"],"sourcesContent":["/**\n * Get the option value\n *\n * @param {Object} state - Current state\n * @param {string} option - Option name\n * @return {boolean}\n */\nexport function isOptionActive( state, option ) {\n\treturn state.options[ option ] ? state.options[ option ] : false;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAAEC,KAAK,EAAEC,MAAM,EAAG;EAC/C,OAAOD,KAAK,CAACE,OAAO,CAAED,MAAM,CAAE,GAAGD,KAAK,CAACE,OAAO,CAAED,MAAM,CAAE,GAAG,KAAK;AACjE"} -------------------------------------------------------------------------------- /build/store/preferences/actions.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports["default"] = void 0; 7 | var actions = { 8 | /** 9 | * Toggle the feature 10 | * 11 | * @param {string} feature - Feature name 12 | */ 13 | toggleFeature: function toggleFeature(feature) { 14 | return { 15 | type: 'TOGGLE_FEATURE', 16 | feature: feature 17 | }; 18 | } 19 | }; 20 | var _default = exports["default"] = actions; 21 | //# sourceMappingURL=actions.js.map -------------------------------------------------------------------------------- /build/store/preferences/actions.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"actions.js","names":["actions","toggleFeature","feature","type","_default","exports"],"sources":["../../../src/store/preferences/actions.js"],"sourcesContent":["const actions = {\n\t/**\n\t * Toggle the feature\n\t *\n\t * @param {string} feature - Feature name\n\t */\n\ttoggleFeature( feature ) {\n\t\treturn {\n\t\t\ttype: 'TOGGLE_FEATURE',\n\t\t\tfeature,\n\t\t};\n\t},\n};\n\nexport default actions;\n"],"mappings":";;;;;;AAAA,IAAMA,OAAO,GAAG;EACf;AACD;AACA;AACA;AACA;EACCC,aAAa,WAAAA,cAAEC,OAAO,EAAG;IACxB,OAAO;MACNC,IAAI,EAAE,gBAAgB;MACtBD,OAAO,EAAPA;IACD,CAAC;EACF;AACD,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEaL,OAAO"} -------------------------------------------------------------------------------- /build/store/preferences/selectors.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.isFeatureActive = isFeatureActive; 7 | /** 8 | * Is the feature active? 9 | * 10 | * @param {Object} state - Current state 11 | * @param {string} feature - Feature name 12 | * @param {boolean} [defaultValue=false] - Default value 13 | */ 14 | function isFeatureActive(state, feature) { 15 | var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; 16 | return state.preferences[feature] === undefined ? defaultValue : state.preferences[feature]; 17 | } 18 | //# sourceMappingURL=selectors.js.map -------------------------------------------------------------------------------- /build/store/preferences/selectors.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"selectors.js","names":["isFeatureActive","state","feature","defaultValue","arguments","length","undefined","preferences"],"sources":["../../../src/store/preferences/selectors.js"],"sourcesContent":["/**\n * Is the feature active?\n *\n * @param {Object} state - Current state\n * @param {string} feature - Feature name\n * @param {boolean} [defaultValue=false] - Default value\n */\nexport function isFeatureActive( state, feature, defaultValue = false ) {\n\treturn state.preferences[ feature ] === undefined ? defaultValue : state.preferences[ feature ];\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,eAAeA,CAAEC,KAAK,EAAEC,OAAO,EAAyB;EAAA,IAAvBC,YAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EACpE,OAAOH,KAAK,CAACM,WAAW,CAAEL,OAAO,CAAE,KAAKI,SAAS,GAAGH,YAAY,GAAGF,KAAK,CAACM,WAAW,CAAEL,OAAO,CAAE;AAChG"} -------------------------------------------------------------------------------- /examples/wordpress-php/README.md: -------------------------------------------------------------------------------- 1 | # Isolated Block Editor - bundling with WordPress 2 | 3 | This helps with setting up WordPress to load Gutenberg on pages outside of the post editor. 4 | 5 | It will: 6 | - Load Gutenberg JS and CSS files 7 | - Setup the Gutenberg settings 8 | - Allow third-party blocks to run 9 | - Setup the media library 10 | 11 | Some of this setup is copied from WordPress, and may need to be updated. 12 | 13 | ```php 14 | add_action( 'init', function() { 15 | $gutenberg = new IsoEditor_Gutenberg(); 16 | $gutenberg->load(); 17 | } ); 18 | ``` 19 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | const baseConfig = require( '@wordpress/scripts/config/jest-unit.config' ); 5 | 6 | module.exports = { 7 | ...baseConfig, 8 | setupFilesAfterEnv: [ ...( baseConfig.setupFilesAfterEnv || [] ), '/.jest/jest-setup.js' ], 9 | transformIgnorePatterns: [ '\\.pnp\\.[^\\/]+$' ], 10 | testPathIgnorePatterns: [ '/node_modules/', 'e2e/' ], 11 | }; 12 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "checkJs": true, 4 | "baseUrl": "." 5 | }, 6 | "exclude": [ 7 | "node_modules", 8 | "vendor", 9 | "**/node_modules/*", 10 | "build", 11 | "build-module" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/browser/README.md: -------------------------------------------------------------------------------- 1 | # Plain Text Editor 2 | 3 | This uses the `IsolatedBlockEditor` to provide a Gutenberg replacement for a `textarea`. Content is loaded from the `textarea` on initialisation, and saved to the `textarea` during editing. 4 | 5 | If the `textarea` is part of a `form` then it could be submitted back to the server. 6 | 7 | Multiple editor instances can be created. 8 | 9 | Gutenberg is bundled into a single file, and basic styling is provided. A text HTML page will be produced. 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/browser/core.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import './core.scss'; 5 | -------------------------------------------------------------------------------- /src/browser/core.scss: -------------------------------------------------------------------------------- 1 | /* Core Gutenberg styles for clients that aren't loading WordPress CSS */ 2 | @import '@wordpress/components/build-style/style.css'; 3 | @import '@wordpress/block-editor/build-style/style.css'; 4 | @import '@wordpress/block-library/build-style/style.css'; 5 | @import '@wordpress/block-library/build-style/editor.css'; 6 | @import '@wordpress/block-library/build-style/theme.css'; 7 | @import '@wordpress/format-library/build-style/style.css'; 8 | @import '@wordpress/edit-post/build-style/style.css'; 9 | -------------------------------------------------------------------------------- /src/browser/plain-text-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/isolated-block-editor/44de0ed937f7a1d9d2f285792023980658e91c91/src/browser/plain-text-editor.png -------------------------------------------------------------------------------- /src/browser/style.scss: -------------------------------------------------------------------------------- 1 | .iso-editor { 2 | --wp-admin-theme-color: #0085ba; 3 | --wp-admin-theme-color-darker-10: #0073a1; 4 | --wp-admin-theme-color-darker-20: #006187; 5 | --wp-admin-border-width-focus: 2px; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/action-area/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { createSlotFill } from '@wordpress/components'; 5 | 6 | const { Fill, Slot } = createSlotFill( 'IsolatedFooter' ); 7 | 8 | const ActionArea = ( { children } ) => { 9 | return { children }; 10 | }; 11 | 12 | ActionArea.Slot = function () { 13 | return { ( fills ) => fills }; 14 | }; 15 | 16 | export default ActionArea; 17 | -------------------------------------------------------------------------------- /src/components/block-editor-container/click-outside.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | 5 | import { Component } from '@wordpress/element'; 6 | 7 | /** 8 | * Internal dependencies 9 | */ 10 | import withFocusOutside from './with-focus-outside.js'; 11 | 12 | const ClickOutsideWrapper = withFocusOutside( 13 | // @ts-ignore 14 | class extends Component { 15 | handleFocus( ev ) { 16 | this.props.onFocus(); 17 | } 18 | 19 | // Clicks in the media modal or popup components are considered in the editor 20 | isInspectorElement( element ) { 21 | // Inside a colour picker popover 22 | if ( element.closest( '.components-color-picker' ) ) { 23 | return true; 24 | } 25 | 26 | // Inside the inspector 27 | if ( element.closest( '.block-editor-block-inspector' ) || element.closest( '.iso-inspector' ) ) { 28 | return true; 29 | } 30 | 31 | // In the media modal 32 | if ( element.classList.contains( 'media-modal' ) ) { 33 | return true; 34 | } 35 | 36 | return false; 37 | } 38 | 39 | handleFocusOutside( ev ) { 40 | const target = ev.relatedTarget || ev.target; 41 | 42 | if ( target && this.isInspectorElement( target ) ) { 43 | return; 44 | } 45 | 46 | this.props.onOutside(); 47 | } 48 | 49 | render() { 50 | return this.props.children; 51 | } 52 | } 53 | ); 54 | 55 | export default ClickOutsideWrapper; 56 | -------------------------------------------------------------------------------- /src/components/block-editor-container/hot-swapper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { withDispatch, withSelect } from '@wordpress/data'; 5 | import { compose } from '@wordpress/compose'; 6 | import { useEffect } from '@wordpress/element'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import storeHotSwapPlugin from '../../store/plugins/store-hot-swap'; 12 | 13 | function HotSwapper( { isEditing, hotSwap } ) { 14 | useEffect( () => { 15 | hotSwap( isEditing ); 16 | }, [ isEditing ] ); 17 | 18 | return null; 19 | } 20 | 21 | // @ts-ignore 22 | export default compose( [ 23 | withSelect( ( select ) => { 24 | const { isEditing } = select( 'isolated/editor' ); 25 | 26 | return { 27 | isEditing: isEditing(), 28 | }; 29 | } ), 30 | withDispatch( ( dispatch, ownProps, { select } ) => { 31 | return { 32 | hotSwap: ( isEditing ) => { 33 | storeHotSwapPlugin.resetEditor(); 34 | 35 | if ( isEditing ) { 36 | storeHotSwapPlugin.setEditor( select, dispatch ); 37 | } 38 | }, 39 | }; 40 | } ), 41 | ] )( HotSwapper ); 42 | -------------------------------------------------------------------------------- /src/components/block-editor-contents/editor-content.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | 5 | import { parse, synchronizeBlocksWithTemplate } from '@wordpress/blocks'; 6 | 7 | /** @typedef {import('../../store/editor/reducer').Pattern} Pattern */ 8 | 9 | const getPattern = ( patterns, currentPattern ) => 10 | patterns && patterns.find( ( item ) => item.name === currentPattern ); 11 | 12 | /** 13 | * Get the pattern to start an editor with. 14 | * 15 | * @param {Pattern[]} patterns Array of patterns 16 | * @param {string} currentPattern Current pattern name 17 | * @param {object[]} template Current template 18 | * @param {object[]} initialContent Initial content 19 | */ 20 | function getInitialEditorContent( patterns, currentPattern, template, initialContent ) { 21 | // No patterns = do nothing 22 | if ( patterns === undefined ) { 23 | return initialContent; 24 | } 25 | 26 | // Existing content comes before anything 27 | if ( initialContent && initialContent.length > 0 ) { 28 | return initialContent; 29 | } 30 | 31 | // Did we load the page with a template set? 32 | if ( currentPattern ) { 33 | const pattern = getPattern( patterns, currentPattern ); 34 | 35 | if ( pattern ) { 36 | return parse( pattern.content ); 37 | } 38 | } 39 | 40 | if ( template ) { 41 | return synchronizeBlocksWithTemplate( initialContent, template ); 42 | } 43 | 44 | // No content 45 | return []; 46 | } 47 | 48 | export default getInitialEditorContent; 49 | -------------------------------------------------------------------------------- /src/components/block-editor-toolbar/block-navigation/style.scss: -------------------------------------------------------------------------------- 1 | @import '@wordpress/base-styles/_colors'; 2 | @import '@wordpress/base-styles/_variables'; 3 | @import '@wordpress/base-styles/_mixins'; 4 | @import '@wordpress/base-styles/_breakpoints'; 5 | @import '@wordpress/base-styles/_animations'; 6 | @import '@wordpress/base-styles/_z-index'; 7 | 8 | .block-editor-block-navigation__popover { 9 | .components-popover__content { 10 | padding: 0; 11 | } 12 | 13 | .edit-post-editor__document-overview-panel .edit-post-sidebar__panel-tabs { 14 | flex-direction: row; 15 | } 16 | 17 | .edit-post-editor__list-view-container { 18 | max-height: 600px; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/components/block-editor-toolbar/header-toolbar/redo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { Button } from '@wordpress/components'; 6 | import { useSelect, useDispatch } from '@wordpress/data'; 7 | import { displayShortcut } from '@wordpress/keycodes'; 8 | import { redo as redoIcon } from '@wordpress/icons'; 9 | import { forwardRef } from '@wordpress/element'; 10 | 11 | function EditorHistoryRedo( props, ref ) { 12 | // @ts-ignore 13 | const hasRedo = useSelect( ( select ) => select( 'isolated/editor' ).hasEditorRedo(), [] ); 14 | const { redo } = useDispatch( 'isolated/editor' ); 15 | return ( 16 |