diff --git a/package-lock.json b/package-lock.json index c10f94d37dc8b..995c1ea58fa61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53640,6 +53640,7 @@ "@wordpress/deprecated": "file:../deprecated", "@wordpress/dom": "file:../dom", "@wordpress/element": "file:../element", + "@wordpress/fields": "file:../fields", "@wordpress/hooks": "file:../hooks", "@wordpress/html-entities": "file:../html-entities", "@wordpress/i18n": "file:../i18n", @@ -53901,7 +53902,27 @@ "version": "0.0.1", "license": "GPL-2.0-or-later", "dependencies": { - "@babel/runtime": "^7.16.0" + "@babel/runtime": "^7.16.0", + "@wordpress/blob": "file:../blob", + "@wordpress/blocks": "file:../blocks", + "@wordpress/components": "file:../components", + "@wordpress/compose": "file:../compose", + "@wordpress/core-data": "file:../core-data", + "@wordpress/data": "file:../data", + "@wordpress/dataviews": "file:../dataviews", + "@wordpress/element": "file:../element", + "@wordpress/hooks": "file:../hooks", + "@wordpress/html-entities": "file:../html-entities", + "@wordpress/i18n": "file:../i18n", + "@wordpress/icons": "file:../icons", + "@wordpress/notices": "file:../notices", + "@wordpress/patterns": "file:../patterns", + "@wordpress/primitives": "file:../primitives", + "@wordpress/private-apis": "file:../private-apis", + "@wordpress/url": "file:../url", + "@wordpress/warning": "file:../warning", + "change-case": "4.1.2", + "client-zip": "^2.4.5" }, "engines": { "node": ">=18.12.0", @@ -68290,6 +68311,7 @@ "@wordpress/deprecated": "file:../deprecated", "@wordpress/dom": "file:../dom", "@wordpress/element": "file:../element", + "@wordpress/fields": "file:../fields", "@wordpress/hooks": "file:../hooks", "@wordpress/html-entities": "file:../html-entities", "@wordpress/i18n": "file:../i18n", @@ -68471,7 +68493,27 @@ "@wordpress/fields": { "version": "file:packages/fields", "requires": { - "@babel/runtime": "^7.16.0" + "@babel/runtime": "^7.16.0", + "@wordpress/blob": "file:../blob", + "@wordpress/blocks": "file:../blocks", + "@wordpress/components": "file:../components", + "@wordpress/compose": "file:../compose", + "@wordpress/core-data": "file:../core-data", + "@wordpress/data": "file:../data", + "@wordpress/dataviews": "file:../dataviews", + "@wordpress/element": "file:../element", + "@wordpress/hooks": "file:../hooks", + "@wordpress/html-entities": "file:../html-entities", + "@wordpress/i18n": "file:../i18n", + "@wordpress/icons": "file:../icons", + "@wordpress/notices": "file:../notices", + "@wordpress/patterns": "file:../patterns", + "@wordpress/primitives": "file:../primitives", + "@wordpress/private-apis": "file:../private-apis", + "@wordpress/url": "file:../url", + "@wordpress/warning": "file:../warning", + "change-case": "4.1.2", + "client-zip": "^2.4.5" } }, "@wordpress/format-library": { diff --git a/packages/editor/package.json b/packages/editor/package.json index a9d486b74e79c..2e01aff3a0aa5 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -47,6 +47,7 @@ "@wordpress/deprecated": "file:../deprecated", "@wordpress/dom": "file:../dom", "@wordpress/element": "file:../element", + "@wordpress/fields": "file:../fields", "@wordpress/hooks": "file:../hooks", "@wordpress/html-entities": "file:../html-entities", "@wordpress/i18n": "file:../i18n", diff --git a/packages/editor/src/dataviews/store/private-actions.ts b/packages/editor/src/dataviews/store/private-actions.ts index a9101e57dd08b..e685493641f3b 100644 --- a/packages/editor/src/dataviews/store/private-actions.ts +++ b/packages/editor/src/dataviews/store/private-actions.ts @@ -8,22 +8,24 @@ import { doAction } from '@wordpress/hooks'; /** * Internal dependencies */ -import deletePost from '../actions/delete-post'; -import duplicatePattern from '../actions/duplicate-pattern'; import duplicateTemplatePart from '../actions/duplicate-template-part'; -import exportPattern from '../actions/export-pattern'; import resetPost from '../actions/reset-post'; import trashPost from '../actions/trash-post'; -import permanentlyDeletePost from '../actions/permanently-delete-post'; import renamePost from '../actions/rename-post'; -import reorderPage from '../actions/reorder-page'; import restorePost from '../actions/restore-post'; import type { PostType } from '../types'; import { store as editorStore } from '../../store'; import { unlock } from '../../lock-unlock'; -import duplicatePost from '../actions/duplicate-post'; -import viewPostRevisions from '../actions/view-post-revisions'; -import viewPost from '../actions/view-post'; +import { + viewPost, + viewPostRevisions, + duplicatePost, + duplicatePattern, + reorderPage, + exportPattern, + permanentlyDeletePost, +} from '@wordpress/fields'; +import deletePost from '../actions/delete-post'; export function registerEntityAction< Item >( kind: string, diff --git a/packages/editor/tsconfig.json b/packages/editor/tsconfig.json index 55d79babd1dac..3c45fbcb10db3 100644 --- a/packages/editor/tsconfig.json +++ b/packages/editor/tsconfig.json @@ -20,6 +20,7 @@ { "path": "../deprecated" }, { "path": "../dom" }, { "path": "../element" }, + { "path": "../fields" }, { "path": "../hooks" }, { "path": "../html-entities" }, { "path": "../i18n" }, diff --git a/packages/fields/README.md b/packages/fields/README.md index c5044d1e9fdd2..842fab02606af 100644 --- a/packages/fields/README.md +++ b/packages/fields/README.md @@ -14,7 +14,53 @@ npm install @wordpress/fields --save -Nothing to document. +### duplicatePattern + +Undocumented declaration. + +### duplicatePost + +Undocumented declaration. + +### duplicatePostNative + +Undocumented declaration. + +### exportPattern + +Undocumented declaration. + +### exportPatternNative + +Undocumented declaration. + +### orderField + +Undocumented declaration. + +### permanentlyDeletePost + +Undocumented declaration. + +### reorderPage + +Undocumented declaration. + +### reorderPageNative + +Undocumented declaration. + +### titleField + +Undocumented declaration. + +### viewPost + +Undocumented declaration. + +### viewPostRevisions + +Undocumented declaration. diff --git a/packages/fields/package.json b/packages/fields/package.json index 4d5d33a10e5ed..ba687e6db1bc8 100644 --- a/packages/fields/package.json +++ b/packages/fields/package.json @@ -24,13 +24,34 @@ }, "main": "build/index.js", "module": "build-module/index.js", + "react-native": "src/index", "types": "build-types", "sideEffects": [ "build-style/**", "src/**/*.scss" ], "dependencies": { - "@babel/runtime": "^7.16.0" + "@babel/runtime": "^7.16.0", + "@wordpress/blob": "file:../blob", + "@wordpress/blocks": "file:../blocks", + "@wordpress/components": "file:../components", + "@wordpress/compose": "file:../compose", + "@wordpress/core-data": "file:../core-data", + "@wordpress/data": "file:../data", + "@wordpress/dataviews": "file:../dataviews", + "@wordpress/element": "file:../element", + "@wordpress/hooks": "file:../hooks", + "@wordpress/html-entities": "file:../html-entities", + "@wordpress/i18n": "file:../i18n", + "@wordpress/icons": "file:../icons", + "@wordpress/notices": "file:../notices", + "@wordpress/patterns": "file:../patterns", + "@wordpress/primitives": "file:../primitives", + "@wordpress/private-apis": "file:../private-apis", + "@wordpress/url": "file:../url", + "@wordpress/warning": "file:../warning", + "change-case": "4.1.2", + "client-zip": "^2.4.5" }, "peerDependencies": { "react": "^18.0.0" diff --git a/packages/editor/src/dataviews/actions/duplicate-post.native.tsx b/packages/fields/src/actions/base-post/duplicate-post.native.tsx similarity index 100% rename from packages/editor/src/dataviews/actions/duplicate-post.native.tsx rename to packages/fields/src/actions/base-post/duplicate-post.native.tsx diff --git a/packages/editor/src/dataviews/actions/duplicate-post.tsx b/packages/fields/src/actions/base-post/duplicate-post.tsx similarity index 96% rename from packages/editor/src/dataviews/actions/duplicate-post.tsx rename to packages/fields/src/actions/base-post/duplicate-post.tsx index 0979d30da3951..0035a40c00934 100644 --- a/packages/editor/src/dataviews/actions/duplicate-post.tsx +++ b/packages/fields/src/actions/base-post/duplicate-post.tsx @@ -18,9 +18,9 @@ import type { Action } from '@wordpress/dataviews'; /** * Internal dependencies */ -import { getItemTitle } from '../../dataviews/actions/utils'; -import type { CoreDataError, BasePost } from '../types'; -import { titleField } from '../fields'; +import { titleField } from '../../fields'; +import type { BasePost, CoreDataError } from '../../types'; +import { getItemTitle } from '../utils'; const fields = [ titleField ]; const formDuplicateAction = { diff --git a/packages/fields/src/actions/base-post/index.ts b/packages/fields/src/actions/base-post/index.ts new file mode 100644 index 0000000000000..7541be86c48b1 --- /dev/null +++ b/packages/fields/src/actions/base-post/index.ts @@ -0,0 +1,5 @@ +export { default as viewPost } from './view-post'; +export { default as reorderPage } from './reorder-page'; +export { default as reorderPageNative } from './reorder-page.native'; +export { default as duplicatePost } from './duplicate-post'; +export { default as duplicatePostNative } from './duplicate-post.native'; diff --git a/packages/editor/src/dataviews/actions/reorder-page.native.tsx b/packages/fields/src/actions/base-post/reorder-page.native.tsx similarity index 100% rename from packages/editor/src/dataviews/actions/reorder-page.native.tsx rename to packages/fields/src/actions/base-post/reorder-page.native.tsx diff --git a/packages/editor/src/dataviews/actions/reorder-page.tsx b/packages/fields/src/actions/base-post/reorder-page.tsx similarity index 96% rename from packages/editor/src/dataviews/actions/reorder-page.tsx rename to packages/fields/src/actions/base-post/reorder-page.tsx index 1820884d8d8c7..7f3bca59c471c 100644 --- a/packages/editor/src/dataviews/actions/reorder-page.tsx +++ b/packages/fields/src/actions/base-post/reorder-page.tsx @@ -17,8 +17,8 @@ import type { Action, RenderModalProps } from '@wordpress/dataviews'; /** * Internal dependencies */ -import type { CoreDataError, BasePost } from '../types'; -import { orderField } from '../fields'; +import type { CoreDataError, BasePost } from '../../types'; +import { orderField } from '../../fields'; const fields = [ orderField ]; const formOrderAction = { diff --git a/packages/editor/src/dataviews/actions/view-post.tsx b/packages/fields/src/actions/base-post/view-post.tsx similarity index 92% rename from packages/editor/src/dataviews/actions/view-post.tsx rename to packages/fields/src/actions/base-post/view-post.tsx index 187faffafb5d3..8c581877e473b 100644 --- a/packages/editor/src/dataviews/actions/view-post.tsx +++ b/packages/fields/src/actions/base-post/view-post.tsx @@ -8,7 +8,7 @@ import type { Action } from '@wordpress/dataviews'; /** * Internal dependencies */ -import type { BasePost } from '../types'; +import type { BasePost } from '../../types'; const viewPost: Action< BasePost > = { id: 'view-post', diff --git a/packages/fields/src/actions/common/index.ts b/packages/fields/src/actions/common/index.ts new file mode 100644 index 0000000000000..3590b2e270892 --- /dev/null +++ b/packages/fields/src/actions/common/index.ts @@ -0,0 +1,2 @@ +export { default as viewPostRevisions } from './view-post-revisions'; +export { default as permanentlyDeletePost } from './permanently-delete-post'; diff --git a/packages/editor/src/dataviews/actions/permanently-delete-post.tsx b/packages/fields/src/actions/common/permanently-delete-post.tsx similarity index 96% rename from packages/editor/src/dataviews/actions/permanently-delete-post.tsx rename to packages/fields/src/actions/common/permanently-delete-post.tsx index afbb84ae12c74..e0c1de96871f1 100644 --- a/packages/editor/src/dataviews/actions/permanently-delete-post.tsx +++ b/packages/fields/src/actions/common/permanently-delete-post.tsx @@ -10,8 +10,8 @@ import { trash } from '@wordpress/icons'; /** * Internal dependencies */ -import { getItemTitle, isTemplateOrTemplatePart } from './utils'; -import type { CoreDataError, PostWithPermissions } from '../types'; +import { getItemTitle, isTemplateOrTemplatePart } from '../utils'; +import type { CoreDataError, PostWithPermissions } from '../../types'; const permanentlyDeletePost: Action< PostWithPermissions > = { id: 'permanently-delete', diff --git a/packages/editor/src/dataviews/actions/view-post-revisions.tsx b/packages/fields/src/actions/common/view-post-revisions.tsx similarity index 96% rename from packages/editor/src/dataviews/actions/view-post-revisions.tsx rename to packages/fields/src/actions/common/view-post-revisions.tsx index 875b925b94f07..617a5263a707d 100644 --- a/packages/editor/src/dataviews/actions/view-post-revisions.tsx +++ b/packages/fields/src/actions/common/view-post-revisions.tsx @@ -8,7 +8,7 @@ import type { Action } from '@wordpress/dataviews'; /** * Internal dependencies */ -import type { Post } from '../types'; +import type { Post } from '../../types'; const viewPostRevisions: Action< Post > = { id: 'view-post-revisions', diff --git a/packages/fields/src/actions/index.ts b/packages/fields/src/actions/index.ts new file mode 100644 index 0000000000000..cf4fd6833f3fb --- /dev/null +++ b/packages/fields/src/actions/index.ts @@ -0,0 +1,3 @@ +export * from './base-post'; +export * from './common'; +export * from './pattern'; diff --git a/packages/editor/src/dataviews/actions/duplicate-pattern.tsx b/packages/fields/src/actions/pattern/duplicate-pattern.tsx similarity index 95% rename from packages/editor/src/dataviews/actions/duplicate-pattern.tsx rename to packages/fields/src/actions/pattern/duplicate-pattern.tsx index 98f43a27c3628..7c71a271997f1 100644 --- a/packages/editor/src/dataviews/actions/duplicate-pattern.tsx +++ b/packages/fields/src/actions/pattern/duplicate-pattern.tsx @@ -10,7 +10,7 @@ import type { Action } from '@wordpress/dataviews'; * Internal dependencies */ import { unlock } from '../../lock-unlock'; -import type { Pattern } from '../types'; +import type { Pattern } from '../../types'; // Patterns. const { CreatePatternModalContents, useDuplicatePatternProps } = diff --git a/packages/editor/src/dataviews/actions/export-pattern.native.tsx b/packages/fields/src/actions/pattern/export-pattern.native.tsx similarity index 100% rename from packages/editor/src/dataviews/actions/export-pattern.native.tsx rename to packages/fields/src/actions/pattern/export-pattern.native.tsx diff --git a/packages/editor/src/dataviews/actions/export-pattern.tsx b/packages/fields/src/actions/pattern/export-pattern.tsx similarity index 95% rename from packages/editor/src/dataviews/actions/export-pattern.tsx rename to packages/fields/src/actions/pattern/export-pattern.tsx index b6be83eeda84b..b0f6c3335544c 100644 --- a/packages/editor/src/dataviews/actions/export-pattern.tsx +++ b/packages/fields/src/actions/pattern/export-pattern.tsx @@ -15,8 +15,8 @@ import type { Action } from '@wordpress/dataviews'; /** * Internal dependencies */ -import type { Pattern } from '../types'; -import { getItemTitle } from './utils'; +import type { Pattern } from '../../types'; +import { getItemTitle } from '../utils'; function getJsonFromItem( item: Pattern ) { return JSON.stringify( diff --git a/packages/fields/src/actions/pattern/index.ts b/packages/fields/src/actions/pattern/index.ts new file mode 100644 index 0000000000000..827c2ce365c2c --- /dev/null +++ b/packages/fields/src/actions/pattern/index.ts @@ -0,0 +1,3 @@ +export { default as duplicatePattern } from './duplicate-pattern'; +export { default as exportPattern } from './export-pattern'; +export { default as exportPatternNative } from './export-pattern.native'; diff --git a/packages/fields/src/actions/utils.ts b/packages/fields/src/actions/utils.ts new file mode 100644 index 0000000000000..14e8edae4be04 --- /dev/null +++ b/packages/fields/src/actions/utils.ts @@ -0,0 +1,66 @@ +/** + * WordPress dependencies + */ +import { decodeEntities } from '@wordpress/html-entities'; + +/** + * Internal dependencies + */ +import type { Post, TemplatePart, Template } from '../types'; + +export const TEMPLATE_POST_TYPE = 'wp_template'; +export const TEMPLATE_PART_POST_TYPE = 'wp_template_part'; +export const TEMPLATE_ORIGINS = { + custom: 'custom', + theme: 'theme', + plugin: 'plugin', +}; + +export function isTemplate( post: Post ): post is Template { + return post.type === TEMPLATE_POST_TYPE; +} + +export function isTemplatePart( post: Post ): post is TemplatePart { + return post.type === TEMPLATE_PART_POST_TYPE; +} + +export function isTemplateOrTemplatePart( + p: Post +): p is Template | TemplatePart { + return p.type === TEMPLATE_POST_TYPE || p.type === TEMPLATE_PART_POST_TYPE; +} + +export function getItemTitle( item: Post ) { + if ( typeof item.title === 'string' ) { + return decodeEntities( item.title ); + } + if ( 'rendered' in item.title ) { + return decodeEntities( item.title.rendered ); + } + if ( 'raw' in item.title ) { + return decodeEntities( item.title.raw ); + } + return ''; +} + +/** + * Check if a template is removable. + * + * @param template The template entity to check. + * @return Whether the template is removable. + */ +export function isTemplateRemovable( template: Template | TemplatePart ) { + if ( ! template ) { + return false; + } + // In patterns list page we map the templates parts to a different object + // than the one returned from the endpoint. This is why we need to check for + // two props whether is custom or has a theme file. + return ( + [ template.source, template.source ].includes( + TEMPLATE_ORIGINS.custom + ) && + ! Boolean( template.type === 'wp_template' && template?.plugin ) && + ! template.has_theme_file + ); +} diff --git a/packages/fields/src/fields/index.ts b/packages/fields/src/fields/index.ts new file mode 100644 index 0000000000000..63ff87842fa4c --- /dev/null +++ b/packages/fields/src/fields/index.ts @@ -0,0 +1,2 @@ +export { default as titleField } from './title'; +export { default as orderField } from './order'; diff --git a/packages/fields/src/fields/order/index.ts b/packages/fields/src/fields/order/index.ts new file mode 100644 index 0000000000000..2fc0a216dcfa0 --- /dev/null +++ b/packages/fields/src/fields/order/index.ts @@ -0,0 +1,18 @@ +/** + * WordPress dependencies + */ +import type { Field } from '@wordpress/dataviews'; +import { __ } from '@wordpress/i18n'; +/** + * Internal dependencies + */ +import type { BasePost } from '../../types'; + +const orderField: Field< BasePost > = { + type: 'integer', + id: 'menu_order', + label: __( 'Order' ), + description: __( 'Determines the order of pages.' ), +}; + +export default orderField; diff --git a/packages/fields/src/fields/title/index.ts b/packages/fields/src/fields/title/index.ts new file mode 100644 index 0000000000000..5332f476f8ff5 --- /dev/null +++ b/packages/fields/src/fields/title/index.ts @@ -0,0 +1,21 @@ +/** + * WordPress dependencies + */ +import type { Field } from '@wordpress/dataviews'; +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import type { BasePost } from '../../types'; +import { getItemTitle } from '../../actions/utils'; + +const titleField: Field< BasePost > = { + type: 'text', + id: 'title', + label: __( 'Title' ), + placeholder: __( 'No title' ), + getValue: ( { item } ) => getItemTitle( item ), +}; + +export default titleField; diff --git a/packages/fields/src/index.native.ts b/packages/fields/src/index.native.ts new file mode 100644 index 0000000000000..e4d3134d72f84 --- /dev/null +++ b/packages/fields/src/index.native.ts @@ -0,0 +1,2 @@ +export * from './actions/base-post/duplicate-post.native'; +export * from './actions/base-post/reorder-page.native'; diff --git a/packages/fields/src/index.ts b/packages/fields/src/index.ts index e69de29bb2d1d..4c721b85b61a4 100644 --- a/packages/fields/src/index.ts +++ b/packages/fields/src/index.ts @@ -0,0 +1,2 @@ +export * from './fields'; +export * from './actions'; diff --git a/packages/fields/src/lock-unlock.ts b/packages/fields/src/lock-unlock.ts new file mode 100644 index 0000000000000..2b5dcc4a50631 --- /dev/null +++ b/packages/fields/src/lock-unlock.ts @@ -0,0 +1,9 @@ +/** + * WordPress dependencies + */ +import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; +export const { lock, unlock } = + __dangerousOptInToUnstableAPIsOnlyForCoreModules( + 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', + '@wordpress/fields' + ); diff --git a/packages/fields/src/types.ts b/packages/fields/src/types.ts new file mode 100644 index 0000000000000..664c2dd417201 --- /dev/null +++ b/packages/fields/src/types.ts @@ -0,0 +1,85 @@ +type PostStatus = + | 'published' + | 'draft' + | 'pending' + | 'private' + | 'future' + | 'auto-draft' + | 'trash'; + +export interface CommonPost { + status?: PostStatus; + title: string | { rendered: string } | { raw: string }; + content: string | { raw: string; rendered: string }; + type: string; + id: string | number; + blocks?: Object[]; + _links?: Links; +} + +interface Links { + 'predecessor-version'?: { href: string; id: number }[]; + 'version-history'?: { href: string; count: number }[]; + [ key: string ]: { href: string }[] | undefined; +} + +export interface BasePost extends CommonPost { + comment_status?: 'open' | 'closed'; + excerpt?: string | { raw: string; rendered: string }; + meta?: Record< string, any >; + parent?: number; + password?: string; + template?: string; + format?: string; + featured_media?: number; + menu_order?: number; + ping_status?: 'open' | 'closed'; + link?: string; +} + +export interface Template extends CommonPost { + type: 'wp_template'; + is_custom: boolean; + source: string; + origin: string; + plugin?: string; + has_theme_file: boolean; + id: string; +} + +export interface TemplatePart extends CommonPost { + type: 'wp_template_part'; + source: string; + origin: string; + has_theme_file: boolean; + id: string; + area: string; +} + +export interface Pattern extends CommonPost { + slug: string; + title: { raw: string }; + wp_pattern_sync_status: string; +} + +export type Post = Template | TemplatePart | Pattern | BasePost; + +export type PostWithPermissions = Post & { + permissions: { + delete: boolean; + update: boolean; + }; +}; + +export interface PostType { + slug: string; + viewable: boolean; + supports?: { + 'page-attributes'?: boolean; + title?: boolean; + revisions?: boolean; + }; +} + +// Will be unnecessary after typescript 5.0 upgrade. +export type CoreDataError = { message?: string; code?: string }; diff --git a/packages/fields/src/wordpress-editor.d.ts b/packages/fields/src/wordpress-editor.d.ts new file mode 100644 index 0000000000000..915dacd5f05a9 --- /dev/null +++ b/packages/fields/src/wordpress-editor.d.ts @@ -0,0 +1 @@ +declare module '@wordpress/editor'; diff --git a/packages/fields/tsconfig.json b/packages/fields/tsconfig.json index 79aa09d0ad56e..c55be59acf40f 100644 --- a/packages/fields/tsconfig.json +++ b/packages/fields/tsconfig.json @@ -6,6 +6,24 @@ "declarationDir": "build-types", "checkJs": false }, - "references": [], - "include": [ "src" ] + "references": [ + { "path": "../components" }, + { "path": "../compose" }, + { "path": "../data" }, + { "path": "../element" }, + { "path": "../i18n" }, + { "path": "../icons" }, + { "path": "../primitives" }, + { "path": "../private-apis" }, + { "path": "../warning" }, + { "path": "../url" }, + { "path": "../notices" }, + { "path": "../dataviews" }, + { "path": "../blob" }, + { "path": "../core-data" }, + { "path": "../hooks" }, + { "path": "../html-entities" } + ], + "include": [ "src" ], + "exclude": [ "@wordpress/editor" ] }