@wordpress/core-data 6.32.0 → 6.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/actions.js.map +1 -1
- package/build/batch/create-batch.js.map +1 -1
- package/build/batch/default-processor.js.map +1 -1
- package/build/batch/index.js.map +1 -1
- package/build/entities.js.map +1 -1
- package/build/entity-provider.js.map +1 -1
- package/build/entity-types/attachment.js.map +1 -1
- package/build/entity-types/base-entity-records.js.map +1 -1
- package/build/entity-types/comment.js.map +1 -1
- package/build/entity-types/global-styles-revision.js.map +1 -1
- package/build/entity-types/helpers.js.map +1 -1
- package/build/entity-types/index.js.map +1 -1
- package/build/entity-types/menu-location.js.map +1 -1
- package/build/entity-types/nav-menu-item.js.map +1 -1
- package/build/entity-types/nav-menu.js.map +1 -1
- package/build/entity-types/page.js.map +1 -1
- package/build/entity-types/plugin.js.map +1 -1
- package/build/entity-types/post-revision.js.map +1 -1
- package/build/entity-types/post.js.map +1 -1
- package/build/entity-types/settings.js.map +1 -1
- package/build/entity-types/sidebar.js.map +1 -1
- package/build/entity-types/taxonomy.js.map +1 -1
- package/build/entity-types/theme.js.map +1 -1
- package/build/entity-types/type.js.map +1 -1
- package/build/entity-types/user.js.map +1 -1
- package/build/entity-types/widget-type.js.map +1 -1
- package/build/entity-types/widget.js.map +1 -1
- package/build/entity-types/wp-template-part.js.map +1 -1
- package/build/entity-types/wp-template.js.map +1 -1
- package/build/fetch/__experimental-fetch-link-suggestions.js.map +1 -1
- package/build/fetch/__experimental-fetch-url-data.js.map +1 -1
- package/build/fetch/index.js.map +1 -1
- package/build/footnotes/get-footnotes-order.js.map +1 -1
- package/build/footnotes/get-rich-text-values-cached.js.map +1 -1
- package/build/footnotes/index.js.map +1 -1
- package/build/hooks/constants.js.map +1 -1
- package/build/hooks/index.js +1 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/memoize.js.map +1 -1
- package/build/hooks/use-entity-record.js.map +1 -1
- package/build/hooks/use-entity-records.js.map +1 -1
- package/build/hooks/use-query-select.js.map +1 -1
- package/build/hooks/use-resource-permissions.js +4 -0
- package/build/hooks/use-resource-permissions.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/locks/actions.js.map +1 -1
- package/build/locks/engine.js.map +1 -1
- package/build/locks/reducer.js.map +1 -1
- package/build/locks/selectors.js.map +1 -1
- package/build/locks/utils.js.map +1 -1
- package/build/name.js.map +1 -1
- package/build/private-apis.js.map +1 -1
- package/build/private-selectors.js +3 -5
- package/build/private-selectors.js.map +1 -1
- package/build/queried-data/actions.js.map +1 -1
- package/build/queried-data/get-query-parts.js.map +1 -1
- package/build/queried-data/index.js.map +1 -1
- package/build/queried-data/reducer.js.map +1 -1
- package/build/queried-data/selectors.js +6 -2
- package/build/queried-data/selectors.js.map +1 -1
- package/build/reducer.js.map +1 -1
- package/build/resolvers.js +25 -21
- package/build/resolvers.js.map +1 -1
- package/build/selectors.js +21 -13
- package/build/selectors.js.map +1 -1
- package/build/sync.js.map +1 -1
- package/build/types.js.map +1 -1
- package/build/utils/conservative-map-item.js.map +1 -1
- package/build/utils/forward-resolver.js.map +1 -1
- package/build/utils/get-nested-value.js.map +1 -1
- package/build/utils/get-normalized-comma-separable.js.map +1 -1
- package/build/utils/if-matching-action.js.map +1 -1
- package/build/utils/index.js.map +1 -1
- package/build/utils/is-numeric-id.js.map +1 -1
- package/build/utils/is-raw-attribute.js.map +1 -1
- package/build/utils/on-sub-key.js.map +1 -1
- package/build/utils/replace-action.js.map +1 -1
- package/build/utils/set-nested-value.js.map +1 -1
- package/build/utils/with-weak-map-cache.js.map +1 -1
- package/build-module/actions.js.map +1 -1
- package/build-module/batch/create-batch.js.map +1 -1
- package/build-module/batch/default-processor.js.map +1 -1
- package/build-module/batch/index.js.map +1 -1
- package/build-module/entities.js.map +1 -1
- package/build-module/entity-provider.js.map +1 -1
- package/build-module/entity-types/attachment.js.map +1 -1
- package/build-module/entity-types/base-entity-records.js.map +1 -1
- package/build-module/entity-types/comment.js.map +1 -1
- package/build-module/entity-types/global-styles-revision.js.map +1 -1
- package/build-module/entity-types/helpers.js.map +1 -1
- package/build-module/entity-types/index.js.map +1 -1
- package/build-module/entity-types/menu-location.js.map +1 -1
- package/build-module/entity-types/nav-menu-item.js.map +1 -1
- package/build-module/entity-types/nav-menu.js.map +1 -1
- package/build-module/entity-types/page.js.map +1 -1
- package/build-module/entity-types/plugin.js.map +1 -1
- package/build-module/entity-types/post-revision.js.map +1 -1
- package/build-module/entity-types/post.js.map +1 -1
- package/build-module/entity-types/settings.js.map +1 -1
- package/build-module/entity-types/sidebar.js.map +1 -1
- package/build-module/entity-types/taxonomy.js.map +1 -1
- package/build-module/entity-types/theme.js.map +1 -1
- package/build-module/entity-types/type.js.map +1 -1
- package/build-module/entity-types/user.js.map +1 -1
- package/build-module/entity-types/widget-type.js.map +1 -1
- package/build-module/entity-types/widget.js.map +1 -1
- package/build-module/entity-types/wp-template-part.js.map +1 -1
- package/build-module/entity-types/wp-template.js.map +1 -1
- package/build-module/fetch/__experimental-fetch-link-suggestions.js.map +1 -1
- package/build-module/fetch/__experimental-fetch-url-data.js.map +1 -1
- package/build-module/fetch/index.js.map +1 -1
- package/build-module/footnotes/get-footnotes-order.js.map +1 -1
- package/build-module/footnotes/get-rich-text-values-cached.js.map +1 -1
- package/build-module/footnotes/index.js.map +1 -1
- package/build-module/hooks/constants.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/memoize.js.map +1 -1
- package/build-module/hooks/use-entity-record.js.map +1 -1
- package/build-module/hooks/use-entity-records.js.map +1 -1
- package/build-module/hooks/use-query-select.js.map +1 -1
- package/build-module/hooks/use-resource-permissions.js +5 -0
- package/build-module/hooks/use-resource-permissions.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/locks/actions.js.map +1 -1
- package/build-module/locks/engine.js.map +1 -1
- package/build-module/locks/reducer.js.map +1 -1
- package/build-module/locks/selectors.js.map +1 -1
- package/build-module/locks/utils.js.map +1 -1
- package/build-module/name.js.map +1 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-selectors.js +1 -6
- package/build-module/private-selectors.js.map +1 -1
- package/build-module/queried-data/actions.js.map +1 -1
- package/build-module/queried-data/get-query-parts.js.map +1 -1
- package/build-module/queried-data/index.js.map +1 -1
- package/build-module/queried-data/reducer.js.map +1 -1
- package/build-module/queried-data/selectors.js +5 -1
- package/build-module/queried-data/selectors.js.map +1 -1
- package/build-module/reducer.js.map +1 -1
- package/build-module/resolvers.js +25 -21
- package/build-module/resolvers.js.map +1 -1
- package/build-module/selectors.js +15 -6
- package/build-module/selectors.js.map +1 -1
- package/build-module/sync.js.map +1 -1
- package/build-module/types.js.map +1 -1
- package/build-module/utils/conservative-map-item.js.map +1 -1
- package/build-module/utils/forward-resolver.js.map +1 -1
- package/build-module/utils/get-nested-value.js.map +1 -1
- package/build-module/utils/get-normalized-comma-separable.js.map +1 -1
- package/build-module/utils/if-matching-action.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/is-numeric-id.js.map +1 -1
- package/build-module/utils/is-raw-attribute.js.map +1 -1
- package/build-module/utils/on-sub-key.js.map +1 -1
- package/build-module/utils/replace-action.js.map +1 -1
- package/build-module/utils/set-nested-value.js.map +1 -1
- package/build-module/utils/with-weak-map-cache.js.map +1 -1
- package/build-types/actions.d.ts.map +1 -1
- package/build-types/entities.d.ts.map +1 -1
- package/build-types/private-selectors.d.ts.map +1 -1
- package/build-types/queried-data/selectors.d.ts.map +1 -1
- package/build-types/resolvers.d.ts +2 -1
- package/build-types/resolvers.d.ts.map +1 -1
- package/build-types/selectors.d.ts.map +1 -1
- package/package.json +17 -18
- package/src/private-selectors.ts +1 -6
- package/src/queried-data/selectors.js +5 -1
- package/src/resolvers.js +34 -30
- package/src/selectors.ts +1 -6
- package/src/test/resolvers.js +4 -3
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseEntityRecords"],"sources":["@wordpress/core-data/src/entity-types/base-entity-records.ts"],"sourcesContent":["/**\n * This module exists solely to make the BaseEntityRecords namespace extensible\n * with declaration merging:\n *\n * ```ts\n * declare module './base-entity-records' {\n * export namespace BaseEntityRecords {\n * \t\t export interface Comment< C extends Context > {\n * \t\t id: number;\n * \t\t // ...\n * \t }\n * \t }\n * }\n * ```\n *\n * The huge upside is that consumers of @wordpress/core-data may extend the\n * exported data types using interface merging as follows:\n *\n * ```ts\n * import type { Context } from '@wordpress/core-data';\n * declare module '@wordpress/core-data' {\n * export namespace BaseEntityRecords {\n * export interface Comment< C extends Context > {\n * numberOfViews: number;\n * }\n * }\n * }\n *\n * import type { Comment } from '@wordpress/core-data';\n * const c : Comment< 'view' > = ...;\n *\n * // c.numberOfViews is a number\n * // c.id is still present\n * ```\n */\nexport namespace BaseEntityRecords {}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlCA,WAmCiBA,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["BaseEntityRecords"],"sources":["@wordpress/core-data/src/entity-types/base-entity-records.ts"],"sourcesContent":["/**\n * This module exists solely to make the BaseEntityRecords namespace extensible\n * with declaration merging:\n *\n * ```ts\n * declare module './base-entity-records' {\n * export namespace BaseEntityRecords {\n * \t\t export interface Comment< C extends Context > {\n * \t\t id: number;\n * \t\t // ...\n * \t }\n * \t }\n * }\n * ```\n *\n * The huge upside is that consumers of @wordpress/core-data may extend the\n * exported data types using interface merging as follows:\n *\n * ```ts\n * import type { Context } from '@wordpress/core-data';\n * declare module '@wordpress/core-data' {\n * export namespace BaseEntityRecords {\n * export interface Comment< C extends Context > {\n * numberOfViews: number;\n * }\n * }\n * }\n *\n * import type { Comment } from '@wordpress/core-data';\n * const c : Comment< 'view' > = ...;\n *\n * // c.numberOfViews is a number\n * // c.id is still present\n * ```\n */\nexport namespace BaseEntityRecords {}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlCA,WAmCiBA,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/comment.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tAvatarUrls,\n\tContext,\n\tContextualField,\n\tOmitNevers,\n\tRenderedText,\n} from './helpers';\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\nexport type CommentStatus = 'hold' | 'approve' | 'spam' | 'trash' | '1' | '0';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Comment< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique identifier for the comment.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * The ID of the user object, if author was a user.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * Email address for the comment author.\n\t\t\t */\n\t\t\tauthor_email: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * IP address for the comment author.\n\t\t\t */\n\t\t\tauthor_ip: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Display name for the comment author.\n\t\t\t */\n\t\t\tauthor_name: string;\n\t\t\t/**\n\t\t\t * URL for the comment author.\n\t\t\t */\n\t\t\tauthor_url: string;\n\t\t\t/**\n\t\t\t * User agent for the comment author.\n\t\t\t */\n\t\t\tauthor_user_agent: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The content for the comment.\n\t\t\t */\n\t\t\tcontent: RenderedText< C >;\n\t\t\t/**\n\t\t\t * The date the comment was published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string;\n\t\t\t/**\n\t\t\t * The date the comment was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * URL to the comment.\n\t\t\t */\n\t\t\tlink: string;\n\t\t\t/**\n\t\t\t * The ID for the parent of the comment.\n\t\t\t */\n\t\t\tparent: number;\n\t\t\t/**\n\t\t\t * The ID of the associated post object.\n\t\t\t */\n\t\t\tpost: ContextualField< number, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * State of the comment.\n\t\t\t */\n\t\t\tstatus: ContextualField< CommentStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Type of the comment.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * Avatar URLs for the comment author.\n\t\t\t */\n\t\t\tauthor_avatar_urls: AvatarUrls;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t}\n\t}\n}\n\nexport type Comment< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Comment< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/comment.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tAvatarUrls,\n\tContext,\n\tContextualField,\n\tOmitNevers,\n\tRenderedText,\n} from './helpers';\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\nexport type CommentStatus = 'hold' | 'approve' | 'spam' | 'trash' | '1' | '0';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Comment< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique identifier for the comment.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * The ID of the user object, if author was a user.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * Email address for the comment author.\n\t\t\t */\n\t\t\tauthor_email: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * IP address for the comment author.\n\t\t\t */\n\t\t\tauthor_ip: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Display name for the comment author.\n\t\t\t */\n\t\t\tauthor_name: string;\n\t\t\t/**\n\t\t\t * URL for the comment author.\n\t\t\t */\n\t\t\tauthor_url: string;\n\t\t\t/**\n\t\t\t * User agent for the comment author.\n\t\t\t */\n\t\t\tauthor_user_agent: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The content for the comment.\n\t\t\t */\n\t\t\tcontent: RenderedText< C >;\n\t\t\t/**\n\t\t\t * The date the comment was published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string;\n\t\t\t/**\n\t\t\t * The date the comment was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * URL to the comment.\n\t\t\t */\n\t\t\tlink: string;\n\t\t\t/**\n\t\t\t * The ID for the parent of the comment.\n\t\t\t */\n\t\t\tparent: number;\n\t\t\t/**\n\t\t\t * The ID of the associated post object.\n\t\t\t */\n\t\t\tpost: ContextualField< number, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * State of the comment.\n\t\t\t */\n\t\t\tstatus: ContextualField< CommentStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Type of the comment.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * Avatar URLs for the comment author.\n\t\t\t */\n\t\t\tauthor_avatar_urls: AvatarUrls;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t}\n\t}\n}\n\nexport type Comment< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Comment< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/global-styles-revision.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface GlobalStylesRevision< C extends Context > {\n\t\t\t/**\n\t\t\t * The ID for the author of the global styles revision.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * The date the post global styles revision published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string | null;\n\t\t\t/**\n\t\t\t * The date the global styles revision was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string | null, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the revision.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * The date the global styles revision was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The date the global styles revision was last modified, as GMT.\n\t\t\t */\n\t\t\tmodified_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Identifier for the parent of the revision.\n\t\t\t */\n\t\t\tparent: number;\n\t\t\tstyles: Record< string, Object >;\n\t\t\tsettings: Record< string, Object >;\n\t\t}\n\t}\n}\n\nexport type GlobalStylesRevision< C extends Context = 'view' > = OmitNevers<\n\t_BaseEntityRecords.GlobalStylesRevision< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/global-styles-revision.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface GlobalStylesRevision< C extends Context > {\n\t\t\t/**\n\t\t\t * The ID for the author of the global styles revision.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * The date the post global styles revision published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string | null;\n\t\t\t/**\n\t\t\t * The date the global styles revision was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string | null, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the revision.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * The date the global styles revision was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The date the global styles revision was last modified, as GMT.\n\t\t\t */\n\t\t\tmodified_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Identifier for the parent of the revision.\n\t\t\t */\n\t\t\tparent: number;\n\t\t\tstyles: Record< string, Object >;\n\t\t\tsettings: Record< string, Object >;\n\t\t}\n\t}\n}\n\nexport type GlobalStylesRevision< C extends Context = 'view' > = OmitNevers<\n\t_BaseEntityRecords.GlobalStylesRevision< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/helpers.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { EntityRecord } from './index';\n\nexport interface AvatarUrls {\n\t/**\n\t * Avatar URL with image size of 24 pixels.\n\t */\n\t'24': string;\n\t/**\n\t * Avatar URL with image size of 48 pixels.\n\t */\n\t'48': string;\n\t/**\n\t * Avatar URL with image size of 96 pixels.\n\t */\n\t'96': string;\n}\n\nexport type MediaType = 'image' | 'file';\nexport type CommentingStatus = 'open' | 'closed';\nexport type PingStatus = 'open' | 'closed';\nexport type PostStatus = 'publish' | 'future' | 'draft' | 'pending' | 'private';\nexport type PostFormat =\n\t| 'standard'\n\t| 'aside'\n\t| 'chat'\n\t| 'gallery'\n\t| 'link'\n\t| 'image'\n\t| 'quote'\n\t| 'status'\n\t| 'video'\n\t| 'audio';\n\n/**\n * The REST API context parameter.\n */\nexport type Context = 'view' | 'edit' | 'embed';\n\n/**\n * ContextualField makes the field available only in the specified given contexts,\n * and ensure the field is absent from the object when in a different context.\n *\n * @example\n * ```ts\n * interface Post< C extends Context > {\n * \t…\n * \tmodified: ContextualField< string, 'edit' | 'view', C >;\n * \tpassword: ContextualField< string, 'edit', C >;\n * \t…\n * }\n *\n * const post: Post<'edit'> = …\n * // post.modified exists as a string\n * // post.password exists as a string\n *\n * const post: Post<'view'> = …\n * // post.modified still exists as a string\n * // post.password is missing, undefined, because we're not in the `edit` context.\n * ```\n */\nexport type ContextualField<\n\tFieldType,\n\tAvailableInContexts extends Context,\n\tC extends Context,\n> = AvailableInContexts extends C ? FieldType : never;\n\n/**\n * Removes all the properties of type never, even the deeply nested ones.\n *\n * @example\n * ```ts\n * type MyType = {\n * foo: string;\n * bar: never;\n * nested: {\n * foo: string;\n * bar: never;\n * }\n * }\n * const x = {} as OmitNevers<MyType>;\n * // x is of type { foo: string; nested: { foo: string; }}\n * // The `never` properties were removed entirely\n * ```\n */\nexport type OmitNevers<\n\tT,\n\tNevers = {\n\t\t[ K in keyof T ]: Exclude< T[ K ], undefined > extends never\n\t\t\t? never\n\t\t\t: T[ K ] extends Record< string, unknown >\n\t\t\t? OmitNevers< T[ K ] >\n\t\t\t: T[ K ];\n\t},\n> = Pick<\n\tNevers,\n\t{\n\t\t[ K in keyof Nevers ]: Nevers[ K ] extends never ? never : K;\n\t}[ keyof Nevers ]\n>;\n\n/**\n * A string that the server renders which often involves\n * modifications from the raw source string.\n *\n * For example, block HTML with the comment delimiters exists\n * in `post_content` but those comments are stripped out when\n * rendering to a page view. Similarly, plugins might modify\n * content or replace shortcodes.\n */\nexport interface RenderedText< C extends Context > {\n\t/**\n\t * The source string which will be rendered on page views.\n\t */\n\traw: ContextualField< string, 'edit', C >;\n\t/**\n\t * The output of the raw source after processing and filtering on the server.\n\t */\n\trendered: string;\n}\n\n/**\n * Updatable<EntityRecord> is a type describing Edited Entity Records. They are like\n * regular Entity Records, but they have all the local edits applied on top of the REST API data.\n *\n * This turns certain field from an object into a string.\n *\n * Entities like Post have fields that only be rendered on the server, like title, excerpt,\n * and content. The REST API exposes both the raw markup and the rendered version of those fields.\n * For example, in the block editor, content.rendered could used as a visual preview, and\n * content.raw could be used to populate the code editor.\n *\n * When updating these rendered fields, Javascript is not be able to properly render arbitrary block\n * markup. Therefore, it stores only the raw markup without the rendered part. And since that's a string,\n * the entire field becomes a string.\n *\n * @example\n * ```ts\n * type Post< C extends Context > {\n * title: RenderedText< C >;\n * }\n * const post = {} as Post;\n * // post.title is an object with raw and rendered properties\n *\n * const updatablePost = {} as Updatable< Post >;\n * // updatablePost.title is a string\n * ```\n */\nexport type Updatable< T extends EntityRecord< 'edit' > > = {\n\t[ K in keyof T ]: T[ K ] extends RenderedText< any > ? string : T[ K ];\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/helpers.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { EntityRecord } from './index';\n\nexport interface AvatarUrls {\n\t/**\n\t * Avatar URL with image size of 24 pixels.\n\t */\n\t'24': string;\n\t/**\n\t * Avatar URL with image size of 48 pixels.\n\t */\n\t'48': string;\n\t/**\n\t * Avatar URL with image size of 96 pixels.\n\t */\n\t'96': string;\n}\n\nexport type MediaType = 'image' | 'file';\nexport type CommentingStatus = 'open' | 'closed';\nexport type PingStatus = 'open' | 'closed';\nexport type PostStatus = 'publish' | 'future' | 'draft' | 'pending' | 'private';\nexport type PostFormat =\n\t| 'standard'\n\t| 'aside'\n\t| 'chat'\n\t| 'gallery'\n\t| 'link'\n\t| 'image'\n\t| 'quote'\n\t| 'status'\n\t| 'video'\n\t| 'audio';\n\n/**\n * The REST API context parameter.\n */\nexport type Context = 'view' | 'edit' | 'embed';\n\n/**\n * ContextualField makes the field available only in the specified given contexts,\n * and ensure the field is absent from the object when in a different context.\n *\n * @example\n * ```ts\n * interface Post< C extends Context > {\n * \t…\n * \tmodified: ContextualField< string, 'edit' | 'view', C >;\n * \tpassword: ContextualField< string, 'edit', C >;\n * \t…\n * }\n *\n * const post: Post<'edit'> = …\n * // post.modified exists as a string\n * // post.password exists as a string\n *\n * const post: Post<'view'> = …\n * // post.modified still exists as a string\n * // post.password is missing, undefined, because we're not in the `edit` context.\n * ```\n */\nexport type ContextualField<\n\tFieldType,\n\tAvailableInContexts extends Context,\n\tC extends Context,\n> = AvailableInContexts extends C ? FieldType : never;\n\n/**\n * Removes all the properties of type never, even the deeply nested ones.\n *\n * @example\n * ```ts\n * type MyType = {\n * foo: string;\n * bar: never;\n * nested: {\n * foo: string;\n * bar: never;\n * }\n * }\n * const x = {} as OmitNevers<MyType>;\n * // x is of type { foo: string; nested: { foo: string; }}\n * // The `never` properties were removed entirely\n * ```\n */\nexport type OmitNevers<\n\tT,\n\tNevers = {\n\t\t[ K in keyof T ]: Exclude< T[ K ], undefined > extends never\n\t\t\t? never\n\t\t\t: T[ K ] extends Record< string, unknown >\n\t\t\t? OmitNevers< T[ K ] >\n\t\t\t: T[ K ];\n\t},\n> = Pick<\n\tNevers,\n\t{\n\t\t[ K in keyof Nevers ]: Nevers[ K ] extends never ? never : K;\n\t}[ keyof Nevers ]\n>;\n\n/**\n * A string that the server renders which often involves\n * modifications from the raw source string.\n *\n * For example, block HTML with the comment delimiters exists\n * in `post_content` but those comments are stripped out when\n * rendering to a page view. Similarly, plugins might modify\n * content or replace shortcodes.\n */\nexport interface RenderedText< C extends Context > {\n\t/**\n\t * The source string which will be rendered on page views.\n\t */\n\traw: ContextualField< string, 'edit', C >;\n\t/**\n\t * The output of the raw source after processing and filtering on the server.\n\t */\n\trendered: string;\n}\n\n/**\n * Updatable<EntityRecord> is a type describing Edited Entity Records. They are like\n * regular Entity Records, but they have all the local edits applied on top of the REST API data.\n *\n * This turns certain field from an object into a string.\n *\n * Entities like Post have fields that only be rendered on the server, like title, excerpt,\n * and content. The REST API exposes both the raw markup and the rendered version of those fields.\n * For example, in the block editor, content.rendered could used as a visual preview, and\n * content.raw could be used to populate the code editor.\n *\n * When updating these rendered fields, Javascript is not be able to properly render arbitrary block\n * markup. Therefore, it stores only the raw markup without the rendered part. And since that's a string,\n * the entire field becomes a string.\n *\n * @example\n * ```ts\n * type Post< C extends Context > {\n * title: RenderedText< C >;\n * }\n * const post = {} as Post;\n * // post.title is an object with raw and rendered properties\n *\n * const updatablePost = {} as Updatable< Post >;\n * // updatablePost.title is a string\n * ```\n */\nexport type Updatable< T extends EntityRecord< 'edit' > > = {\n\t[ K in keyof T ]: T[ K ] extends RenderedText< any > ? string : T[ K ];\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, Updatable } from './helpers';\nimport type { Attachment } from './attachment';\nimport type { Comment } from './comment';\nimport type { GlobalStylesRevision } from './global-styles-revision';\nimport type { MenuLocation } from './menu-location';\nimport type { NavMenu } from './nav-menu';\nimport type { NavMenuItem } from './nav-menu-item';\nimport type { Page } from './page';\nimport type { Plugin } from './plugin';\nimport type { Post } from './post';\nimport type { PostRevision } from './post-revision';\nimport type { Settings } from './settings';\nimport type { Sidebar } from './sidebar';\nimport type { Taxonomy } from './taxonomy';\nimport type { Theme } from './theme';\nimport type { User } from './user';\nimport type { Type } from './type';\nimport type { Widget } from './widget';\nimport type { WidgetType } from './widget-type';\nimport type { WpTemplate } from './wp-template';\nimport type { WpTemplatePart } from './wp-template-part';\n\nexport type { BaseEntityRecords } from './base-entity-records';\n\nexport type {\n\tAttachment,\n\tComment,\n\tContext,\n\tGlobalStylesRevision,\n\tMenuLocation,\n\tNavMenu,\n\tNavMenuItem,\n\tPage,\n\tPlugin,\n\tPost,\n\tPostRevision,\n\tSettings,\n\tSidebar,\n\tTaxonomy,\n\tTheme,\n\tUpdatable,\n\tUser,\n\tType,\n\tWidget,\n\tWidgetType,\n\tWpTemplate,\n\tWpTemplatePart,\n};\n\n/**\n * An interface that may be extended to add types for new entities. Each entry\n * must be a union of entity definitions adhering to the EntityInterface type.\n *\n * Example:\n *\n * ```ts\n * import type { Context } from '@wordpress/core-data';\n * // ...\n *\n * interface Client {\n * id: number;\n * name: string;\n * // ...\n * }\n *\n * interface Order< C extends Context > {\n * id: number;\n * name: string;\n * // ...\n * }\n *\n * declare module '@wordpress/core-data' {\n * export interface PerPackageEntityRecords< C extends Context > {\n * myPlugin: Client | Order<C>>\n * }\n * }\n *\n * const c = getEntityRecord<Order>( 'myPlugin', 'order', 15 );\n * // c is of the type Order\n * ```\n */\nexport interface PerPackageEntityRecords< C extends Context > {\n\tcore:\n\t\t| Attachment< C >\n\t\t| Comment< C >\n\t\t| GlobalStylesRevision< C >\n\t\t| MenuLocation< C >\n\t\t| NavMenu< C >\n\t\t| NavMenuItem< C >\n\t\t| Page< C >\n\t\t| Plugin< C >\n\t\t| Post< C >\n\t\t| PostRevision< C >\n\t\t| Settings< C >\n\t\t| Sidebar< C >\n\t\t| Taxonomy< C >\n\t\t| Theme< C >\n\t\t| User< C >\n\t\t| Type< C >\n\t\t| Widget< C >\n\t\t| WidgetType< C >\n\t\t| WpTemplate< C >\n\t\t| WpTemplatePart< C >;\n}\n\n/**\n * A union of all known record types.\n */\nexport type EntityRecord< C extends Context = 'edit' > =\n\tPerPackageEntityRecords< C >[ keyof PerPackageEntityRecords< C > ];\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, Updatable } from './helpers';\nimport type { Attachment } from './attachment';\nimport type { Comment } from './comment';\nimport type { GlobalStylesRevision } from './global-styles-revision';\nimport type { MenuLocation } from './menu-location';\nimport type { NavMenu } from './nav-menu';\nimport type { NavMenuItem } from './nav-menu-item';\nimport type { Page } from './page';\nimport type { Plugin } from './plugin';\nimport type { Post } from './post';\nimport type { PostRevision } from './post-revision';\nimport type { Settings } from './settings';\nimport type { Sidebar } from './sidebar';\nimport type { Taxonomy } from './taxonomy';\nimport type { Theme } from './theme';\nimport type { User } from './user';\nimport type { Type } from './type';\nimport type { Widget } from './widget';\nimport type { WidgetType } from './widget-type';\nimport type { WpTemplate } from './wp-template';\nimport type { WpTemplatePart } from './wp-template-part';\n\nexport type { BaseEntityRecords } from './base-entity-records';\n\nexport type {\n\tAttachment,\n\tComment,\n\tContext,\n\tGlobalStylesRevision,\n\tMenuLocation,\n\tNavMenu,\n\tNavMenuItem,\n\tPage,\n\tPlugin,\n\tPost,\n\tPostRevision,\n\tSettings,\n\tSidebar,\n\tTaxonomy,\n\tTheme,\n\tUpdatable,\n\tUser,\n\tType,\n\tWidget,\n\tWidgetType,\n\tWpTemplate,\n\tWpTemplatePart,\n};\n\n/**\n * An interface that may be extended to add types for new entities. Each entry\n * must be a union of entity definitions adhering to the EntityInterface type.\n *\n * Example:\n *\n * ```ts\n * import type { Context } from '@wordpress/core-data';\n * // ...\n *\n * interface Client {\n * id: number;\n * name: string;\n * // ...\n * }\n *\n * interface Order< C extends Context > {\n * id: number;\n * name: string;\n * // ...\n * }\n *\n * declare module '@wordpress/core-data' {\n * export interface PerPackageEntityRecords< C extends Context > {\n * myPlugin: Client | Order<C>>\n * }\n * }\n *\n * const c = getEntityRecord<Order>( 'myPlugin', 'order', 15 );\n * // c is of the type Order\n * ```\n */\nexport interface PerPackageEntityRecords< C extends Context > {\n\tcore:\n\t\t| Attachment< C >\n\t\t| Comment< C >\n\t\t| GlobalStylesRevision< C >\n\t\t| MenuLocation< C >\n\t\t| NavMenu< C >\n\t\t| NavMenuItem< C >\n\t\t| Page< C >\n\t\t| Plugin< C >\n\t\t| Post< C >\n\t\t| PostRevision< C >\n\t\t| Settings< C >\n\t\t| Sidebar< C >\n\t\t| Taxonomy< C >\n\t\t| Theme< C >\n\t\t| User< C >\n\t\t| Type< C >\n\t\t| Widget< C >\n\t\t| WidgetType< C >\n\t\t| WpTemplate< C >\n\t\t| WpTemplatePart< C >;\n}\n\n/**\n * A union of all known record types.\n */\nexport type EntityRecord< C extends Context = 'edit' > =\n\tPerPackageEntityRecords< C >[ keyof PerPackageEntityRecords< C > ];\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/menu-location.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface MenuLocation< C extends Context > {\n\t\t\t/**\n\t\t\t * The name of the menu location.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * The description of the menu location.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * The ID of the assigned menu.\n\t\t\t */\n\t\t\tmenu: number;\n\t\t}\n\t}\n}\n\nexport type MenuLocation< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.MenuLocation< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/menu-location.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface MenuLocation< C extends Context > {\n\t\t\t/**\n\t\t\t * The name of the menu location.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * The description of the menu location.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * The ID of the assigned menu.\n\t\t\t */\n\t\t\tmenu: number;\n\t\t}\n\t}\n}\n\nexport type MenuLocation< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.MenuLocation< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/nav-menu-item.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tRenderedText,\n\tContext,\n\tContextualField,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\nexport type NavMenuItemType =\n\t| 'taxonomy'\n\t| 'post_type'\n\t| 'post_type_archive'\n\t| 'custom';\nexport type NavMenuItemStatus =\n\t| 'publish'\n\t| 'future'\n\t| 'draft'\n\t| 'pending'\n\t| 'private';\nexport type Target = '_blank' | '';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface NavMenuItem< C extends Context > {\n\t\t\t/**\n\t\t\t * The title for the object.\n\t\t\t */\n\t\t\ttitle: RenderedText< C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the object.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * The singular label used to describe this type of menu item.\n\t\t\t */\n\t\t\ttype_label: string;\n\t\t\t/**\n\t\t\t * The family of objects originally represented, such as \"post_type\" or \"taxonomy\".\n\t\t\t */\n\t\t\ttype: NavMenuItemType;\n\t\t\t/**\n\t\t\t * A named status for the object.\n\t\t\t */\n\t\t\tstatus: NavMenuItemStatus;\n\t\t\t/**\n\t\t\t * The ID for the parent of the object.\n\t\t\t */\n\t\t\tparent: number;\n\t\t\t/**\n\t\t\t * Text for the title attribute of the link element for this menu item.\n\t\t\t */\n\t\t\tattr_title: string;\n\t\t\t/**\n\t\t\t * Class names for the link element of this menu item.\n\t\t\t */\n\t\t\tclasses: string[];\n\t\t\t/**\n\t\t\t * The description of this menu item.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.\n\t\t\t */\n\t\t\tmenu_order: number;\n\t\t\t/**\n\t\t\t * The type of object originally represented, such as \"category\", \"post\", or \"attachment\".\n\t\t\t */\n\t\t\tobject: string;\n\t\t\t/**\n\t\t\t * The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.\n\t\t\t */\n\t\t\tobject_id: number;\n\t\t\t/**\n\t\t\t * The target attribute of the link element for this menu item.\n\t\t\t */\n\t\t\ttarget: Target;\n\t\t\t/**\n\t\t\t * The URL to which this menu item points.\n\t\t\t */\n\t\t\turl: string;\n\t\t\t/**\n\t\t\t * The XFN relationship expressed in the link of this menu item.\n\t\t\t */\n\t\t\txfn: string[];\n\t\t\t/**\n\t\t\t * Whether the menu item represents an object that no longer exists.\n\t\t\t */\n\t\t\tinvalid: boolean;\n\t\t\t/**\n\t\t\t * The terms assigned to the object in the nav_menu taxonomy.\n\t\t\t */\n\t\t\tmenus: ContextualField< number, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t}\n\t}\n}\n\nexport type NavMenuItem< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.NavMenuItem< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/nav-menu-item.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tRenderedText,\n\tContext,\n\tContextualField,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\nexport type NavMenuItemType =\n\t| 'taxonomy'\n\t| 'post_type'\n\t| 'post_type_archive'\n\t| 'custom';\nexport type NavMenuItemStatus =\n\t| 'publish'\n\t| 'future'\n\t| 'draft'\n\t| 'pending'\n\t| 'private';\nexport type Target = '_blank' | '';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface NavMenuItem< C extends Context > {\n\t\t\t/**\n\t\t\t * The title for the object.\n\t\t\t */\n\t\t\ttitle: RenderedText< C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the object.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * The singular label used to describe this type of menu item.\n\t\t\t */\n\t\t\ttype_label: string;\n\t\t\t/**\n\t\t\t * The family of objects originally represented, such as \"post_type\" or \"taxonomy\".\n\t\t\t */\n\t\t\ttype: NavMenuItemType;\n\t\t\t/**\n\t\t\t * A named status for the object.\n\t\t\t */\n\t\t\tstatus: NavMenuItemStatus;\n\t\t\t/**\n\t\t\t * The ID for the parent of the object.\n\t\t\t */\n\t\t\tparent: number;\n\t\t\t/**\n\t\t\t * Text for the title attribute of the link element for this menu item.\n\t\t\t */\n\t\t\tattr_title: string;\n\t\t\t/**\n\t\t\t * Class names for the link element of this menu item.\n\t\t\t */\n\t\t\tclasses: string[];\n\t\t\t/**\n\t\t\t * The description of this menu item.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.\n\t\t\t */\n\t\t\tmenu_order: number;\n\t\t\t/**\n\t\t\t * The type of object originally represented, such as \"category\", \"post\", or \"attachment\".\n\t\t\t */\n\t\t\tobject: string;\n\t\t\t/**\n\t\t\t * The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.\n\t\t\t */\n\t\t\tobject_id: number;\n\t\t\t/**\n\t\t\t * The target attribute of the link element for this menu item.\n\t\t\t */\n\t\t\ttarget: Target;\n\t\t\t/**\n\t\t\t * The URL to which this menu item points.\n\t\t\t */\n\t\t\turl: string;\n\t\t\t/**\n\t\t\t * The XFN relationship expressed in the link of this menu item.\n\t\t\t */\n\t\t\txfn: string[];\n\t\t\t/**\n\t\t\t * Whether the menu item represents an object that no longer exists.\n\t\t\t */\n\t\t\tinvalid: boolean;\n\t\t\t/**\n\t\t\t * The terms assigned to the object in the nav_menu taxonomy.\n\t\t\t */\n\t\t\tmenus: ContextualField< number, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t}\n\t}\n}\n\nexport type NavMenuItem< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.NavMenuItem< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/nav-menu.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface NavMenu< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique identifier for the term.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * HTML description of the term.\n\t\t\t */\n\t\t\tdescription: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * HTML title for the term.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the term unique to its type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The locations assigned to the menu.\n\t\t\t */\n\t\t\tlocations: ContextualField< string[], 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The DB ID of the original object this menu item represents, e . g . ID for posts and term_id for categories.\n\t\t\t */\n\t\t\tobject_id: number;\n\t\t\t/**\n\t\t\t * Whether to automatically add top level pages to this menu.\n\t\t\t */\n\t\t\tauto_add: ContextualField< boolean, 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type NavMenu< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.NavMenu< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/nav-menu.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface NavMenu< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique identifier for the term.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * HTML description of the term.\n\t\t\t */\n\t\t\tdescription: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * HTML title for the term.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the term unique to its type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The locations assigned to the menu.\n\t\t\t */\n\t\t\tlocations: ContextualField< string[], 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The DB ID of the original object this menu item represents, e . g . ID for posts and term_id for categories.\n\t\t\t */\n\t\t\tobject_id: number;\n\t\t\t/**\n\t\t\t * Whether to automatically add top level pages to this menu.\n\t\t\t */\n\t\t\tauto_add: ContextualField< boolean, 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type NavMenu< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.NavMenu< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/page.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tCommentingStatus,\n\tContext,\n\tContextualField,\n\tPingStatus,\n\tPostStatus,\n\tRenderedText,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Page< C extends Context > {\n\t\t\t/**\n\t\t\t * The date the post was published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string | null;\n\t\t\t/**\n\t\t\t * The date the post was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string | null, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The globally unique identifier for the post.\n\t\t\t */\n\t\t\tguid: ContextualField< RenderedText< C >, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the post.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * URL to the post.\n\t\t\t */\n\t\t\tlink: string;\n\t\t\t/**\n\t\t\t * The date the post was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The date the post was last modified, as GMT.\n\t\t\t */\n\t\t\tmodified_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the post unique to its type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * A named status for the post.\n\t\t\t */\n\t\t\tstatus: ContextualField< PostStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Type of post.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * A password to protect access to the content and excerpt.\n\t\t\t */\n\t\t\tpassword: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Permalink template for the post.\n\t\t\t */\n\t\t\tpermalink_template: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Slug automatically generated from the post title.\n\t\t\t */\n\t\t\tgenerated_slug: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The ID for the parent of the post.\n\t\t\t */\n\t\t\tparent: ContextualField< number, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The title for the post.\n\t\t\t */\n\t\t\ttitle: RenderedText< C >;\n\t\t\t/**\n\t\t\t * The content for the post.\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Whether the content is protected with a password.\n\t\t\t\t\t */\n\t\t\t\t\tis_protected: boolean;\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the page.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< string, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The ID for the author of the post.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * The excerpt for the post.\n\t\t\t */\n\t\t\texcerpt: RenderedText< C > & {\n\t\t\t\tprotected: boolean;\n\t\t\t};\n\t\t\t/**\n\t\t\t * The ID of the featured media for the post.\n\t\t\t */\n\t\t\tfeatured_media: number;\n\t\t\t/**\n\t\t\t * Whether or not comments are open on the post.\n\t\t\t */\n\t\t\tcomment_status: ContextualField<\n\t\t\t\tCommentingStatus,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Whether or not the post can be pinged.\n\t\t\t */\n\t\t\tping_status: ContextualField< PingStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The order of the post in relation to other posts.\n\t\t\t */\n\t\t\tmenu_order: ContextualField< number, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The theme file to use to display the post.\n\t\t\t */\n\t\t\ttemplate: ContextualField< string, 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type Page< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Page< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/page.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tCommentingStatus,\n\tContext,\n\tContextualField,\n\tPingStatus,\n\tPostStatus,\n\tRenderedText,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Page< C extends Context > {\n\t\t\t/**\n\t\t\t * The date the post was published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string | null;\n\t\t\t/**\n\t\t\t * The date the post was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string | null, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The globally unique identifier for the post.\n\t\t\t */\n\t\t\tguid: ContextualField< RenderedText< C >, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the post.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * URL to the post.\n\t\t\t */\n\t\t\tlink: string;\n\t\t\t/**\n\t\t\t * The date the post was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The date the post was last modified, as GMT.\n\t\t\t */\n\t\t\tmodified_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the post unique to its type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * A named status for the post.\n\t\t\t */\n\t\t\tstatus: ContextualField< PostStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Type of post.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * A password to protect access to the content and excerpt.\n\t\t\t */\n\t\t\tpassword: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Permalink template for the post.\n\t\t\t */\n\t\t\tpermalink_template: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Slug automatically generated from the post title.\n\t\t\t */\n\t\t\tgenerated_slug: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The ID for the parent of the post.\n\t\t\t */\n\t\t\tparent: ContextualField< number, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The title for the post.\n\t\t\t */\n\t\t\ttitle: RenderedText< C >;\n\t\t\t/**\n\t\t\t * The content for the post.\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Whether the content is protected with a password.\n\t\t\t\t\t */\n\t\t\t\t\tis_protected: boolean;\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the page.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< string, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The ID for the author of the post.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * The excerpt for the post.\n\t\t\t */\n\t\t\texcerpt: RenderedText< C > & {\n\t\t\t\tprotected: boolean;\n\t\t\t};\n\t\t\t/**\n\t\t\t * The ID of the featured media for the post.\n\t\t\t */\n\t\t\tfeatured_media: number;\n\t\t\t/**\n\t\t\t * Whether or not comments are open on the post.\n\t\t\t */\n\t\t\tcomment_status: ContextualField<\n\t\t\t\tCommentingStatus,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Whether or not the post can be pinged.\n\t\t\t */\n\t\t\tping_status: ContextualField< PingStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The order of the post in relation to other posts.\n\t\t\t */\n\t\t\tmenu_order: ContextualField< number, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The theme file to use to display the post.\n\t\t\t */\n\t\t\ttemplate: ContextualField< string, 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type Page< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Page< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/plugin.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tContext,\n\tContextualField,\n\tRenderedText,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Plugin< C extends Context > {\n\t\t\t/**\n\t\t\t * The plugin file.\n\t\t\t */\n\t\t\tplugin: string;\n\t\t\t/**\n\t\t\t * The plugin activation status.\n\t\t\t */\n\t\t\tstatus: PluginStatus;\n\t\t\t/**\n\t\t\t * The plugin name.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * The plugin's website address.\n\t\t\t */\n\t\t\tplugin_uri: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The plugin author.\n\t\t\t */\n\t\t\tauthor: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Plugin author's website address.\n\t\t\t */\n\t\t\tauthor_uri: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The plugin description.\n\t\t\t */\n\t\t\tdescription: ContextualField<\n\t\t\t\tRenderedText< 'edit' >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The plugin version number.\n\t\t\t */\n\t\t\tversion: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Whether the plugin can only be activated network-wide.\n\t\t\t */\n\t\t\tnetwork_only: boolean;\n\t\t\t/**\n\t\t\t * Minimum required version of WordPress.\n\t\t\t */\n\t\t\trequires_wp: string;\n\t\t\t/**\n\t\t\t * Minimum required version of PHP.\n\t\t\t */\n\t\t\trequires_php: string;\n\t\t\t/**\n\t\t\t * The plugin's text domain.\n\t\t\t */\n\t\t\ttextdomain: ContextualField< string, 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type PluginStatus = 'active' | 'inactive';\nexport type Plugin< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Plugin< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/plugin.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tContext,\n\tContextualField,\n\tRenderedText,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Plugin< C extends Context > {\n\t\t\t/**\n\t\t\t * The plugin file.\n\t\t\t */\n\t\t\tplugin: string;\n\t\t\t/**\n\t\t\t * The plugin activation status.\n\t\t\t */\n\t\t\tstatus: PluginStatus;\n\t\t\t/**\n\t\t\t * The plugin name.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * The plugin's website address.\n\t\t\t */\n\t\t\tplugin_uri: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The plugin author.\n\t\t\t */\n\t\t\tauthor: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Plugin author's website address.\n\t\t\t */\n\t\t\tauthor_uri: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The plugin description.\n\t\t\t */\n\t\t\tdescription: ContextualField<\n\t\t\t\tRenderedText< 'edit' >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The plugin version number.\n\t\t\t */\n\t\t\tversion: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Whether the plugin can only be activated network-wide.\n\t\t\t */\n\t\t\tnetwork_only: boolean;\n\t\t\t/**\n\t\t\t * Minimum required version of WordPress.\n\t\t\t */\n\t\t\trequires_wp: string;\n\t\t\t/**\n\t\t\t * Minimum required version of PHP.\n\t\t\t */\n\t\t\trequires_php: string;\n\t\t\t/**\n\t\t\t * The plugin's text domain.\n\t\t\t */\n\t\t\ttextdomain: ContextualField< string, 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type PluginStatus = 'active' | 'inactive';\nexport type Plugin< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Plugin< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/post-revision.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tContext,\n\tContextualField,\n\tRenderedText,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface PostRevision< C extends Context > {\n\t\t\t/**\n\t\t\t * The ID for the author of the post revision.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * The content for the post.\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Whether the content is protected with a password.\n\t\t\t\t\t */\n\t\t\t\t\tis_protected: boolean;\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the post.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< string, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The date the post was published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string | null;\n\t\t\t/**\n\t\t\t * The date the post was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string | null, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The excerpt for the post revision.\n\t\t\t */\n\t\t\texcerpt: RenderedText< C > & {\n\t\t\t\tprotected: boolean;\n\t\t\t};\n\t\t\t/**\n\t\t\t * The globally unique identifier for the post.\n\t\t\t */\n\t\t\tguid: ContextualField< RenderedText< C >, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the revision.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The date the post was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The date the post revision was last modified, as GMT.\n\t\t\t */\n\t\t\tmodified_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Identifier for the parent of the revision.\n\t\t\t */\n\t\t\tparent: number;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the post unique to its type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * The title for the post revision.\n\t\t\t */\n\t\t\ttitle: RenderedText< C >;\n\t\t}\n\t}\n}\n\nexport type PostRevision< C extends Context = 'view' > = OmitNevers<\n\t_BaseEntityRecords.PostRevision< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/post-revision.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tContext,\n\tContextualField,\n\tRenderedText,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface PostRevision< C extends Context > {\n\t\t\t/**\n\t\t\t * The ID for the author of the post revision.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * The content for the post.\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Whether the content is protected with a password.\n\t\t\t\t\t */\n\t\t\t\t\tis_protected: boolean;\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the post.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< string, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The date the post was published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string | null;\n\t\t\t/**\n\t\t\t * The date the post was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string | null, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The excerpt for the post revision.\n\t\t\t */\n\t\t\texcerpt: RenderedText< C > & {\n\t\t\t\tprotected: boolean;\n\t\t\t};\n\t\t\t/**\n\t\t\t * The globally unique identifier for the post.\n\t\t\t */\n\t\t\tguid: ContextualField< RenderedText< C >, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the revision.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The date the post was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The date the post revision was last modified, as GMT.\n\t\t\t */\n\t\t\tmodified_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Identifier for the parent of the revision.\n\t\t\t */\n\t\t\tparent: number;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the post unique to its type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * The title for the post revision.\n\t\t\t */\n\t\t\ttitle: RenderedText< C >;\n\t\t}\n\t}\n}\n\nexport type PostRevision< C extends Context = 'view' > = OmitNevers<\n\t_BaseEntityRecords.PostRevision< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/post.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tCommentingStatus,\n\tContext,\n\tContextualField,\n\tPingStatus,\n\tPostFormat,\n\tPostStatus,\n\tRenderedText,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Post< C extends Context > {\n\t\t\t/**\n\t\t\t * The date the post was published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string | null;\n\t\t\t/**\n\t\t\t * The date the post was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string | null, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The globally unique identifier for the post.\n\t\t\t */\n\t\t\tguid: ContextualField< RenderedText< C >, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the post.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * URL to the post.\n\t\t\t */\n\t\t\tlink: string;\n\t\t\t/**\n\t\t\t * The date the post was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The date the post was last modified, as GMT.\n\t\t\t */\n\t\t\tmodified_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the post unique to its type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * A named status for the post.\n\t\t\t */\n\t\t\tstatus: ContextualField< PostStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Type of post.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * A password to protect access to the content and excerpt.\n\t\t\t */\n\t\t\tpassword: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Permalink template for the post.\n\t\t\t */\n\t\t\tpermalink_template: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Slug automatically generated from the post title.\n\t\t\t */\n\t\t\tgenerated_slug: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The title for the post.\n\t\t\t */\n\t\t\ttitle: RenderedText< C >;\n\t\t\t/**\n\t\t\t * The content for the post.\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Whether the content is protected with a password.\n\t\t\t\t\t */\n\t\t\t\t\tis_protected: boolean;\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the page.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< string, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The ID for the author of the post.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * The excerpt for the post.\n\t\t\t */\n\t\t\texcerpt: RenderedText< C > & {\n\t\t\t\tprotected: boolean;\n\t\t\t};\n\t\t\t/**\n\t\t\t * The ID of the featured media for the post.\n\t\t\t */\n\t\t\tfeatured_media: number;\n\t\t\t/**\n\t\t\t * Whether or not comments are open on the post.\n\t\t\t */\n\t\t\tcomment_status: ContextualField<\n\t\t\t\tCommentingStatus,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Whether or not the post can be pinged.\n\t\t\t */\n\t\t\tping_status: ContextualField< PingStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The format for the post.\n\t\t\t */\n\t\t\tformat: ContextualField< PostFormat, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Whether or not the post should be treated as sticky.\n\t\t\t */\n\t\t\tsticky: ContextualField< boolean, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The theme file to use to display the post.\n\t\t\t */\n\t\t\ttemplate: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The terms assigned to the post in the category taxonomy.\n\t\t\t */\n\t\t\tcategories: ContextualField< number[], 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The terms assigned to the post in the post_tag taxonomy.\n\t\t\t */\n\t\t\ttags: ContextualField< number[], 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type Post< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Post< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/post.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tCommentingStatus,\n\tContext,\n\tContextualField,\n\tPingStatus,\n\tPostFormat,\n\tPostStatus,\n\tRenderedText,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Post< C extends Context > {\n\t\t\t/**\n\t\t\t * The date the post was published, in the site's timezone.\n\t\t\t */\n\t\t\tdate: string | null;\n\t\t\t/**\n\t\t\t * The date the post was published, as GMT.\n\t\t\t */\n\t\t\tdate_gmt: ContextualField< string | null, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The globally unique identifier for the post.\n\t\t\t */\n\t\t\tguid: ContextualField< RenderedText< C >, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Unique identifier for the post.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * URL to the post.\n\t\t\t */\n\t\t\tlink: string;\n\t\t\t/**\n\t\t\t * The date the post was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The date the post was last modified, as GMT.\n\t\t\t */\n\t\t\tmodified_gmt: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the post unique to its type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * A named status for the post.\n\t\t\t */\n\t\t\tstatus: ContextualField< PostStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Type of post.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * A password to protect access to the content and excerpt.\n\t\t\t */\n\t\t\tpassword: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Permalink template for the post.\n\t\t\t */\n\t\t\tpermalink_template: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Slug automatically generated from the post title.\n\t\t\t */\n\t\t\tgenerated_slug: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The title for the post.\n\t\t\t */\n\t\t\ttitle: RenderedText< C >;\n\t\t\t/**\n\t\t\t * The content for the post.\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Whether the content is protected with a password.\n\t\t\t\t\t */\n\t\t\t\t\tis_protected: boolean;\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the page.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< string, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * The ID for the author of the post.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * The excerpt for the post.\n\t\t\t */\n\t\t\texcerpt: RenderedText< C > & {\n\t\t\t\tprotected: boolean;\n\t\t\t};\n\t\t\t/**\n\t\t\t * The ID of the featured media for the post.\n\t\t\t */\n\t\t\tfeatured_media: number;\n\t\t\t/**\n\t\t\t * Whether or not comments are open on the post.\n\t\t\t */\n\t\t\tcomment_status: ContextualField<\n\t\t\t\tCommentingStatus,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Whether or not the post can be pinged.\n\t\t\t */\n\t\t\tping_status: ContextualField< PingStatus, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The format for the post.\n\t\t\t */\n\t\t\tformat: ContextualField< PostFormat, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Whether or not the post should be treated as sticky.\n\t\t\t */\n\t\t\tsticky: ContextualField< boolean, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The theme file to use to display the post.\n\t\t\t */\n\t\t\ttemplate: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The terms assigned to the post in the category taxonomy.\n\t\t\t */\n\t\t\tcategories: ContextualField< number[], 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * The terms assigned to the post in the post_tag taxonomy.\n\t\t\t */\n\t\t\ttags: ContextualField< number[], 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type Post< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Post< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/settings.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tCommentingStatus,\n\tContext,\n\tOmitNevers,\n\tPingStatus,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Settings< C extends Context > {\n\t\t\t/**\n\t\t\t * What to show on the front page\n\t\t\t */\n\t\t\tshow_on_front: string;\n\t\t\t/**\n\t\t\t * The ID of the page that should be displayed on the front page\n\t\t\t */\n\t\t\tpage_on_front: number;\n\t\t\t/**\n\t\t\t * Site title.\n\t\t\t */\n\t\t\ttitle: string;\n\t\t\t/**\n\t\t\t * Site tagline.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Site URL.\n\t\t\t */\n\t\t\turl: string;\n\t\t\t/**\n\t\t\t * This address is used for admin purposes, like new user notification.\n\t\t\t */\n\t\t\temail: string;\n\t\t\t/**\n\t\t\t * A city in the same timezone as you.\n\t\t\t */\n\t\t\ttimezone: string;\n\t\t\t/**\n\t\t\t * A date format for all date strings.\n\t\t\t */\n\t\t\tdate_format: string;\n\t\t\t/**\n\t\t\t * A time format for all time strings.\n\t\t\t */\n\t\t\ttime_format: string;\n\t\t\t/**\n\t\t\t * A day number of the week that the week should start on.\n\t\t\t */\n\t\t\tstart_of_week: number;\n\t\t\t/**\n\t\t\t * WordPress locale code.\n\t\t\t */\n\t\t\tlanguage: string;\n\t\t\t/**\n\t\t\t * Convert emoticons like :-) and :-P to graphics on display.\n\t\t\t */\n\t\t\tuse_smilies: boolean;\n\t\t\t/**\n\t\t\t * Default post category.\n\t\t\t */\n\t\t\tdefault_category: number;\n\t\t\t/**\n\t\t\t * Default post format.\n\t\t\t */\n\t\t\tdefault_post_format: string;\n\t\t\t/**\n\t\t\t * Blog pages show at most.\n\t\t\t */\n\t\t\tposts_per_page: number;\n\t\t\t/**\n\t\t\t * Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.\n\t\t\t */\n\t\t\tdefault_ping_status: PingStatus;\n\t\t\t/**\n\t\t\t * Allow people to submit comments on new posts.\n\t\t\t */\n\t\t\tdefault_comment_status: CommentingStatus;\n\t\t\t/**\n\t\t\t * Site logo.\n\t\t\t */\n\t\t\tsite_logo: number;\n\t\t\t/**\n\t\t\t * Site icon.\n\t\t\t */\n\t\t\tsite_icon: number;\n\t\t}\n\t}\n}\n\nexport type Settings< C extends Context = 'view' > = OmitNevers<\n\t_BaseEntityRecords.Settings< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/settings.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tCommentingStatus,\n\tContext,\n\tOmitNevers,\n\tPingStatus,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Settings< C extends Context > {\n\t\t\t/**\n\t\t\t * What to show on the front page\n\t\t\t */\n\t\t\tshow_on_front: string;\n\t\t\t/**\n\t\t\t * The ID of the page that should be displayed on the front page\n\t\t\t */\n\t\t\tpage_on_front: number;\n\t\t\t/**\n\t\t\t * Site title.\n\t\t\t */\n\t\t\ttitle: string;\n\t\t\t/**\n\t\t\t * Site tagline.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Site URL.\n\t\t\t */\n\t\t\turl: string;\n\t\t\t/**\n\t\t\t * This address is used for admin purposes, like new user notification.\n\t\t\t */\n\t\t\temail: string;\n\t\t\t/**\n\t\t\t * A city in the same timezone as you.\n\t\t\t */\n\t\t\ttimezone: string;\n\t\t\t/**\n\t\t\t * A date format for all date strings.\n\t\t\t */\n\t\t\tdate_format: string;\n\t\t\t/**\n\t\t\t * A time format for all time strings.\n\t\t\t */\n\t\t\ttime_format: string;\n\t\t\t/**\n\t\t\t * A day number of the week that the week should start on.\n\t\t\t */\n\t\t\tstart_of_week: number;\n\t\t\t/**\n\t\t\t * WordPress locale code.\n\t\t\t */\n\t\t\tlanguage: string;\n\t\t\t/**\n\t\t\t * Convert emoticons like :-) and :-P to graphics on display.\n\t\t\t */\n\t\t\tuse_smilies: boolean;\n\t\t\t/**\n\t\t\t * Default post category.\n\t\t\t */\n\t\t\tdefault_category: number;\n\t\t\t/**\n\t\t\t * Default post format.\n\t\t\t */\n\t\t\tdefault_post_format: string;\n\t\t\t/**\n\t\t\t * Blog pages show at most.\n\t\t\t */\n\t\t\tposts_per_page: number;\n\t\t\t/**\n\t\t\t * Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.\n\t\t\t */\n\t\t\tdefault_ping_status: PingStatus;\n\t\t\t/**\n\t\t\t * Allow people to submit comments on new posts.\n\t\t\t */\n\t\t\tdefault_comment_status: CommentingStatus;\n\t\t\t/**\n\t\t\t * Site logo.\n\t\t\t */\n\t\t\tsite_logo: number;\n\t\t\t/**\n\t\t\t * Site icon.\n\t\t\t */\n\t\t\tsite_icon: number;\n\t\t}\n\t}\n}\n\nexport type Settings< C extends Context = 'view' > = OmitNevers<\n\t_BaseEntityRecords.Settings< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/sidebar.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Sidebar< C extends Context > {\n\t\t\t/**\n\t\t\t * ID of sidebar.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * Unique name identifying the sidebar.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * Description of sidebar.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Extra CSS class to assign to the sidebar in the Widgets interface.\n\t\t\t */\n\t\t\tclass: string;\n\t\t\t/**\n\t\t\t * HTML content to prepend to each widget's HTML output when assigned to this sidebar. Default is an opening list item element.\n\t\t\t */\n\t\t\tbefore_widget: string;\n\t\t\t/**\n\t\t\t * HTML content to append to each widget's HTML output when assigned to this sidebar. Default is a closing list item element.\n\t\t\t */\n\t\t\tafter_widget: string;\n\t\t\t/**\n\t\t\t * HTML content to prepend to the sidebar title when displayed. Default is an opening h2 element.\n\t\t\t */\n\t\t\tbefore_title: string;\n\t\t\t/**\n\t\t\t * HTML content to append to the sidebar title when displayed. Default is a closing h2 element.\n\t\t\t */\n\t\t\tafter_title: string;\n\t\t\t/**\n\t\t\t * Status of sidebar.\n\t\t\t */\n\t\t\tstatus: SidebarStatus;\n\t\t\t/**\n\t\t\t * Nested widgets.\n\t\t\t */\n\t\t\twidgets: ( BaseEntityRecords.Widget< C > | string )[];\n\t\t}\n\t}\n}\n\ntype SidebarStatus = 'active' | 'inactive';\n\nexport type Sidebar< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Sidebar< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/sidebar.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Sidebar< C extends Context > {\n\t\t\t/**\n\t\t\t * ID of sidebar.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * Unique name identifying the sidebar.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * Description of sidebar.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Extra CSS class to assign to the sidebar in the Widgets interface.\n\t\t\t */\n\t\t\tclass: string;\n\t\t\t/**\n\t\t\t * HTML content to prepend to each widget's HTML output when assigned to this sidebar. Default is an opening list item element.\n\t\t\t */\n\t\t\tbefore_widget: string;\n\t\t\t/**\n\t\t\t * HTML content to append to each widget's HTML output when assigned to this sidebar. Default is a closing list item element.\n\t\t\t */\n\t\t\tafter_widget: string;\n\t\t\t/**\n\t\t\t * HTML content to prepend to the sidebar title when displayed. Default is an opening h2 element.\n\t\t\t */\n\t\t\tbefore_title: string;\n\t\t\t/**\n\t\t\t * HTML content to append to the sidebar title when displayed. Default is a closing h2 element.\n\t\t\t */\n\t\t\tafter_title: string;\n\t\t\t/**\n\t\t\t * Status of sidebar.\n\t\t\t */\n\t\t\tstatus: SidebarStatus;\n\t\t\t/**\n\t\t\t * Nested widgets.\n\t\t\t */\n\t\t\twidgets: ( BaseEntityRecords.Widget< C > | string )[];\n\t\t}\n\t}\n}\n\ntype SidebarStatus = 'active' | 'inactive';\n\nexport type Sidebar< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Sidebar< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/taxonomy.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Taxonomy< C extends Context > {\n\t\t\t/**\n\t\t\t * All capabilities used by the taxonomy.\n\t\t\t */\n\t\t\tcapabilities: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * A human-readable description of the taxonomy.\n\t\t\t */\n\t\t\tdescription: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Whether or not the taxonomy should have children.\n\t\t\t */\n\t\t\thierarchical: ContextualField< boolean, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Human-readable labels for the taxonomy for various contexts.\n\t\t\t */\n\t\t\tlabels: ContextualField< Record< string, string >, 'edit', C >;\n\t\t\t/**\n\t\t\t * The title for the taxonomy.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the taxonomy.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Whether or not the term cloud should be displayed.\n\t\t\t */\n\t\t\tshow_cloud: ContextualField< boolean, 'edit', C >;\n\t\t\t/**\n\t\t\t * Types associated with the taxonomy.\n\t\t\t */\n\t\t\ttypes: ContextualField< string[], 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * REST base route for the taxonomy.\n\t\t\t */\n\t\t\trest_base: string;\n\t\t\t/**\n\t\t\t * REST namespace route for the taxonomy.\n\t\t\t */\n\t\t\trest_namespace: string;\n\t\t\t/**\n\t\t\t * The visibility settings for the taxonomy.\n\t\t\t */\n\t\t\tvisibility: TaxonomyVisibility;\n\t\t}\n\n\t\texport interface TaxonomyVisibility {\n\t\t\t/**\n\t\t\t * Whether a taxonomy is intended for use publicly either via the admin interface or by front-end users.\n\t\t\t */\n\t\t\tpublic: boolean;\n\t\t\t/**\n\t\t\t * Whether the taxonomy is publicly queryable.\n\t\t\t */\n\t\t\tpublicly_queryable: boolean;\n\t\t\t/**\n\t\t\t * Whether to generate a default UI for managing this taxonomy.\n\t\t\t */\n\t\t\tshow_ui: boolean;\n\t\t\t/**\n\t\t\t * Whether to allow automatic creation of taxonomy columns on associated post-types table.\n\t\t\t */\n\t\t\tshow_admin_column: boolean;\n\t\t\t/**\n\t\t\t * Whether to make the taxonomy available for selection in navigation menus.\n\t\t\t */\n\t\t\tshow_in_nav_menus: boolean;\n\t\t\t/**\n\t\t\t * Whether to show the taxonomy in the quick/bulk edit panel.\n\t\t\t */\n\t\t\tshow_in_quick_edit: boolean;\n\t\t}\n\t}\n}\n\nexport type Taxonomy< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Taxonomy< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/taxonomy.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Taxonomy< C extends Context > {\n\t\t\t/**\n\t\t\t * All capabilities used by the taxonomy.\n\t\t\t */\n\t\t\tcapabilities: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * A human-readable description of the taxonomy.\n\t\t\t */\n\t\t\tdescription: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Whether or not the taxonomy should have children.\n\t\t\t */\n\t\t\thierarchical: ContextualField< boolean, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Human-readable labels for the taxonomy for various contexts.\n\t\t\t */\n\t\t\tlabels: ContextualField< Record< string, string >, 'edit', C >;\n\t\t\t/**\n\t\t\t * The title for the taxonomy.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the taxonomy.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Whether or not the term cloud should be displayed.\n\t\t\t */\n\t\t\tshow_cloud: ContextualField< boolean, 'edit', C >;\n\t\t\t/**\n\t\t\t * Types associated with the taxonomy.\n\t\t\t */\n\t\t\ttypes: ContextualField< string[], 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * REST base route for the taxonomy.\n\t\t\t */\n\t\t\trest_base: string;\n\t\t\t/**\n\t\t\t * REST namespace route for the taxonomy.\n\t\t\t */\n\t\t\trest_namespace: string;\n\t\t\t/**\n\t\t\t * The visibility settings for the taxonomy.\n\t\t\t */\n\t\t\tvisibility: TaxonomyVisibility;\n\t\t}\n\n\t\texport interface TaxonomyVisibility {\n\t\t\t/**\n\t\t\t * Whether a taxonomy is intended for use publicly either via the admin interface or by front-end users.\n\t\t\t */\n\t\t\tpublic: boolean;\n\t\t\t/**\n\t\t\t * Whether the taxonomy is publicly queryable.\n\t\t\t */\n\t\t\tpublicly_queryable: boolean;\n\t\t\t/**\n\t\t\t * Whether to generate a default UI for managing this taxonomy.\n\t\t\t */\n\t\t\tshow_ui: boolean;\n\t\t\t/**\n\t\t\t * Whether to allow automatic creation of taxonomy columns on associated post-types table.\n\t\t\t */\n\t\t\tshow_admin_column: boolean;\n\t\t\t/**\n\t\t\t * Whether to make the taxonomy available for selection in navigation menus.\n\t\t\t */\n\t\t\tshow_in_nav_menus: boolean;\n\t\t\t/**\n\t\t\t * Whether to show the taxonomy in the quick/bulk edit panel.\n\t\t\t */\n\t\t\tshow_in_quick_edit: boolean;\n\t\t}\n\t}\n}\n\nexport type Taxonomy< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Taxonomy< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/theme.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, PostFormat, RenderedText, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Theme< C extends Context > {\n\t\t\t/**\n\t\t\t * The theme's stylesheet. This uniquely identifies the theme.\n\t\t\t */\n\t\t\tstylesheet: string;\n\t\t\t/**\n\t\t\t * The theme's template. If this is a child theme, this refers to the parent theme, otherwise this is the same as the theme's stylesheet.\n\t\t\t */\n\t\t\ttemplate: string;\n\t\t\t/**\n\t\t\t * The theme author.\n\t\t\t */\n\t\t\tauthor: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The website of the theme author.\n\t\t\t */\n\t\t\tauthor_uri: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * A description of the theme.\n\t\t\t */\n\t\t\tdescription: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The name of the theme.\n\t\t\t */\n\t\t\tname: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The minimum PHP version required for the theme to work.\n\t\t\t */\n\t\t\trequires_php: string;\n\t\t\t/**\n\t\t\t * The minimum WordPress version required for the theme to work.\n\t\t\t */\n\t\t\trequires_wp: string;\n\t\t\t/**\n\t\t\t * The theme's screenshot URL.\n\t\t\t */\n\t\t\tscreenshot: string;\n\t\t\t/**\n\t\t\t * Tags indicating styles and features of the theme.\n\t\t\t */\n\t\t\ttags: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The theme's text domain.\n\t\t\t */\n\t\t\ttextdomain: string;\n\t\t\t/**\n\t\t\t * Features supported by this theme.\n\t\t\t */\n\t\t\ttheme_supports: ThemeSupports;\n\t\t\t/**\n\t\t\t * The URI of the theme's webpage.\n\t\t\t */\n\t\t\ttheme_uri: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The theme's current version.\n\t\t\t */\n\t\t\tversion: string;\n\t\t\t/**\n\t\t\t * A named status for the theme.\n\t\t\t */\n\t\t\tstatus: ThemeStatus;\n\t\t}\n\n\t\texport type ThemeStatus = 'active' | 'inactive';\n\n\t\texport interface ThemeSupports {\n\t\t\t/**\n\t\t\t * Whether theme opts in to wide alignment CSS class.\n\t\t\t */\n\t\t\t'align-wide': boolean;\n\t\t\t/**\n\t\t\t * Whether appearanceTools are enabled in Global Styles.\n\t\t\t */\n\t\t\t'appearance-tools': boolean;\n\t\t\t/**\n\t\t\t * Whether posts and comments RSS feed links are added to head.\n\t\t\t */\n\t\t\t'automatic-feed-links': boolean;\n\t\t\t/**\n\t\t\t * Whether border settings are enabled.\n\t\t\t */\n\t\t\tborder: boolean;\n\t\t\t/**\n\t\t\t * Custom background if defined by the theme.\n\t\t\t */\n\t\t\t'custom-background': boolean | CustomBackground;\n\t\t\t/**\n\t\t\t * Custom header if defined by the theme.\n\t\t\t */\n\t\t\t'custom-header': boolean | CustomHeader;\n\t\t\t/**\n\t\t\t * Custom logo if defined by the theme.\n\t\t\t */\n\t\t\t'custom-logo': boolean | CustomLogo;\n\t\t\t/**\n\t\t\t * Whether the theme enables Selective Refresh for Widgets being managed with the Customizer.\n\t\t\t */\n\t\t\t'customize-selective-refresh-widgets': boolean;\n\t\t\t/**\n\t\t\t * Whether theme opts in to the dark editor style UI.\n\t\t\t */\n\t\t\t'dark-editor-style': boolean;\n\t\t\t/**\n\t\t\t * Whether the theme disables custom colors.\n\t\t\t */\n\t\t\t'disable-custom-colors': boolean;\n\t\t\t/**\n\t\t\t * Whether the theme disables custom font sizes.\n\t\t\t */\n\t\t\t'disable-custom-font-sizes': boolean;\n\t\t\t/**\n\t\t\t * Whether the theme disables custom gradients.\n\t\t\t */\n\t\t\t'disable-custom-gradients': boolean;\n\t\t\t/**\n\t\t\t * Custom color palette if defined by the theme.\n\t\t\t */\n\t\t\t'editor-color-palette': boolean | Color[];\n\t\t\t/**\n\t\t\t * Custom font sizes if defined by the theme.\n\t\t\t */\n\t\t\t'editor-font-sizes': boolean | FontSize[];\n\t\t\t/**\n\t\t\t * Custom gradient presets if defined by the theme.\n\t\t\t */\n\t\t\t'editor-gradient-presets': boolean | GradientPreset[];\n\t\t\t/**\n\t\t\t * Whether theme opts in to the editor styles CSS wrapper.\n\t\t\t */\n\t\t\t'editor-styles': boolean;\n\t\t\t/**\n\t\t\t * Allows use of HTML5 markup for search forms, comment forms, comment lists, gallery, and caption.\n\t\t\t */\n\t\t\thtml5: boolean | Html5Option[];\n\t\t\t/**\n\t\t\t * Post formats supported.\n\t\t\t */\n\t\t\tformats: PostFormat[];\n\t\t\t/**\n\t\t\t * Whether link colors are enabled.\n\t\t\t */\n\t\t\t'link-color': boolean;\n\t\t\t/**\n\t\t\t * The post types that support thumbnails or true if all post types are supported.\n\t\t\t */\n\t\t\t'post-thumbnails': boolean | string[];\n\t\t\t/**\n\t\t\t * Whether the theme supports responsive embedded content.\n\t\t\t */\n\t\t\t'responsive-embeds': boolean;\n\t\t\t/**\n\t\t\t * Whether the theme can manage the document title tag.\n\t\t\t */\n\t\t\t'title-tag': boolean;\n\t\t\t/**\n\t\t\t * Whether theme opts in to default WordPress block styles for viewing.\n\t\t\t */\n\t\t\t'wp-block-styles': boolean;\n\t\t}\n\n\t\texport interface CustomBackground {\n\t\t\t'default-image': string;\n\t\t\t'default-preset': 'default' | 'fill' | 'fit' | 'repeat' | 'custom';\n\t\t\t'default-position-x': 'left' | 'center' | 'right';\n\t\t\t'default-position-y': 'left' | 'center' | 'right';\n\t\t\t'default-size': 'auto' | 'contain' | 'cover';\n\t\t\t'default-repeat': 'repeat-x' | 'repeat-y' | 'repeat' | 'no-repeat';\n\t\t\t'default-attachment': 'scroll' | 'fixed';\n\t\t\t'default-color': string;\n\t\t}\n\n\t\texport interface CustomHeader {\n\t\t\t'default-image': string;\n\t\t\t'random-default': boolean;\n\t\t\twidth: number;\n\t\t\theight: number;\n\t\t\t'flex-height': boolean;\n\t\t\t'flex-width': boolean;\n\t\t\t'default-text-color': string;\n\t\t\t'header-text': boolean;\n\t\t\tuploads: boolean;\n\t\t\tvideo: boolean;\n\t\t}\n\n\t\texport interface CustomLogo {\n\t\t\twidth: number;\n\t\t\theight: number;\n\t\t\t'flex-width': boolean;\n\t\t\t'flex-height': boolean;\n\t\t\t'header-text': string[];\n\t\t\t'unlink-homepage-logo': boolean;\n\t\t}\n\n\t\texport interface Color {\n\t\t\tname: string;\n\t\t\tslug: string;\n\t\t\tcolor: string;\n\t\t}\n\n\t\texport interface FontSize {\n\t\t\tname: string;\n\t\t\tsize: number;\n\t\t\tslug: string;\n\t\t}\n\n\t\texport interface GradientPreset {\n\t\t\tname: string;\n\t\t\tgradient: string;\n\t\t\tslug: string;\n\t\t}\n\n\t\texport type Html5Option =\n\t\t\t| 'search-form'\n\t\t\t| 'comment-form'\n\t\t\t| 'comment-list'\n\t\t\t| 'gallery'\n\t\t\t| 'caption'\n\t\t\t| 'script'\n\t\t\t| 'style';\n\t}\n}\n\nexport type Theme< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Theme< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/theme.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, PostFormat, RenderedText, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Theme< C extends Context > {\n\t\t\t/**\n\t\t\t * The theme's stylesheet. This uniquely identifies the theme.\n\t\t\t */\n\t\t\tstylesheet: string;\n\t\t\t/**\n\t\t\t * The theme's template. If this is a child theme, this refers to the parent theme, otherwise this is the same as the theme's stylesheet.\n\t\t\t */\n\t\t\ttemplate: string;\n\t\t\t/**\n\t\t\t * The theme author.\n\t\t\t */\n\t\t\tauthor: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The website of the theme author.\n\t\t\t */\n\t\t\tauthor_uri: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * A description of the theme.\n\t\t\t */\n\t\t\tdescription: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The name of the theme.\n\t\t\t */\n\t\t\tname: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The minimum PHP version required for the theme to work.\n\t\t\t */\n\t\t\trequires_php: string;\n\t\t\t/**\n\t\t\t * The minimum WordPress version required for the theme to work.\n\t\t\t */\n\t\t\trequires_wp: string;\n\t\t\t/**\n\t\t\t * The theme's screenshot URL.\n\t\t\t */\n\t\t\tscreenshot: string;\n\t\t\t/**\n\t\t\t * Tags indicating styles and features of the theme.\n\t\t\t */\n\t\t\ttags: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The theme's text domain.\n\t\t\t */\n\t\t\ttextdomain: string;\n\t\t\t/**\n\t\t\t * Features supported by this theme.\n\t\t\t */\n\t\t\ttheme_supports: ThemeSupports;\n\t\t\t/**\n\t\t\t * The URI of the theme's webpage.\n\t\t\t */\n\t\t\ttheme_uri: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * The theme's current version.\n\t\t\t */\n\t\t\tversion: string;\n\t\t\t/**\n\t\t\t * A named status for the theme.\n\t\t\t */\n\t\t\tstatus: ThemeStatus;\n\t\t}\n\n\t\texport type ThemeStatus = 'active' | 'inactive';\n\n\t\texport interface ThemeSupports {\n\t\t\t/**\n\t\t\t * Whether theme opts in to wide alignment CSS class.\n\t\t\t */\n\t\t\t'align-wide': boolean;\n\t\t\t/**\n\t\t\t * Whether appearanceTools are enabled in Global Styles.\n\t\t\t */\n\t\t\t'appearance-tools': boolean;\n\t\t\t/**\n\t\t\t * Whether posts and comments RSS feed links are added to head.\n\t\t\t */\n\t\t\t'automatic-feed-links': boolean;\n\t\t\t/**\n\t\t\t * Whether border settings are enabled.\n\t\t\t */\n\t\t\tborder: boolean;\n\t\t\t/**\n\t\t\t * Custom background if defined by the theme.\n\t\t\t */\n\t\t\t'custom-background': boolean | CustomBackground;\n\t\t\t/**\n\t\t\t * Custom header if defined by the theme.\n\t\t\t */\n\t\t\t'custom-header': boolean | CustomHeader;\n\t\t\t/**\n\t\t\t * Custom logo if defined by the theme.\n\t\t\t */\n\t\t\t'custom-logo': boolean | CustomLogo;\n\t\t\t/**\n\t\t\t * Whether the theme enables Selective Refresh for Widgets being managed with the Customizer.\n\t\t\t */\n\t\t\t'customize-selective-refresh-widgets': boolean;\n\t\t\t/**\n\t\t\t * Whether theme opts in to the dark editor style UI.\n\t\t\t */\n\t\t\t'dark-editor-style': boolean;\n\t\t\t/**\n\t\t\t * Whether the theme disables custom colors.\n\t\t\t */\n\t\t\t'disable-custom-colors': boolean;\n\t\t\t/**\n\t\t\t * Whether the theme disables custom font sizes.\n\t\t\t */\n\t\t\t'disable-custom-font-sizes': boolean;\n\t\t\t/**\n\t\t\t * Whether the theme disables custom gradients.\n\t\t\t */\n\t\t\t'disable-custom-gradients': boolean;\n\t\t\t/**\n\t\t\t * Custom color palette if defined by the theme.\n\t\t\t */\n\t\t\t'editor-color-palette': boolean | Color[];\n\t\t\t/**\n\t\t\t * Custom font sizes if defined by the theme.\n\t\t\t */\n\t\t\t'editor-font-sizes': boolean | FontSize[];\n\t\t\t/**\n\t\t\t * Custom gradient presets if defined by the theme.\n\t\t\t */\n\t\t\t'editor-gradient-presets': boolean | GradientPreset[];\n\t\t\t/**\n\t\t\t * Whether theme opts in to the editor styles CSS wrapper.\n\t\t\t */\n\t\t\t'editor-styles': boolean;\n\t\t\t/**\n\t\t\t * Allows use of HTML5 markup for search forms, comment forms, comment lists, gallery, and caption.\n\t\t\t */\n\t\t\thtml5: boolean | Html5Option[];\n\t\t\t/**\n\t\t\t * Post formats supported.\n\t\t\t */\n\t\t\tformats: PostFormat[];\n\t\t\t/**\n\t\t\t * Whether link colors are enabled.\n\t\t\t */\n\t\t\t'link-color': boolean;\n\t\t\t/**\n\t\t\t * The post types that support thumbnails or true if all post types are supported.\n\t\t\t */\n\t\t\t'post-thumbnails': boolean | string[];\n\t\t\t/**\n\t\t\t * Whether the theme supports responsive embedded content.\n\t\t\t */\n\t\t\t'responsive-embeds': boolean;\n\t\t\t/**\n\t\t\t * Whether the theme can manage the document title tag.\n\t\t\t */\n\t\t\t'title-tag': boolean;\n\t\t\t/**\n\t\t\t * Whether theme opts in to default WordPress block styles for viewing.\n\t\t\t */\n\t\t\t'wp-block-styles': boolean;\n\t\t}\n\n\t\texport interface CustomBackground {\n\t\t\t'default-image': string;\n\t\t\t'default-preset': 'default' | 'fill' | 'fit' | 'repeat' | 'custom';\n\t\t\t'default-position-x': 'left' | 'center' | 'right';\n\t\t\t'default-position-y': 'left' | 'center' | 'right';\n\t\t\t'default-size': 'auto' | 'contain' | 'cover';\n\t\t\t'default-repeat': 'repeat-x' | 'repeat-y' | 'repeat' | 'no-repeat';\n\t\t\t'default-attachment': 'scroll' | 'fixed';\n\t\t\t'default-color': string;\n\t\t}\n\n\t\texport interface CustomHeader {\n\t\t\t'default-image': string;\n\t\t\t'random-default': boolean;\n\t\t\twidth: number;\n\t\t\theight: number;\n\t\t\t'flex-height': boolean;\n\t\t\t'flex-width': boolean;\n\t\t\t'default-text-color': string;\n\t\t\t'header-text': boolean;\n\t\t\tuploads: boolean;\n\t\t\tvideo: boolean;\n\t\t}\n\n\t\texport interface CustomLogo {\n\t\t\twidth: number;\n\t\t\theight: number;\n\t\t\t'flex-width': boolean;\n\t\t\t'flex-height': boolean;\n\t\t\t'header-text': string[];\n\t\t\t'unlink-homepage-logo': boolean;\n\t\t}\n\n\t\texport interface Color {\n\t\t\tname: string;\n\t\t\tslug: string;\n\t\t\tcolor: string;\n\t\t}\n\n\t\texport interface FontSize {\n\t\t\tname: string;\n\t\t\tsize: number;\n\t\t\tslug: string;\n\t\t}\n\n\t\texport interface GradientPreset {\n\t\t\tname: string;\n\t\t\tgradient: string;\n\t\t\tslug: string;\n\t\t}\n\n\t\texport type Html5Option =\n\t\t\t| 'search-form'\n\t\t\t| 'comment-form'\n\t\t\t| 'comment-list'\n\t\t\t| 'gallery'\n\t\t\t| 'caption'\n\t\t\t| 'script'\n\t\t\t| 'style';\n\t}\n}\n\nexport type Theme< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Theme< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/type.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Type< C extends Context > {\n\t\t\t/**\n\t\t\t * All capabilities used by the post type.\n\t\t\t */\n\t\t\tcapabilities: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * A human-readable description of the post type.\n\t\t\t */\n\t\t\tdescription: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Whether or not the post type should have children.\n\t\t\t */\n\t\t\thierarchical: ContextualField< boolean, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Whether or not the post type can be viewed.\n\t\t\t */\n\t\t\tviewable: ContextualField< boolean, 'edit', C >;\n\t\t\t/**\n\t\t\t * Human-readable labels for the post type for various contexts.\n\t\t\t */\n\t\t\tlabels: ContextualField< Record< string, string >, 'edit', C >;\n\t\t\t/**\n\t\t\t * The title for the post type.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the post type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * All features, supported by the post type.\n\t\t\t */\n\t\t\tsupports: ContextualField< Record< string, string >, 'edit', C >;\n\t\t\t/**\n\t\t\t * Taxonomies associated with post type.\n\t\t\t */\n\t\t\ttaxonomies: ContextualField< string[], 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * REST base route for the post type.\n\t\t\t */\n\t\t\trest_base: string;\n\t\t\t/**\n\t\t\t * REST route's namespace for the post type.\n\t\t\t */\n\t\t\trest_namespace: string;\n\t\t\t/**\n\t\t\t * The visibility settings for the post type.\n\t\t\t */\n\t\t\tvisibility: ContextualField< TypeVisibility, 'edit', C >;\n\t\t}\n\n\t\tinterface TypeVisibility {\n\t\t\t/**\n\t\t\t * Whether to generate a default UI for managing this post type.\n\t\t\t */\n\t\t\tshow_ui: boolean;\n\t\t\t/**\n\t\t\t * Whether to make the post type is available for selection in navigation menus.\n\t\t\t */\n\t\t\tshow_in_nav_menus: boolean;\n\t\t}\n\t}\n}\n\nexport type Type< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Type< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/type.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Type< C extends Context > {\n\t\t\t/**\n\t\t\t * All capabilities used by the post type.\n\t\t\t */\n\t\t\tcapabilities: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * A human-readable description of the post type.\n\t\t\t */\n\t\t\tdescription: ContextualField< string, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Whether or not the post type should have children.\n\t\t\t */\n\t\t\thierarchical: ContextualField< boolean, 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * Whether or not the post type can be viewed.\n\t\t\t */\n\t\t\tviewable: ContextualField< boolean, 'edit', C >;\n\t\t\t/**\n\t\t\t * Human-readable labels for the post type for various contexts.\n\t\t\t */\n\t\t\tlabels: ContextualField< Record< string, string >, 'edit', C >;\n\t\t\t/**\n\t\t\t * The title for the post type.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the post type.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * All features, supported by the post type.\n\t\t\t */\n\t\t\tsupports: ContextualField< Record< string, string >, 'edit', C >;\n\t\t\t/**\n\t\t\t * Taxonomies associated with post type.\n\t\t\t */\n\t\t\ttaxonomies: ContextualField< string[], 'view' | 'edit', C >;\n\t\t\t/**\n\t\t\t * REST base route for the post type.\n\t\t\t */\n\t\t\trest_base: string;\n\t\t\t/**\n\t\t\t * REST route's namespace for the post type.\n\t\t\t */\n\t\t\trest_namespace: string;\n\t\t\t/**\n\t\t\t * The visibility settings for the post type.\n\t\t\t */\n\t\t\tvisibility: ContextualField< TypeVisibility, 'edit', C >;\n\t\t}\n\n\t\tinterface TypeVisibility {\n\t\t\t/**\n\t\t\t * Whether to generate a default UI for managing this post type.\n\t\t\t */\n\t\t\tshow_ui: boolean;\n\t\t\t/**\n\t\t\t * Whether to make the post type is available for selection in navigation menus.\n\t\t\t */\n\t\t\tshow_in_nav_menus: boolean;\n\t\t}\n\t}\n}\n\nexport type Type< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Type< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/user.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tAvatarUrls,\n\tContext,\n\tContextualField,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface User< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique identifier for the user.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * Login name for the user.\n\t\t\t */\n\t\t\tusername: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Display name for the user.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * First name for the user.\n\t\t\t */\n\t\t\tfirst_name: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Last name for the user.\n\t\t\t */\n\t\t\tlast_name: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The email address for the user.\n\t\t\t */\n\t\t\temail: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * URL of the user.\n\t\t\t */\n\t\t\turl: string;\n\t\t\t/**\n\t\t\t * Description of the user.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Author URL of the user.\n\t\t\t */\n\t\t\tlink: string;\n\t\t\t/**\n\t\t\t * Locale for the user.\n\t\t\t */\n\t\t\tlocale: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The nickname for the user.\n\t\t\t */\n\t\t\tnickname: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the user.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Registration date for the user.\n\t\t\t */\n\t\t\tregistered_date: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Roles assigned to the user.\n\t\t\t */\n\t\t\troles: ContextualField< string[], 'edit', C >;\n\t\t\t/**\n\t\t\t * Password for the user.\n\t\t\t *\n\t\t\t * This is never sent from the server to the client\n\t\t\t * but exists because we might send an update to the\n\t\t\t * server with a new password to set.\n\t\t\t */\n\t\t\tpassword?: string;\n\t\t\t/**\n\t\t\t * All capabilities assigned to the user.\n\t\t\t */\n\t\t\tcapabilities: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Any extra capabilities assigned to the user.\n\t\t\t */\n\t\t\textra_capabilities: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Avatar URLs for the user.\n\t\t\t */\n\t\t\tavatar_urls: AvatarUrls;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t}\n\t}\n}\n\nexport type User< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.User< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/user.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tAvatarUrls,\n\tContext,\n\tContextualField,\n\tOmitNevers,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface User< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique identifier for the user.\n\t\t\t */\n\t\t\tid: number;\n\t\t\t/**\n\t\t\t * Login name for the user.\n\t\t\t */\n\t\t\tusername: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Display name for the user.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * First name for the user.\n\t\t\t */\n\t\t\tfirst_name: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Last name for the user.\n\t\t\t */\n\t\t\tlast_name: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The email address for the user.\n\t\t\t */\n\t\t\temail: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * URL of the user.\n\t\t\t */\n\t\t\turl: string;\n\t\t\t/**\n\t\t\t * Description of the user.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Author URL of the user.\n\t\t\t */\n\t\t\tlink: string;\n\t\t\t/**\n\t\t\t * Locale for the user.\n\t\t\t */\n\t\t\tlocale: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * The nickname for the user.\n\t\t\t */\n\t\t\tnickname: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * An alphanumeric identifier for the user.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Registration date for the user.\n\t\t\t */\n\t\t\tregistered_date: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Roles assigned to the user.\n\t\t\t */\n\t\t\troles: ContextualField< string[], 'edit', C >;\n\t\t\t/**\n\t\t\t * Password for the user.\n\t\t\t *\n\t\t\t * This is never sent from the server to the client\n\t\t\t * but exists because we might send an update to the\n\t\t\t * server with a new password to set.\n\t\t\t */\n\t\t\tpassword?: string;\n\t\t\t/**\n\t\t\t * All capabilities assigned to the user.\n\t\t\t */\n\t\t\tcapabilities: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Any extra capabilities assigned to the user.\n\t\t\t */\n\t\t\textra_capabilities: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Avatar URLs for the user.\n\t\t\t */\n\t\t\tavatar_urls: AvatarUrls;\n\t\t\t/**\n\t\t\t * Meta fields.\n\t\t\t */\n\t\t\tmeta: ContextualField<\n\t\t\t\tRecord< string, string >,\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t}\n\t}\n}\n\nexport type User< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.User< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/widget-type.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface WidgetType< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique slug identifying the widget type.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * Human-readable name identifying the widget type.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * Description of the widget.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Whether the widget supports multiple instances\n\t\t\t */\n\t\t\tis_multi: boolean;\n\t\t\t/**\n\t\t\t * Class name\n\t\t\t */\n\t\t\tclassname: string;\n\t\t}\n\t}\n}\n\nexport type WidgetType< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.WidgetType< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/widget-type.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface WidgetType< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique slug identifying the widget type.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * Human-readable name identifying the widget type.\n\t\t\t */\n\t\t\tname: string;\n\t\t\t/**\n\t\t\t * Description of the widget.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Whether the widget supports multiple instances\n\t\t\t */\n\t\t\tis_multi: boolean;\n\t\t\t/**\n\t\t\t * Class name\n\t\t\t */\n\t\t\tclassname: string;\n\t\t}\n\t}\n}\n\nexport type WidgetType< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.WidgetType< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/widget.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Widget< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique identifier for the widget.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * The type of the widget. Corresponds to ID in widget-types endpoint.\n\t\t\t */\n\t\t\tid_base: string;\n\t\t\t/**\n\t\t\t * The sidebar the widget belongs to.\n\t\t\t */\n\t\t\tsidebar: string;\n\t\t\t/**\n\t\t\t * HTML representation of the widget.\n\t\t\t */\n\t\t\trendered: string;\n\t\t\t/**\n\t\t\t * HTML representation of the widget admin form.\n\t\t\t */\n\t\t\trendered_form: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Instance settings of the widget, if supported.\n\t\t\t */\n\t\t\tinstance: ContextualField< WidgetInstance, 'edit', C >;\n\t\t\t/**\n\t\t\t * URL-encoded form data from the widget admin form. Used\n\t\t\t * to update a widget that does not support instance.\n\t\t\t *\n\t\t\t * This is never sent from the server to the client but exists\n\t\t\t * because we might send an update.\n\t\t\t */\n\t\t\tform_data?: string;\n\t\t}\n\n\t\tinterface WidgetInstance {\n\t\t\t/**\n\t\t\t * Base64 encoded representation of the instance settings.\n\t\t\t */\n\t\t\tencoded: string;\n\t\t\t/**\n\t\t\t * Cryptographic hash of the instance settings.\n\t\t\t */\n\t\t\thash: string;\n\t\t\t/**\n\t\t\t * Unencoded instance settings, if supported.\n\t\t\t */\n\t\t\traw: Record< string, string >;\n\t\t}\n\t}\n}\n\nexport type Widget< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Widget< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/widget.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Context, ContextualField, OmitNevers } from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface Widget< C extends Context > {\n\t\t\t/**\n\t\t\t * Unique identifier for the widget.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * The type of the widget. Corresponds to ID in widget-types endpoint.\n\t\t\t */\n\t\t\tid_base: string;\n\t\t\t/**\n\t\t\t * The sidebar the widget belongs to.\n\t\t\t */\n\t\t\tsidebar: string;\n\t\t\t/**\n\t\t\t * HTML representation of the widget.\n\t\t\t */\n\t\t\trendered: string;\n\t\t\t/**\n\t\t\t * HTML representation of the widget admin form.\n\t\t\t */\n\t\t\trendered_form: ContextualField< string, 'edit', C >;\n\t\t\t/**\n\t\t\t * Instance settings of the widget, if supported.\n\t\t\t */\n\t\t\tinstance: ContextualField< WidgetInstance, 'edit', C >;\n\t\t\t/**\n\t\t\t * URL-encoded form data from the widget admin form. Used\n\t\t\t * to update a widget that does not support instance.\n\t\t\t *\n\t\t\t * This is never sent from the server to the client but exists\n\t\t\t * because we might send an update.\n\t\t\t */\n\t\t\tform_data?: string;\n\t\t}\n\n\t\tinterface WidgetInstance {\n\t\t\t/**\n\t\t\t * Base64 encoded representation of the instance settings.\n\t\t\t */\n\t\t\tencoded: string;\n\t\t\t/**\n\t\t\t * Cryptographic hash of the instance settings.\n\t\t\t */\n\t\t\thash: string;\n\t\t\t/**\n\t\t\t * Unencoded instance settings, if supported.\n\t\t\t */\n\t\t\traw: Record< string, string >;\n\t\t}\n\t}\n}\n\nexport type Widget< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.Widget< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/wp-template-part.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tContext,\n\tPostStatus,\n\tRenderedText,\n\tOmitNevers,\n\tContextualField,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface WpTemplatePart< C extends Context > {\n\t\t\t/**\n\t\t\t * ID of template.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * Unique slug identifying the template.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Theme identifier for the template.\n\t\t\t */\n\t\t\ttheme: string;\n\t\t\t/**\n\t\t\t * Type of template.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * Source of template\n\t\t\t */\n\t\t\tsource: string;\n\t\t\t/**\n\t\t\t * Source of a customized template\n\t\t\t */\n\t\t\torigin: string;\n\t\t\t/**\n\t\t\t * Content of template.\n\t\t\t *\n\t\t\t * This field never has a `rendered` property when reading but still uses\n\t\t\t * the RenderedText type so it can be set as a string when sending updates to\n\t\t\t * the server.\n\t\t\t *\n\t\t\t * TODO: Figure out how to mesh this with `RenderedText<C>`\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the template.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< number, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Title of template.\n\t\t\t */\n\t\t\ttitle: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * Description of template.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Status of template.\n\t\t\t */\n\t\t\tstatus: PostStatus;\n\t\t\t/**\n\t\t\t * Post ID.\n\t\t\t */\n\t\t\twp_id: number;\n\t\t\t/**\n\t\t\t * Theme file exists.\n\t\t\t */\n\t\t\thas_theme_file: Record< string, string >;\n\t\t\t/**\n\t\t\t * The ID for the author of the template.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * Where the template part is intended for use (header, footer, etc.)\n\t\t\t */\n\t\t\tarea: string;\n\t\t}\n\t}\n}\n\nexport type WpTemplatePart< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.WpTemplatePart< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/wp-template-part.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tContext,\n\tPostStatus,\n\tRenderedText,\n\tOmitNevers,\n\tContextualField,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface WpTemplatePart< C extends Context > {\n\t\t\t/**\n\t\t\t * ID of template.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * Unique slug identifying the template.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Theme identifier for the template.\n\t\t\t */\n\t\t\ttheme: string;\n\t\t\t/**\n\t\t\t * Type of template.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * Source of template\n\t\t\t */\n\t\t\tsource: string;\n\t\t\t/**\n\t\t\t * Source of a customized template\n\t\t\t */\n\t\t\torigin: string;\n\t\t\t/**\n\t\t\t * Content of template.\n\t\t\t *\n\t\t\t * This field never has a `rendered` property when reading but still uses\n\t\t\t * the RenderedText type so it can be set as a string when sending updates to\n\t\t\t * the server.\n\t\t\t *\n\t\t\t * TODO: Figure out how to mesh this with `RenderedText<C>`\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the template.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< number, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Title of template.\n\t\t\t */\n\t\t\ttitle: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * Description of template.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Status of template.\n\t\t\t */\n\t\t\tstatus: PostStatus;\n\t\t\t/**\n\t\t\t * Post ID.\n\t\t\t */\n\t\t\twp_id: number;\n\t\t\t/**\n\t\t\t * Theme file exists.\n\t\t\t */\n\t\t\thas_theme_file: Record< string, string >;\n\t\t\t/**\n\t\t\t * The ID for the author of the template.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * Where the template part is intended for use (header, footer, etc.)\n\t\t\t */\n\t\t\tarea: string;\n\t\t}\n\t}\n}\n\nexport type WpTemplatePart< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.WpTemplatePart< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/wp-template.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tContext,\n\tPostStatus,\n\tRenderedText,\n\tOmitNevers,\n\tContextualField,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface WpTemplate< C extends Context > {\n\t\t\t/**\n\t\t\t * ID of template.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * Unique slug identifying the template.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Theme identifier for the template.\n\t\t\t */\n\t\t\ttheme: string;\n\t\t\t/**\n\t\t\t * Type of template.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * Source of template\n\t\t\t */\n\t\t\tsource: string;\n\t\t\t/**\n\t\t\t * Source of a customized template\n\t\t\t */\n\t\t\torigin: string;\n\t\t\t/**\n\t\t\t * Content of template.\n\t\t\t *\n\t\t\t * This field never has a `rendered` property when reading but still uses\n\t\t\t * the RenderedText type so it can be set as a string when sending updates to\n\t\t\t * the server.\n\t\t\t *\n\t\t\t * TODO: Figure out how to mesh this with `RenderedText<C>`\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the template.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< number, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Title of template.\n\t\t\t */\n\t\t\ttitle: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * Description of template.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Status of template.\n\t\t\t */\n\t\t\tstatus: PostStatus;\n\t\t\t/**\n\t\t\t * Post ID.\n\t\t\t */\n\t\t\twp_id: number;\n\t\t\t/**\n\t\t\t * Theme file exists.\n\t\t\t */\n\t\t\thas_theme_file: Record< string, string >;\n\t\t\t/**\n\t\t\t * The ID for the author of the template.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * Whether a template is a custom template.\n\t\t\t */\n\t\t\tis_custom: Record< string, string >;\n\t\t\t/**\n\t\t\t * The date the template was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type WpTemplate< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.WpTemplate< C >\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/core-data/src/entity-types/wp-template.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tContext,\n\tPostStatus,\n\tRenderedText,\n\tOmitNevers,\n\tContextualField,\n} from './helpers';\n\nimport type { BaseEntityRecords as _BaseEntityRecords } from './base-entity-records';\n\ndeclare module './base-entity-records' {\n\texport namespace BaseEntityRecords {\n\t\texport interface WpTemplate< C extends Context > {\n\t\t\t/**\n\t\t\t * ID of template.\n\t\t\t */\n\t\t\tid: string;\n\t\t\t/**\n\t\t\t * Unique slug identifying the template.\n\t\t\t */\n\t\t\tslug: string;\n\t\t\t/**\n\t\t\t * Theme identifier for the template.\n\t\t\t */\n\t\t\ttheme: string;\n\t\t\t/**\n\t\t\t * Type of template.\n\t\t\t */\n\t\t\ttype: string;\n\t\t\t/**\n\t\t\t * Source of template\n\t\t\t */\n\t\t\tsource: string;\n\t\t\t/**\n\t\t\t * Source of a customized template\n\t\t\t */\n\t\t\torigin: string;\n\t\t\t/**\n\t\t\t * Content of template.\n\t\t\t *\n\t\t\t * This field never has a `rendered` property when reading but still uses\n\t\t\t * the RenderedText type so it can be set as a string when sending updates to\n\t\t\t * the server.\n\t\t\t *\n\t\t\t * TODO: Figure out how to mesh this with `RenderedText<C>`\n\t\t\t */\n\t\t\tcontent: ContextualField<\n\t\t\t\tRenderedText< C > & {\n\t\t\t\t\t/**\n\t\t\t\t\t * Version of the content block format used by the template.\n\t\t\t\t\t */\n\t\t\t\t\tblock_version: ContextualField< number, 'edit', C >;\n\t\t\t\t},\n\t\t\t\t'view' | 'edit',\n\t\t\t\tC\n\t\t\t>;\n\t\t\t/**\n\t\t\t * Title of template.\n\t\t\t */\n\t\t\ttitle: RenderedText< 'edit' >;\n\t\t\t/**\n\t\t\t * Description of template.\n\t\t\t */\n\t\t\tdescription: string;\n\t\t\t/**\n\t\t\t * Status of template.\n\t\t\t */\n\t\t\tstatus: PostStatus;\n\t\t\t/**\n\t\t\t * Post ID.\n\t\t\t */\n\t\t\twp_id: number;\n\t\t\t/**\n\t\t\t * Theme file exists.\n\t\t\t */\n\t\t\thas_theme_file: Record< string, string >;\n\t\t\t/**\n\t\t\t * The ID for the author of the template.\n\t\t\t */\n\t\t\tauthor: number;\n\t\t\t/**\n\t\t\t * Whether a template is a custom template.\n\t\t\t */\n\t\t\tis_custom: Record< string, string >;\n\t\t\t/**\n\t\t\t * The date the template was last modified, in the site's timezone.\n\t\t\t */\n\t\t\tmodified: ContextualField< string, 'view' | 'edit', C >;\n\t\t}\n\t}\n}\n\nexport type WpTemplate< C extends Context = 'edit' > = OmitNevers<\n\t_BaseEntityRecords.WpTemplate< C >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["apiFetch","addQueryArgs","decodeEntities","__","fetchLinkSuggestions","search","searchOptions","settings","isInitialSuggestions","initialSuggestionsSearchOptions","undefined","disablePostFormats","type","subtype","page","perPage","queries","push","path","per_page","then","results","map","result","meta","kind","catch","Promise","all","reduce","accumulator","current","concat","filter","id","slice","isMedia","url","source_url","title","rendered"],"sources":["@wordpress/core-data/src/fetch/__experimental-fetch-link-suggestions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Filters the search by type\n *\n * @typedef { 'attachment' | 'post' | 'term' | 'post-format' } WPLinkSearchType\n */\n\n/**\n * A link with an id may be of kind post-type or taxonomy\n *\n * @typedef { 'post-type' | 'taxonomy' } WPKind\n */\n\n/**\n * @typedef WPLinkSearchOptions\n *\n * @property {boolean} [isInitialSuggestions] Displays initial search suggestions, when true.\n * @property {WPLinkSearchType} [type] Filters by search type.\n * @property {string} [subtype] Slug of the post-type or taxonomy.\n * @property {number} [page] Which page of results to return.\n * @property {number} [perPage] Search results per page.\n */\n\n/**\n * @typedef WPLinkSearchResult\n *\n * @property {number} id Post or term id.\n * @property {string} url Link url.\n * @property {string} title Title of the link.\n * @property {string} type The taxonomy or post type slug or type URL.\n * @property {WPKind} [kind] Link kind of post-type or taxonomy\n */\n\n/**\n * @typedef WPLinkSearchResultAugments\n *\n * @property {{kind: WPKind}} [meta] Contains kind information.\n * @property {WPKind} [subtype] Optional subtype if it exists.\n */\n\n/**\n * @typedef {WPLinkSearchResult & WPLinkSearchResultAugments} WPLinkSearchResultAugmented\n */\n\n/**\n * @typedef WPEditorSettings\n *\n * @property {boolean} [ disablePostFormats ] Disables post formats, when true.\n */\n\n/**\n * Fetches link suggestions from the API.\n *\n * @async\n * @param {string} search\n * @param {WPLinkSearchOptions} [searchOptions]\n * @param {WPEditorSettings} [settings]\n *\n * @example\n * ```js\n * import { __experimentalFetchLinkSuggestions as fetchLinkSuggestions } from '@wordpress/core-data';\n *\n * //...\n *\n * export function initialize( id, settings ) {\n *\n * settings.__experimentalFetchLinkSuggestions = (\n * search,\n * searchOptions\n * ) => fetchLinkSuggestions( search, searchOptions, settings );\n * ```\n * @return {Promise< WPLinkSearchResult[] >} List of search suggestions\n */\nconst fetchLinkSuggestions = async (\n\tsearch,\n\tsearchOptions = {},\n\tsettings = {}\n) => {\n\tconst {\n\t\tisInitialSuggestions = false,\n\t\tinitialSuggestionsSearchOptions = undefined,\n\t} = searchOptions;\n\n\tconst { disablePostFormats = false } = settings;\n\n\tlet {\n\t\ttype = undefined,\n\t\tsubtype = undefined,\n\t\tpage = undefined,\n\t\tperPage = isInitialSuggestions ? 3 : 20,\n\t} = searchOptions;\n\n\t/** @type {Promise<WPLinkSearchResult>[]} */\n\tconst queries = [];\n\n\tif ( isInitialSuggestions && initialSuggestionsSearchOptions ) {\n\t\ttype = initialSuggestionsSearchOptions.type || type;\n\t\tsubtype = initialSuggestionsSearchOptions.subtype || subtype;\n\t\tpage = initialSuggestionsSearchOptions.page || page;\n\t\tperPage = initialSuggestionsSearchOptions.perPage || perPage;\n\t}\n\n\tif ( ! type || type === 'post' ) {\n\t\tqueries.push(\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/search', {\n\t\t\t\t\tsearch,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tsubtype,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.then( ( results ) => {\n\t\t\t\t\treturn results.map( ( result ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\tmeta: { kind: 'post-type', subtype },\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => [] ) // Fail by returning no results.\n\t\t);\n\t}\n\n\tif ( ! type || type === 'term' ) {\n\t\tqueries.push(\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/search', {\n\t\t\t\t\tsearch,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\ttype: 'term',\n\t\t\t\t\tsubtype,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.then( ( results ) => {\n\t\t\t\t\treturn results.map( ( result ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\tmeta: { kind: 'taxonomy', subtype },\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => [] ) // Fail by returning no results.\n\t\t);\n\t}\n\n\tif ( ! disablePostFormats && ( ! type || type === 'post-format' ) ) {\n\t\tqueries.push(\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/search', {\n\t\t\t\t\tsearch,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\ttype: 'post-format',\n\t\t\t\t\tsubtype,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.then( ( results ) => {\n\t\t\t\t\treturn results.map( ( result ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\tmeta: { kind: 'taxonomy', subtype },\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => [] ) // Fail by returning no results.\n\t\t);\n\t}\n\n\tif ( ! type || type === 'attachment' ) {\n\t\tqueries.push(\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/media', {\n\t\t\t\t\tsearch,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.then( ( results ) => {\n\t\t\t\t\treturn results.map( ( result ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\tmeta: { kind: 'media' },\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => [] ) // Fail by returning no results.\n\t\t);\n\t}\n\n\treturn Promise.all( queries ).then( ( results ) => {\n\t\treturn results\n\t\t\t.reduce(\n\t\t\t\t( /** @type {WPLinkSearchResult[]} */ accumulator, current ) =>\n\t\t\t\t\taccumulator.concat( current ), // Flatten list.\n\t\t\t\t[]\n\t\t\t)\n\t\t\t.filter(\n\t\t\t\t/**\n\t\t\t\t * @param {{ id: number }} result\n\t\t\t\t */\n\t\t\t\t( result ) => {\n\t\t\t\t\treturn !! result.id;\n\t\t\t\t}\n\t\t\t)\n\t\t\t.slice( 0, perPage )\n\t\t\t.map( ( /** @type {WPLinkSearchResultAugmented} */ result ) => {\n\t\t\t\tconst isMedia = result.type === 'attachment';\n\n\t\t\t\treturn {\n\t\t\t\t\tid: result.id,\n\t\t\t\t\t// @ts-ignore fix when we make this a TS file\n\t\t\t\t\turl: isMedia ? result.source_url : result.url,\n\t\t\t\t\ttitle:\n\t\t\t\t\t\tdecodeEntities(\n\t\t\t\t\t\t\tisMedia\n\t\t\t\t\t\t\t\t? // @ts-ignore fix when we make this a TS file\n\t\t\t\t\t\t\t\t result.title.rendered\n\t\t\t\t\t\t\t\t: result.title || ''\n\t\t\t\t\t\t) || __( '(no title)' ),\n\t\t\t\t\ttype: result.subtype || result.type,\n\t\t\t\t\tkind: result?.meta?.kind,\n\t\t\t\t};\n\t\t\t} );\n\t} );\n};\n\nexport default fetchLinkSuggestions;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"names":["apiFetch","addQueryArgs","decodeEntities","__","fetchLinkSuggestions","search","searchOptions","settings","isInitialSuggestions","initialSuggestionsSearchOptions","undefined","disablePostFormats","type","subtype","page","perPage","queries","push","path","per_page","then","results","map","result","meta","kind","catch","Promise","all","reduce","accumulator","current","concat","filter","id","slice","isMedia","url","source_url","title","rendered"],"sources":["@wordpress/core-data/src/fetch/__experimental-fetch-link-suggestions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Filters the search by type\n *\n * @typedef { 'attachment' | 'post' | 'term' | 'post-format' } WPLinkSearchType\n */\n\n/**\n * A link with an id may be of kind post-type or taxonomy\n *\n * @typedef { 'post-type' | 'taxonomy' } WPKind\n */\n\n/**\n * @typedef WPLinkSearchOptions\n *\n * @property {boolean} [isInitialSuggestions] Displays initial search suggestions, when true.\n * @property {WPLinkSearchType} [type] Filters by search type.\n * @property {string} [subtype] Slug of the post-type or taxonomy.\n * @property {number} [page] Which page of results to return.\n * @property {number} [perPage] Search results per page.\n */\n\n/**\n * @typedef WPLinkSearchResult\n *\n * @property {number} id Post or term id.\n * @property {string} url Link url.\n * @property {string} title Title of the link.\n * @property {string} type The taxonomy or post type slug or type URL.\n * @property {WPKind} [kind] Link kind of post-type or taxonomy\n */\n\n/**\n * @typedef WPLinkSearchResultAugments\n *\n * @property {{kind: WPKind}} [meta] Contains kind information.\n * @property {WPKind} [subtype] Optional subtype if it exists.\n */\n\n/**\n * @typedef {WPLinkSearchResult & WPLinkSearchResultAugments} WPLinkSearchResultAugmented\n */\n\n/**\n * @typedef WPEditorSettings\n *\n * @property {boolean} [ disablePostFormats ] Disables post formats, when true.\n */\n\n/**\n * Fetches link suggestions from the API.\n *\n * @async\n * @param {string} search\n * @param {WPLinkSearchOptions} [searchOptions]\n * @param {WPEditorSettings} [settings]\n *\n * @example\n * ```js\n * import { __experimentalFetchLinkSuggestions as fetchLinkSuggestions } from '@wordpress/core-data';\n *\n * //...\n *\n * export function initialize( id, settings ) {\n *\n * settings.__experimentalFetchLinkSuggestions = (\n * search,\n * searchOptions\n * ) => fetchLinkSuggestions( search, searchOptions, settings );\n * ```\n * @return {Promise< WPLinkSearchResult[] >} List of search suggestions\n */\nconst fetchLinkSuggestions = async (\n\tsearch,\n\tsearchOptions = {},\n\tsettings = {}\n) => {\n\tconst {\n\t\tisInitialSuggestions = false,\n\t\tinitialSuggestionsSearchOptions = undefined,\n\t} = searchOptions;\n\n\tconst { disablePostFormats = false } = settings;\n\n\tlet {\n\t\ttype = undefined,\n\t\tsubtype = undefined,\n\t\tpage = undefined,\n\t\tperPage = isInitialSuggestions ? 3 : 20,\n\t} = searchOptions;\n\n\t/** @type {Promise<WPLinkSearchResult>[]} */\n\tconst queries = [];\n\n\tif ( isInitialSuggestions && initialSuggestionsSearchOptions ) {\n\t\ttype = initialSuggestionsSearchOptions.type || type;\n\t\tsubtype = initialSuggestionsSearchOptions.subtype || subtype;\n\t\tpage = initialSuggestionsSearchOptions.page || page;\n\t\tperPage = initialSuggestionsSearchOptions.perPage || perPage;\n\t}\n\n\tif ( ! type || type === 'post' ) {\n\t\tqueries.push(\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/search', {\n\t\t\t\t\tsearch,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tsubtype,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.then( ( results ) => {\n\t\t\t\t\treturn results.map( ( result ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\tmeta: { kind: 'post-type', subtype },\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => [] ) // Fail by returning no results.\n\t\t);\n\t}\n\n\tif ( ! type || type === 'term' ) {\n\t\tqueries.push(\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/search', {\n\t\t\t\t\tsearch,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\ttype: 'term',\n\t\t\t\t\tsubtype,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.then( ( results ) => {\n\t\t\t\t\treturn results.map( ( result ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\tmeta: { kind: 'taxonomy', subtype },\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => [] ) // Fail by returning no results.\n\t\t);\n\t}\n\n\tif ( ! disablePostFormats && ( ! type || type === 'post-format' ) ) {\n\t\tqueries.push(\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/search', {\n\t\t\t\t\tsearch,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\ttype: 'post-format',\n\t\t\t\t\tsubtype,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.then( ( results ) => {\n\t\t\t\t\treturn results.map( ( result ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\tmeta: { kind: 'taxonomy', subtype },\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => [] ) // Fail by returning no results.\n\t\t);\n\t}\n\n\tif ( ! type || type === 'attachment' ) {\n\t\tqueries.push(\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/media', {\n\t\t\t\t\tsearch,\n\t\t\t\t\tpage,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.then( ( results ) => {\n\t\t\t\t\treturn results.map( ( result ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\tmeta: { kind: 'media' },\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => [] ) // Fail by returning no results.\n\t\t);\n\t}\n\n\treturn Promise.all( queries ).then( ( results ) => {\n\t\treturn results\n\t\t\t.reduce(\n\t\t\t\t( /** @type {WPLinkSearchResult[]} */ accumulator, current ) =>\n\t\t\t\t\taccumulator.concat( current ), // Flatten list.\n\t\t\t\t[]\n\t\t\t)\n\t\t\t.filter(\n\t\t\t\t/**\n\t\t\t\t * @param {{ id: number }} result\n\t\t\t\t */\n\t\t\t\t( result ) => {\n\t\t\t\t\treturn !! result.id;\n\t\t\t\t}\n\t\t\t)\n\t\t\t.slice( 0, perPage )\n\t\t\t.map( ( /** @type {WPLinkSearchResultAugmented} */ result ) => {\n\t\t\t\tconst isMedia = result.type === 'attachment';\n\n\t\t\t\treturn {\n\t\t\t\t\tid: result.id,\n\t\t\t\t\t// @ts-ignore fix when we make this a TS file\n\t\t\t\t\turl: isMedia ? result.source_url : result.url,\n\t\t\t\t\ttitle:\n\t\t\t\t\t\tdecodeEntities(\n\t\t\t\t\t\t\tisMedia\n\t\t\t\t\t\t\t\t? // @ts-ignore fix when we make this a TS file\n\t\t\t\t\t\t\t\t result.title.rendered\n\t\t\t\t\t\t\t\t: result.title || ''\n\t\t\t\t\t\t) || __( '(no title)' ),\n\t\t\t\t\ttype: result.subtype || result.type,\n\t\t\t\t\tkind: result?.meta?.kind,\n\t\t\t\t};\n\t\t\t} );\n\t} );\n};\n\nexport default fetchLinkSuggestions;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["apiFetch","addQueryArgs","prependHTTP","isURL","getProtocol","isValidProtocol","CACHE","Map","fetchUrlData","url","options","endpoint","args","Promise","reject","protocol","startsWith","test","has","get","path","then","res","set"],"sources":["@wordpress/core-data/src/fetch/__experimental-fetch-url-data.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport {\n\taddQueryArgs,\n\tprependHTTP,\n\tisURL,\n\tgetProtocol,\n\tisValidProtocol,\n} from '@wordpress/url';\n\n/**\n * A simple in-memory cache for requests.\n * This avoids repeat HTTP requests which may be beneficial\n * for those wishing to preserve low-bandwidth.\n */\nconst CACHE = new Map();\n\n/**\n * @typedef WPRemoteUrlData\n *\n * @property {string} title contents of the remote URL's `<title>` tag.\n */\n\n/**\n * Fetches data about a remote URL.\n * eg: <title> tag, favicon...etc.\n *\n * @async\n * @param {string} url the URL to request details from.\n * @param {Object?} options any options to pass to the underlying fetch.\n * @example\n * ```js\n * import { __experimentalFetchUrlData as fetchUrlData } from '@wordpress/core-data';\n *\n * //...\n *\n * export function initialize( id, settings ) {\n *\n * settings.__experimentalFetchUrlData = (\n * url\n * ) => fetchUrlData( url );\n * ```\n * @return {Promise< WPRemoteUrlData[] >} Remote URL data.\n */\nconst fetchUrlData = async ( url, options = {} ) => {\n\tconst endpoint = '/wp-block-editor/v1/url-details';\n\n\tconst args = {\n\t\turl: prependHTTP( url ),\n\t};\n\n\tif ( ! isURL( url ) ) {\n\t\treturn Promise.reject( `${ url } is not a valid URL.` );\n\t}\n\n\t// Test for \"http\" based URL as it is possible for valid\n\t// yet unusable URLs such as `tel:123456` to be passed.\n\tconst protocol = getProtocol( url );\n\n\tif (\n\t\t! protocol ||\n\t\t! isValidProtocol( protocol ) ||\n\t\t! protocol.startsWith( 'http' ) ||\n\t\t! /^https?:\\/\\/[^\\/\\s]/i.test( url )\n\t) {\n\t\treturn Promise.reject(\n\t\t\t`${ url } does not have a valid protocol. URLs must be \"http\" based`\n\t\t);\n\t}\n\n\tif ( CACHE.has( url ) ) {\n\t\treturn CACHE.get( url );\n\t}\n\n\treturn apiFetch( {\n\t\tpath: addQueryArgs( endpoint, args ),\n\t\t...options,\n\t} ).then( ( res ) => {\n\t\tCACHE.set( url, res );\n\t\treturn res;\n\t} );\n};\n\nexport default fetchUrlData;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAQ,MAAM,sBAAsB;AAC3C,SACCC,YAAY,EACZC,WAAW,EACXC,KAAK,EACLC,WAAW,EACXC,eAAe,QACT,gBAAgB;;AAEvB;AACA;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC;;AAEvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,MAAAA,CAAQC,GAAG,EAAEC,OAAO,GAAG,CAAC,CAAC,KAAM;EACnD,MAAMC,QAAQ,GAAG,iCAAiC;EAElD,MAAMC,IAAI,GAAG;IACZH,GAAG,EAAEP,WAAW,CAAEO,GAAI;EACvB,CAAC;EAED,IAAK,CAAEN,KAAK,CAAEM,GAAI,CAAC,EAAG;IACrB,OAAOI,OAAO,CAACC,MAAM,CAAG,GAAGL,GAAK,sBAAsB,CAAC;EACxD;;EAEA;EACA;EACA,MAAMM,QAAQ,GAAGX,WAAW,CAAEK,GAAI,CAAC;EAEnC,IACC,CAAEM,QAAQ,IACV,CAAEV,eAAe,CAAEU,QAAS,CAAC,IAC7B,CAAEA,QAAQ,CAACC,UAAU,CAAE,MAAO,CAAC,IAC/B,CAAE,sBAAsB,CAACC,IAAI,CAAER,GAAI,CAAC,EACnC;IACD,OAAOI,OAAO,CAACC,MAAM,CACnB,GAAGL,GAAK,4DACV,CAAC;EACF;EAEA,IAAKH,KAAK,CAACY,GAAG,CAAET,GAAI,CAAC,EAAG;IACvB,OAAOH,KAAK,CAACa,GAAG,CAAEV,GAAI,CAAC;EACxB;EAEA,OAAOT,QAAQ,CAAE;IAChBoB,IAAI,EAAEnB,YAAY,CAAEU,QAAQ,EAAEC,IAAK,CAAC;IACpC,GAAGF;EACJ,CAAE,CAAC,CAACW,IAAI,CAAIC,GAAG,IAAM;IACpBhB,KAAK,CAACiB,GAAG,CAAEd,GAAG,EAAEa,GAAI,CAAC;IACrB,OAAOA,GAAG;EACX,CAAE,CAAC;AACJ,CAAC;AAED,eAAed,YAAY"}
|
|
1
|
+
{"version":3,"names":["apiFetch","addQueryArgs","prependHTTP","isURL","getProtocol","isValidProtocol","CACHE","Map","fetchUrlData","url","options","endpoint","args","Promise","reject","protocol","startsWith","test","has","get","path","then","res","set"],"sources":["@wordpress/core-data/src/fetch/__experimental-fetch-url-data.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport {\n\taddQueryArgs,\n\tprependHTTP,\n\tisURL,\n\tgetProtocol,\n\tisValidProtocol,\n} from '@wordpress/url';\n\n/**\n * A simple in-memory cache for requests.\n * This avoids repeat HTTP requests which may be beneficial\n * for those wishing to preserve low-bandwidth.\n */\nconst CACHE = new Map();\n\n/**\n * @typedef WPRemoteUrlData\n *\n * @property {string} title contents of the remote URL's `<title>` tag.\n */\n\n/**\n * Fetches data about a remote URL.\n * eg: <title> tag, favicon...etc.\n *\n * @async\n * @param {string} url the URL to request details from.\n * @param {Object?} options any options to pass to the underlying fetch.\n * @example\n * ```js\n * import { __experimentalFetchUrlData as fetchUrlData } from '@wordpress/core-data';\n *\n * //...\n *\n * export function initialize( id, settings ) {\n *\n * settings.__experimentalFetchUrlData = (\n * url\n * ) => fetchUrlData( url );\n * ```\n * @return {Promise< WPRemoteUrlData[] >} Remote URL data.\n */\nconst fetchUrlData = async ( url, options = {} ) => {\n\tconst endpoint = '/wp-block-editor/v1/url-details';\n\n\tconst args = {\n\t\turl: prependHTTP( url ),\n\t};\n\n\tif ( ! isURL( url ) ) {\n\t\treturn Promise.reject( `${ url } is not a valid URL.` );\n\t}\n\n\t// Test for \"http\" based URL as it is possible for valid\n\t// yet unusable URLs such as `tel:123456` to be passed.\n\tconst protocol = getProtocol( url );\n\n\tif (\n\t\t! protocol ||\n\t\t! isValidProtocol( protocol ) ||\n\t\t! protocol.startsWith( 'http' ) ||\n\t\t! /^https?:\\/\\/[^\\/\\s]/i.test( url )\n\t) {\n\t\treturn Promise.reject(\n\t\t\t`${ url } does not have a valid protocol. URLs must be \"http\" based`\n\t\t);\n\t}\n\n\tif ( CACHE.has( url ) ) {\n\t\treturn CACHE.get( url );\n\t}\n\n\treturn apiFetch( {\n\t\tpath: addQueryArgs( endpoint, args ),\n\t\t...options,\n\t} ).then( ( res ) => {\n\t\tCACHE.set( url, res );\n\t\treturn res;\n\t} );\n};\n\nexport default fetchUrlData;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAQ,MAAM,sBAAsB;AAC3C,SACCC,YAAY,EACZC,WAAW,EACXC,KAAK,EACLC,WAAW,EACXC,eAAe,QACT,gBAAgB;;AAEvB;AACA;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC;;AAEvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,MAAAA,CAAQC,GAAG,EAAEC,OAAO,GAAG,CAAC,CAAC,KAAM;EACnD,MAAMC,QAAQ,GAAG,iCAAiC;EAElD,MAAMC,IAAI,GAAG;IACZH,GAAG,EAAEP,WAAW,CAAEO,GAAI;EACvB,CAAC;EAED,IAAK,CAAEN,KAAK,CAAEM,GAAI,CAAC,EAAG;IACrB,OAAOI,OAAO,CAACC,MAAM,CAAG,GAAGL,GAAK,sBAAsB,CAAC;EACxD;;EAEA;EACA;EACA,MAAMM,QAAQ,GAAGX,WAAW,CAAEK,GAAI,CAAC;EAEnC,IACC,CAAEM,QAAQ,IACV,CAAEV,eAAe,CAAEU,QAAS,CAAC,IAC7B,CAAEA,QAAQ,CAACC,UAAU,CAAE,MAAO,CAAC,IAC/B,CAAE,sBAAsB,CAACC,IAAI,CAAER,GAAI,CAAC,EACnC;IACD,OAAOI,OAAO,CAACC,MAAM,CACnB,GAAGL,GAAK,4DACV,CAAC;EACF;EAEA,IAAKH,KAAK,CAACY,GAAG,CAAET,GAAI,CAAC,EAAG;IACvB,OAAOH,KAAK,CAACa,GAAG,CAAEV,GAAI,CAAC;EACxB;EAEA,OAAOT,QAAQ,CAAE;IAChBoB,IAAI,EAAEnB,YAAY,CAAEU,QAAQ,EAAEC,IAAK,CAAC;IACpC,GAAGF;EACJ,CAAE,CAAC,CAACW,IAAI,CAAIC,GAAG,IAAM;IACpBhB,KAAK,CAACiB,GAAG,CAAEd,GAAG,EAAEa,GAAI,CAAC;IACrB,OAAOA,GAAG;EACX,CAAE,CAAC;AACJ,CAAC;AAED,eAAed,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["camelCase","apiFetch","default","__experimentalFetchLinkSuggestions","__experimentalFetchUrlData","fetchBlockPatterns","restPatterns","path","map","pattern","Object","fromEntries","entries","key","value"],"sources":["@wordpress/core-data/src/fetch/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { camelCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\nexport { default as __experimentalFetchLinkSuggestions } from './__experimental-fetch-link-suggestions';\nexport { default as __experimentalFetchUrlData } from './__experimental-fetch-url-data';\n\nexport async function fetchBlockPatterns() {\n\tconst restPatterns = await apiFetch( {\n\t\tpath: '/wp/v2/block-patterns/patterns',\n\t} );\n\tif ( ! restPatterns ) {\n\t\treturn [];\n\t}\n\treturn restPatterns.map( ( pattern ) =>\n\t\tObject.fromEntries(\n\t\t\tObject.entries( pattern ).map( ( [ key, value ] ) => [\n\t\t\t\tcamelCase( key ),\n\t\t\t\tvalue,\n\t\t\t] )\n\t\t)\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,aAAa;;AAEvC;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,sBAAsB;AAE3C,SAASC,OAAO,IAAIC,kCAAkC,QAAQ,yCAAyC;AACvG,SAASD,OAAO,IAAIE,0BAA0B,QAAQ,iCAAiC;AAEvF,OAAO,eAAeC,kBAAkBA,CAAA,EAAG;EAC1C,MAAMC,YAAY,GAAG,MAAML,QAAQ,CAAE;IACpCM,IAAI,EAAE;EACP,CAAE,CAAC;EACH,IAAK,CAAED,YAAY,EAAG;IACrB,OAAO,EAAE;EACV;EACA,OAAOA,YAAY,CAACE,GAAG,CAAIC,OAAO,IACjCC,MAAM,CAACC,WAAW,CACjBD,MAAM,CAACE,OAAO,CAAEH,OAAQ,CAAC,CAACD,GAAG,CAAE,CAAE,CAAEK,GAAG,EAAEC,KAAK,CAAE,KAAM,CACpDd,SAAS,CAAEa,GAAI,CAAC,EAChBC,KAAK,CACJ,CACH,CACD,CAAC;AACF"}
|
|
1
|
+
{"version":3,"names":["camelCase","apiFetch","default","__experimentalFetchLinkSuggestions","__experimentalFetchUrlData","fetchBlockPatterns","restPatterns","path","map","pattern","Object","fromEntries","entries","key","value"],"sources":["@wordpress/core-data/src/fetch/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { camelCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\nexport { default as __experimentalFetchLinkSuggestions } from './__experimental-fetch-link-suggestions';\nexport { default as __experimentalFetchUrlData } from './__experimental-fetch-url-data';\n\nexport async function fetchBlockPatterns() {\n\tconst restPatterns = await apiFetch( {\n\t\tpath: '/wp/v2/block-patterns/patterns',\n\t} );\n\tif ( ! restPatterns ) {\n\t\treturn [];\n\t}\n\treturn restPatterns.map( ( pattern ) =>\n\t\tObject.fromEntries(\n\t\t\tObject.entries( pattern ).map( ( [ key, value ] ) => [\n\t\t\t\tcamelCase( key ),\n\t\t\t\tvalue,\n\t\t\t] )\n\t\t)\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,aAAa;;AAEvC;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,sBAAsB;AAE3C,SAASC,OAAO,IAAIC,kCAAkC,QAAQ,yCAAyC;AACvG,SAASD,OAAO,IAAIE,0BAA0B,QAAQ,iCAAiC;AAEvF,OAAO,eAAeC,kBAAkBA,CAAA,EAAG;EAC1C,MAAMC,YAAY,GAAG,MAAML,QAAQ,CAAE;IACpCM,IAAI,EAAE;EACP,CAAE,CAAC;EACH,IAAK,CAAED,YAAY,EAAG;IACrB,OAAO,EAAE;EACV;EACA,OAAOA,YAAY,CAACE,GAAG,CAAIC,OAAO,IACjCC,MAAM,CAACC,WAAW,CACjBD,MAAM,CAACE,OAAO,CAAEH,OAAQ,CAAC,CAACD,GAAG,CAAE,CAAE,CAAEK,GAAG,EAAEC,KAAK,CAAE,KAAM,CACpDd,SAAS,CAAEa,GAAI,CAAC,EAChBC,KAAK,CACJ,CACH,CACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getRichTextValuesCached","cache","WeakMap","getBlockFootnotesOrder","block","has","order","value","replacements","forEach","type","attributes","push","set","get","getFootnotesOrder","blocks","flatMap"],"sources":["@wordpress/core-data/src/footnotes/get-footnotes-order.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport getRichTextValuesCached from './get-rich-text-values-cached';\n\nconst cache = new WeakMap();\n\nfunction getBlockFootnotesOrder( block ) {\n\tif ( ! cache.has( block ) ) {\n\t\tconst order = [];\n\t\tfor ( const value of getRichTextValuesCached( block ) ) {\n\t\t\tif ( ! value ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// replacements is a sparse array, use forEach to skip empty slots.\n\t\t\tvalue.replacements.forEach( ( { type, attributes } ) => {\n\t\t\t\tif ( type === 'core/footnote' ) {\n\t\t\t\t\torder.push( attributes[ 'data-fn' ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\tcache.set( block, order );\n\t}\n\n\treturn cache.get( block );\n}\n\nexport default function getFootnotesOrder( blocks ) {\n\t// We can only separate getting order from blocks at the root level. For\n\t// deeper inner blocks, this will not work since it's possible to have both\n\t// inner blocks and block attributes, so order needs to be computed from the\n\t// Edit functions as a whole.\n\treturn blocks.flatMap( getBlockFootnotesOrder );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,uBAAuB,MAAM,+BAA+B;AAEnE,MAAMC,KAAK,GAAG,IAAIC,OAAO,CAAC,CAAC;AAE3B,SAASC,sBAAsBA,CAAEC,KAAK,EAAG;EACxC,IAAK,CAAEH,KAAK,CAACI,GAAG,CAAED,KAAM,CAAC,EAAG;IAC3B,MAAME,KAAK,GAAG,EAAE;IAChB,KAAM,MAAMC,KAAK,IAAIP,uBAAuB,CAAEI,KAAM,CAAC,EAAG;MACvD,IAAK,CAAEG,KAAK,EAAG;QACd;MACD;;MAEA;MACAA,KAAK,CAACC,YAAY,CAACC,OAAO,CAAE,CAAE;QAAEC,IAAI;QAAEC;MAAW,CAAC,KAAM;QACvD,IAAKD,IAAI,KAAK,eAAe,EAAG;UAC/BJ,KAAK,CAACM,IAAI,CAAED,UAAU,CAAE,SAAS,CAAG,CAAC;QACtC;MACD,CAAE,CAAC;IACJ;IACAV,KAAK,CAACY,GAAG,CAAET,KAAK,EAAEE,KAAM,CAAC;EAC1B;EAEA,OAAOL,KAAK,CAACa,GAAG,CAAEV,KAAM,CAAC;AAC1B;AAEA,eAAe,SAASW,iBAAiBA,CAAEC,MAAM,EAAG;EACnD;EACA;EACA;EACA;EACA,OAAOA,MAAM,CAACC,OAAO,CAAEd,sBAAuB,CAAC;AAChD"}
|
|
1
|
+
{"version":3,"names":["getRichTextValuesCached","cache","WeakMap","getBlockFootnotesOrder","block","has","order","value","replacements","forEach","type","attributes","push","set","get","getFootnotesOrder","blocks","flatMap"],"sources":["@wordpress/core-data/src/footnotes/get-footnotes-order.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport getRichTextValuesCached from './get-rich-text-values-cached';\n\nconst cache = new WeakMap();\n\nfunction getBlockFootnotesOrder( block ) {\n\tif ( ! cache.has( block ) ) {\n\t\tconst order = [];\n\t\tfor ( const value of getRichTextValuesCached( block ) ) {\n\t\t\tif ( ! value ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// replacements is a sparse array, use forEach to skip empty slots.\n\t\t\tvalue.replacements.forEach( ( { type, attributes } ) => {\n\t\t\t\tif ( type === 'core/footnote' ) {\n\t\t\t\t\torder.push( attributes[ 'data-fn' ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\tcache.set( block, order );\n\t}\n\n\treturn cache.get( block );\n}\n\nexport default function getFootnotesOrder( blocks ) {\n\t// We can only separate getting order from blocks at the root level. For\n\t// deeper inner blocks, this will not work since it's possible to have both\n\t// inner blocks and block attributes, so order needs to be computed from the\n\t// Edit functions as a whole.\n\treturn blocks.flatMap( getBlockFootnotesOrder );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,uBAAuB,MAAM,+BAA+B;AAEnE,MAAMC,KAAK,GAAG,IAAIC,OAAO,CAAC,CAAC;AAE3B,SAASC,sBAAsBA,CAAEC,KAAK,EAAG;EACxC,IAAK,CAAEH,KAAK,CAACI,GAAG,CAAED,KAAM,CAAC,EAAG;IAC3B,MAAME,KAAK,GAAG,EAAE;IAChB,KAAM,MAAMC,KAAK,IAAIP,uBAAuB,CAAEI,KAAM,CAAC,EAAG;MACvD,IAAK,CAAEG,KAAK,EAAG;QACd;MACD;;MAEA;MACAA,KAAK,CAACC,YAAY,CAACC,OAAO,CAAE,CAAE;QAAEC,IAAI;QAAEC;MAAW,CAAC,KAAM;QACvD,IAAKD,IAAI,KAAK,eAAe,EAAG;UAC/BJ,KAAK,CAACM,IAAI,CAAED,UAAU,CAAE,SAAS,CAAG,CAAC;QACtC;MACD,CAAE,CAAC;IACJ;IACAV,KAAK,CAACY,GAAG,CAAET,KAAK,EAAEE,KAAM,CAAC;EAC1B;EAEA,OAAOL,KAAK,CAACa,GAAG,CAAEV,KAAM,CAAC;AAC1B;AAEA,eAAe,SAASW,iBAAiBA,CAAEC,MAAM,EAAG;EACnD;EACA;EACA;EACA;EACA,OAAOA,MAAM,CAACC,OAAO,CAAEd,sBAAuB,CAAC;AAChD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","blockEditorPrivateApis","unlock","unlockedApis","cache","WeakMap","getRichTextValuesCached","block","has","values","getRichTextValues","set","get"],"sources":["@wordpress/core-data/src/footnotes/get-rich-text-values-cached.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../private-apis';\n\n// TODO: The following line should have been:\n//\n// const unlockedApis = unlock( blockEditorPrivateApis );\n//\n// But there are hidden circular dependencies in RNMobile code, specifically in\n// certain native components in the `components` package that depend on\n// `block-editor`. What follows is a workaround that defers the `unlock` call\n// to prevent native code from failing.\n//\n// Fix once https://github.com/WordPress/gutenberg/issues/52692 is closed.\nlet unlockedApis;\n\nconst cache = new WeakMap();\n\nexport default function getRichTextValuesCached( block ) {\n\tif ( ! unlockedApis ) {\n\t\tunlockedApis = unlock( blockEditorPrivateApis );\n\t}\n\n\tif ( ! cache.has( block ) ) {\n\t\tconst values = unlockedApis.getRichTextValues( [ block ] );\n\t\tcache.set( block, values );\n\t}\n\treturn cache.get( block );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,YAAY;AAEhB,MAAMC,KAAK,GAAG,IAAIC,OAAO,CAAC,CAAC;AAE3B,eAAe,SAASC,uBAAuBA,CAAEC,KAAK,EAAG;EACxD,IAAK,CAAEJ,YAAY,EAAG;IACrBA,YAAY,GAAGD,MAAM,CAAED,sBAAuB,CAAC;EAChD;EAEA,IAAK,CAAEG,KAAK,CAACI,GAAG,CAAED,KAAM,CAAC,EAAG;IAC3B,MAAME,MAAM,GAAGN,YAAY,CAACO,iBAAiB,CAAE,CAAEH,KAAK,CAAG,CAAC;IAC1DH,KAAK,CAACO,GAAG,CAAEJ,KAAK,EAAEE,MAAO,CAAC;EAC3B;EACA,OAAOL,KAAK,CAACQ,GAAG,CAAEL,KAAM,CAAC;AAC1B"}
|
|
1
|
+
{"version":3,"names":["privateApis","blockEditorPrivateApis","unlock","unlockedApis","cache","WeakMap","getRichTextValuesCached","block","has","values","getRichTextValues","set","get"],"sources":["@wordpress/core-data/src/footnotes/get-rich-text-values-cached.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../private-apis';\n\n// TODO: The following line should have been:\n//\n// const unlockedApis = unlock( blockEditorPrivateApis );\n//\n// But there are hidden circular dependencies in RNMobile code, specifically in\n// certain native components in the `components` package that depend on\n// `block-editor`. What follows is a workaround that defers the `unlock` call\n// to prevent native code from failing.\n//\n// Fix once https://github.com/WordPress/gutenberg/issues/52692 is closed.\nlet unlockedApis;\n\nconst cache = new WeakMap();\n\nexport default function getRichTextValuesCached( block ) {\n\tif ( ! unlockedApis ) {\n\t\tunlockedApis = unlock( blockEditorPrivateApis );\n\t}\n\n\tif ( ! cache.has( block ) ) {\n\t\tconst values = unlockedApis.getRichTextValues( [ block ] );\n\t\tcache.set( block, values );\n\t}\n\treturn cache.get( block );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,YAAY;AAEhB,MAAMC,KAAK,GAAG,IAAIC,OAAO,CAAC,CAAC;AAE3B,eAAe,SAASC,uBAAuBA,CAAEC,KAAK,EAAG;EACxD,IAAK,CAAEJ,YAAY,EAAG;IACrBA,YAAY,GAAGD,MAAM,CAAED,sBAAuB,CAAC;EAChD;EAEA,IAAK,CAAEG,KAAK,CAACI,GAAG,CAAED,KAAM,CAAC,EAAG;IAC3B,MAAME,MAAM,GAAGN,YAAY,CAACO,iBAAiB,CAAE,CAAEH,KAAK,CAAG,CAAC;IAC1DH,KAAK,CAACO,GAAG,CAAEJ,KAAK,EAAEE,MAAO,CAAC;EAC3B;EACA,OAAOL,KAAK,CAACQ,GAAG,CAAEL,KAAM,CAAC;AAC1B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RichTextData","create","toHTMLString","getFootnotesOrder","oldFootnotes","updateFootnotesFromMeta","blocks","meta","output","footnotes","undefined","newOrder","JSON","parse","currentOrder","map","fn","id","join","newFootnotes","fnId","find","content","updateAttributes","attributes","Array","isArray","key","value","richTextValue","fromHTMLString","replacements","forEach","replacement","type","index","indexOf","countValue","html","innerHTML","text","String","formats","from","length","updateBlocksAttributes","__blocks","block","innerBlocks","newBlocks","reduce","acc","includes","stringify"],"sources":["@wordpress/core-data/src/footnotes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichTextData, create, toHTMLString } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport getFootnotesOrder from './get-footnotes-order';\n\nlet oldFootnotes = {};\n\nexport function updateFootnotesFromMeta( blocks, meta ) {\n\tconst output = { blocks };\n\tif ( ! meta ) return output;\n\n\t// If meta.footnotes is empty, it means the meta is not registered.\n\tif ( meta.footnotes === undefined ) return output;\n\n\tconst newOrder = getFootnotesOrder( blocks );\n\n\tconst footnotes = meta.footnotes ? JSON.parse( meta.footnotes ) : [];\n\tconst currentOrder = footnotes.map( ( fn ) => fn.id );\n\n\tif ( currentOrder.join( '' ) === newOrder.join( '' ) ) return output;\n\n\tconst newFootnotes = newOrder.map(\n\t\t( fnId ) =>\n\t\t\tfootnotes.find( ( fn ) => fn.id === fnId ) ||\n\t\t\toldFootnotes[ fnId ] || {\n\t\t\t\tid: fnId,\n\t\t\t\tcontent: '',\n\t\t\t}\n\t);\n\n\tfunction updateAttributes( attributes ) {\n\t\t// Only attempt to update attributes, if attributes is an object.\n\t\tif (\n\t\t\t! attributes ||\n\t\t\tArray.isArray( attributes ) ||\n\t\t\ttypeof attributes !== 'object'\n\t\t) {\n\t\t\treturn attributes;\n\t\t}\n\n\t\tattributes = { ...attributes };\n\n\t\tfor ( const key in attributes ) {\n\t\t\tconst value = attributes[ key ];\n\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\tattributes[ key ] = value.map( updateAttributes );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// To do, remove support for string values?\n\t\t\tif (\n\t\t\t\ttypeof value !== 'string' &&\n\t\t\t\t! ( value instanceof RichTextData )\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst richTextValue =\n\t\t\t\ttypeof value === 'string'\n\t\t\t\t\t? RichTextData.fromHTMLString( value )\n\t\t\t\t\t: new RichTextData( value );\n\n\t\t\trichTextValue.replacements.forEach( ( replacement ) => {\n\t\t\t\tif ( replacement.type === 'core/footnote' ) {\n\t\t\t\t\tconst id = replacement.attributes[ 'data-fn' ];\n\t\t\t\t\tconst index = newOrder.indexOf( id );\n\t\t\t\t\t// The innerHTML contains the count wrapped in a link.\n\t\t\t\t\tconst countValue = create( {\n\t\t\t\t\t\thtml: replacement.innerHTML,\n\t\t\t\t\t} );\n\t\t\t\t\tcountValue.text = String( index + 1 );\n\t\t\t\t\tcountValue.formats = Array.from(\n\t\t\t\t\t\t{ length: countValue.text.length },\n\t\t\t\t\t\t() => countValue.formats[ 0 ]\n\t\t\t\t\t);\n\t\t\t\t\tcountValue.replacements = Array.from(\n\t\t\t\t\t\t{ length: countValue.text.length },\n\t\t\t\t\t\t() => countValue.replacements[ 0 ]\n\t\t\t\t\t);\n\t\t\t\t\treplacement.innerHTML = toHTMLString( {\n\t\t\t\t\t\tvalue: countValue,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tattributes[ key ] =\n\t\t\t\ttypeof value === 'string'\n\t\t\t\t\t? richTextValue.toHTMLString()\n\t\t\t\t\t: richTextValue;\n\t\t}\n\n\t\treturn attributes;\n\t}\n\n\tfunction updateBlocksAttributes( __blocks ) {\n\t\treturn __blocks.map( ( block ) => {\n\t\t\treturn {\n\t\t\t\t...block,\n\t\t\t\tattributes: updateAttributes( block.attributes ),\n\t\t\t\tinnerBlocks: updateBlocksAttributes( block.innerBlocks ),\n\t\t\t};\n\t\t} );\n\t}\n\n\t// We need to go through all block attributes deeply and update the\n\t// footnote anchor numbering (textContent) to match the new order.\n\tconst newBlocks = updateBlocksAttributes( blocks );\n\n\toldFootnotes = {\n\t\t...oldFootnotes,\n\t\t...footnotes.reduce( ( acc, fn ) => {\n\t\t\tif ( ! newOrder.includes( fn.id ) ) {\n\t\t\t\tacc[ fn.id ] = fn;\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, {} ),\n\t};\n\n\treturn {\n\t\tmeta: {\n\t\t\t...meta,\n\t\t\tfootnotes: JSON.stringify( newFootnotes ),\n\t\t},\n\t\tblocks: newBlocks,\n\t};\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"names":["RichTextData","create","toHTMLString","getFootnotesOrder","oldFootnotes","updateFootnotesFromMeta","blocks","meta","output","footnotes","undefined","newOrder","JSON","parse","currentOrder","map","fn","id","join","newFootnotes","fnId","find","content","updateAttributes","attributes","Array","isArray","key","value","richTextValue","fromHTMLString","replacements","forEach","replacement","type","index","indexOf","countValue","html","innerHTML","text","String","formats","from","length","updateBlocksAttributes","__blocks","block","innerBlocks","newBlocks","reduce","acc","includes","stringify"],"sources":["@wordpress/core-data/src/footnotes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichTextData, create, toHTMLString } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport getFootnotesOrder from './get-footnotes-order';\n\nlet oldFootnotes = {};\n\nexport function updateFootnotesFromMeta( blocks, meta ) {\n\tconst output = { blocks };\n\tif ( ! meta ) return output;\n\n\t// If meta.footnotes is empty, it means the meta is not registered.\n\tif ( meta.footnotes === undefined ) return output;\n\n\tconst newOrder = getFootnotesOrder( blocks );\n\n\tconst footnotes = meta.footnotes ? JSON.parse( meta.footnotes ) : [];\n\tconst currentOrder = footnotes.map( ( fn ) => fn.id );\n\n\tif ( currentOrder.join( '' ) === newOrder.join( '' ) ) return output;\n\n\tconst newFootnotes = newOrder.map(\n\t\t( fnId ) =>\n\t\t\tfootnotes.find( ( fn ) => fn.id === fnId ) ||\n\t\t\toldFootnotes[ fnId ] || {\n\t\t\t\tid: fnId,\n\t\t\t\tcontent: '',\n\t\t\t}\n\t);\n\n\tfunction updateAttributes( attributes ) {\n\t\t// Only attempt to update attributes, if attributes is an object.\n\t\tif (\n\t\t\t! attributes ||\n\t\t\tArray.isArray( attributes ) ||\n\t\t\ttypeof attributes !== 'object'\n\t\t) {\n\t\t\treturn attributes;\n\t\t}\n\n\t\tattributes = { ...attributes };\n\n\t\tfor ( const key in attributes ) {\n\t\t\tconst value = attributes[ key ];\n\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\tattributes[ key ] = value.map( updateAttributes );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// To do, remove support for string values?\n\t\t\tif (\n\t\t\t\ttypeof value !== 'string' &&\n\t\t\t\t! ( value instanceof RichTextData )\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst richTextValue =\n\t\t\t\ttypeof value === 'string'\n\t\t\t\t\t? RichTextData.fromHTMLString( value )\n\t\t\t\t\t: new RichTextData( value );\n\n\t\t\trichTextValue.replacements.forEach( ( replacement ) => {\n\t\t\t\tif ( replacement.type === 'core/footnote' ) {\n\t\t\t\t\tconst id = replacement.attributes[ 'data-fn' ];\n\t\t\t\t\tconst index = newOrder.indexOf( id );\n\t\t\t\t\t// The innerHTML contains the count wrapped in a link.\n\t\t\t\t\tconst countValue = create( {\n\t\t\t\t\t\thtml: replacement.innerHTML,\n\t\t\t\t\t} );\n\t\t\t\t\tcountValue.text = String( index + 1 );\n\t\t\t\t\tcountValue.formats = Array.from(\n\t\t\t\t\t\t{ length: countValue.text.length },\n\t\t\t\t\t\t() => countValue.formats[ 0 ]\n\t\t\t\t\t);\n\t\t\t\t\tcountValue.replacements = Array.from(\n\t\t\t\t\t\t{ length: countValue.text.length },\n\t\t\t\t\t\t() => countValue.replacements[ 0 ]\n\t\t\t\t\t);\n\t\t\t\t\treplacement.innerHTML = toHTMLString( {\n\t\t\t\t\t\tvalue: countValue,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tattributes[ key ] =\n\t\t\t\ttypeof value === 'string'\n\t\t\t\t\t? richTextValue.toHTMLString()\n\t\t\t\t\t: richTextValue;\n\t\t}\n\n\t\treturn attributes;\n\t}\n\n\tfunction updateBlocksAttributes( __blocks ) {\n\t\treturn __blocks.map( ( block ) => {\n\t\t\treturn {\n\t\t\t\t...block,\n\t\t\t\tattributes: updateAttributes( block.attributes ),\n\t\t\t\tinnerBlocks: updateBlocksAttributes( block.innerBlocks ),\n\t\t\t};\n\t\t} );\n\t}\n\n\t// We need to go through all block attributes deeply and update the\n\t// footnote anchor numbering (textContent) to match the new order.\n\tconst newBlocks = updateBlocksAttributes( blocks );\n\n\toldFootnotes = {\n\t\t...oldFootnotes,\n\t\t...footnotes.reduce( ( acc, fn ) => {\n\t\t\tif ( ! newOrder.includes( fn.id ) ) {\n\t\t\t\tacc[ fn.id ] = fn;\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, {} ),\n\t};\n\n\treturn {\n\t\tmeta: {\n\t\t\t...meta,\n\t\t\tfootnotes: JSON.stringify( newFootnotes ),\n\t\t},\n\t\tblocks: newBlocks,\n\t};\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Status"],"sources":["@wordpress/core-data/src/hooks/constants.ts"],"sourcesContent":["export const enum Status {\n\tIdle = 'IDLE',\n\tResolving = 'RESOLVING',\n\tError = 'ERROR',\n\tSuccess = 'SUCCESS',\n}\n"],"mappings":"AAAA,WAAkBA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA"}
|
|
1
|
+
{"version":3,"names":["Status"],"sources":["@wordpress/core-data/src/hooks/constants.ts"],"sourcesContent":["export const enum Status {\n\tIdle = 'IDLE',\n\tResolving = 'RESOLVING',\n\tError = 'ERROR',\n\tSuccess = 'SUCCESS',\n}\n"],"mappings":"AAAA,WAAkBA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA","ignoreList":[]}
|