UNPKG

@wordpress/blocks

Version:
212 lines (210 loc) 10.1 kB
var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // packages/blocks/src/api/index.js var api_exports = {}; __export(api_exports, { __EXPERIMENTAL_ELEMENTS: () => import_constants.__EXPERIMENTAL_ELEMENTS, __EXPERIMENTAL_PATHS_WITH_OVERRIDE: () => import_constants.__EXPERIMENTAL_PATHS_WITH_OVERRIDE, __EXPERIMENTAL_STYLE_PROPERTY: () => import_constants.__EXPERIMENTAL_STYLE_PROPERTY, __experimentalCloneSanitizedBlock: () => import_factory.__experimentalCloneSanitizedBlock, __experimentalGetAccessibleBlockLabel: () => import_utils2.getAccessibleBlockLabel, __experimentalGetBlockAttributesNamesByRole: () => import_utils2.__experimentalGetBlockAttributesNamesByRole, __experimentalGetBlockLabel: () => import_utils2.getBlockLabel, __experimentalSanitizeBlockAttributes: () => import_utils2.__experimentalSanitizeBlockAttributes, __unstableGetBlockProps: () => import_serializer.getBlockProps, __unstableGetInnerBlocksProps: () => import_serializer.getInnerBlocksProps, __unstableSerializeAndClean: () => import_serializer.__unstableSerializeAndClean, children: () => import_children.default, cloneBlock: () => import_factory.cloneBlock, createBlock: () => import_factory.createBlock, createBlocksFromInnerBlocksTemplate: () => import_factory.createBlocksFromInnerBlocksTemplate, doBlocksMatchTemplate: () => import_templates.doBlocksMatchTemplate, findTransform: () => import_factory.findTransform, getBlockAttributes: () => import_get_block_attributes.getBlockAttributes, getBlockAttributesNamesByRole: () => import_utils2.getBlockAttributesNamesByRole, getBlockBindingsSource: () => import_registration.getBlockBindingsSource, getBlockBindingsSources: () => import_registration.getBlockBindingsSources, getBlockContent: () => import_serializer.getBlockInnerHTML, getBlockDefaultClassName: () => import_serializer.getBlockDefaultClassName, getBlockFromExample: () => import_factory.getBlockFromExample, getBlockMenuDefaultClassName: () => import_serializer.getBlockMenuDefaultClassName, getBlockSupport: () => import_registration.getBlockSupport, getBlockTransforms: () => import_factory.getBlockTransforms, getBlockType: () => import_registration.getBlockType, getBlockTypes: () => import_registration.getBlockTypes, getBlockVariations: () => import_registration.getBlockVariations, getCategories: () => import_categories.getCategories, getChildBlockNames: () => import_registration.getChildBlockNames, getDefaultBlockName: () => import_registration.getDefaultBlockName, getFreeformContentHandlerName: () => import_registration.getFreeformContentHandlerName, getGroupingBlockName: () => import_registration.getGroupingBlockName, getPhrasingContentSchema: () => import_raw_handling.deprecatedGetPhrasingContentSchema, getPossibleBlockTransformations: () => import_factory.getPossibleBlockTransformations, getSaveContent: () => import_serializer.getSaveContent, getSaveElement: () => import_serializer.getSaveElement, getUnregisteredTypeHandlerName: () => import_registration.getUnregisteredTypeHandlerName, hasBlockSupport: () => import_registration.hasBlockSupport, hasChildBlocks: () => import_registration.hasChildBlocks, hasChildBlocksWithInserterSupport: () => import_registration.hasChildBlocksWithInserterSupport, isReusableBlock: () => import_registration.isReusableBlock, isTemplatePart: () => import_registration.isTemplatePart, isUnmodifiedBlock: () => import_utils2.isUnmodifiedBlock, isUnmodifiedDefaultBlock: () => import_utils2.isUnmodifiedDefaultBlock, isValidBlockContent: () => import_validation.isValidBlockContent, isValidIcon: () => import_utils2.isValidIcon, node: () => import_node.default, normalizeIconObject: () => import_utils2.normalizeIconObject, parse: () => import_parser.default, parseWithAttributeSchema: () => import_get_block_attributes.parseWithAttributeSchema, pasteHandler: () => import_raw_handling.pasteHandler, privateApis: () => privateApis, rawHandler: () => import_raw_handling.rawHandler, registerBlockBindingsSource: () => import_registration.registerBlockBindingsSource, registerBlockCollection: () => import_registration.registerBlockCollection, registerBlockStyle: () => import_registration.registerBlockStyle, registerBlockType: () => import_registration.registerBlockType, registerBlockVariation: () => import_registration.registerBlockVariation, serialize: () => import_serializer.default, serializeRawBlock: () => import_serialize_raw_block.serializeRawBlock, setCategories: () => import_categories.setCategories, setDefaultBlockName: () => import_registration.setDefaultBlockName, setFreeformContentHandlerName: () => import_registration.setFreeformContentHandlerName, setGroupingBlockName: () => import_registration.setGroupingBlockName, setUnregisteredTypeHandlerName: () => import_registration.setUnregisteredTypeHandlerName, switchToBlockType: () => import_factory.switchToBlockType, synchronizeBlocksWithTemplate: () => import_templates.synchronizeBlocksWithTemplate, unregisterBlockBindingsSource: () => import_registration.unregisterBlockBindingsSource, unregisterBlockStyle: () => import_registration.unregisterBlockStyle, unregisterBlockType: () => import_registration.unregisterBlockType, unregisterBlockVariation: () => import_registration.unregisterBlockVariation, unstable__bootstrapServerSideBlockDefinitions: () => import_registration.unstable__bootstrapServerSideBlockDefinitions, updateCategory: () => import_categories.updateCategory, validateBlock: () => import_validation.validateBlock }); module.exports = __toCommonJS(api_exports); var import_lock_unlock = require("../lock-unlock"); var import_utils = require("./utils"); var import_factory = require("./factory"); var import_parser = __toESM(require("./parser")); var import_serialize_raw_block = require("./parser/serialize-raw-block"); var import_get_block_attributes = require("./parser/get-block-attributes"); var import_raw_handling = require("./raw-handling"); var import_serializer = __toESM(require("./serializer")); var import_validation = require("./validation"); var import_categories = require("./categories"); var import_registration = require("./registration"); var import_utils2 = require("./utils"); var import_templates = require("./templates"); var import_children = __toESM(require("./children")); var import_node = __toESM(require("./node")); var import_constants = require("./constants"); var fieldsKey = Symbol("fields"); var formKey = Symbol("form"); var privateApis = {}; (0, import_lock_unlock.lock)(privateApis, { isContentBlock: import_utils.isContentBlock, fieldsKey, formKey }); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { __EXPERIMENTAL_ELEMENTS, __EXPERIMENTAL_PATHS_WITH_OVERRIDE, __EXPERIMENTAL_STYLE_PROPERTY, __experimentalCloneSanitizedBlock, __experimentalGetAccessibleBlockLabel, __experimentalGetBlockAttributesNamesByRole, __experimentalGetBlockLabel, __experimentalSanitizeBlockAttributes, __unstableGetBlockProps, __unstableGetInnerBlocksProps, __unstableSerializeAndClean, children, cloneBlock, createBlock, createBlocksFromInnerBlocksTemplate, doBlocksMatchTemplate, findTransform, getBlockAttributes, getBlockAttributesNamesByRole, getBlockBindingsSource, getBlockBindingsSources, getBlockContent, getBlockDefaultClassName, getBlockFromExample, getBlockMenuDefaultClassName, getBlockSupport, getBlockTransforms, getBlockType, getBlockTypes, getBlockVariations, getCategories, getChildBlockNames, getDefaultBlockName, getFreeformContentHandlerName, getGroupingBlockName, getPhrasingContentSchema, getPossibleBlockTransformations, getSaveContent, getSaveElement, getUnregisteredTypeHandlerName, hasBlockSupport, hasChildBlocks, hasChildBlocksWithInserterSupport, isReusableBlock, isTemplatePart, isUnmodifiedBlock, isUnmodifiedDefaultBlock, isValidBlockContent, isValidIcon, node, normalizeIconObject, parse, parseWithAttributeSchema, pasteHandler, privateApis, rawHandler, registerBlockBindingsSource, registerBlockCollection, registerBlockStyle, registerBlockType, registerBlockVariation, serialize, serializeRawBlock, setCategories, setDefaultBlockName, setFreeformContentHandlerName, setGroupingBlockName, setUnregisteredTypeHandlerName, switchToBlockType, synchronizeBlocksWithTemplate, unregisterBlockBindingsSource, unregisterBlockStyle, unregisterBlockType, unregisterBlockVariation, unstable__bootstrapServerSideBlockDefinitions, updateCategory, validateBlock }); //# sourceMappingURL=index.js.map