@dotcms/types
Version:
The `@dotcms/types` package contains TypeScript type definitions for the dotCMS ecosystem. Use it to enable type safety and an enhanced developer experience when working with dotCMS APIs and structured content.
101 lines (98 loc) • 4 kB
JavaScript
/**
* Enum representing the different types of blocks available in the Block Editor
*
* @export
* @enum {string}
*/
var BlockEditorDefaultBlocks;
(function (BlockEditorDefaultBlocks) {
/** Represents a paragraph block */
BlockEditorDefaultBlocks["PARAGRAPH"] = "paragraph";
/** Represents a heading block */
BlockEditorDefaultBlocks["HEADING"] = "heading";
/** Represents a text block */
BlockEditorDefaultBlocks["TEXT"] = "text";
/** Represents a bullet/unordered list block */
BlockEditorDefaultBlocks["BULLET_LIST"] = "bulletList";
/** Represents an ordered/numbered list block */
BlockEditorDefaultBlocks["ORDERED_LIST"] = "orderedList";
/** Represents a list item within a list block */
BlockEditorDefaultBlocks["LIST_ITEM"] = "listItem";
/** Represents a blockquote block */
BlockEditorDefaultBlocks["BLOCK_QUOTE"] = "blockquote";
/** Represents a code block */
BlockEditorDefaultBlocks["CODE_BLOCK"] = "codeBlock";
/** Represents a hard break (line break) */
BlockEditorDefaultBlocks["HARDBREAK"] = "hardBreak";
/** Represents a horizontal rule/divider */
BlockEditorDefaultBlocks["HORIZONTAL_RULE"] = "horizontalRule";
/** Represents a DotCMS image block */
BlockEditorDefaultBlocks["DOT_IMAGE"] = "dotImage";
/** Represents a DotCMS video block */
BlockEditorDefaultBlocks["DOT_VIDEO"] = "dotVideo";
/** Represents a table block */
BlockEditorDefaultBlocks["TABLE"] = "table";
/** Represents a DotCMS content block */
BlockEditorDefaultBlocks["DOT_CONTENT"] = "dotContent";
/** Represents a grid block with columns */
BlockEditorDefaultBlocks["GRID_BLOCK"] = "gridBlock";
/** Represents a column inside a grid block */
BlockEditorDefaultBlocks["GRID_COLUMN"] = "gridColumn";
})(BlockEditorDefaultBlocks || (BlockEditorDefaultBlocks = {}));
/**
* Actions received from the dotcms editor
*
* @export
* @enum {number}
*/
var __DOTCMS_UVE_EVENT__;
(function (__DOTCMS_UVE_EVENT__) {
/**
* Request to page to reload
*/
__DOTCMS_UVE_EVENT__["UVE_RELOAD_PAGE"] = "uve-reload-page";
/**
* Tell the SDK to emit page bounds immediately, bypassing the
* auto-bounds debounce. Used when the editor needs a synchronous
* snapshot of bounds for an interaction (drag/drop dropzone) and
* cannot wait the ~100ms trailing edge.
*/
__DOTCMS_UVE_EVENT__["UVE_FLUSH_BOUNDS"] = "uve-flush-bounds";
/**
* @deprecated Use UVE_FLUSH_BOUNDS instead. Kept for one release so the
* editor can dual-emit and SDKs in the wild that still listen for the
* legacy `uve-request-bounds` event continue to receive flushes. Drop
* after the next minor release of @dotcms/uve.
*/
__DOTCMS_UVE_EVENT__["UVE_REQUEST_BOUNDS"] = "uve-request-bounds";
/**
* Received pong from the editor
*/
__DOTCMS_UVE_EVENT__["UVE_EDITOR_PONG"] = "uve-editor-pong";
/**
* Received scroll event trigger from the editor
*/
__DOTCMS_UVE_EVENT__["UVE_SCROLL_INSIDE_IFRAME"] = "uve-scroll-inside-iframe";
/**
* TODO:
* Set the page data - This is used to catch the "changes" event.
* We must to re-check the name late.
*/
__DOTCMS_UVE_EVENT__["UVE_SET_PAGE_DATA"] = "uve-set-page-data";
/**
* Copy contentlet inline editing success
*/
__DOTCMS_UVE_EVENT__["UVE_COPY_CONTENTLET_INLINE_EDITING_SUCCESS"] = "uve-copy-contentlet-inline-editing-success";
/**
* Request the iframe to scroll to a section by 1-based row index
*/
__DOTCMS_UVE_EVENT__["UVE_SCROLL_TO_SECTION"] = "uve-scroll-to-section";
/**
* The editor cleared its contentlet selection (e.g. after a canvas resize
* or scroll). The SDK uses this to reset its "last selected" tracker so a
* subsequent click on the same contentlet re-emits CONTENTLET_CLICKED
* instead of being treated as a passthrough.
*/
__DOTCMS_UVE_EVENT__["UVE_SELECTION_CLEARED"] = "uve-selection-cleared";
})(__DOTCMS_UVE_EVENT__ || (__DOTCMS_UVE_EVENT__ = {}));
export { BlockEditorDefaultBlocks, __DOTCMS_UVE_EVENT__ };