├── .nvmrc ├── .jshintignore ├── .npmrc ├── packages ├── a11y │ ├── .npmrc │ └── src │ │ └── clear.js ├── blob │ └── .npmrc ├── data │ ├── .npmrc │ └── src │ │ ├── plugins │ │ ├── index.js │ │ └── controls │ │ │ └── index.js │ │ ├── default-registry.js │ │ └── components │ │ └── async-mode-provider │ │ └── index.js ├── date │ └── .npmrc ├── dom │ ├── .npmrc │ └── src │ │ └── index.js ├── editor │ ├── src │ │ ├── hooks │ │ │ ├── index.native.js │ │ │ └── index.js │ │ ├── utils │ │ │ ├── index.native.js │ │ │ ├── index.js │ │ │ └── test │ │ │ │ └── url.js │ │ ├── components │ │ │ ├── post-excerpt │ │ │ │ ├── style.scss │ │ │ │ └── check.js │ │ │ ├── autocompleters │ │ │ │ ├── index.js │ │ │ │ └── README.md │ │ │ ├── error-boundary │ │ │ │ └── style.scss │ │ │ ├── post-title │ │ │ │ └── style.native.scss │ │ │ ├── template-validation-notice │ │ │ │ └── style.scss │ │ │ ├── post-trash │ │ │ │ └── style.scss │ │ │ ├── global-keyboard-shortcuts │ │ │ │ └── text-editor-shortcuts.js │ │ │ ├── index.native.js │ │ │ └── server-side-render │ │ │ │ └── README.md │ │ ├── editor-styles │ │ │ ├── test │ │ │ │ └── __snapshots__ │ │ │ │ │ └── traverse.js.snap │ │ │ └── ast │ │ │ │ └── index.js │ │ └── index.native.js │ └── .npmrc ├── i18n │ ├── .npmrc │ └── benchmark │ │ └── index.js ├── nux │ ├── .npmrc │ └── src │ │ ├── style.scss │ │ └── index.js ├── url │ └── .npmrc ├── viewport │ ├── src │ │ └── index.native.js │ └── .npmrc ├── api-fetch │ └── .npmrc ├── autop │ └── .npmrc ├── blocks │ ├── .npmrc │ └── src │ │ ├── api │ │ └── raw-handling │ │ │ ├── index.native.js │ │ │ ├── google-docs-uid-remover.js │ │ │ ├── head-remover.js │ │ │ ├── blockquote-normaliser.js │ │ │ └── iframe-remover.js │ │ └── store │ │ └── index.js ├── compose │ └── .npmrc ├── core-data │ ├── .npmrc │ └── src │ │ ├── queried-data │ │ └── index.js │ │ ├── name.js │ │ └── utils │ │ └── index.js ├── docgen │ ├── .npmrc │ ├── src │ │ ├── test │ │ │ ├── fixtures │ │ │ │ ├── namespace │ │ │ │ │ ├── code.js │ │ │ │ │ └── module.js │ │ │ │ ├── named-default │ │ │ │ │ ├── code.js │ │ │ │ │ ├── module-code.js │ │ │ │ │ └── module-ir.json │ │ │ │ ├── named-default-exported │ │ │ │ │ ├── code.js │ │ │ │ │ ├── module-code.js │ │ │ │ │ └── module-ir.json │ │ │ │ ├── default-variable │ │ │ │ │ └── code.js │ │ │ │ ├── named-class │ │ │ │ │ └── code.js │ │ │ │ ├── default-class-anonymous │ │ │ │ │ └── code.js │ │ │ │ ├── default-undocumented-oneliner │ │ │ │ │ └── code.js │ │ │ │ ├── named-function │ │ │ │ │ ├── code.js │ │ │ │ │ └── ir.json │ │ │ │ ├── named-import-namespace │ │ │ │ │ ├── module-code.js │ │ │ │ │ ├── module-ir.json │ │ │ │ │ └── code.js │ │ │ │ ├── named-variable │ │ │ │ │ └── code.js │ │ │ │ ├── default-import-named │ │ │ │ │ ├── module-ir.json │ │ │ │ │ ├── module-code.js │ │ │ │ │ └── code.js │ │ │ │ ├── default-undocumented-nocomments │ │ │ │ │ └── code.js │ │ │ │ ├── default-class-named │ │ │ │ │ └── code.js │ │ │ │ ├── default-function-anonymous │ │ │ │ │ └── code.js │ │ │ │ ├── namespace-commented │ │ │ │ │ ├── code.js │ │ │ │ │ └── module.js │ │ │ │ ├── default-function-named │ │ │ │ │ ├── code.js │ │ │ │ │ └── ir.json │ │ │ │ ├── named-identifier │ │ │ │ │ └── code.js │ │ │ │ ├── default-identifier │ │ │ │ │ └── code.js │ │ │ │ ├── default-import-default │ │ │ │ │ ├── module-ir.json │ │ │ │ │ ├── code.js │ │ │ │ │ └── module-code.js │ │ │ │ ├── named-import-named │ │ │ │ │ └── code.js │ │ │ │ ├── named-variables │ │ │ │ │ └── code.js │ │ │ │ ├── default-named-export │ │ │ │ │ └── code.js │ │ │ │ ├── tags-variable │ │ │ │ │ └── code.js │ │ │ │ ├── named-identifier-destructuring │ │ │ │ │ └── code.js │ │ │ │ ├── named-identifiers │ │ │ │ │ ├── ir.json │ │ │ │ │ └── code.js │ │ │ │ └── named-identifiers-and-inline │ │ │ │ │ └── code.js │ │ │ └── engine.js │ │ └── get-dependency-path.js │ └── CHANGELOG.md ├── dom-ready │ └── .npmrc ├── e2e-tests │ ├── .npmrc │ ├── fixtures │ │ ├── blocks │ │ │ ├── core__search.html │ │ │ ├── core__calendar.html │ │ │ ├── core__search.serialized.html │ │ │ ├── core__archives.serialized.html │ │ │ ├── core__block.html │ │ │ ├── core__calendar.serialized.html │ │ │ ├── core__legacy-widget.html │ │ │ ├── core__block.serialized.html │ │ │ ├── core__categories.serialized.html │ │ │ ├── core__4-invalid-starting-letter.html │ │ │ ├── core__invalid-Capitals.html │ │ │ ├── core__invalid-special.html │ │ │ ├── core__latest-posts.serialized.html │ │ │ ├── core__legacy-widget.serialized.html │ │ │ ├── core__tag-cloud.html │ │ │ ├── core__latest-comments.serialized.html │ │ │ ├── core__invalid-special.serialized.html │ │ │ ├── core__tag-cloud.serialized.html │ │ │ ├── core__4-invalid-starting-letter.serialized.html │ │ │ ├── core__invalid-Capitals.serialized.html │ │ │ ├── core__more.html │ │ │ ├── core__more.serialized.html │ │ │ ├── core__archives.html │ │ │ ├── core__archives__showPostCounts.serialized.html │ │ │ ├── core__latest-posts.html │ │ │ ├── core__nextpage.html │ │ │ ├── core__nextpage.serialized.html │ │ │ ├── core__tag-cloud__showTagCounts.html │ │ │ ├── core__archives__showPostCounts.html │ │ │ ├── core__latest-posts__displayPostDate.serialized.html │ │ │ ├── core__shortcode.html │ │ │ ├── core__shortcode.serialized.html │ │ │ ├── core__latest-posts__displayPostDate.html │ │ │ ├── core__tag-cloud__showTagCounts.serialized.html │ │ │ ├── core__separator.html │ │ │ ├── core__separator.serialized.html │ │ │ ├── core__categories.html │ │ │ ├── core__heading__h2-em.html │ │ │ ├── core__heading__h2-em.serialized.html │ │ │ ├── core__latest-comments.html │ │ │ ├── core__paragraph__deprecated.html │ │ │ ├── core__paragraph__deprecated.serialized.html │ │ │ ├── core__subhead.html │ │ │ ├── core__subhead.serialized.html │ │ │ ├── core__verse.html │ │ │ ├── core__verse.serialized.html │ │ │ ├── core__search__custom-text.html │ │ │ ├── core__spacer.html │ │ │ ├── core__heading__h2.html │ │ │ ├── core__heading__h2.serialized.html │ │ │ ├── core__spacer.serialized.html │ │ │ ├── core__freeform__undelimited.html │ │ │ ├── core__html.html │ │ │ ├── core__html.serialized.html │ │ │ ├── core__search__custom-text.serialized.html │ │ │ ├── core__freeform.serialized.html │ │ │ ├── core__freeform__undelimited.serialized.html │ │ │ ├── core__text__converts-to-paragraph.html │ │ │ ├── core__preformatted.html │ │ │ ├── core__preformatted.serialized.html │ │ │ ├── core__more__custom-text-teaser.html │ │ │ ├── core__more__custom-text-teaser.serialized.html │ │ │ ├── core__text__converts-to-paragraph.serialized.html │ │ │ ├── core__rss.html │ │ │ ├── core__code.serialized.html │ │ │ ├── core__rss.serialized.html │ │ │ ├── core__code.html │ │ │ ├── core__freeform.html │ │ │ ├── core__quote__deprecated-1.serialized.html │ │ │ ├── core__paragraph__align-right.html │ │ │ ├── core__paragraph__align-right.serialized.html │ │ │ ├── core__pullquote.serialized.html │ │ │ ├── core__pullquote__deprecated-2.html │ │ │ ├── core__pullquote__deprecated-2.serialized.html │ │ │ ├── core__image.html │ │ │ ├── core__image.serialized.html │ │ │ ├── core__pullquote.html │ │ │ ├── core__quote__deprecated-1.html │ │ │ ├── core__button__center.html │ │ │ ├── core__button__center.serialized.html │ │ │ ├── core__pullquote__multi-paragraph.serialized.html │ │ │ ├── core__calendar.json │ │ │ ├── core__missing.html │ │ │ ├── core__pullquote__deprecated-1.html │ │ │ ├── core__pullquote__deprecated-1.serialized.html │ │ │ ├── core__legacy-widget.json │ │ │ ├── core__missing.serialized.html │ │ │ ├── core__text-columns.serialized.html │ │ │ ├── core__nextpage.json │ │ │ ├── core__quote__style-2.html │ │ │ ├── core__quote__style-2.serialized.html │ │ │ ├── core__embed.serialized.html │ │ │ ├── core__tag-cloud.parsed.json │ │ │ ├── core__audio.serialized.html │ │ │ ├── core__block.json │ │ │ ├── core__file__no-download-button.html │ │ │ ├── core__separator.json │ │ │ ├── core__column.html │ │ │ ├── core__column.serialized.html │ │ │ ├── core__audio.html │ │ │ ├── core__file__no-download-button.serialized.html │ │ │ ├── core__image__deprecated-1.serialized.html │ │ │ ├── core__embed.html │ │ │ ├── core__file__no-text-link.serialized.html │ │ │ ├── core__more.json │ │ │ ├── core__4-invalid-starting-letter.parsed.json │ │ │ ├── core__archives.parsed.json │ │ │ ├── core__image__deprecated-1.html │ │ │ ├── core__invalid-special.parsed.json │ │ │ ├── core__pullquote__multi-paragraph.html │ │ │ ├── core__file__no-text-link.html │ │ │ ├── core__image__custom-link.html │ │ │ ├── core__image__custom-link.serialized.html │ │ │ ├── core__invalid-Capitals.parsed.json │ │ │ ├── core__list__ul.html │ │ │ ├── core__tag-cloud__showTagCounts.parsed.json │ │ │ ├── core__archives__showPostCounts.parsed.json │ │ │ ├── core__list__ul.serialized.html │ │ │ ├── core__text-columns.html │ │ │ ├── core__image__custom-link-rel.html │ │ │ ├── core__image__custom-link-rel.serialized.html │ │ │ ├── core__image__deprecated-2.html │ │ │ ├── core__image__attachment-link.html │ │ │ ├── core__image__attachment-link.serialized.html │ │ │ ├── core__image__custom-link-class.html │ │ │ ├── core__image__custom-link-class.serialized.html │ │ │ ├── core__shortcode.json │ │ │ ├── core__archives.json │ │ │ ├── core__tag-cloud.json │ │ │ ├── core__image__deprecated-3.html │ │ │ ├── core__image__deprecated-2.serialized.html │ │ │ ├── core__image__deprecated-3.serialized.html │ │ │ ├── core__tag-cloud__showTagCounts.json │ │ │ ├── core__archives__showPostCounts.json │ │ │ ├── core__search.json │ │ │ ├── core__spacer.json │ │ │ ├── core__4-invalid-starting-letter.json │ │ │ ├── core__subhead.json │ │ │ ├── core__group.html │ │ │ ├── core__group.serialized.html │ │ │ └── core__invalid-Capitals.json │ │ └── index.js │ ├── assets │ │ ├── 10x10_e2e_test_image_z9T8jK.png │ │ └── greeting-reusable-block.json │ ├── specs │ │ ├── blocks │ │ │ └── __snapshots__ │ │ │ │ ├── classic.test.js.snap │ │ │ │ ├── media-text.test.js.snap │ │ │ │ ├── separator.test.js.snap │ │ │ │ ├── code.test.js.snap │ │ │ │ └── html.test.js.snap │ │ ├── plugins │ │ │ └── __snapshots__ │ │ │ │ ├── wp-editor-meta-box.test.js.snap │ │ │ │ ├── meta-attribute-block.test.js.snap │ │ │ │ └── format-api.test.js.snap │ │ └── __snapshots__ │ │ │ ├── mentions.test.js.snap │ │ │ ├── compatibility-classic-editor.test.js.snap │ │ │ ├── style-variation.test.js.snap │ │ │ ├── reusable-blocks.test.js.snap │ │ │ └── embedding.test.js.snap │ ├── CHANGELOG.md │ ├── config │ │ └── gutenberg-phase.js │ ├── README.md │ ├── mu-plugins │ │ └── disable-login-autofocus.php │ └── jest.config.js ├── edit-post │ ├── .npmrc │ └── src │ │ ├── hooks │ │ └── index.js │ │ ├── components │ │ ├── sidebar │ │ │ ├── post-status │ │ │ │ └── style.scss │ │ │ ├── post-link │ │ │ │ └── style.scss │ │ │ ├── plugin-post-status-info │ │ │ │ └── test │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── index.js.snap │ │ │ ├── last-revision │ │ │ │ └── style.scss │ │ │ └── post-author │ │ │ │ └── style.scss │ │ ├── options-modal │ │ │ ├── section.js │ │ │ └── options │ │ │ │ └── index.js │ │ └── browser-url │ │ │ └── README.md │ │ └── store │ │ ├── defaults.js │ │ └── constants.js ├── element │ ├── .npmrc │ └── src │ │ ├── react-platform.native.js │ │ └── index.js ├── hooks │ └── .npmrc ├── keycodes │ ├── .npmrc │ └── src │ │ └── platform.native.js ├── notices │ ├── .npmrc │ └── src │ │ ├── index.js │ │ └── store │ │ └── controls.js ├── plugins │ ├── .npmrc │ └── src │ │ ├── index.js │ │ └── components │ │ └── index.js ├── rich-text │ ├── .npmrc │ └── src │ │ ├── special-characters.js │ │ ├── get-text-content.js │ │ ├── get-format-types.js │ │ ├── store │ │ └── index.js │ │ ├── test │ │ └── is-collapsed.js │ │ └── get-format-type.js ├── scripts │ ├── .npmrc │ ├── scripts │ │ └── test-unit-js.js │ ├── config │ │ ├── .stylelintrc.json │ │ ├── npmpackagejsonlint.json │ │ ├── .eslintrc.js │ │ ├── puppeteer.config.js │ │ └── babel-transform.js │ └── bin │ │ └── wp-scripts.js ├── shortcode │ └── .npmrc ├── wordcount │ └── .npmrc ├── annotations │ ├── .npmrc │ ├── src │ │ ├── index.js │ │ └── format │ │ │ └── index.js │ └── CHANGELOG.md ├── block-editor │ ├── .npmrc │ └── src │ │ ├── components │ │ ├── font-sizes │ │ │ ├── index.native.js │ │ │ ├── index.js │ │ │ └── style.scss │ │ ├── contrast-checker │ │ │ └── style.scss │ │ ├── alignment-toolbar │ │ │ └── index.native.js │ │ ├── color-palette │ │ │ ├── control.scss │ │ │ └── index.js │ │ ├── block-types-list │ │ │ └── style.scss │ │ ├── rich-text │ │ │ ├── style.native.scss │ │ │ ├── shortcut.native.js │ │ │ └── input-event.native.js │ │ ├── plain-text │ │ │ ├── style.native.scss │ │ │ └── style.scss │ │ ├── writing-flow │ │ │ └── style.scss │ │ ├── colors │ │ │ └── index.js │ │ ├── block-title │ │ │ └── README.md │ │ ├── inner-blocks │ │ │ └── style.scss │ │ ├── panel-color-settings │ │ │ └── style.scss │ │ └── default-block-appender │ │ │ └── style.native.scss │ │ ├── hooks │ │ ├── index.native.js │ │ └── index.js │ │ └── index.js ├── block-library │ ├── .npmrc │ └── src │ │ ├── separator │ │ ├── save.js │ │ ├── block.json │ │ ├── edit.js │ │ ├── theme.scss │ │ └── icon.js │ │ ├── heading │ │ ├── style.native.scss │ │ ├── editor.native.scss │ │ ├── shared.js │ │ └── test │ │ │ └── shared.js │ │ ├── nextpage │ │ ├── block.json │ │ ├── save.js │ │ ├── edit.js │ │ └── editor.native.scss │ │ ├── quote │ │ ├── editor.scss │ │ └── style.scss │ │ ├── template │ │ ├── block.json │ │ ├── edit.js │ │ └── save.js │ │ ├── archives │ │ └── editor.scss │ │ ├── audio │ │ ├── theme.scss │ │ ├── editor.scss │ │ └── style.scss │ │ ├── embed │ │ ├── theme.scss │ │ └── embed-loading.js │ │ ├── image │ │ └── theme.scss │ │ ├── paragraph │ │ ├── style.native.scss │ │ └── icon.js │ │ ├── verse │ │ ├── style.scss │ │ ├── editor.scss │ │ ├── icon.js │ │ ├── block.json │ │ └── save.js │ │ ├── video │ │ ├── theme.scss │ │ ├── editor.scss │ │ └── style.scss │ │ ├── preformatted │ │ ├── editor.scss │ │ ├── block.json │ │ ├── save.js │ │ └── theme.scss │ │ ├── search │ │ ├── theme.scss │ │ └── style.scss │ │ ├── subhead │ │ ├── style.scss │ │ ├── editor.scss │ │ ├── block.json │ │ ├── icon.js │ │ ├── save.js │ │ └── tranforms.js │ │ ├── code │ │ ├── save.js │ │ ├── theme.native.scss │ │ ├── block.json │ │ ├── theme.scss │ │ └── icon.js │ │ ├── categories │ │ ├── editor.scss │ │ └── style.scss │ │ ├── spacer │ │ ├── save.js │ │ ├── block.json │ │ ├── editor.scss │ │ └── icon.js │ │ ├── pullquote │ │ └── shared.js │ │ ├── text-columns │ │ └── editor.scss │ │ ├── list │ │ ├── editor.scss │ │ ├── block.json │ │ └── save.js │ │ ├── html │ │ ├── block.json │ │ ├── save.js │ │ └── icon.js │ │ ├── rss │ │ └── editor.scss │ │ ├── classic │ │ ├── block.json │ │ └── save.js │ │ ├── latest-posts │ │ └── editor.scss │ │ ├── shortcode │ │ ├── save.js │ │ └── icon.js │ │ ├── group │ │ ├── theme.scss │ │ └── block.json │ │ ├── table │ │ └── theme.scss │ │ ├── more │ │ ├── block.json │ │ └── icon.js │ │ ├── columns │ │ ├── block.json │ │ └── icon.js │ │ ├── column │ │ └── block.json │ │ ├── media-text │ │ └── icon.js │ │ ├── tag-cloud │ │ └── editor.scss │ │ ├── missing │ │ ├── save.js │ │ └── block.json │ │ ├── button │ │ └── icon.js │ │ └── file │ │ └── icon.js ├── components │ ├── .npmrc │ └── src │ │ ├── primitives │ │ ├── horizontal-rule │ │ │ ├── index.js │ │ │ └── index.native.js │ │ ├── block-quotation │ │ │ ├── index.js │ │ │ ├── style.native.scss │ │ │ ├── style.scss │ │ │ └── index.native.js │ │ └── index.js │ │ ├── dashicon │ │ ├── style.scss │ │ ├── icon-class.js │ │ ├── icon-class.native.js │ │ └── README.md │ │ ├── scroll-lock │ │ └── style.scss │ │ ├── spinner │ │ ├── style.native.scss │ │ ├── index.js │ │ └── README.md │ │ ├── text-control │ │ └── style.scss │ │ ├── checkbox-control │ │ └── style.scss │ │ ├── textarea-control │ │ └── style.scss │ │ ├── dropdown-menu │ │ └── index.native.js │ │ ├── sandbox │ │ ├── style.scss │ │ └── README.md │ │ ├── form-file-upload │ │ └── style.scss │ │ ├── mobile │ │ └── bottom-sheet │ │ │ ├── cellStyles.ios.scss │ │ │ └── cellStyles.android.scss │ │ ├── external-link │ │ ├── style.scss │ │ └── README.md │ │ ├── toolbar │ │ ├── style.native.scss │ │ └── toolbar-container.js │ │ ├── navigable-container │ │ └── index.js │ │ ├── toolbar-button │ │ ├── toolbar-button-container.js │ │ └── toolbar-button-container.native.js │ │ ├── color-indicator │ │ ├── README.md │ │ ├── style.scss │ │ ├── test │ │ │ └── __snapshots__ │ │ │ │ └── index.js.snap │ │ └── index.js │ │ ├── panel │ │ ├── header.js │ │ └── row.js │ │ ├── placeholder │ │ └── README.md │ │ ├── higher-order │ │ └── README.md │ │ ├── menu-group │ │ └── style.scss │ │ ├── responsive-wrapper │ │ └── style.scss │ │ ├── tooltip │ │ └── index.native.js │ │ ├── radio-control │ │ └── style.scss │ │ ├── disabled │ │ └── style.scss │ │ ├── toggle-control │ │ └── style.scss │ │ └── button-group │ │ └── index.js ├── deprecated │ └── .npmrc ├── e2e-test-utils │ ├── .npmrc │ └── src │ │ ├── clear-local-storage.js │ │ ├── click-block-appender.js │ │ ├── enable-pre-publish-checks.js │ │ ├── disable-pre-publish-checks.js │ │ ├── mocks │ │ └── index.js │ │ ├── click-button.js │ │ ├── select-block-by-client-id.js │ │ └── shared │ │ └── config.js ├── edit-widgets │ ├── .npmrc │ ├── CHANGELOG.md │ └── src │ │ ├── components │ │ ├── widget-area │ │ │ └── style.scss │ │ └── layout │ │ │ └── style.scss │ │ └── store │ │ └── constants.js ├── escape-html │ ├── .npmrc │ └── CHANGELOG.md ├── eslint-plugin │ ├── .npmrc │ ├── rules │ │ └── index.js │ ├── configs │ │ ├── index.js │ │ └── recommended.js │ └── index.js ├── format-library │ ├── .npmrc │ └── src │ │ ├── link │ │ └── modal.native.scss │ │ ├── style.scss │ │ ├── default-formats.native.js │ │ └── index.js ├── html-entities │ └── .npmrc ├── jest-console │ ├── .npmrc │ └── src │ │ └── supported-matchers.js ├── postcss-themes │ ├── .npmrc │ ├── CHANGELOG.md │ └── README.md ├── priority-queue │ ├── .npmrc │ └── CHANGELOG.md ├── redux-routine │ └── .npmrc ├── token-list │ ├── .npmrc │ └── CHANGELOG.md ├── browserslist-config │ ├── .npmrc │ └── index.js ├── is-shallow-equal │ ├── .npmrc │ ├── test │ │ └── .eslintrc.json │ ├── benchmark │ │ └── .eslintrc.json │ └── .eslintrc.json ├── jest-preset-default │ ├── .npmrc │ ├── scripts │ │ └── style-mock.js │ └── index.js ├── jest-puppeteer-axe │ ├── .npmrc │ └── CHANGELOG.md ├── babel-plugin-makepot │ └── .npmrc ├── babel-preset-default │ ├── .npmrc │ └── test │ │ └── fixtures │ │ └── input.js ├── list-reusable-blocks │ ├── .npmrc │ └── src │ │ ├── components │ │ ├── import-dropdown │ │ │ └── style.scss │ │ └── import-form │ │ │ └── style.scss │ │ └── style.scss ├── npm-package-json-lint-config │ └── .npmrc ├── babel-plugin-import-jsx-pragma │ └── .npmrc ├── block-serialization-default-parser │ └── .npmrc ├── block-serialization-spec-parser │ ├── .npmrc │ ├── .gitignore │ └── .npmignore ├── custom-templated-path-webpack-plugin │ ├── .npmrc │ └── test │ │ └── fixtures │ │ └── entry │ │ └── index.js ├── library-export-default-webpack-plugin │ ├── .npmrc │ ├── test │ │ └── fixtures │ │ │ ├── boo │ │ │ └── index.js │ │ │ └── foo │ │ │ └── index.js │ └── CHANGELOG.md ├── dependency-extraction-webpack-plugin │ ├── test │ │ └── fixtures │ │ │ ├── no-deps │ │ │ ├── index.js │ │ │ └── webpack.config.js │ │ │ ├── no-default │ │ │ ├── index.js │ │ │ └── webpack.config.js │ │ │ ├── dynamic-import │ │ │ ├── index.js │ │ │ ├── util.js │ │ │ └── webpack.config.js │ │ │ ├── wordpress │ │ │ ├── webpack.config.js │ │ │ └── index.js │ │ │ ├── wordpress-require │ │ │ ├── webpack.config.js │ │ │ └── index.js │ │ │ ├── function-output-filename │ │ │ ├── index.js │ │ │ └── webpack.config.js │ │ │ └── with-externs │ │ │ └── webpack.config.js │ └── CHANGELOG.md └── data-controls │ └── CHANGELOG.md ├── vendor └── .gitignore ├── .browserslistrc ├── test ├── integration │ └── fixtures │ │ ├── plain-in.html │ │ ├── gutenberg-out.html │ │ ├── gutenberg-in.html │ │ ├── iframe-embed-in.html │ │ ├── wordpress-in.html │ │ ├── plain-out.html │ │ ├── iframe-embed-out.html │ │ ├── one-image-in.html │ │ ├── shortcode-caption.html │ │ ├── classic-in.html │ │ ├── one-image-out.html │ │ ├── shortcode-caption-with-caption-link.html │ │ ├── google-docs-table-out.html │ │ ├── google-docs-table-with-comments-out.html │ │ ├── two-images-in.html │ │ └── shortcode-caption-with-link.html └── unit │ ├── __mocks__ │ └── @wordpress │ │ └── block-library.js │ └── config │ └── gutenberg-phase.js ├── docs ├── designers-developers │ ├── developers │ │ ├── backward-compatibility │ │ │ └── README.md │ │ ├── tutorials │ │ │ ├── metabox │ │ │ │ └── meta-block.png │ │ │ └── notices │ │ │ │ ├── block-editor-notice.png │ │ │ │ └── classic-editor-notice.png │ │ └── themes │ │ │ └── README.md │ ├── assets │ │ ├── inspector.png │ │ ├── toolbar-text.png │ │ ├── plugin-more-menu-item.png │ │ ├── fancy-quote-in-inspector.png │ │ ├── fancy-quote-with-style.png │ │ ├── plugin-pre-publish-panel.png │ │ ├── sidebar-up-and-running.png │ │ ├── plugin-post-publish-panel.png │ │ ├── plugin-sidebar-open-state.png │ │ ├── sidebar-style-and-controls.png │ │ ├── toolbar-with-custom-button.png │ │ ├── js-tutorial-console-log-error.png │ │ ├── plugin-sidebar-closed-state.png │ │ ├── plugin-sidebar-more-menu-item.gif │ │ ├── js-tutorial-console-log-success.png │ │ ├── js-tutorial-error-blocks-undefined.png │ │ ├── plugin-post-status-info-location.png │ │ └── plugin-block-settings-menu-item-screenshot.png │ └── designers │ │ ├── assets │ │ ├── blocks-do.png │ │ ├── blocks-dont.png │ │ ├── placeholder-do.png │ │ ├── placeholder-dont.png │ │ ├── block-controls-do.png │ │ ├── block-controls-dont.png │ │ ├── advanced-settings-do.png │ │ ├── block-descriptions-do.png │ │ └── block-descriptions-dont.png │ │ └── README.md └── contributors │ └── release-screenshot.png ├── bin ├── patches │ └── README.md └── reset-local-e2e-tests.sh ├── .eslintignore ├── babel.config.js ├── playground ├── .babelrc └── src │ └── index.html ├── docker-compose-localdev.yml ├── jsconfig.json ├── lerna.json ├── .gitignore ├── SECURITY.md ├── assets └── stylesheets │ └── _animations.scss └── phpunit.xml.dist /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/* 2 | -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | **/*.js 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | save-exact = true 2 | -------------------------------------------------------------------------------- /packages/a11y/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/blob/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/data/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/date/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/dom/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/editor/src/hooks/index.native.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/editor/src/utils/index.native.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/i18n/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/nux/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/url/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/viewport/src/index.native.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /vendor/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /packages/api-fetch/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/autop/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/blocks/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/compose/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/core-data/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/docgen/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/dom-ready/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/edit-post/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/editor/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/element/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/element/src/react-platform.native.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/hooks/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/keycodes/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/notices/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/plugins/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/rich-text/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/scripts/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/shortcode/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/viewport/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/wordcount/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/annotations/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/block-editor/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/block-library/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/components/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/deprecated/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/edit-widgets/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/escape-html/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/eslint-plugin/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/format-library/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/html-entities/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/jest-console/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/postcss-themes/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/priority-queue/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/redux-routine/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/token-list/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | extends @wordpress/browserslist-config 2 | -------------------------------------------------------------------------------- /packages/browserslist-config/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/is-shallow-equal/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/jest-preset-default/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/jest-puppeteer-axe/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/babel-plugin-makepot/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/babel-preset-default/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/list-reusable-blocks/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/npm-package-json-lint-config/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/babel-plugin-import-jsx-pragma/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/block-serialization-default-parser/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/block-serialization-spec-parser/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /test/integration/fixtures/plain-in.html: -------------------------------------------------------------------------------- 1 | test
test

test
2 | -------------------------------------------------------------------------------- /packages/custom-templated-path-webpack-plugin/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__search.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/jest-preset-default/scripts/style-mock.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /packages/library-export-default-webpack-plugin/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /packages/nux/src/style.scss: -------------------------------------------------------------------------------- 1 | @import "./components/dot-tip/style.scss"; 2 | -------------------------------------------------------------------------------- /packages/scripts/scripts/test-unit-js.js: -------------------------------------------------------------------------------- 1 | require( './test-unit-jest' ); 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__calendar.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__search.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/namespace/code.js: -------------------------------------------------------------------------------- 1 | export * from './namespace-module'; 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__archives.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__block.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__calendar.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__legacy-widget.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/plugins/src/index.js: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './api'; 3 | -------------------------------------------------------------------------------- /packages/priority-queue/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 (2019-03-06) 2 | 3 | Initial release. 4 | -------------------------------------------------------------------------------- /docs/designers-developers/developers/backward-compatibility/README.md: -------------------------------------------------------------------------------- 1 | # Backward Compatibility 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__block.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__categories.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/eslint-plugin/rules/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require( 'requireindex' )( __dirname ); 2 | -------------------------------------------------------------------------------- /packages/notices/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import './store'; 5 | -------------------------------------------------------------------------------- /packages/scripts/config/.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-wordpress" 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-serialization-spec-parser/.gitignore: -------------------------------------------------------------------------------- 1 | # Build Artifacts 2 | parser.js 3 | parser.php 4 | -------------------------------------------------------------------------------- /packages/components/src/primitives/horizontal-rule/index.js: -------------------------------------------------------------------------------- 1 | export const HorizontalRule = 'hr'; 2 | -------------------------------------------------------------------------------- /packages/custom-templated-path-webpack-plugin/test/fixtures/entry/index.js: -------------------------------------------------------------------------------- 1 | module.exports = null; 2 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-default/code.js: -------------------------------------------------------------------------------- 1 | export { default } from './module-code'; 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__4-invalid-starting-letter.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__invalid-Capitals.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__invalid-special.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__latest-posts.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__legacy-widget.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__tag-cloud.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/eslint-plugin/configs/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require( 'requireindex' )( __dirname ); 2 | -------------------------------------------------------------------------------- /packages/format-library/src/link/modal.native.scss: -------------------------------------------------------------------------------- 1 | .clearLinkButton { 2 | color: $alert-red; 3 | } 4 | -------------------------------------------------------------------------------- /packages/jest-preset-default/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require( './scripts/setup-test-framework' ); 2 | -------------------------------------------------------------------------------- /bin/patches/README.md: -------------------------------------------------------------------------------- 1 | This directory contains patches required to build 2 | older versions of PHP on trusty. -------------------------------------------------------------------------------- /packages/block-library/src/separator/save.js: -------------------------------------------------------------------------------- 1 | export default function save() { 2 | return
; 3 | } 4 | -------------------------------------------------------------------------------- /packages/components/src/primitives/block-quotation/index.js: -------------------------------------------------------------------------------- 1 | export const BlockQuotation = 'blockquote'; 2 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/no-deps/index.js: -------------------------------------------------------------------------------- 1 | /* Silence is golden */ 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__latest-comments.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/format-library/src/style.scss: -------------------------------------------------------------------------------- 1 | @import "./image/style.scss"; 2 | @import "./link/style.scss"; 3 | -------------------------------------------------------------------------------- /packages/components/src/dashicon/style.scss: -------------------------------------------------------------------------------- 1 | svg.dashicon { 2 | fill: currentColor; 3 | outline: none; 4 | } 5 | -------------------------------------------------------------------------------- /test/integration/fixtures/gutenberg-out.html: -------------------------------------------------------------------------------- 1 | 2 |

Test

3 | 4 | -------------------------------------------------------------------------------- /packages/block-library/src/heading/style.native.scss: -------------------------------------------------------------------------------- 1 | 2 | .blockText { 3 | min-height: $min-height-heading; 4 | } 5 | -------------------------------------------------------------------------------- /packages/block-library/src/nextpage/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/nextpage", 3 | "category": "layout" 4 | } 5 | -------------------------------------------------------------------------------- /packages/block-library/src/quote/editor.scss: -------------------------------------------------------------------------------- 1 | .wp-block-quote__citation { 2 | font-size: $default-font-size; 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-library/src/separator/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/separator", 3 | "category": "layout" 4 | } 5 | -------------------------------------------------------------------------------- /packages/block-library/src/template/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/template", 3 | "category": "reusable" 4 | } 5 | -------------------------------------------------------------------------------- /packages/components/src/scroll-lock/style.scss: -------------------------------------------------------------------------------- 1 | html.lockscroll, 2 | body.lockscroll { 3 | overflow: hidden; 4 | } 5 | -------------------------------------------------------------------------------- /packages/data-controls/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Master 2 | 3 | Initial release of the @wordpress/data-controls package. 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__invalid-special.serialized.html: -------------------------------------------------------------------------------- 1 |

2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__tag-cloud.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/editor/src/hooks/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import './default-autocompleters'; 5 | -------------------------------------------------------------------------------- /packages/is-shallow-equal/test/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": "../../../.eslintrc.js" 4 | } 5 | -------------------------------------------------------------------------------- /packages/scripts/config/npmpackagejsonlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@wordpress/npm-package-json-lint-config" 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-library/src/archives/editor.scss: -------------------------------------------------------------------------------- 1 | .block-editor ul.wp-block-archives { 2 | padding-left: 2.5em; 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-library/src/audio/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-audio figcaption { 2 | @include caption-style-theme(); 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-library/src/embed/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-embed figcaption { 2 | @include caption-style-theme(); 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-library/src/image/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-image figcaption { 2 | @include caption-style-theme(); 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-library/src/paragraph/style.native.scss: -------------------------------------------------------------------------------- 1 | 2 | .blockText { 3 | min-height: $min-height-paragraph; 4 | } 5 | -------------------------------------------------------------------------------- /packages/block-library/src/verse/style.scss: -------------------------------------------------------------------------------- 1 | pre.wp-block-verse { 2 | white-space: nowrap; 3 | overflow: auto; 4 | } 5 | -------------------------------------------------------------------------------- /packages/block-library/src/video/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-video figcaption { 2 | @include caption-style-theme(); 3 | } 4 | -------------------------------------------------------------------------------- /packages/components/src/spinner/style.native.scss: -------------------------------------------------------------------------------- 1 | .spinner { 2 | height: 6; 3 | background: $blue-wordpress; 4 | } 5 | -------------------------------------------------------------------------------- /packages/docgen/src/get-dependency-path.js: -------------------------------------------------------------------------------- 1 | module.exports = function( token ) { 2 | return token.source.value; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__4-invalid-starting-letter.serialized.html: -------------------------------------------------------------------------------- 1 |

2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__invalid-Capitals.serialized.html: -------------------------------------------------------------------------------- 1 |

2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__more.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__more.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/is-shallow-equal/benchmark/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": "../../../.eslintrc.js" 4 | } 5 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/font-sizes/index.native.js: -------------------------------------------------------------------------------- 1 | export { getFontSize, getFontSizeClass } from './utils'; 2 | -------------------------------------------------------------------------------- /packages/block-library/src/heading/editor.native.scss: -------------------------------------------------------------------------------- 1 | 2 | .wp-block-heading { 3 | min-height: $min-height-heading; 4 | } 5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__archives.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/block-library/src/preformatted/editor.scss: -------------------------------------------------------------------------------- 1 | .wp-block-preformatted { 2 | pre { 3 | white-space: pre-wrap; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/components/src/text-control/style.scss: -------------------------------------------------------------------------------- 1 | .components-text-control__input { 2 | width: 100%; 3 | padding: 6px 8px; 4 | } 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-default-exported/code.js: -------------------------------------------------------------------------------- 1 | export { default as moduleName } from './named-default-module'; 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__archives__showPostCounts.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/edit-widgets/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.1.0 (2019-03-06) 2 | 3 | ### New Features 4 | 5 | - Initial version of the module. 6 | -------------------------------------------------------------------------------- /packages/eslint-plugin/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | configs: require( './configs' ), 3 | rules: require( './rules' ), 4 | }; 5 | -------------------------------------------------------------------------------- /docs/contributors/release-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/contributors/release-screenshot.png -------------------------------------------------------------------------------- /packages/block-library/src/search/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-search { 2 | .wp-block-search__label { 3 | font-weight: bold; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/components/src/checkbox-control/style.scss: -------------------------------------------------------------------------------- 1 | .components-checkbox-control__input[type="checkbox"] { 2 | margin-top: 0; 3 | } 4 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-variable/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Variable declaration example. 3 | */ 4 | export default true; 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-class/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * My declaration example. 3 | */ 4 | export class MyDeclaration {} 5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__latest-posts.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__nextpage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__nextpage.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/library-export-default-webpack-plugin/test/fixtures/boo/index.js: -------------------------------------------------------------------------------- 1 | export default function boo() { 2 | return 'boo'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/library-export-default-webpack-plugin/test/fixtures/foo/index.js: -------------------------------------------------------------------------------- 1 | export default function foo() { 2 | return 'foo'; 3 | } 4 | -------------------------------------------------------------------------------- /test/integration/fixtures/gutenberg-in.html: -------------------------------------------------------------------------------- 1 | 2 |

Test

3 | 4 | -------------------------------------------------------------------------------- /packages/components/src/spinner/index.js: -------------------------------------------------------------------------------- 1 | export default function Spinner() { 2 | return ; 3 | } 4 | -------------------------------------------------------------------------------- /packages/components/src/textarea-control/style.scss: -------------------------------------------------------------------------------- 1 | .components-textarea-control__input { 2 | width: 100%; 3 | padding: 6px 8px; 4 | } 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-class-anonymous/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Class declaration example. 3 | */ 4 | export default class {} 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-undocumented-oneliner/code.js: -------------------------------------------------------------------------------- 1 | // This comment should be ignored 2 | export default function() { } 3 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-default/module-code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module declaration. 3 | */ 4 | export default function( ) {} 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-function/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * My declaration example. 3 | */ 4 | export function myDeclaration() {} 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-import-namespace/module-code.js: -------------------------------------------------------------------------------- 1 | export { default as controls } from './default-function-named'; 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__archives__showPostCounts.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__latest-posts__displayPostDate.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/editor/src/components/post-excerpt/style.scss: -------------------------------------------------------------------------------- 1 | .editor-post-excerpt__textarea { 2 | width: 100%; 3 | margin-bottom: 10px; 4 | } 5 | -------------------------------------------------------------------------------- /docs/designers-developers/assets/inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/inspector.png -------------------------------------------------------------------------------- /packages/block-editor/src/components/contrast-checker/style.scss: -------------------------------------------------------------------------------- 1 | .block-editor-contrast-checker > .components-notice { 2 | margin: 0; 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-library/src/subhead/style.scss: -------------------------------------------------------------------------------- 1 | p.wp-block-subhead { 2 | font-size: 1.1em; 3 | font-style: italic; 4 | opacity: 0.75; 5 | } 6 | -------------------------------------------------------------------------------- /packages/components/src/primitives/index.js: -------------------------------------------------------------------------------- 1 | export * from './svg'; 2 | export * from './horizontal-rule'; 3 | export * from './block-quotation'; 4 | -------------------------------------------------------------------------------- /packages/data/src/plugins/index.js: -------------------------------------------------------------------------------- 1 | export { default as controls } from './controls'; 2 | export { default as persistence } from './persistence'; 3 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-default-exported/module-code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module declaration. 3 | */ 4 | export default function( ) {} 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-import-namespace/module-ir.json: -------------------------------------------------------------------------------- 1 | [{"name":"controls","description":"Function declaration example.","tags":[]}] -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-variable/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * My declaration example. 3 | */ 4 | export const myDeclaration = true; 5 | 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__shortcode.html: -------------------------------------------------------------------------------- 1 | 2 | [gallery ids="238,338"] 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__shortcode.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | [gallery ids="238,338"] 3 | 4 | -------------------------------------------------------------------------------- /packages/edit-post/src/hooks/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import './components'; 5 | import './validate-multiple-use'; 6 | -------------------------------------------------------------------------------- /packages/scripts/config/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/annotations/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import './store'; 5 | import './format'; 6 | import './block'; 7 | 8 | -------------------------------------------------------------------------------- /packages/components/src/dropdown-menu/index.native.js: -------------------------------------------------------------------------------- 1 | 2 | function DropdownMenu() { 3 | return null; 4 | } 5 | 6 | export default DropdownMenu; 7 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-import-named/module-ir.json: -------------------------------------------------------------------------------- 1 | [{"name":"functionDeclaration","description":"Function declaration.","tags":[]}] -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-undocumented-nocomments/code.js: -------------------------------------------------------------------------------- 1 | const myDeclaration = function() {}; 2 | 3 | export default myDeclaration; 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__latest-posts__displayPostDate.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build 2 | build-module 3 | node_modules 4 | packages/e2e-tests/plugins 5 | vendor 6 | packages/block-serialization-spec-parser/parser.js 7 | -------------------------------------------------------------------------------- /docs/designers-developers/assets/toolbar-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/toolbar-text.png -------------------------------------------------------------------------------- /packages/block-library/src/code/save.js: -------------------------------------------------------------------------------- 1 | export default function save( { attributes } ) { 2 | return
{ attributes.content }
; 3 | } 4 | -------------------------------------------------------------------------------- /packages/components/src/sandbox/style.scss: -------------------------------------------------------------------------------- 1 | .components-sandbox { 2 | overflow: hidden; 3 | } 4 | 5 | iframe.components-sandbox { 6 | width: 100%; 7 | } 8 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-class-named/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Class declaration example. 3 | */ 4 | export default class ClassDeclaration {} 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-function-anonymous/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Function declaration example. 3 | */ 4 | export default function() {} 5 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-default/module-ir.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name": "default", 3 | "description": "Module declaration.", 4 | "tags": [] 5 | }] -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/namespace-commented/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This comment should be ignored. 3 | */ 4 | export * from './namespace-module'; 5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__separator.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__separator.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/edit-widgets/src/components/widget-area/style.scss: -------------------------------------------------------------------------------- 1 | .edit-widgets-widget-area { 2 | max-width: $content-width; 3 | margin: 0 auto 30px; 4 | } 5 | -------------------------------------------------------------------------------- /packages/plugins/src/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as PluginArea } from './plugin-area'; 2 | export { withPluginContext } from './plugin-context'; 3 | -------------------------------------------------------------------------------- /packages/block-editor/src/hooks/index.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import './custom-class-name'; 5 | import './generated-class-name'; 6 | -------------------------------------------------------------------------------- /packages/components/src/form-file-upload/style.scss: -------------------------------------------------------------------------------- 1 | .components-form-file-upload { 2 | .components-button.is-large { 3 | padding-left: 6px; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/core-data/src/queried-data/index.js: -------------------------------------------------------------------------------- 1 | export * from './actions'; 2 | export * from './selectors'; 3 | export { default as reducer } from './reducer'; 4 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-default-exported/module-ir.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name": "default", 3 | "description": "Module declaration.", 4 | "tags": [] 5 | }] -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__categories.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__heading__h2-em.html: -------------------------------------------------------------------------------- 1 | 2 |

The Inserter Tool

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__heading__h2-em.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

The Inserter Tool

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__latest-comments.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__paragraph__deprecated.html: -------------------------------------------------------------------------------- 1 | 2 | Unwrapped is still valid. 3 | 4 | -------------------------------------------------------------------------------- /packages/nux/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import './store'; 5 | 6 | export { default as DotTip } from './components/dot-tip'; 7 | -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/blocks-do.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/blocks-do.png -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-function-named/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Function declaration example. 3 | */ 4 | export default function myDeclaration() {} 5 | -------------------------------------------------------------------------------- /packages/is-shallow-equal/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": "plugin:@wordpress/eslint-plugin/es5", 4 | "env": { 5 | "node": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /docs/designers-developers/assets/plugin-more-menu-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/plugin-more-menu-item.png -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/blocks-dont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/blocks-dont.png -------------------------------------------------------------------------------- /packages/block-library/src/categories/editor.scss: -------------------------------------------------------------------------------- 1 | .block-editor .wp-block-categories ul { 2 | padding-left: 2.5em; 3 | 4 | ul { 5 | margin-top: 6px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/block-library/src/spacer/save.js: -------------------------------------------------------------------------------- 1 | export default function save( { attributes } ) { 2 | return
; 3 | } 4 | -------------------------------------------------------------------------------- /packages/blocks/src/api/raw-handling/index.native.js: -------------------------------------------------------------------------------- 1 | export { getPhrasingContentSchema } from './phrasing-content'; 2 | export { pasteHandler } from './paste-handler'; 3 | -------------------------------------------------------------------------------- /packages/data/src/default-registry.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { createRegistry } from './registry'; 5 | 6 | export default createRegistry(); 7 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-function/ir.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "myDeclaration", 4 | "description": "My declaration example.", 5 | "tags": [] 6 | } 7 | ] -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-identifier/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * My declaration example. 3 | */ 4 | function myDeclaration() {} 5 | 6 | export { myDeclaration }; 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/assets/10x10_e2e_test_image_z9T8jK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/packages/e2e-tests/assets/10x10_e2e_test_image_z9T8jK.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/fancy-quote-in-inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/fancy-quote-in-inspector.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/fancy-quote-with-style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/fancy-quote-with-style.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/plugin-pre-publish-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/plugin-pre-publish-panel.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/sidebar-up-and-running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/sidebar-up-and-running.png -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/placeholder-do.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/placeholder-do.png -------------------------------------------------------------------------------- /packages/block-editor/src/components/alignment-toolbar/index.native.js: -------------------------------------------------------------------------------- 1 | const AlignmentToolbar = () => { 2 | return null; 3 | }; 4 | 5 | export default AlignmentToolbar; 6 | -------------------------------------------------------------------------------- /packages/block-library/src/subhead/editor.scss: -------------------------------------------------------------------------------- 1 | .edit-post-visual-editor p.wp-block-subhead { 2 | color: $dark-gray-300; 3 | font-size: 1.1em; 4 | font-style: italic; 5 | } 6 | -------------------------------------------------------------------------------- /packages/components/src/mobile/bottom-sheet/cellStyles.ios.scss: -------------------------------------------------------------------------------- 1 | .labelIconSeparator { 2 | width: 12px; 3 | } 4 | 5 | .separatorMarginLeft { 6 | margin-left: 36px; 7 | } 8 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__paragraph__deprecated.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

Unwrapped is still valid.

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__subhead.html: -------------------------------------------------------------------------------- 1 | 2 |

This is a subhead.

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__subhead.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

This is a subhead.

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__verse.html: -------------------------------------------------------------------------------- 1 | 2 |
A verse
And more!
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__verse.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
A verse
And more!
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/blocks/__snapshots__/classic.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Classic should be inserted 1`] = `"test"`; 4 | -------------------------------------------------------------------------------- /packages/editor/src/components/autocompleters/index.js: -------------------------------------------------------------------------------- 1 | export { default as blockAutocompleter } from './block'; 2 | export { default as userAutocompleter } from './user'; 3 | -------------------------------------------------------------------------------- /docs/designers-developers/assets/plugin-post-publish-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/plugin-post-publish-panel.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/plugin-sidebar-open-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/plugin-sidebar-open-state.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/sidebar-style-and-controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/sidebar-style-and-controls.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/toolbar-with-custom-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/toolbar-with-custom-button.png -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/placeholder-dont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/placeholder-dont.png -------------------------------------------------------------------------------- /packages/block-editor/src/components/color-palette/control.scss: -------------------------------------------------------------------------------- 1 | .block-editor-color-palette-control__color-palette { 2 | display: inline-block; 3 | margin-top: 0.6rem; 4 | } 5 | -------------------------------------------------------------------------------- /packages/block-library/src/audio/editor.scss: -------------------------------------------------------------------------------- 1 | .wp-block-audio { 2 | // Remove the left and right margin the figure is born with. 3 | margin-left: 0; 4 | margin-right: 0; 5 | } 6 | -------------------------------------------------------------------------------- /packages/block-library/src/pullquote/shared.js: -------------------------------------------------------------------------------- 1 | export const SOLID_COLOR_STYLE_NAME = 'solid-color'; 2 | export const SOLID_COLOR_CLASS = `is-style-${ SOLID_COLOR_STYLE_NAME }`; 3 | -------------------------------------------------------------------------------- /packages/components/src/mobile/bottom-sheet/cellStyles.android.scss: -------------------------------------------------------------------------------- 1 | .labelIconSeparator { 2 | width: 32px; 3 | } 4 | 5 | .separatorMarginLeft { 6 | margin-left: 56px; 7 | } 8 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-function-named/ir.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "default", 4 | "description": "Function declaration example.", 5 | "tags": [] 6 | } 7 | ] -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-identifier/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Class declaration example. 3 | */ 4 | class ClassDeclaration {} 5 | 6 | export default ClassDeclaration; 7 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-import-default/module-ir.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "default", 4 | "description": "Function declaration.", 5 | "tags": [] 6 | } 7 | ] -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-import-named/code.js: -------------------------------------------------------------------------------- 1 | export { 2 | functionDeclaration, 3 | variableDeclaration, 4 | ClassDeclaration, 5 | } from './named-identifiers'; 6 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-variables/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * My declaration example. 3 | */ 4 | export const firstDeclaration = true, 5 | secondDeclaration = 42; 6 | 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__search__custom-text.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__spacer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/list-reusable-blocks/src/components/import-dropdown/style.scss: -------------------------------------------------------------------------------- 1 | .list-reusable-blocks-import-dropdown__content .components-popover__content { 2 | padding: 10px; 3 | } 4 | -------------------------------------------------------------------------------- /test/integration/fixtures/iframe-embed-in.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/designers-developers/assets/js-tutorial-console-log-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/js-tutorial-console-log-error.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/plugin-sidebar-closed-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/plugin-sidebar-closed-state.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/plugin-sidebar-more-menu-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/plugin-sidebar-more-menu-item.gif -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/block-controls-do.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/block-controls-do.png -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/block-controls-dont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/block-controls-dont.png -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/no-default/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import _ from 'lodash'; 5 | 6 | _.map( [], _.identity ); 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__heading__h2.html: -------------------------------------------------------------------------------- 1 | 2 |

A picture is worth a thousand words, or so the saying goes

3 | 4 | -------------------------------------------------------------------------------- /docs/designers-developers/assets/js-tutorial-console-log-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/js-tutorial-console-log-success.png -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/advanced-settings-do.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/advanced-settings-do.png -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/block-descriptions-do.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/block-descriptions-do.png -------------------------------------------------------------------------------- /packages/block-library/src/text-columns/editor.scss: -------------------------------------------------------------------------------- 1 | .wp-block-text-columns { 2 | .block-editor-rich-text__editable:focus { 3 | outline: $border-width solid $light-gray-500; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/components/src/external-link/style.scss: -------------------------------------------------------------------------------- 1 | .components-external-link__icon { 2 | width: 1.4em; 3 | height: 1.4em; 4 | margin: -0.2em 0.1em 0; 5 | vertical-align: middle; 6 | } 7 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-import-named/module-code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Function declaration. 3 | */ 4 | function functionDeclaration() {} 5 | 6 | export { functionDeclaration }; 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__heading__h2.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

A picture is worth a thousand words, or so the saying goes

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__spacer.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/edit-widgets/src/store/constants.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Constant for the store module (or reducer) key. 3 | * @type {string} 4 | */ 5 | export const STORE_KEY = 'core/edit-widgets'; 6 | 7 | -------------------------------------------------------------------------------- /test/integration/fixtures/wordpress-in.html: -------------------------------------------------------------------------------- 1 |

Howdy

2 |

This is a paragraph.

3 |

More tag

4 |

5 |

Shortcode

6 |

[gallery ids="1"]

7 | -------------------------------------------------------------------------------- /docs/designers-developers/assets/js-tutorial-error-blocks-undefined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/js-tutorial-error-blocks-undefined.png -------------------------------------------------------------------------------- /docs/designers-developers/assets/plugin-post-status-info-location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/plugin-post-status-info-location.png -------------------------------------------------------------------------------- /docs/designers-developers/designers/assets/block-descriptions-dont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/designers/assets/block-descriptions-dont.png -------------------------------------------------------------------------------- /docs/designers-developers/developers/tutorials/metabox/meta-block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/developers/tutorials/metabox/meta-block.png -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-import-default/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import fnDeclaration from './module-code'; 5 | 6 | export default fnDeclaration; 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__freeform__undelimited.html: -------------------------------------------------------------------------------- 1 | Testing freeform block with some 2 |
3 | HTML content 4 |
5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__html.html: -------------------------------------------------------------------------------- 1 | 2 |

Some HTML code

3 | This text will scroll from right to left 4 | 5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__html.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

Some HTML code

3 | This text will scroll from right to left 4 | 5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__search__custom-text.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/rich-text/src/special-characters.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Line separator character. 3 | */ 4 | export const LINE_SEPARATOR = '\u2028'; 5 | export const OBJECT_REPLACEMENT_CHARACTER = '\ufffc'; 6 | -------------------------------------------------------------------------------- /test/integration/fixtures/plain-out.html: -------------------------------------------------------------------------------- 1 | 2 |

test
test

3 | 4 | 5 | 6 |

test

7 | 8 | -------------------------------------------------------------------------------- /packages/block-editor/src/hooks/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import './align'; 5 | import './anchor'; 6 | import './custom-class-name'; 7 | import './generated-class-name'; 8 | -------------------------------------------------------------------------------- /packages/block-library/src/code/theme.native.scss: -------------------------------------------------------------------------------- 1 | /* stylelint-disable font-family-no-missing-generic-family-keyword */ 2 | 3 | .blockCode { 4 | font-family: $default-monospace-font; 5 | } 6 | 7 | -------------------------------------------------------------------------------- /packages/block-library/src/list/editor.scss: -------------------------------------------------------------------------------- 1 | .editor-styles-wrapper .block-library-list ul, 2 | .editor-styles-wrapper .block-library-list ol { 3 | padding-left: 1.3em; 4 | margin-left: 1.3em; 5 | } 6 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/dynamic-import/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import _ from 'lodash'; 5 | 6 | import( './util' ).then( _.noop ); 7 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/dynamic-import/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { isBlobURL } from '@wordpress/blob'; 5 | 6 | isBlobURL(); 7 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-import-default/module-code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Function declaration. 3 | */ 4 | function functionDeclaration() {} 5 | 6 | export default functionDeclaration; 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/assets/greeting-reusable-block.json: -------------------------------------------------------------------------------- 1 | { 2 | "__file": "wp_block", 3 | "title": "Greeting", 4 | "content": "\n

Hello there

\n" 5 | } -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__freeform.serialized.html: -------------------------------------------------------------------------------- 1 |

Testing freeform block with some

2 |
3 | HTML content 4 |
5 | -------------------------------------------------------------------------------- /packages/editor/src/utils/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import mediaUpload from './media-upload'; 5 | 6 | export { mediaUpload }; 7 | export { cleanForSlug } from './url.js'; 8 | -------------------------------------------------------------------------------- /packages/block-serialization-spec-parser/.npmignore: -------------------------------------------------------------------------------- 1 | # Intentionally empty, to avoid inheriting from `.gitignore`, since `parser.js` 2 | # and `parser.php` should be included with the npm distributable. 3 | -------------------------------------------------------------------------------- /packages/components/src/dashicon/icon-class.js: -------------------------------------------------------------------------------- 1 | export const getIconClassName = ( icon, className ) => { 2 | return [ 'dashicon', 'dashicons-' + icon, className ].filter( Boolean ).join( ' ' ); 3 | }; 4 | -------------------------------------------------------------------------------- /packages/components/src/toolbar/style.native.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | flex-direction: row; 3 | border-left-width: 1px; 4 | border-color: #e9eff3; 5 | padding-left: 5px; 6 | padding-right: 5px; 7 | } 8 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-named-export/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Function declaration example. 3 | */ 4 | export function functionDeclaration() {} 5 | 6 | export default functionDeclaration; 7 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-import-namespace/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import * as variables from './named-import-namespace-module'; 5 | 6 | export { variables }; 7 | -------------------------------------------------------------------------------- /packages/editor/src/components/error-boundary/style.scss: -------------------------------------------------------------------------------- 1 | .editor-error-boundary { 2 | margin: auto; 3 | max-width: 780px; 4 | padding: 20px; 5 | margin-top: 60px; 6 | box-shadow: $shadow-modal; 7 | } 8 | -------------------------------------------------------------------------------- /docs/designers-developers/developers/tutorials/notices/block-editor-notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/developers/tutorials/notices/block-editor-notice.png -------------------------------------------------------------------------------- /test/integration/fixtures/iframe-embed-out.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /bin/reset-local-e2e-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Exit if any command fails. 4 | set -e 5 | 6 | # Set up WordPress site used for end-to-end (e2e) tests. 7 | . "$(dirname "$0")/install-wordpress.sh" --e2e_tests 8 | -------------------------------------------------------------------------------- /docs/designers-developers/assets/plugin-block-settings-menu-item-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/assets/plugin-block-settings-menu-item-screenshot.png -------------------------------------------------------------------------------- /docs/designers-developers/developers/tutorials/notices/classic-editor-notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derweili/gutenberg/master/docs/designers-developers/developers/tutorials/notices/classic-editor-notice.png -------------------------------------------------------------------------------- /packages/block-editor/src/components/block-types-list/style.scss: -------------------------------------------------------------------------------- 1 | .block-editor-block-types-list { 2 | list-style: none; 3 | padding: 2px 0; 4 | overflow: hidden; 5 | display: flex; 6 | flex-wrap: wrap; 7 | } 8 | -------------------------------------------------------------------------------- /packages/components/src/navigable-container/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal Dependencies 3 | */ 4 | export { default as NavigableMenu } from './menu'; 5 | export { default as TabbableContainer } from './tabbable'; 6 | -------------------------------------------------------------------------------- /packages/components/src/toolbar/toolbar-container.js: -------------------------------------------------------------------------------- 1 | const ToolbarContainer = ( props ) => ( 2 |
3 | { props.children } 4 |
5 | ); 6 | export default ToolbarContainer; 7 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/src/clear-local-storage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Clears the local storage. 3 | */ 4 | export async function clearLocalStorage() { 5 | await page.evaluate( () => window.localStorage.clear() ); 6 | } 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__freeform__undelimited.serialized.html: -------------------------------------------------------------------------------- 1 |

Testing freeform block with some

2 |
3 | HTML content 4 |
5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__text__converts-to-paragraph.html: -------------------------------------------------------------------------------- 1 | 2 |

This is an old-style text block. Changed to paragraph in #2135.

3 | 4 | -------------------------------------------------------------------------------- /packages/edit-post/src/components/sidebar/post-status/style.scss: -------------------------------------------------------------------------------- 1 | .edit-post-post-status .edit-post-post-publish-dropdown__switch-to-draft { 2 | margin-top: 15px; 3 | width: 100%; 4 | text-align: center; 5 | } 6 | -------------------------------------------------------------------------------- /test/integration/fixtures/one-image-in.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function( api ) { 2 | api.cache( true ); 3 | 4 | return { 5 | presets: [ '@wordpress/babel-preset-default' ], 6 | plugins: [ 'babel-plugin-inline-json-import' ], 7 | }; 8 | }; 9 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/rich-text/style.native.scss: -------------------------------------------------------------------------------- 1 | 2 | .block-editor-rich-text { 3 | font-family: $default-regular-font; 4 | text-decoration-color: $gray; 5 | min-height: $min-height-paragraph; 6 | } 7 | -------------------------------------------------------------------------------- /packages/block-library/src/spacer/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/spacer", 3 | "category": "layout", 4 | "attributes": { 5 | "height": { 6 | "type": "number", 7 | "default": 100 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/components/src/spinner/README.md: -------------------------------------------------------------------------------- 1 | # Spinner 2 | 3 | ## Usage 4 | 5 | ```jsx 6 | import { Spinner } from '@wordpress/components'; 7 | 8 | const MySpinner = () => ( 9 | 10 | ); 11 | ``` 12 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/default-import-named/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { functionDeclaration as fnDeclaration } from './module-code'; 5 | 6 | export default fnDeclaration; 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__preformatted.html: -------------------------------------------------------------------------------- 1 | 2 |
Some preformatted text...
And more!
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__preformatted.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
Some preformatted text...
And more!
3 | 4 | -------------------------------------------------------------------------------- /packages/scripts/config/puppeteer.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | launch: { 3 | headless: process.env.PUPPETEER_HEADLESS !== 'false', 4 | slowMo: parseInt( process.env.PUPPETEER_SLOWMO, 10 ) || 0, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /test/integration/fixtures/shortcode-caption.html: -------------------------------------------------------------------------------- 1 |

[caption id="attachment_122" align="alignnone" width="300"] test[/caption]

2 | -------------------------------------------------------------------------------- /packages/block-library/src/html/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/html", 3 | "category": "formatting", 4 | "attributes": { 5 | "content": { 6 | "type": "string", 7 | "source": "html" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-library/src/rss/editor.scss: -------------------------------------------------------------------------------- 1 | .block-editor .wp-block-rss { 2 | padding-left: 2.5em; 3 | &.is-grid { 4 | padding-left: 0; 5 | } 6 | } 7 | .wp-block-rss li a > div { 8 | display: inline; 9 | } 10 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/tags-variable/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Constant to document the meaning of life, 3 | * the universe and everything else. 4 | * 5 | * @type {number} 6 | */ 7 | export const THE_MEANING = 42; 8 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__more__custom-text-teaser.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__more__custom-text-teaser.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__text__converts-to-paragraph.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

This is an old-style text block. Changed to paragraph in #2135.

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/plugins/__snapshots__/wp-editor-meta-box.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`WP Editor Meta Boxes Should save the changes 1`] = `"

Typing in a metabox

"`; 4 | -------------------------------------------------------------------------------- /test/unit/__mocks__/@wordpress/block-library.js: -------------------------------------------------------------------------------- 1 | // Make sure the classic block is registered. 2 | window.wp = window.wp || {}; 3 | window.wp.oldEditor = {}; 4 | 5 | export * from '../../../../packages/block-library/src'; 6 | -------------------------------------------------------------------------------- /packages/block-library/src/classic/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/freeform", 3 | "category": "formatting", 4 | "attributes": { 5 | "content": { 6 | "type": "string", 7 | "source": "html" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-library/src/template/edit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { InnerBlocks } from '@wordpress/block-editor'; 5 | 6 | export default function TemplateEdit() { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/block-library/src/template/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { InnerBlocks } from '@wordpress/block-editor'; 5 | 6 | export default function save() { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/components/src/primitives/block-quotation/style.native.scss: -------------------------------------------------------------------------------- 1 | .wpBlockQuote { 2 | border-left-width: 4px; 3 | border-left-color: $black; 4 | border-left-style: solid; 5 | padding-left: 8px; 6 | margin-left: 8px; 7 | } 8 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__rss.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/editor/src/editor-styles/test/__snapshots__/traverse.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`CSS traverse Should traverse the CSS 1`] = ` 4 | "namespace h1 { 5 | color: red; 6 | }" 7 | `; 8 | -------------------------------------------------------------------------------- /packages/library-export-default-webpack-plugin/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Master 2 | 3 | ### Internal 4 | 5 | - The module is no longer transpiled as part of a build process, and instead exposes its source directly as the `main` file. 6 | -------------------------------------------------------------------------------- /docs/designers-developers/designers/README.md: -------------------------------------------------------------------------------- 1 | # Designer Documentation 2 | 3 | For those designing blocks and other block editor integrations, this documentation will provide resources for creating beautiful and intuitive layouts. 4 | -------------------------------------------------------------------------------- /packages/block-library/src/categories/style.scss: -------------------------------------------------------------------------------- 1 | .wp-block-categories { 2 | &.alignleft { 3 | /*rtl:ignore*/ 4 | margin-right: 2em; 5 | } 6 | &.alignright { 7 | /*rtl:ignore*/ 8 | margin-left: 2em; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-identifier-destructuring/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * My declaration example. 3 | */ 4 | const { someDeclaration } = { someDeclaration: () => { } }; 5 | 6 | export { someDeclaration as myDeclaration }; 7 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/src/click-block-appender.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Clicks the default block appender. 3 | */ 4 | export async function clickBlockAppender() { 5 | await page.click( '.block-editor-default-block-appender__content' ); 6 | } 7 | -------------------------------------------------------------------------------- /packages/block-library/src/spacer/editor.scss: -------------------------------------------------------------------------------- 1 | .block-library-spacer__resize-container.is-selected { 2 | background: $light-gray-200; 3 | } 4 | 5 | .block-library-spacer__resize-container { 6 | margin-bottom: $default-block-margin; 7 | } 8 | -------------------------------------------------------------------------------- /packages/e2e-tests/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.2.0 (2019-05-21) 2 | 3 | ### New features 4 | 5 | - Added Axe (the Accessibility Engine) API integration with e2e tests suite. 6 | 7 | ## 1.0.0 (2019-03-06) 8 | 9 | - Initial release. 10 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__code.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
export default function MyButton() {
3 | 	return <Button>Click Me!</Button>;
4 | }
5 | 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__rss.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/element/src/index.js: -------------------------------------------------------------------------------- 1 | export * from './react'; 2 | export * from './react-platform'; 3 | export * from './utils'; 4 | export { default as renderToString } from './serialize'; 5 | export { default as RawHTML } from './raw-html'; 6 | -------------------------------------------------------------------------------- /packages/jest-console/src/supported-matchers.js: -------------------------------------------------------------------------------- 1 | const supportedMatchers = { 2 | error: 'toHaveErrored', 3 | info: 'toHaveInformed', 4 | log: 'toHaveLogged', 5 | warn: 'toHaveWarned', 6 | }; 7 | 8 | export default supportedMatchers; 9 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/plain-text/style.native.scss: -------------------------------------------------------------------------------- 1 | 2 | .block-editor-plain-text { 3 | font-family: $default-regular-font; 4 | box-shadow: none; 5 | 6 | border-width: 0; 7 | 8 | padding: 0; 9 | margin: 0; 10 | } 11 | -------------------------------------------------------------------------------- /packages/core-data/src/name.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The reducer key used by core data in store registration. 3 | * This is defined in a separate file to avoid cycle-dependency 4 | * 5 | * @type {string} 6 | */ 7 | export const REDUCER_KEY = 'core'; 8 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/no-deps/webpack.config.js: -------------------------------------------------------------------------------- 1 | const DependencyExtractionWebpackPlugin = require( '../../..' ); 2 | 3 | module.exports = { 4 | plugins: [ new DependencyExtractionWebpackPlugin() ], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__code.html: -------------------------------------------------------------------------------- 1 | 2 |
export default function MyButton() {
3 | 	return <Button>Click Me!</Button>;
4 | }
5 | 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__freeform.html: -------------------------------------------------------------------------------- 1 | 2 | Testing freeform block with some 3 |
4 | HTML content 5 |
6 | 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

Testing deprecated quote block...

...with a caption
3 | 4 | -------------------------------------------------------------------------------- /packages/jest-puppeteer-axe/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.1.0 (2019-05-21) 2 | 3 | ### New Feature 4 | 5 | - Added optional `disabledRules` option to use with `toPassAxeTests` matcher. 6 | 7 | ## 1.0.0 (2019-03-06) 8 | 9 | - Initial release. 10 | -------------------------------------------------------------------------------- /packages/notices/src/store/controls.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { speak } from '@wordpress/a11y'; 5 | 6 | export default { 7 | SPEAK( action ) { 8 | speak( action.message, 'assertive' ); 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /test/integration/fixtures/classic-in.html: -------------------------------------------------------------------------------- 1 |

First paragraph

2 |

3 |

Second paragraph

4 |

Third paragraph

5 | 6 |

Fourth paragraph

7 |

Fifth paragraph

8 |

Sixth paragraph

9 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/font-sizes/index.js: -------------------------------------------------------------------------------- 1 | export { getFontSize, getFontSizeClass } from './utils'; 2 | export { default as FontSizePicker } from './font-size-picker'; 3 | export { default as withFontSizes } from './with-font-sizes'; 4 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/wordpress/webpack.config.js: -------------------------------------------------------------------------------- 1 | const DependencyExtractionWebpackPlugin = require( '../../..' ); 2 | 3 | module.exports = { 4 | plugins: [ new DependencyExtractionWebpackPlugin() ], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/postcss-themes/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 2.0.0 (2019-03-06) 2 | 3 | ### Breaking change 4 | 5 | - Stop using Babel transpilation internally and set node 8 as a minimal version required ([#13540](https://github.com/WordPress/gutenberg/pull/13540)). 6 | -------------------------------------------------------------------------------- /packages/scripts/config/babel-transform.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | const babelJest = require( 'babel-jest' ); 5 | 6 | module.exports = babelJest.createTransformer( { 7 | presets: [ '@wordpress/babel-preset-default' ], 8 | } ); 9 | -------------------------------------------------------------------------------- /playground/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@wordpress/babel-preset-default"], 3 | "plugins": [ 4 | [ "@babel/plugin-transform-react-jsx", { 5 | "pragma": "createElement" 6 | } ], 7 | "babel-plugin-inline-json-import" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /docker-compose-localdev.yml: -------------------------------------------------------------------------------- 1 | version: '3.1' 2 | 3 | services: 4 | 5 | wordpress: 6 | volumes: 7 | - ./wordpress:/var/www/html 8 | 9 | cli: 10 | image: wordpress:cli 11 | volumes: 12 | - ./wordpress:/var/www/html 13 | -------------------------------------------------------------------------------- /packages/block-library/src/code/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/code", 3 | "category": "formatting", 4 | "attributes": { 5 | "content": { 6 | "type": "string", 7 | "source": "text", 8 | "selector": "code" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/block-library/src/html/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RawHTML } from '@wordpress/element'; 5 | 6 | export default function save( { attributes } ) { 7 | return { attributes.content }; 8 | } 9 | -------------------------------------------------------------------------------- /packages/block-library/src/latest-posts/editor.scss: -------------------------------------------------------------------------------- 1 | .block-editor .wp-block-latest-posts { 2 | padding-left: 2.5em; 3 | &.is-grid { 4 | padding-left: 0; 5 | } 6 | } 7 | 8 | .wp-block-latest-posts li a > div { 9 | display: inline; 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-library/src/shortcode/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RawHTML } from '@wordpress/element'; 5 | 6 | export default function save( { attributes } ) { 7 | return { attributes.text }; 8 | } 9 | -------------------------------------------------------------------------------- /packages/block-library/src/verse/editor.scss: -------------------------------------------------------------------------------- 1 | pre.wp-block-verse, 2 | .wp-block-verse pre { 3 | color: $dark-gray-900; 4 | white-space: nowrap; 5 | font-family: inherit; 6 | font-size: inherit; 7 | padding: 1em; 8 | overflow: auto; 9 | } 10 | -------------------------------------------------------------------------------- /packages/components/src/dashicon/icon-class.native.js: -------------------------------------------------------------------------------- 1 | export const getIconClassName = ( icon, className, ariaPressed ) => { 2 | return [ ariaPressed ? 'dashicon-active' : 'dashicon', 'dashicons-' + icon, className ].filter( Boolean ).join( ' ' ); 3 | }; 4 | -------------------------------------------------------------------------------- /packages/components/src/toolbar-button/toolbar-button-container.js: -------------------------------------------------------------------------------- 1 | const ToolbarButtonContainer = ( props ) => ( 2 |
5 | { props.children } 6 |
7 | ); 8 | export default ToolbarButtonContainer; 9 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/dynamic-import/webpack.config.js: -------------------------------------------------------------------------------- 1 | const DependencyExtractionWebpackPlugin = require( '../../..' ); 2 | 3 | module.exports = { 4 | plugins: [ new DependencyExtractionWebpackPlugin() ], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/wordpress-require/webpack.config.js: -------------------------------------------------------------------------------- 1 | const DependencyExtractionWebpackPlugin = require( '../../..' ); 2 | 3 | module.exports = { 4 | plugins: [ new DependencyExtractionWebpackPlugin() ], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__paragraph__align-right.html: -------------------------------------------------------------------------------- 1 | 2 |

... like this one, which is separate from the above and right aligned.

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__paragraph__align-right.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

... like this one, which is separate from the above and right aligned.

3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__pullquote.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

Testing pullquote block...

...with a caption
3 | 4 | -------------------------------------------------------------------------------- /packages/editor/src/components/post-title/style.native.scss: -------------------------------------------------------------------------------- 1 | 2 | .titleContainer { 3 | padding-left: 16; 4 | padding-right: 16; 5 | padding-top: $title-block-padding-top; 6 | padding-bottom: $title-block-padding-bottom; 7 | margin-top: 24; 8 | } 9 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/__snapshots__/mentions.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`autocomplete mentions should insert mention 1`] = ` 4 | " 5 |

I am @admin.

6 | " 7 | `; 8 | -------------------------------------------------------------------------------- /packages/editor/src/components/autocompleters/README.md: -------------------------------------------------------------------------------- 1 | Autocompleters 2 | ============== 3 | 4 | The Autocompleter interface is documented [here](/packages/components/src/autocomplete/README.md) with the `Autocomplete` component in `@wordpress/components`. 5 | -------------------------------------------------------------------------------- /packages/editor/src/editor-styles/ast/index.js: -------------------------------------------------------------------------------- 1 | // Adapted from https://github.com/reworkcss/css 2 | // because we needed to remove source map support. 3 | 4 | export { default as parse } from './parse'; 5 | export { default as stringify } from './stringify'; 6 | -------------------------------------------------------------------------------- /packages/block-library/src/code/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-code { 2 | font-family: $editor-html-font; 3 | font-size: $text-editor-font-size; 4 | color: $dark-gray-800; 5 | padding: 0.8em 1em; 6 | border: 1px solid $light-gray-500; 7 | border-radius: 4px; 8 | } 9 | -------------------------------------------------------------------------------- /packages/block-library/src/group/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-group { 2 | &.has-background { 3 | // Matches paragraph Block padding 4 | // Todo: normalise with variables 5 | padding: 20px 30px; 6 | margin-top: 0; 7 | margin-bottom: 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/components/src/toolbar-button/toolbar-button-container.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import { View } from 'react-native'; 5 | 6 | export default ( props ) => ( 7 | 8 | { props.children } 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /test/integration/fixtures/one-image-out.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /test/integration/fixtures/shortcode-caption-with-caption-link.html: -------------------------------------------------------------------------------- 1 |

[caption id="attachment_122" align="alignnone" width="300"] test[/caption]

2 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/plugins/__snapshots__/meta-attribute-block.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Block with a meta attribute Should persist the meta attribute properly 1`] = `""`; 4 | -------------------------------------------------------------------------------- /packages/editor/src/components/template-validation-notice/style.scss: -------------------------------------------------------------------------------- 1 | .editor-template-validation-notice { 2 | display: flex; 3 | justify-content: space-between; 4 | align-items: center; 5 | 6 | .components-button { 7 | margin-left: 5px; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/block-library/src/group/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/group", 3 | "category": "layout", 4 | "attributes": { 5 | "backgroundColor": { 6 | "type": "string" 7 | }, 8 | "customBackgroundColor": { 9 | "type": "string" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/block-library/src/separator/edit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { HorizontalRule } from '@wordpress/components'; 5 | 6 | export default function SeparatorEdit( { className } ) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/block-library/src/table/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-table { 2 | width: 100%; 3 | min-width: $break-mobile / 2; 4 | border-collapse: collapse; 5 | 6 | td, 7 | th { 8 | padding: 0.5em; 9 | border: 1px solid; 10 | word-break: break-all; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/components/src/color-indicator/README.md: -------------------------------------------------------------------------------- 1 | # ColorIndicator 2 | 3 | ## Usage 4 | 5 | ```jsx 6 | import { ColorIndicator } from '@wordpress/components'; 7 | 8 | const MyColorIndicator = () => ( 9 | 10 | ); 11 | ``` 12 | -------------------------------------------------------------------------------- /packages/components/src/color-indicator/style.scss: -------------------------------------------------------------------------------- 1 | .component-color-indicator { 2 | width: 25px; 3 | height: 16px; 4 | margin-left: 0.8rem; 5 | border: 1px solid #dadada; 6 | display: inline-block; 7 | 8 | & + & { 9 | margin-left: 0.5rem; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/no-default/webpack.config.js: -------------------------------------------------------------------------------- 1 | const DependencyExtractionWebpackPlugin = require( '../../..' ); 2 | 3 | module.exports = { 4 | plugins: [ new DependencyExtractionWebpackPlugin( { useDefaults: false } ) ], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/__snapshots__/compatibility-classic-editor.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Compatibility with classic editor Should not apply autop when rendering blocks 1`] = ` 4 | " 5 | Random Link 6 | " 7 | `; 8 | -------------------------------------------------------------------------------- /packages/editor/src/components/post-trash/style.scss: -------------------------------------------------------------------------------- 1 | .editor-post-trash.components-button { 2 | width: 100%; 3 | color: darken($alert-red, 10%); 4 | justify-content: center; 5 | 6 | &:hover, 7 | &:focus { 8 | color: darken($alert-red, 15%); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/rich-text/shortcut.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Component } from '@wordpress/element'; 5 | 6 | export class RichTextShortcut extends Component { 7 | render() { 8 | return null; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/writing-flow/style.scss: -------------------------------------------------------------------------------- 1 | .block-editor-writing-flow { 2 | height: 100%; 3 | display: flex; 4 | flex-direction: column; 5 | } 6 | 7 | .block-editor-writing-flow__click-redirect { 8 | flex-basis: 100%; 9 | cursor: text; 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-library/src/more/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/more", 3 | "category": "layout", 4 | "attributes": { 5 | "customText": { 6 | "type": "string" 7 | }, 8 | "noTeaser": { 9 | "type": "boolean", 10 | "default": false 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__pullquote__deprecated-2.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Testing deprecated pullquote block...

4 | ...with a caption 5 |
6 | 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__pullquote__deprecated-2.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

Testing deprecated pullquote block...

...with a caption
3 | 4 | -------------------------------------------------------------------------------- /packages/escape-html/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.2.0 (2019-03-20) 2 | 3 | - Add fix for WordPress wptexturize greater-than tokenize bug (see https://core.trac.wordpress.org/ticket/45387) 4 | 5 | ## 1.0.1 (2018-10-19) 6 | 7 | ## 1.0.0 (2018-10-18) 8 | 9 | - Initial release. 10 | -------------------------------------------------------------------------------- /test/integration/fixtures/google-docs-table-out.html: -------------------------------------------------------------------------------- 1 | 2 |
OneTwoThree
123
IIIIII
3 | 4 | -------------------------------------------------------------------------------- /packages/block-library/src/nextpage/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RawHTML } from '@wordpress/element'; 5 | 6 | export default function save() { 7 | return ( 8 | 9 | { '' } 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /packages/components/src/panel/header.js: -------------------------------------------------------------------------------- 1 | function PanelHeader( { label, children } ) { 2 | return ( 3 |
4 | { label &&

{ label }

} 5 | { children } 6 |
7 | ); 8 | } 9 | 10 | export default PanelHeader; 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__pullquote.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Testing pullquote block...

...with a caption 5 |
6 |
7 | 8 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Testing deprecated quote block...

4 |
...with a caption
5 |
6 | 7 | -------------------------------------------------------------------------------- /packages/edit-post/src/components/sidebar/post-link/style.scss: -------------------------------------------------------------------------------- 1 | .edit-post-post-link__link-post-name { 2 | font-weight: 600; 3 | } 4 | 5 | .edit-post-post-link__preview-label { 6 | margin: 0; 7 | } 8 | 9 | .edit-post-post-link__link { 10 | word-wrap: break-word; 11 | } 12 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/colors/index.js: -------------------------------------------------------------------------------- 1 | export { 2 | getColorClassName, 3 | getColorObjectByAttributeValues, 4 | getColorObjectByColorValue, 5 | } from './utils'; 6 | export { 7 | createCustomColorsHOC, 8 | default as withColors, 9 | } from './with-colors'; 10 | -------------------------------------------------------------------------------- /packages/block-library/src/columns/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/columns", 3 | "category": "layout", 4 | "attributes": { 5 | "columns": { 6 | "type": "number", 7 | "default": 2 8 | }, 9 | "verticalAlignment": { 10 | "type": "string" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/block-library/src/preformatted/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/preformatted", 3 | "category": "formatting", 4 | "attributes": { 5 | "content": { 6 | "type": "string", 7 | "source": "html", 8 | "selector": "pre", 9 | "default": "" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__button__center.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__button__center.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__pullquote__multi-paragraph.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

Paragraph one

Paragraph two

by whomever
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/blocks/__snapshots__/media-text.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Media Text restricts blocks that can be inserted 1`] = ` 4 | Array [ 5 | "Button", 6 | "Heading", 7 | "List", 8 | "Paragraph", 9 | ] 10 | `; 11 | -------------------------------------------------------------------------------- /packages/scripts/bin/wp-scripts.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Internal dependencies 5 | */ 6 | const { getCliArgs, spawnScript } = require( '../utils' ); 7 | 8 | const [ scriptName, ...nodesArgs ] = getCliArgs(); 9 | 10 | spawnScript( scriptName, nodesArgs ); 11 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/font-sizes/style.scss: -------------------------------------------------------------------------------- 1 | .block-editor__container .components-popover.components-font-size-picker__dropdown-content.is-bottom { 2 | z-index: z-index(".block-editor__container .components-popover.components-font-size-picker__dropdown-content.is-bottom"); 3 | } 4 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/rich-text/input-event.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Component } from '@wordpress/element'; 5 | 6 | export class __unstableRichTextInputEvent extends Component { 7 | render() { 8 | return null; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/components/src/placeholder/README.md: -------------------------------------------------------------------------------- 1 | # Placeholder 2 | 3 | ## Usage 4 | ```jsx 5 | import { Placeholder } from '@wordpress/components'; 6 | 7 | const MyPlaceholder = () => ( 8 | 12 | ); 13 | ``` 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__calendar.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/calendar", 5 | "isValid": true, 6 | "attributes": {}, 7 | "innerBlocks": [], 8 | "originalContent": "" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__missing.html: -------------------------------------------------------------------------------- 1 | 2 |

Testing missing block with some

3 |
4 | HTML content 5 |
6 | 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__pullquote__deprecated-1.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Testing deprecated pullquote block...

4 |
...with a caption
5 |
6 | 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__pullquote__deprecated-1.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

Testing deprecated pullquote block...

...with a caption
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/blocks/__snapshots__/separator.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Separator can be created by three dashes and enter 1`] = ` 4 | " 5 |
6 | " 7 | `; 8 | -------------------------------------------------------------------------------- /test/integration/fixtures/google-docs-table-with-comments-out.html: -------------------------------------------------------------------------------- 1 | 2 |
OneTwoThree
123
IIIIII
3 | 4 | -------------------------------------------------------------------------------- /packages/block-library/src/classic/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RawHTML } from '@wordpress/element'; 5 | 6 | export default function save( { attributes } ) { 7 | const { content } = attributes; 8 | 9 | return { content }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-library/src/column/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/column", 3 | "category": "common", 4 | "attributes": { 5 | "verticalAlignment": { 6 | "type": "string" 7 | }, 8 | "width": { 9 | "type": "number", 10 | "min": 0, 11 | "max": 100 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/components/src/external-link/README.md: -------------------------------------------------------------------------------- 1 | # ExternalLink 2 | 3 | ## Usage 4 | 5 | ```jsx 6 | import { ExternalLink } from '@wordpress/components'; 7 | 8 | const MyExternalLink = () => ( 9 | WordPress.org 10 | ); 11 | ``` 12 | -------------------------------------------------------------------------------- /packages/core-data/src/utils/index.js: -------------------------------------------------------------------------------- 1 | export { default as ifMatchingAction } from './if-matching-action'; 2 | export { default as onSubKey } from './on-sub-key'; 3 | export { default as replaceAction } from './replace-action'; 4 | export { default as withWeakMapCache } from './with-weak-map-cache'; 5 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/wordpress/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { isBlobURL } from '@wordpress/blob'; 5 | 6 | /** 7 | * External dependencies 8 | */ 9 | import _ from 'lodash'; 10 | 11 | _.isEmpty( isBlobURL( '' ) ); 12 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/blocks/__snapshots__/code.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Code can be created by three backticks and enter 1`] = ` 4 | " 5 |
<?php
6 | " 7 | `; 8 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@wordpress/*": ["./*", "./packages/*/src"] 6 | } 7 | }, 8 | "exclude": [ 9 | "build", 10 | "build-module", 11 | "node_modules", 12 | "packages/e2e-tests/plugins", 13 | "vendor" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/annotations/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.5 (2019-01-03) 2 | 3 | ## 1.0.4 (2018-12-12) 4 | 5 | ## 1.0.3 (2018-11-21) 6 | 7 | ## 1.0.2 (2018-11-20) 8 | 9 | ## 1.0.1 (2018-11-15) 10 | 11 | ## 1.0.0 (2018-11-12) 12 | 13 | ### New Features 14 | 15 | - Implement annotations API in the editor. 16 | -------------------------------------------------------------------------------- /packages/block-library/src/subhead/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/subhead", 3 | "category": "common", 4 | "attributes": { 5 | "align": { 6 | "type": "string" 7 | }, 8 | "content": { 9 | "type": "string", 10 | "source": "html", 11 | "selector": "p" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/block-library/src/subhead/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/components/src/higher-order/README.md: -------------------------------------------------------------------------------- 1 | Higher Order Components 2 | ======================= 3 | 4 | This directory includes a library of generic Higher Order React Components. 5 | 6 | [Learn more about Higher Order Components](https://facebook.github.io/react/docs/higher-order-components.html) 7 | -------------------------------------------------------------------------------- /packages/components/src/menu-group/style.scss: -------------------------------------------------------------------------------- 1 | .components-menu-group { 2 | width: 100%; 3 | padding: ($grid-size - $border-width) 0; 4 | } 5 | 6 | .components-menu-group__label { 7 | margin-bottom: $grid-size; 8 | color: $dark-gray-300; 9 | padding: 0 ($grid-size - $border-width); 10 | } 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__legacy-widget.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/legacy-widget", 5 | "isValid": true, 6 | "attributes": {}, 7 | "innerBlocks": [], 8 | "originalContent": "" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__missing.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

Testing missing block with some

3 |
4 | HTML content 5 |
6 | 7 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__text-columns.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

One

Two

3 | 4 | -------------------------------------------------------------------------------- /packages/editor/src/components/global-keyboard-shortcuts/text-editor-shortcuts.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import SaveShortcut from './save-shortcut'; 5 | 6 | export default function TextEditorGlobalKeyboardShortcuts() { 7 | return ( 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/block-title/README.md: -------------------------------------------------------------------------------- 1 | Block Title 2 | =========== 3 | 4 | Renders the block's configured title as a string, or empty if the title cannot be determined. 5 | 6 | ## Usage 7 | 8 | ```jsx 9 | 10 | ``` 11 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/inner-blocks/style.scss: -------------------------------------------------------------------------------- 1 | .block-editor-inner-blocks.has-overlay::after { 2 | content: ""; 3 | position: absolute; 4 | top: 0; 5 | right: 0; 6 | bottom: 0; 7 | left: 0; 8 | z-index: z-index(".block-editor-inner-blocks__small-screen-overlay:after"); 9 | } 10 | -------------------------------------------------------------------------------- /packages/block-library/src/media-text/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG } from '@wordpress/components'; 5 | 6 | export default ; 7 | -------------------------------------------------------------------------------- /packages/block-library/src/tag-cloud/editor.scss: -------------------------------------------------------------------------------- 1 | .block-editor .wp-block-tag-cloud { 2 | a { 3 | display: inline-block; 4 | margin-right: 5px; 5 | } 6 | 7 | span { 8 | display: inline-block; 9 | margin-left: 5px; 10 | color: $dark-gray-100; 11 | text-decoration: none; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__nextpage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/nextpage", 5 | "isValid": true, 6 | "attributes": {}, 7 | "innerBlocks": [], 8 | "originalContent": "" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__quote__style-2.html: -------------------------------------------------------------------------------- 1 | 2 |

There is no greater agony than bearing an untold story inside you.

Maya Angelou
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__quote__style-2.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |

There is no greater agony than bearing an untold story inside you.

Maya Angelou
3 | 4 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "command": { 3 | "publish": { 4 | "message": "chore(release): publish" 5 | } 6 | }, 7 | "ignoreChanges": [ 8 | "**/benchmark/*.js", 9 | "**/CHANGELOG.md", 10 | "**/test/**" 11 | ], 12 | "packages": [ 13 | "packages/*" 14 | ], 15 | "version": "independent" 16 | } 17 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/plain-text/style.scss: -------------------------------------------------------------------------------- 1 | .block-editor .block-editor-plain-text { 2 | box-shadow: none; 3 | font-family: inherit; 4 | font-size: inherit; 5 | color: inherit; 6 | line-height: inherit; 7 | border: none; 8 | padding: 0; 9 | margin: 0; 10 | width: 100%; 11 | } 12 | -------------------------------------------------------------------------------- /packages/block-library/src/separator/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-separator { 2 | border: none; 3 | border-bottom: 2px solid $dark-gray-100; 4 | margin-left: auto; 5 | margin-right: auto; 6 | 7 | // Default, thin style 8 | &:not(.is-style-wide):not(.is-style-dots) { 9 | max-width: 100px; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/function-output-filename/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { isBlobURL } from '@wordpress/blob'; 5 | 6 | /** 7 | * External dependencies 8 | */ 9 | import _ from 'lodash'; 10 | 11 | _.isEmpty( isBlobURL( '' ) ); 12 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-identifiers/ir.json: -------------------------------------------------------------------------------- 1 | [{"name":"ClassDeclaration","description":"Class declaration example.","tags":[]},{"name":"functionDeclaration","description":"Function declaration example.","tags":[]},{"name":"variableDeclaration","description":"Variable declaration example.","tags":[]}] -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__embed.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | https://example.com/ 4 |
Embedded content from an example URL
5 | 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__tag-cloud.parsed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "blockName": "core/tag-cloud", 4 | "attrs": { 5 | "taxonomy": "category" 6 | }, 7 | "innerBlocks": [], 8 | "innerHTML": "", 9 | "innerContent": [] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /packages/edit-post/src/components/options-modal/section.js: -------------------------------------------------------------------------------- 1 | const Section = ( { title, children } ) => ( 2 |
3 |

{ title }

4 | { children } 5 |
6 | ); 7 | 8 | export default Section; 9 | -------------------------------------------------------------------------------- /test/unit/config/gutenberg-phase.js: -------------------------------------------------------------------------------- 1 | global.process.env = { 2 | ...global.process.env, 3 | // Inject the `GUTENBERG_PHASE` global, used for feature flagging. 4 | // eslint-disable-next-line @wordpress/gutenberg-phase 5 | GUTENBERG_PHASE: parseInt( process.env.npm_package_config_GUTENBERG_PHASE, 10 ), 6 | }; 7 | -------------------------------------------------------------------------------- /packages/block-library/src/missing/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RawHTML } from '@wordpress/element'; 5 | 6 | export default function save( { attributes } ) { 7 | // Preserve the missing block's content. 8 | return { attributes.originalContent }; 9 | } 10 | -------------------------------------------------------------------------------- /packages/block-library/src/nextpage/edit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | 6 | export default function NextPageEdit() { 7 | return ( 8 |
9 | { __( 'Page break' ) } 10 |
11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /packages/block-library/src/separator/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/block-library/src/verse/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/data/src/components/async-mode-provider/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { createContext } from '@wordpress/element'; 5 | 6 | const { Consumer, Provider } = createContext( false ); 7 | 8 | export const AsyncModeConsumer = Consumer; 9 | 10 | export default Provider; 11 | -------------------------------------------------------------------------------- /packages/block-library/src/search/style.scss: -------------------------------------------------------------------------------- 1 | .wp-block-search { 2 | display: flex; 3 | flex-wrap: wrap; 4 | 5 | .wp-block-search__label { 6 | width: 100%; 7 | } 8 | 9 | .wp-block-search__input { 10 | flex-grow: 1; 11 | } 12 | 13 | .wp-block-search__button { 14 | margin-left: 10px; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/block-library/src/spacer/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { G, Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.1 (2019-05-22) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix missing file entry for `util.js` in `package.json` 6 | 7 | ## 1.0.0 (2019-05-21) 8 | 9 | ### New Feature 10 | 11 | - Introduce the `@wordpress/dependency-extraction-webpack-plugin` package. 12 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/wordpress-require/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | const { isBlobURL } = require( '@wordpress/blob' ); 5 | 6 | /** 7 | * External dependencies 8 | */ 9 | const _ = require( 'lodash' ); 10 | 11 | _.isEmpty( isBlobURL( '' ) ); 12 | -------------------------------------------------------------------------------- /packages/e2e-tests/config/gutenberg-phase.js: -------------------------------------------------------------------------------- 1 | global.process.env = { 2 | ...global.process.env, 3 | // Inject the `GUTENBERG_PHASE` global, used for feature flagging. 4 | // eslint-disable-next-line @wordpress/gutenberg-phase 5 | GUTENBERG_PHASE: parseInt( process.env.npm_package_config_GUTENBERG_PHASE, 10 ), 6 | }; 7 | -------------------------------------------------------------------------------- /packages/editor/src/components/index.native.js: -------------------------------------------------------------------------------- 1 | 2 | // Post Related Components 3 | export { default as PostTitle } from './post-title'; 4 | export { default as EditorHistoryRedo } from './editor-history/redo'; 5 | export { default as EditorHistoryUndo } from './editor-history/undo'; 6 | 7 | export * from './deprecated'; 8 | -------------------------------------------------------------------------------- /packages/block-library/src/audio/style.scss: -------------------------------------------------------------------------------- 1 | .wp-block-audio { 2 | // Show full-width when not aligned. 3 | audio { 4 | width: 100%; 5 | 6 | // The browser natively applies a 300px width to the audio block. 7 | // We restore this as a min-width instead, for alignments. 8 | min-width: 300px; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-library/src/preformatted/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RichText } from '@wordpress/block-editor'; 5 | 6 | export default function save( { attributes } ) { 7 | const { content } = attributes; 8 | 9 | return ; 10 | } 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__audio.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__block.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/block", 5 | "isValid": true, 6 | "attributes": { 7 | "ref": 123 8 | }, 9 | "innerBlocks": [], 10 | "originalContent": "" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/list-reusable-blocks/src/style.scss: -------------------------------------------------------------------------------- 1 | @import "./components/import-dropdown/style.scss"; 2 | @import "./components/import-form/style.scss"; 3 | 4 | .list-reusable-blocks__container { 5 | display: inline-flex; 6 | padding: 9px 0 4px; // To match the H1 7 | align-items: center; 8 | vertical-align: top; 9 | } 10 | -------------------------------------------------------------------------------- /packages/a11y/src/clear.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Clear the a11y-speak-region elements. 3 | */ 4 | const clear = function() { 5 | const regions = document.querySelectorAll( '.a11y-speak-region' ); 6 | for ( let i = 0; i < regions.length; i++ ) { 7 | regions[ i ].textContent = ''; 8 | } 9 | }; 10 | 11 | export default clear; 12 | -------------------------------------------------------------------------------- /packages/block-library/src/verse/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/verse", 3 | "category": "formatting", 4 | "attributes": { 5 | "content": { 6 | "type": "string", 7 | "source": "html", 8 | "selector": "pre", 9 | "default": "" 10 | }, 11 | "textAlign": { 12 | "type": "string" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/blocks/src/api/raw-handling/google-docs-uid-remover.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { unwrap } from '@wordpress/dom'; 5 | 6 | export default function( node ) { 7 | if ( ! node.id || node.id.indexOf( 'docs-internal-guid-' ) !== 0 ) { 8 | return; 9 | } 10 | 11 | unwrap( node ); 12 | } 13 | -------------------------------------------------------------------------------- /packages/components/src/responsive-wrapper/style.scss: -------------------------------------------------------------------------------- 1 | .components-responsive-wrapper { 2 | position: relative; 3 | max-width: 100%; 4 | } 5 | 6 | .components-responsive-wrapper__content { 7 | position: absolute; 8 | top: 0; 9 | right: 0; 10 | bottom: 0; 11 | left: 0; 12 | width: 100%; 13 | height: 100%; 14 | } 15 | -------------------------------------------------------------------------------- /packages/components/src/tooltip/index.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Children } from '@wordpress/element'; 5 | 6 | // For native mobile, just shortcircuit the Tooltip to return its child. 7 | const Tooltip = ( props ) => Children.only( props.children ); 8 | 9 | export default Tooltip; 10 | -------------------------------------------------------------------------------- /packages/data/src/plugins/controls/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import deprecated from '@wordpress/deprecated'; 5 | 6 | export default function( registry ) { 7 | deprecated( 'wp.data.plugins.controls', { 8 | hint: 'The controls plugins is now baked-in.', 9 | } ); 10 | return registry; 11 | } 12 | -------------------------------------------------------------------------------- /packages/docgen/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.2.0 (2019-05-21) 2 | 3 | ### Enhancement 4 | 5 | - Docblocks including a `@private` tag will be omitted from the generated result. 6 | 7 | ### Internal 8 | 9 | - Remove unneccessary argument from an instance of `Array#pop`. 10 | 11 | ## 1.0.0 (2019-03-06) 12 | 13 | - Initial release 14 | -------------------------------------------------------------------------------- /packages/docgen/src/test/engine.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies. 3 | */ 4 | const engine = require( '../engine' ); 5 | 6 | describe( 'Engine', () => { 7 | it( 'should return a void IR for undefined code', () => { 8 | const { ir } = engine( undefined ); 9 | expect( ir ).toHaveLength( 0 ); 10 | } ); 11 | } ); 12 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__file__no-download-button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__separator.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/separator", 5 | "isValid": true, 6 | "attributes": {}, 7 | "innerBlocks": [], 8 | "originalContent": "
" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /packages/editor/src/utils/test/url.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { cleanForSlug } from '../url'; 5 | 6 | describe( 'cleanForSlug()', () => { 7 | it( 'Should return string prepared for use as url slug', () => { 8 | expect( cleanForSlug( ' /Déjà_vu. ' ) ).toBe( 'deja-vu' ); 9 | } ); 10 | } ); 11 | -------------------------------------------------------------------------------- /docs/designers-developers/developers/themes/README.md: -------------------------------------------------------------------------------- 1 | # Theming for the Block Editor 2 | 3 | The new editor provides a number of options for theme designers and developers, including theme-defined color settings, font size control, and much more. 4 | 5 | In this section, you'll learn about the ways that themes can customise the editor. 6 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/color-palette/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { ColorPalette } from '@wordpress/components'; 5 | 6 | /** 7 | * Internal dependencies 8 | */ 9 | import withColorContext from './with-color-context'; 10 | 11 | export default withColorContext( ColorPalette ); 12 | -------------------------------------------------------------------------------- /packages/block-library/src/video/editor.scss: -------------------------------------------------------------------------------- 1 | .block-editor-block-list__block[data-align="center"] { 2 | text-align: center; 3 | } 4 | 5 | .editor-video-poster-control .components-button { 6 | margin-right: 8px; 7 | } 8 | 9 | .editor-video-poster-control .components-button + .components-button { 10 | margin-top: 1em; 11 | } 12 | -------------------------------------------------------------------------------- /packages/blocks/src/api/raw-handling/head-remover.js: -------------------------------------------------------------------------------- 1 | export default function( node ) { 2 | if ( 3 | node.nodeName !== 'SCRIPT' && 4 | node.nodeName !== 'NOSCRIPT' && 5 | node.nodeName !== 'TEMPLATE' && 6 | node.nodeName !== 'STYLE' 7 | ) { 8 | return; 9 | } 10 | 11 | node.parentNode.removeChild( node ); 12 | } 13 | -------------------------------------------------------------------------------- /packages/components/src/dashicon/README.md: -------------------------------------------------------------------------------- 1 | # Dashicon 2 | 3 | ## Usage 4 | 5 | ```jsx 6 | import { Dashicon } from '@wordpress/components'; 7 | 8 | const MyDashicon = () => ( 9 |
10 | 11 | 12 | 13 |
14 | ); 15 | ``` 16 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__column.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

Column One, Paragraph One

5 | 6 | 7 |

Column One, Paragraph Two

8 | 9 |
10 | 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__column.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Column One, Paragraph One

4 | 5 | 6 | 7 |

Column One, Paragraph Two

8 |
9 | 10 | -------------------------------------------------------------------------------- /packages/edit-widgets/src/components/layout/style.scss: -------------------------------------------------------------------------------- 1 | .edit-widgets-layout__content { 2 | min-height: 100%; 3 | background: #f1f1f1; 4 | padding: 30px 0; 5 | 6 | // Temporarily disable the sidebar on mobile 7 | @include break-small() { 8 | margin-right: $sidebar-width; 9 | margin-top: $header-height; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/editor/src/components/post-excerpt/check.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import PostTypeSupportCheck from '../post-type-support-check'; 5 | 6 | function PostExcerptCheck( props ) { 7 | return ; 8 | } 9 | 10 | export default PostExcerptCheck; 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__audio.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__file__no-download-button.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__deprecated-1.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/rich-text/src/get-text-content.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Get the textual content of a Rich Text value. This is similar to 3 | * `Element.textContent`. 4 | * 5 | * @param {Object} value Value to use. 6 | * 7 | * @return {string} The text content. 8 | */ 9 | export function getTextContent( { text } ) { 10 | return text; 11 | } 12 | -------------------------------------------------------------------------------- /packages/blocks/src/api/raw-handling/blockquote-normaliser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import normaliseBlocks from './normalise-blocks'; 5 | 6 | export default function( node ) { 7 | if ( node.nodeName !== 'BLOCKQUOTE' ) { 8 | return; 9 | } 10 | 11 | node.innerHTML = normaliseBlocks( node.innerHTML ); 12 | } 13 | -------------------------------------------------------------------------------- /packages/components/src/radio-control/style.scss: -------------------------------------------------------------------------------- 1 | .components-radio-control { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | .components-radio-control__option:not(:last-child) { 7 | margin-bottom: 4px; 8 | } 9 | 10 | .components-radio-control__input[type="radio"] { 11 | margin-top: 0; 12 | margin-right: 6px; 13 | } 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__embed.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | https://example.com/ 5 |
6 |
Embedded content from an example URL
7 |
8 | 9 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__file__no-text-link.serialized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__more.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/more", 5 | "isValid": true, 6 | "attributes": { 7 | "noTeaser": false 8 | }, 9 | "innerBlocks": [], 10 | "originalContent": "" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/blocks/__snapshots__/html.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`HTML block can be created by typing "/html" 1`] = ` 4 | " 5 |

Pythagorean theorem: 6 | a2 + b2 = c2

7 | " 8 | `; 9 | -------------------------------------------------------------------------------- /packages/edit-post/src/store/defaults.js: -------------------------------------------------------------------------------- 1 | export const PREFERENCES_DEFAULTS = { 2 | editorMode: 'visual', 3 | isGeneralSidebarDismissed: false, 4 | panels: { 5 | 'post-status': { 6 | opened: true, 7 | }, 8 | }, 9 | features: { 10 | fixedToolbar: false, 11 | }, 12 | pinnedPluginItems: {}, 13 | hiddenBlockTypes: [], 14 | }; 15 | -------------------------------------------------------------------------------- /packages/e2e-tests/README.md: -------------------------------------------------------------------------------- 1 | # E2E Tests 2 | 3 | End-To-End (E2E) tests for WordPress. 4 | 5 | ## Installation 6 | 7 | Install the module 8 | 9 | ```bash 10 | npm install @wordpress/e2e-tests --save-dev 11 | ``` 12 | 13 |

Code is Poetry.

14 | -------------------------------------------------------------------------------- /packages/edit-post/src/components/sidebar/plugin-post-status-info/test/__snapshots__/index.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`PluginPostStatusInfo renders fill properly 1`] = ` 4 |
7 | My plugin post status info 8 |
9 | `; 10 | -------------------------------------------------------------------------------- /packages/rich-text/src/get-format-types.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { select } from '@wordpress/data'; 5 | 6 | /** 7 | * Returns all registered formats. 8 | * 9 | * @return {Array} Format settings. 10 | */ 11 | export function getFormatTypes() { 12 | return select( 'core/rich-text' ).getFormatTypes(); 13 | } 14 | -------------------------------------------------------------------------------- /packages/block-library/src/nextpage/editor.native.scss: -------------------------------------------------------------------------------- 1 | // @format 2 | 3 | .block-library-nextpage__line { 4 | background-color: $gray-lighten-20; 5 | height: 2; 6 | } 7 | 8 | .block-library-nextpage__text { 9 | color: $gray; 10 | font-family: $default-regular-font; 11 | text-decoration-style: solid; 12 | text-transform: uppercase; 13 | } 14 | -------------------------------------------------------------------------------- /packages/block-library/src/shortcode/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/src/enable-pre-publish-checks.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { toggleScreenOption } from './toggle-screen-option'; 5 | 6 | /** 7 | * Enables Pre-publish checks. 8 | */ 9 | export async function enablePrePublishChecks() { 10 | await toggleScreenOption( 'Enable Pre-publish Checks', true ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__4-invalid-starting-letter.parsed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "blockName": null, 4 | "attrs": {}, 5 | "innerBlocks": [], 6 | "innerHTML": "\n", 7 | "innerContent": [ 8 | "\n" 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__archives.parsed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "blockName": "core/archives", 4 | "attrs": { 5 | "displayAsDropdown": false, 6 | "showPostCounts": false 7 | }, 8 | "innerBlocks": [], 9 | "innerHTML": "", 10 | "innerContent": [] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__deprecated-1.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__invalid-special.parsed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "blockName": null, 4 | "attrs": {}, 5 | "innerBlocks": [], 6 | "innerHTML": "\n", 7 | "innerContent": [ 8 | "\n" 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__pullquote__multi-paragraph.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Paragraph one

5 |

Paragraph two

6 | by whomever 7 |
8 |
9 | 10 | -------------------------------------------------------------------------------- /packages/edit-post/src/store/constants.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The identifier for the data store. 3 | * @type {string} 4 | */ 5 | export const STORE_KEY = 'core/edit-post'; 6 | 7 | /** 8 | * CSS selector string for the admin bar view post link anchor tag. 9 | * @type {string} 10 | */ 11 | export const VIEW_AS_LINK_SELECTOR = '#wp-admin-bar-view a'; 12 | -------------------------------------------------------------------------------- /packages/format-library/src/default-formats.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { bold } from './bold'; 5 | import { italic } from './italic'; 6 | import { link } from './link'; 7 | import { strikethrough } from './strikethrough'; 8 | 9 | export default [ 10 | bold, 11 | italic, 12 | link, 13 | strikethrough, 14 | ]; 15 | -------------------------------------------------------------------------------- /packages/format-library/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { 5 | registerFormatType, 6 | } from '@wordpress/rich-text'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import formats from './default-formats'; 12 | 13 | formats.forEach( ( { name, ...settings } ) => registerFormatType( name, settings ) ); 14 | -------------------------------------------------------------------------------- /packages/token-list/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.1.0 (2018-11-20) 2 | 3 | ### Enhancements 4 | 5 | - Implements missing stringification behavior (i.e. `toString`), as prescribed in the standard to be the `value` property (the interface's `stringifier`) 6 | - Implements missing iterator behavior 7 | 8 | ## 1.0.0 (2018-09-05) 9 | 10 | - Initial release 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Directories/files that may be generated by this project 2 | build 3 | build-module 4 | build-style 5 | node_modules 6 | gutenberg.zip 7 | 8 | # Directories/files that may appear in your environment 9 | .DS_Store 10 | *.log 11 | phpcs.xml 12 | yarn.lock 13 | docker-compose.override.yml 14 | /wordpress 15 | 16 | playground/dist 17 | .cache 18 | -------------------------------------------------------------------------------- /packages/block-library/src/heading/shared.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Given a node name string for a heading node, returns its numeric level. 3 | * 4 | * @param {string} nodeName Heading node name. 5 | * 6 | * @return {number} Heading level. 7 | */ 8 | export function getLevelFromHeadingNodeName( nodeName ) { 9 | return Number( nodeName.substr( 1 ) ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/block-library/src/more/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { G, Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/src/disable-pre-publish-checks.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { toggleScreenOption } from './toggle-screen-option'; 5 | 6 | /** 7 | * Disables Pre-publish checks. 8 | */ 9 | export async function disablePrePublishChecks() { 10 | await toggleScreenOption( 'Enable Pre-publish Checks', false ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__file__no-text-link.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__custom-link.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__custom-link.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__invalid-Capitals.parsed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "blockName": null, 4 | "attrs": {}, 5 | "innerBlocks": [], 6 | "innerHTML": "\n", 7 | "innerContent": [ 8 | "\n" 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /packages/edit-post/src/components/options-modal/options/index.js: -------------------------------------------------------------------------------- 1 | export { default as EnableCustomFieldsOption } from './enable-custom-fields'; 2 | export { default as EnablePanelOption } from './enable-panel'; 3 | export { default as EnablePublishSidebarOption } from './enable-publish-sidebar'; 4 | export { default as EnableTipsOption } from './enable-tips'; 5 | -------------------------------------------------------------------------------- /packages/edit-post/src/components/sidebar/last-revision/style.scss: -------------------------------------------------------------------------------- 1 | // Needs specificity, because this panel is just a button 2 | .components-panel__body.is-opened.edit-post-last-revision__panel { 3 | padding: 0; 4 | } 5 | 6 | .editor-post-last-revision__title { 7 | padding: #{ $panel-padding - 3px } $panel-padding; // subtract extra height of dashicon 8 | } 9 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting Security Issues 2 | 3 | The Gutenberg team and WordPress community take security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. 4 | 5 | To report a security issue, please visit the [WordPress HackerOne](https://hackerone.com/wordpress) program. 6 | -------------------------------------------------------------------------------- /packages/annotations/src/format/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { 5 | registerFormatType, 6 | } from '@wordpress/rich-text'; 7 | 8 | /** 9 | * Internal dependencies 10 | */ 11 | import { annotation } from './annotation'; 12 | 13 | const { name, ...settings } = annotation; 14 | 15 | registerFormatType( name, settings ); 16 | -------------------------------------------------------------------------------- /packages/block-library/src/missing/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/missing", 3 | "category": "common", 4 | "attributes": { 5 | "originalName": { 6 | "type": "string" 7 | }, 8 | "originalUndelimitedContent": { 9 | "type": "string" 10 | }, 11 | "originalContent": { 12 | "type": "string", 13 | "source": "html" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/block-library/src/paragraph/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/src/mocks/index.js: -------------------------------------------------------------------------------- 1 | export { createURLMatcher } from './create-url-matcher'; 2 | export { createJSONResponse } from './create-json-response'; 3 | export { createEmbeddingMatcher } from './create-embedding-matcher'; 4 | export { mockOrTransform } from './mock-or-transform'; 5 | export { setUpResponseMocking } from './set-up-response-mocking'; 6 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__list__ul.html: -------------------------------------------------------------------------------- 1 | 2 |
  • Text & Headings
  • Images & Videos
  • Galleries
  • Embeds, like YouTube, Tweets, or other WordPress posts.
  • Layout blocks, like Buttons, Hero Images, Separators, etc.
  • And Lists like this one of course :)
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.parsed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "blockName": "core/tag-cloud", 4 | "attrs": { 5 | "showTagCounts": true, 6 | "taxonomy": "category" 7 | }, 8 | "innerBlocks": [], 9 | "innerHTML": "", 10 | "innerContent": [] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/postcss-themes/README.md: -------------------------------------------------------------------------------- 1 | # PostCSS Themes 2 | 3 | PostCSS plugin to generate theme colors. 4 | 5 | ## Installation 6 | 7 | Install the module 8 | 9 | ```bash 10 | npm install @wordpress/postcss-themes --save 11 | ``` 12 | 13 |

Code is Poetry.

14 | -------------------------------------------------------------------------------- /packages/block-library/src/preformatted/theme.scss: -------------------------------------------------------------------------------- 1 | .wp-block-preformatted { 2 | pre { 3 | font-family: $editor-html-font; 4 | color: $dark-gray-800; 5 | 6 | /* Fonts smaller than 16px causes mobile safari to zoom. */ 7 | font-size: $mobile-text-min-font-size; 8 | @include break-small { 9 | font-size: $text-editor-font-size; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/block-library/src/quote/style.scss: -------------------------------------------------------------------------------- 1 | .wp-block-quote { 2 | &.is-style-large, 3 | &.is-large { 4 | margin: 0 0 16px; 5 | padding: 0 1em; 6 | 7 | p { 8 | font-size: 24px; 9 | font-style: italic; 10 | line-height: 1.6; 11 | } 12 | 13 | cite, 14 | footer { 15 | font-size: 18px; 16 | text-align: right; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/components/src/color-indicator/test/__snapshots__/index.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ColorIndicator matches the snapshot 1`] = ` 4 | 13 | `; 14 | -------------------------------------------------------------------------------- /packages/components/src/disabled/style.scss: -------------------------------------------------------------------------------- 1 | .components-disabled { 2 | position: relative; 3 | pointer-events: none; 4 | 5 | &::after { 6 | content: ""; 7 | position: absolute; 8 | top: 0; 9 | right: 0; 10 | bottom: 0; 11 | left: 0; 12 | } 13 | 14 | // Also make nested blocks unselectable. 15 | * { 16 | pointer-events: none; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/components/src/toggle-control/style.scss: -------------------------------------------------------------------------------- 1 | .components-toggle-control .components-base-control__field { 2 | display: flex; 3 | margin-bottom: $grid-size-small * 3; 4 | 5 | .components-form-toggle { 6 | margin-right: $grid-size-large; 7 | } 8 | 9 | .components-toggle-control__label { 10 | display: block; 11 | margin-bottom: 4px; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/dom/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import * as focusable from './focusable'; 5 | import * as tabbable from './tabbable'; 6 | 7 | /** 8 | * Object grouping `focusable` and `tabbable` utils 9 | * under the keys with the same name. 10 | */ 11 | export const focus = { focusable, tabbable }; 12 | 13 | export * from './dom'; 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__archives__showPostCounts.parsed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "blockName": "core/archives", 4 | "attrs": { 5 | "displayAsDropdown": false, 6 | "showPostCounts": true 7 | }, 8 | "innerBlocks": [], 9 | "innerHTML": "", 10 | "innerContent": [] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/e2e-tests/mu-plugins/disable-login-autofocus.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | The Gutenberg Playground 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/block-library/src/list/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core/list", 3 | "category": "common", 4 | "attributes": { 5 | "ordered": { 6 | "type": "boolean", 7 | "default": false 8 | }, 9 | "values": { 10 | "type": "string", 11 | "source": "html", 12 | "selector": "ol,ul", 13 | "multiline": "li", 14 | "default": "" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/namespace/module.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Named variable. 3 | */ 4 | export const myVariable = true; 5 | 6 | /** 7 | * Named function. 8 | */ 9 | export const myFunction = () => {}; 10 | 11 | /** 12 | * Named class. 13 | */ 14 | export class MyClass {} 15 | 16 | /** 17 | * Default variable declaration. 18 | */ 19 | export default 42; 20 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__list__ul.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
  • Text & Headings
  • Images & Videos
  • Galleries
  • Embeds, like YouTube, Tweets, or other WordPress posts.
  • Layout blocks, like Buttons, Hero Images, Separators, etc.
  • And Lists like this one of course :)
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__text-columns.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

One

5 |
6 |
7 |

Two

8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/__snapshots__/style-variation.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`adding blocks Should switch the style of the quote block 1`] = ` 4 | " 5 |

Quote content

6 | " 7 | `; 8 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/plugins/__snapshots__/format-api.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Using Format API Clicking the control wraps the selected text properly with HTML code 1`] = ` 4 | " 5 |

First paragraph

6 | " 7 | `; 8 | -------------------------------------------------------------------------------- /assets/stylesheets/_animations.scss: -------------------------------------------------------------------------------- 1 | @mixin edit-post__loading-fade-animation { 2 | animation: edit-post__loading-fade-animation 1.6s ease-in-out infinite; 3 | } 4 | 5 | @mixin edit-post__fade-in-animation($speed: 0.2s, $delay: 0s) { 6 | animation: edit-post__fade-in-animation $speed ease-out $delay; 7 | animation-fill-mode: forwards; 8 | @include reduce-motion; 9 | } 10 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/with-externs/webpack.config.js: -------------------------------------------------------------------------------- 1 | const DependencyExtractionWebpackPlugin = require( '../../..' ); 2 | 3 | module.exports = { 4 | externals: { 5 | '@wordpress/blob': 'wp.blob', 6 | 'rxjs/operators': 'rxjs.operators', 7 | rxjs: true, 8 | }, 9 | plugins: [ new DependencyExtractionWebpackPlugin() ], 10 | }; 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__custom-link-rel.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__custom-link-rel.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__deprecated-2.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/panel-color-settings/style.scss: -------------------------------------------------------------------------------- 1 | .block-editor-panel-color-settings { 2 | .component-color-indicator { 3 | vertical-align: text-bottom; 4 | } 5 | 6 | &__panel-title .component-color-indicator { 7 | display: inline-block; 8 | } 9 | 10 | &.is-opened &__panel-title .component-color-indicator { 11 | display: none; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/components/src/primitives/block-quotation/style.scss: -------------------------------------------------------------------------------- 1 | .wp-block-quote { 2 | &.is-style-large, 3 | &.is-large { 4 | margin: 0 0 16px; 5 | padding: 0 1em; 6 | 7 | p { 8 | font-size: 24px; 9 | font-style: italic; 10 | line-height: 1.6; 11 | } 12 | 13 | cite, 14 | footer { 15 | font-size: 18px; 16 | text-align: right; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/components/src/sandbox/README.md: -------------------------------------------------------------------------------- 1 | # Sandbox 2 | 3 | This component provides an isolated environment for arbitrary HTML via iframes. 4 | 5 | ## Usage 6 | 7 | ```jsx 8 | import { SandBox } from '@wordpress/components'; 9 | 10 | const MySandBox = () => ( 11 | 16 | ); 17 | ``` 18 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/namespace-commented/module.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Named variable. 3 | */ 4 | export const myVariable = true; 5 | 6 | /** 7 | * Named function. 8 | */ 9 | export const myFunction = () => {}; 10 | 11 | /** 12 | * Named class. 13 | */ 14 | export class MyClass {} 15 | 16 | /** 17 | * Default variable declaration. 18 | */ 19 | export default 42; 20 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__attachment-link.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__attachment-link.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__custom-link-class.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__custom-link-class.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__shortcode.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/shortcode", 5 | "isValid": true, 6 | "attributes": { 7 | "text": "[gallery ids=\"238,338\"]" 8 | }, 9 | "innerBlocks": [], 10 | "originalContent": "[gallery ids=\"238,338\"]" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/i18n/benchmark/index.js: -------------------------------------------------------------------------------- 1 | const Benchmark = require( 'benchmark' ); 2 | const { __ } = require( '../' ); 3 | 4 | const suite = new Benchmark.Suite; 5 | 6 | suite 7 | .add( '__', () => { 8 | __( 'Translate' ); 9 | } ) 10 | // eslint-disable-next-line no-console 11 | .on( 'cycle', ( event ) => console.log( event.target.toString() ) ) 12 | .run( { async: true } ); 13 | -------------------------------------------------------------------------------- /packages/block-library/src/code/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/blocks/src/store/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { registerStore } from '@wordpress/data'; 5 | 6 | /** 7 | * Internal dependencies 8 | */ 9 | import reducer from './reducer'; 10 | import * as selectors from './selectors'; 11 | import * as actions from './actions'; 12 | 13 | registerStore( 'core/blocks', { reducer, selectors, actions } ); 14 | -------------------------------------------------------------------------------- /packages/browserslist-config/index.js: -------------------------------------------------------------------------------- 1 | // browserslist-config/index.js 2 | module.exports = [ 3 | '> 1%', 4 | 'ie >= 11', 5 | 'last 1 Android versions', 6 | 'last 1 ChromeAndroid versions', 7 | 'last 2 Chrome versions', 8 | 'last 2 Firefox versions', 9 | 'last 2 Safari versions', 10 | 'last 2 iOS versions', 11 | 'last 2 Edge versions', 12 | 'last 2 Opera versions', 13 | ]; 14 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/src/click-button.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Clicks a button based on the text on the button. 3 | * 4 | * @param {string} buttonText The text that appears on the button to click. 5 | */ 6 | export async function clickButton( buttonText ) { 7 | const button = await page.waitForXPath( `//button[contains(text(), '${ buttonText }')]` ); 8 | await button.click(); 9 | } 10 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__archives.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/archives", 5 | "isValid": true, 6 | "attributes": { 7 | "displayAsDropdown": false, 8 | "showPostCounts": false 9 | }, 10 | "innerBlocks": [], 11 | "originalContent": "" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__tag-cloud.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/tag-cloud", 5 | "isValid": true, 6 | "attributes": { 7 | "taxonomy": "category", 8 | "showTagCounts": false 9 | }, 10 | "innerBlocks": [], 11 | "originalContent": "" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ...require( '@wordpress/scripts/config/jest-e2e.config' ), 3 | setupFiles: [ 4 | '/config/gutenberg-phase.js', 5 | ], 6 | setupFilesAfterEnv: [ 7 | '/config/setup-test-framework.js', 8 | '@wordpress/jest-console', 9 | '@wordpress/jest-puppeteer-axe', 10 | 'expect-puppeteer', 11 | ], 12 | }; 13 | -------------------------------------------------------------------------------- /packages/keycodes/src/platform.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import { Platform } from 'react-native'; 5 | 6 | /** 7 | * Return true if platform is iOS. 8 | * 9 | * @return {boolean} True if iOS; false otherwise. 10 | */ 11 | // eslint-disable-next-line no-unused-vars 12 | export function isAppleOS() { 13 | return Platform.OS === 'ios'; 14 | } 15 | -------------------------------------------------------------------------------- /packages/block-library/src/button/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { G, Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/block-library/src/embed/embed-loading.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { __ } from '@wordpress/i18n'; 5 | import { Spinner } from '@wordpress/components'; 6 | 7 | const EmbedLoading = () => ( 8 |
9 | 10 |

{ __( 'Embedding…' ) }

11 |
12 | ); 13 | 14 | export default EmbedLoading; 15 | -------------------------------------------------------------------------------- /packages/block-library/src/file/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { Path, SVG } from '@wordpress/components'; 5 | 6 | export default ; 7 | -------------------------------------------------------------------------------- /packages/blocks/src/api/raw-handling/iframe-remover.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { remove } from '@wordpress/dom'; 5 | 6 | /** 7 | * Removes iframes. 8 | * 9 | * @param {Node} node The node to check. 10 | * 11 | * @return {void} 12 | */ 13 | export default function( node ) { 14 | if ( node.nodeName === 'IFRAME' ) { 15 | remove( node ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/components/src/panel/row.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import classnames from 'classnames'; 5 | 6 | function PanelRow( { className, children } ) { 7 | const classes = classnames( 'components-panel__row', className ); 8 | 9 | return ( 10 |
11 | { children } 12 |
13 | ); 14 | } 15 | 16 | export default PanelRow; 17 | -------------------------------------------------------------------------------- /packages/dependency-extraction-webpack-plugin/test/fixtures/function-output-filename/webpack.config.js: -------------------------------------------------------------------------------- 1 | const DependencyExtractionWebpackPlugin = require( '../../..' ); 2 | 3 | module.exports = { 4 | output: { 5 | filename( chunkData ) { 6 | return `chunk--${ chunkData.chunk.name }--[name].js`; 7 | }, 8 | }, 9 | plugins: [ new DependencyExtractionWebpackPlugin() ], 10 | }; 11 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/src/select-block-by-client-id.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Given the clientId of a block, selects the block on the editor. 3 | * 4 | * @param {string} clientId Identified of the block. 5 | */ 6 | export async function selectBlockByClientId( clientId ) { 7 | await page.evaluate( ( id ) => { 8 | wp.data.dispatch( 'core/editor' ).selectBlock( id ); 9 | }, clientId ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__deprecated-3.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /packages/editor/src/index.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import '@wordpress/block-editor'; 5 | import '@wordpress/blocks'; 6 | import '@wordpress/core-data'; 7 | import '@wordpress/rich-text'; 8 | 9 | /** 10 | * Internal dependencies 11 | */ 12 | import './store'; 13 | import './hooks'; 14 | 15 | export * from './components'; 16 | export * from './utils'; 17 | -------------------------------------------------------------------------------- /packages/rich-text/src/store/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { registerStore } from '@wordpress/data'; 5 | 6 | /** 7 | * Internal dependencies 8 | */ 9 | import reducer from './reducer'; 10 | import * as selectors from './selectors'; 11 | import * as actions from './actions'; 12 | 13 | registerStore( 'core/rich-text', { reducer, selectors, actions } ); 14 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | ./phpunit/ 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/integration/fixtures/two-images-in.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/babel-preset-default/test/fixtures/input.js: -------------------------------------------------------------------------------- 1 | describe( 'Babel preset default', () => { 2 | async function* foo() { 3 | await 1; 4 | yield 2; 5 | } 6 | 7 | test( 'support for async generator functions', async () => { 8 | const generator = foo(); 9 | 10 | expect( await generator.next() ).toEqual( { 11 | done: false, 12 | value: 2, 13 | } ); 14 | } ); 15 | } ); 16 | -------------------------------------------------------------------------------- /packages/block-editor/src/components/default-block-appender/style.native.scss: -------------------------------------------------------------------------------- 1 | // @format 2 | 3 | .blockHolder { 4 | flex: 1 1 auto; 5 | } 6 | 7 | .blockContainer { 8 | background-color: $white; 9 | padding-top: 0; 10 | padding-left: 16px; 11 | padding-right: 16px; 12 | } 13 | 14 | .textView { 15 | color: $gray; 16 | font-size: 16px; 17 | font-family: $default-regular-font; 18 | } 19 | -------------------------------------------------------------------------------- /packages/block-library/src/heading/test/shared.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | import { getLevelFromHeadingNodeName } from '../shared'; 5 | 6 | describe( 'getLevelFromHeadingNodeName()', () => { 7 | it( 'should return a numeric value from nodeName', () => { 8 | const level = getLevelFromHeadingNodeName( 'H4' ); 9 | 10 | expect( level ).toBe( 4 ); 11 | } ); 12 | } ); 13 | -------------------------------------------------------------------------------- /packages/block-library/src/verse/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RichText } from '@wordpress/block-editor'; 5 | 6 | export default function save( { attributes } ) { 7 | const { textAlign, content } = attributes; 8 | 9 | return ( 10 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/block-library/src/video/style.scss: -------------------------------------------------------------------------------- 1 | .wp-block-video { 2 | // Remove the left and right margin the figure is born with. 3 | margin-left: 0; 4 | margin-right: 0; 5 | 6 | video { 7 | max-width: 100%; 8 | } 9 | 10 | @supports (position: sticky) { 11 | [poster] { 12 | object-fit: cover; 13 | } 14 | } 15 | 16 | &.aligncenter { 17 | text-align: center; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__deprecated-2.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__image__deprecated-3.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__tag-cloud__showTagCounts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/tag-cloud", 5 | "isValid": true, 6 | "attributes": { 7 | "taxonomy": "category", 8 | "showTagCounts": true 9 | }, 10 | "innerBlocks": [], 11 | "originalContent": "" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/index.js: -------------------------------------------------------------------------------- 1 | export { 2 | blockNameToFixtureBasename, 3 | getAvailableBlockFixturesBasenames, 4 | getBlockFixtureHTML, 5 | getBlockFixtureJSON, 6 | getBlockFixtureParsedJSON, 7 | getBlockFixtureSerializedHTML, 8 | writeBlockFixtureHTML, 9 | writeBlockFixtureJSON, 10 | writeBlockFixtureParsedJSON, 11 | writeBlockFixtureSerializedHTML, 12 | } from './utils'; 13 | -------------------------------------------------------------------------------- /packages/edit-post/src/components/browser-url/README.md: -------------------------------------------------------------------------------- 1 | BrowserURL 2 | ========== 3 | 4 | `` is a component used to keep the editor's saved post ID in sync with the browser's URL. Using the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API), it makes an in-place replacement (using `window.replaceState`) of the URL if the post ID changes and is not an auto-draft. 5 | -------------------------------------------------------------------------------- /packages/rich-text/src/test/is-collapsed.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal dependencies 3 | */ 4 | 5 | import { isCollapsed } from '../is-collapsed'; 6 | 7 | describe( 'isCollapsed', () => { 8 | it( 'should return true for a collapsed selection', () => { 9 | const record = { 10 | start: 4, 11 | end: 4, 12 | }; 13 | 14 | expect( isCollapsed( record ) ).toBe( true ); 15 | } ); 16 | } ); 17 | -------------------------------------------------------------------------------- /packages/block-library/src/subhead/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RichText } from '@wordpress/block-editor'; 5 | 6 | export default function save( { attributes } ) { 7 | const { align, content } = attributes; 8 | 9 | return ( 10 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/components/src/button-group/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import classnames from 'classnames'; 5 | 6 | function ButtonGroup( { className, ...props } ) { 7 | const classes = classnames( 'components-button-group', className ); 8 | 9 | return ( 10 |
11 | ); 12 | } 13 | 14 | export default ButtonGroup; 15 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__archives__showPostCounts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/archives", 5 | "isValid": true, 6 | "attributes": { 7 | "displayAsDropdown": false, 8 | "showPostCounts": true 9 | }, 10 | "innerBlocks": [], 11 | "originalContent": "" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/__snapshots__/reusable-blocks.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Reusable Blocks multi-selection reusable block can be converted back to regular blocks 1`] = ` 4 | " 5 |

Hello there!

6 | 7 | 8 | 9 |

Second paragraph

10 | " 11 | `; 12 | -------------------------------------------------------------------------------- /packages/eslint-plugin/configs/recommended.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: 'babel-eslint', 3 | extends: [ 4 | require.resolve( './jsx-a11y.js' ), 5 | require.resolve( './react.js' ), 6 | require.resolve( './custom.js' ), 7 | require.resolve( './esnext.js' ), 8 | ], 9 | env: { 10 | node: true, 11 | }, 12 | globals: { 13 | window: true, 14 | document: true, 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /packages/block-library/src/columns/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { G, Path, SVG } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/block-library/src/list/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { RichText } from '@wordpress/block-editor'; 5 | 6 | export default function save( { attributes } ) { 7 | const { ordered, values } = attributes; 8 | const tagName = ordered ? 'ol' : 'ul'; 9 | 10 | return ( 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/components/src/primitives/horizontal-rule/index.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import Hr from 'react-native-hr'; 5 | 6 | export const HorizontalRule = ( props ) => { 7 | const lineStyle = { 8 | backgroundColor: '#555d66', 9 | height: 2, 10 | ...props.lineStyle, 11 | }; 12 | 13 | return ( 14 |
15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /packages/e2e-test-utils/src/shared/config.js: -------------------------------------------------------------------------------- 1 | const WP_ADMIN_USER = { 2 | username: 'admin', 3 | password: 'password', 4 | }; 5 | 6 | const { 7 | WP_USERNAME = WP_ADMIN_USER.username, 8 | WP_PASSWORD = WP_ADMIN_USER.password, 9 | WP_BASE_URL = 'http://localhost:8889', 10 | } = process.env; 11 | 12 | export { 13 | WP_ADMIN_USER, 14 | WP_USERNAME, 15 | WP_PASSWORD, 16 | WP_BASE_URL, 17 | }; 18 | -------------------------------------------------------------------------------- /packages/e2e-tests/specs/__snapshots__/embedding.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Embedding content should allow the user to convert unembeddable URLs to a paragraph with a link in it 1`] = ` 4 | " 5 |

https://twitter.com/wooyaygutenberg123454312

6 | " 7 | `; 8 | -------------------------------------------------------------------------------- /packages/rich-text/src/get-format-type.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { select } from '@wordpress/data'; 5 | 6 | /** 7 | * Returns a registered format type. 8 | * 9 | * @param {string} name Format name. 10 | * 11 | * @return {?Object} Format type. 12 | */ 13 | export function getFormatType( name ) { 14 | return select( 'core/rich-text' ).getFormatType( name ); 15 | } 16 | -------------------------------------------------------------------------------- /packages/block-library/src/subhead/tranforms.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { createBlock } from '@wordpress/blocks'; 5 | 6 | const transforms = { 7 | to: [ 8 | { 9 | type: 'block', 10 | blocks: [ 'core/paragraph' ], 11 | transform: ( attributes ) => 12 | createBlock( 'core/paragraph', attributes ), 13 | }, 14 | ], 15 | }; 16 | 17 | export default transforms; 18 | -------------------------------------------------------------------------------- /packages/components/src/primitives/block-quotation/index.native.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import { View } from 'react-native'; 5 | /** 6 | * Internal dependencies 7 | */ 8 | import styles from './style.scss'; 9 | 10 | export const BlockQuotation = ( props ) => { 11 | return ( 12 | 13 | { props.children } 14 | 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/search", 5 | "isValid": true, 6 | "attributes": { 7 | "label": "Search", 8 | "placeholder": "", 9 | "buttonText": "Search" 10 | }, 11 | "innerBlocks": [], 12 | "originalContent": "" 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__spacer.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/spacer", 5 | "isValid": true, 6 | "attributes": { 7 | "height": 100 8 | }, 9 | "innerBlocks": [], 10 | "originalContent": "
" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/editor/src/components/server-side-render/README.md: -------------------------------------------------------------------------------- 1 | # ServerSideRender 2 | 3 | This utility component is a wrapper for the generic ServerSideRender in `@wordpress/components`. It adds the `post_id` parameter to the `urlQueryArgs` prop of the wrapped component. Use this component to ensure that the global `$post` object is set up properly in the server-side `render_callback` when rendering within the editor. 4 | -------------------------------------------------------------------------------- /packages/block-library/src/html/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import { SVG, Path } from '@wordpress/components'; 5 | 6 | export default ( 7 | 8 | ); 9 | -------------------------------------------------------------------------------- /packages/components/src/color-indicator/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * External dependencies 3 | */ 4 | import classnames from 'classnames'; 5 | 6 | const ColorIndicator = ( { className, colorValue, ...props } ) => ( 7 | 12 | ); 13 | 14 | export default ColorIndicator; 15 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-identifiers/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Function declaration example. 3 | */ 4 | function functionDeclaration() {} 5 | 6 | /** 7 | * Class declaration example. 8 | */ 9 | class ClassDeclaration {} 10 | 11 | /** 12 | * Variable declaration example. 13 | */ 14 | const variableDeclaration = true; 15 | 16 | export { functionDeclaration, variableDeclaration, ClassDeclaration }; 17 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__4-invalid-starting-letter.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/freeform", 5 | "isValid": true, 6 | "attributes": { 7 | "content": "

" 8 | }, 9 | "innerBlocks": [], 10 | "originalContent": "

" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__subhead.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/subhead", 5 | "isValid": true, 6 | "attributes": { 7 | "content": "This is a subhead." 8 | }, 9 | "innerBlocks": [], 10 | "originalContent": "

This is a subhead.

" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /packages/edit-post/src/components/sidebar/post-author/style.scss: -------------------------------------------------------------------------------- 1 | .editor-post-author__select { 2 | margin: -5px 0; 3 | 4 | // Set the width of the author select box in IE11 to prevent it overflowing 5 | // outside of the container because of IE11 flexbox bugs. 6 | // We reset it to `width: auto;` for non-IE11 browsers. 7 | width: 100%; 8 | @supports (position: sticky) { 9 | width: auto; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/integration/fixtures/shortcode-caption-with-link.html: -------------------------------------------------------------------------------- 1 | [caption id="attachment_754" align="alignnone" width="604"]Bell on Wharf Bell on wharf in San Francisco[/caption] 2 | -------------------------------------------------------------------------------- /packages/block-editor/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WordPress dependencies 3 | */ 4 | import '@wordpress/blocks'; 5 | import '@wordpress/core-data'; 6 | import '@wordpress/rich-text'; 7 | import '@wordpress/viewport'; 8 | 9 | /** 10 | * Internal dependencies 11 | */ 12 | import './store'; 13 | import './hooks'; 14 | 15 | export * from './components'; 16 | 17 | export { SETTINGS_DEFAULTS } from './store/defaults'; 18 | -------------------------------------------------------------------------------- /packages/docgen/src/test/fixtures/named-identifiers-and-inline/code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Function declaration example. 3 | */ 4 | function functionDeclaration() {} 5 | 6 | /** 7 | * Class declaration example. 8 | */ 9 | class ClassDeclaration {} 10 | 11 | export { functionDeclaration, ClassDeclaration }; 12 | 13 | /** 14 | * Variable declaration example. 15 | */ 16 | export const variableDeclaration = true; 17 | 18 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__group.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

This is a group block.

5 | 6 | 7 | 8 |

Group block content.

9 |
10 | 11 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__group.serialized.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

This is a group block.

4 | 5 | 6 | 7 |

Group block content.

8 |
9 | 10 | -------------------------------------------------------------------------------- /packages/e2e-tests/fixtures/blocks/core__invalid-Capitals.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "clientId": "_clientId_0", 4 | "name": "core/freeform", 5 | "isValid": true, 6 | "attributes": { 7 | "content": "

" 8 | }, 9 | "innerBlocks": [], 10 | "originalContent": "

" 11 | } 12 | ] 13 | --------------------------------------------------------------------------------