@dotcms/vue 1.5.5

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.
Files changed (45) hide show
  1. package/README.md +571 -0
  2. package/index.d.ts +12 -0
  3. package/index.js +842 -0
  4. package/lib/__test__/mocks.d.ts +6 -0
  5. package/lib/components/Column/Column.vue.d.ts +12 -0
  6. package/lib/components/Container/Container.vue.d.ts +11 -0
  7. package/lib/components/Container/ContainerNotFound.vue.d.ts +6 -0
  8. package/lib/components/Container/EmptyContainer.vue.d.ts +2 -0
  9. package/lib/components/Contentlet/Contentlet.vue.d.ts +14 -0
  10. package/lib/components/Contentlet/constants.d.ts +2 -0
  11. package/lib/components/DotCMSBlockEditorRenderer/DotCMSBlockEditorRenderer.vue.d.ts +5 -0
  12. package/lib/components/DotCMSBlockEditorRenderer/components/BlockEditorBlock.vue.d.ts +13 -0
  13. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/BulletList.vue.d.ts +17 -0
  14. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/CodeBlock.vue.d.ts +22 -0
  15. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/DotContent.vue.d.ts +10 -0
  16. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/DotImage.vue.d.ts +7 -0
  17. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/DotVideo.vue.d.ts +7 -0
  18. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/GridBlock.vue.d.ts +10 -0
  19. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/Heading.vue.d.ts +22 -0
  20. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/ListItem.vue.d.ts +17 -0
  21. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/NoComponentProvided.vue.d.ts +6 -0
  22. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/OrderedList.vue.d.ts +17 -0
  23. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/Paragraph.vue.d.ts +22 -0
  24. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/Quote.vue.d.ts +17 -0
  25. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/TableRenderer.vue.d.ts +15 -0
  26. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/TextBlock.vue.d.ts +13 -0
  27. package/lib/components/DotCMSBlockEditorRenderer/components/blocks/UnknownBlock.vue.d.ts +10 -0
  28. package/lib/components/DotCMSBlockEditorRenderer/types.d.ts +44 -0
  29. package/lib/components/DotCMSEditableText/DotCMSEditableText.vue.d.ts +15 -0
  30. package/lib/components/DotCMSEditableText/utils.d.ts +22 -0
  31. package/lib/components/DotCMSLayoutBody/DotCMSLayoutBody.vue.d.ts +5 -0
  32. package/lib/components/DotCMSLayoutBody/components/ErrorMessage.vue.d.ts +2 -0
  33. package/lib/components/DotCMSLayoutBody/types.d.ts +17 -0
  34. package/lib/components/DotCMSShow/DotCMSShow.vue.d.ts +35 -0
  35. package/lib/components/FallbackComponent/FallbackComponent.vue.d.ts +13 -0
  36. package/lib/components/Row/Row.vue.d.ts +13 -0
  37. package/lib/composables/useCheckVisibleContent.d.ts +16 -0
  38. package/lib/composables/useDotCMSShowWhen.d.ts +18 -0
  39. package/lib/composables/useEditableDotCMSPage.d.ts +34 -0
  40. package/lib/composables/useIsAnalyticsActive.d.ts +14 -0
  41. package/lib/composables/useIsDevMode.d.ts +23 -0
  42. package/lib/contexts/dotcms-page.context.d.ts +61 -0
  43. package/lib/utils/toPlain.d.ts +12 -0
  44. package/package.json +47 -0
  45. package/test-setup.d.ts +0 -0
@@ -0,0 +1,6 @@
1
+ import { DotCMSBasicContentlet, DotCMSColumnContainer, DotCMSPageAsset, DotPageAssetLayoutColumn } from '@dotcms/types';
2
+ export declare const MOCK_COLUMN: DotPageAssetLayoutColumn;
3
+ export declare const MOCK_CONTAINER: DotCMSColumnContainer;
4
+ export declare const MOCK_CONTENTLET: DotCMSBasicContentlet;
5
+ export declare const MOCK_PAGE_ASSET: DotCMSPageAsset;
6
+ export declare const PAGE_ASSET_NO_BODY: DotCMSPageAsset;
@@ -0,0 +1,12 @@
1
+ import { DotPageAssetLayoutColumn } from '@dotcms/types';
2
+ /**
3
+ * @internal
4
+ * Renders a single column of the 12-column grid. Position is derived from the
5
+ * column's `leftOffset`/`width` — the same values the React SDK turns into
6
+ * `col-start-*`/`col-end-*` classes, applied here as inline grid styles.
7
+ */
8
+ type __VLS_Props = {
9
+ column: DotPageAssetLayoutColumn;
10
+ };
11
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
12
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { DotCMSColumnContainer } from '@dotcms/types';
2
+ /**
3
+ * @internal
4
+ * Renders a dotCMS container and the contentlets placed inside it. Container
5
+ * metadata (`data-dot-*`) is editor-only and stripped from live output.
6
+ */
7
+ type __VLS_Props = {
8
+ container: DotCMSColumnContainer;
9
+ };
10
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /** @internal Dev-only message shown when a container cannot be found on the page. */
2
+ type __VLS_Props = {
3
+ identifier: string;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { DotCMSBasicContentlet } from '@dotcms/types';
2
+ /**
3
+ * @internal
4
+ * Renders a single contentlet: resolves the user component for its content type
5
+ * (falling back to a dev-only placeholder) and emits the editor `data-dot-*`
6
+ * metadata only when in development/edit mode.
7
+ */
8
+ type __VLS_Props = {
9
+ contentlet: DotCMSBasicContentlet;
10
+ /** JSON-serialized container data the contentlet belongs to. */
11
+ container: string;
12
+ };
13
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
14
+ export default _default;
@@ -0,0 +1,2 @@
1
+ /** CSS class applied to every contentlet wrapper. */
2
+ export declare const CONTENTLET_CLASS = "dotcms-contentlet";
@@ -0,0 +1,5 @@
1
+ import { BlockEditorRendererProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<BlockEditorRendererProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BlockEditorRendererProps> & Readonly<{}>, {
3
+ isDevMode: boolean;
4
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ import { CustomRenderer } from '../types';
3
+ /**
4
+ * Recursive dispatcher: renders a list of block-editor nodes, delegating each to
5
+ * a custom renderer (if provided) or the matching built-in block component.
6
+ */
7
+ type __VLS_Props = {
8
+ content?: BlockEditorNode[];
9
+ customRenderers?: CustomRenderer;
10
+ isDevMode?: boolean;
11
+ };
12
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,17 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLUListElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLUListElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,22 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ /** Renders a code block, exposing the language via `data-language`. */
3
+ type __VLS_Props = {
4
+ node: BlockEditorNode;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLPreElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLPreElement>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,10 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ import { CustomRenderer } from '../../types';
3
+ /** Renders an embedded contentlet block via a custom renderer keyed by content type. */
4
+ type __VLS_Props = {
5
+ node: BlockEditorNode;
6
+ customRenderers?: CustomRenderer;
7
+ isDevMode?: boolean;
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ /** Renders a dotCMS image block with optional text-wrap / alignment. */
3
+ type __VLS_Props = {
4
+ node: BlockEditorNode;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ /** Renders a dotCMS video block. */
3
+ type __VLS_Props = {
4
+ node: BlockEditorNode;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLVideoElement>;
7
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ import { CustomRenderer } from '../../types';
3
+ /** Renders a two-column grid block over a 12-column grid. */
4
+ type __VLS_Props = {
5
+ node: BlockEditorNode;
6
+ customRenderers?: CustomRenderer;
7
+ isDevMode?: boolean;
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
10
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ /** Renders a heading block as h1..h6 based on `node.attrs.level` (default 1). */
3
+ type __VLS_Props = {
4
+ node: BlockEditorNode;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,17 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLLIElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLLIElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,6 @@
1
+ /** Dev-only warning shown when a contentlet block has no matching custom renderer. */
2
+ type __VLS_Props = {
3
+ contentType?: string;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
6
+ export default _default;
@@ -0,0 +1,17 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLOListElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLOListElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,22 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ /** Renders a paragraph block, applying any node attrs as inline styles. */
3
+ type __VLS_Props = {
4
+ node: BlockEditorNode;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLParagraphElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLParagraphElement>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,17 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLQuoteElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLQuoteElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,15 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ import { CustomRenderer } from '../../types';
3
+ /**
4
+ * Renders a table block. Cell type — not row position — decides `<th>` vs `<td>`
5
+ * (`node.type === 'tableHeader'`), matching the VTL renderer, so column headers
6
+ * in any row keep their semantic wrapper and `scope`.
7
+ */
8
+ type __VLS_Props = {
9
+ content: BlockEditorNode[];
10
+ attrs?: BlockEditorNode['attrs'];
11
+ customRenderers?: CustomRenderer;
12
+ isDevMode?: boolean;
13
+ };
14
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLTableElement>;
15
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { BlockEditorMark } from '@dotcms/types';
2
+ /**
3
+ * Renders a text node, applying its marks (bold, italic, link, ...) recursively.
4
+ *
5
+ * Each mark wraps a `TextBlock` of the remaining marks, so nested formatting is
6
+ * preserved. When no marks remain the raw text is emitted.
7
+ */
8
+ type __VLS_Props = {
9
+ text?: string;
10
+ marks?: BlockEditorMark[];
11
+ };
12
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ /**
3
+ * Renders an unknown block. Shows a visible warning only inside the UVE; in the
4
+ * live site it renders nothing to avoid leaking editor scaffolding.
5
+ */
6
+ type __VLS_Props = {
7
+ node: BlockEditorNode;
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,44 @@
1
+ import { BlockEditorNode } from '@dotcms/types';
2
+ import { Component, CSSProperties } from 'vue';
3
+ /**
4
+ * Props that every custom block renderer receives.
5
+ *
6
+ * A custom renderer is a Vue component that gets the full {@link BlockEditorNode}
7
+ * as its `node` prop and the already-rendered children in its default slot.
8
+ *
9
+ * @template TData the type of data stored in `node.attrs.data` (contentlet blocks)
10
+ */
11
+ export interface CustomRendererProps<TData = unknown> {
12
+ /** The full BlockEditorNode with attrs, marks, content, etc. */
13
+ node: BlockEditorNode & {
14
+ attrs?: {
15
+ data?: TData;
16
+ [key: string]: unknown;
17
+ };
18
+ };
19
+ }
20
+ /**
21
+ * A custom renderer component — a Vue component whose props include the `node`
22
+ * (typed via {@link CustomRendererProps}) plus a default slot with the rendered
23
+ * children.
24
+ */
25
+ export type CustomRendererComponent = Component<CustomRendererProps>;
26
+ /**
27
+ * Map of block type name to the custom renderer component that should render it.
28
+ */
29
+ export type CustomRenderer = Record<string, CustomRendererComponent>;
30
+ /**
31
+ * Props for {@link DotCMSBlockEditorRenderer}.
32
+ */
33
+ export interface BlockEditorRendererProps {
34
+ /** The block editor field value (a root node with `content`). */
35
+ blocks: BlockEditorNode;
36
+ /** Inline styles for the container element. */
37
+ style?: CSSProperties;
38
+ /** CSS class for the container element. */
39
+ className?: string;
40
+ /** Custom renderers keyed by block type (or content type for contentlet blocks). */
41
+ customRenderers?: CustomRenderer;
42
+ /** When true, renders helpful dev-only messages for invalid/unknown blocks. */
43
+ isDevMode?: boolean;
44
+ }
@@ -0,0 +1,15 @@
1
+ import { DotCMSBasicContentlet } from '@dotcms/types';
2
+ import { DotCMSEditableTextProps } from './utils';
3
+ declare const _default: <T extends DotCMSBasicContentlet>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & DotCMSEditableTextProps<T> & Partial<{}>> & import('vue').PublicProps;
5
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
6
+ attrs: any;
7
+ slots: {};
8
+ emit: {};
9
+ }>) => import('vue').VNode & {
10
+ __ctx?: Awaited<typeof __VLS_setup>;
11
+ };
12
+ export default _default;
13
+ type __VLS_PrettifyLocal<T> = {
14
+ [K in keyof T]: T[K];
15
+ } & {};
@@ -0,0 +1,22 @@
1
+ import { DotCMSBasicContentlet } from '@dotcms/types';
2
+ export type DOT_EDITABLE_TEXT_FORMAT = 'html' | 'text';
3
+ export type DOT_EDITABLE_TEXT_MODE = 'minimal' | 'full' | 'plain';
4
+ /**
5
+ * Props for {@link DotCMSEditableText}.
6
+ */
7
+ export interface DotCMSEditableTextProps<T extends DotCMSBasicContentlet = DotCMSBasicContentlet> {
8
+ /** The contentlet whose field is edited. */
9
+ contentlet: T;
10
+ /** The field of the contentlet to edit. */
11
+ fieldName: keyof T;
12
+ /** The editor format — `text` or `html`. Defaults to `text`. */
13
+ format?: DOT_EDITABLE_TEXT_FORMAT;
14
+ /** The editor toolbar preset — `plain`, `minimal` or `full`. Defaults to `plain`. */
15
+ mode?: DOT_EDITABLE_TEXT_MODE;
16
+ }
17
+ type TinyMCEInit = Record<string, unknown>;
18
+ /**
19
+ * TinyMCE init config per editor mode, composed from the shared dotCMS presets.
20
+ */
21
+ export declare const TINYMCE_CONFIG: Record<DOT_EDITABLE_TEXT_MODE, TinyMCEInit>;
22
+ export {};
@@ -0,0 +1,5 @@
1
+ import { DotCMSLayoutBodyProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<DotCMSLayoutBodyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DotCMSLayoutBodyProps> & Readonly<{}>, {
3
+ mode: import('@dotcms/types').DotCMSPageRendererMode;
4
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { DotCMSPageAsset, DotCMSPageRendererMode } from '@dotcms/types';
2
+ import { Component } from 'vue';
3
+ /**
4
+ * Props for {@link DotCMSLayoutBody}.
5
+ */
6
+ export interface DotCMSLayoutBodyProps {
7
+ /** The dotCMS page asset containing the layout information. */
8
+ page: DotCMSPageAsset;
9
+ /**
10
+ * Map of content-type variable name to the Vue component that renders it.
11
+ * The special `CustomNoComponent` key is used as the fallback for unmatched
12
+ * content types.
13
+ */
14
+ components: Record<string, Component>;
15
+ /** Renderer mode; defaults to `production`. */
16
+ mode?: DotCMSPageRendererMode;
17
+ }
@@ -0,0 +1,35 @@
1
+ import { UVE_MODE } from '@dotcms/types';
2
+ /**
3
+ * `DotCMSShow` conditionally renders its slot content based on the current
4
+ * Universal Visual Editor (UVE) mode.
5
+ *
6
+ * @example
7
+ * ```vue
8
+ * <DotCMSShow :when="UVE_MODE.EDIT">
9
+ * <button @click="editContentlet(contentlet)">Edit</button>
10
+ * </DotCMSShow>
11
+ * ```
12
+ */
13
+ type __VLS_Props = {
14
+ /** The UVE mode in which the slot content should be rendered. */
15
+ when?: UVE_MODE;
16
+ };
17
+ declare function __VLS_template(): {
18
+ attrs: Partial<{}>;
19
+ slots: {
20
+ default?(_: {}): any;
21
+ };
22
+ refs: {};
23
+ rootEl: any;
24
+ };
25
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
26
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
27
+ when: UVE_MODE;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
+ export default _default;
31
+ type __VLS_WithTemplateSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,13 @@
1
+ import { Component } from 'vue';
2
+ import { DotCMSBasicContentlet } from '@dotcms/types';
3
+ /**
4
+ * @internal
5
+ * Fallback rendered when no component is mapped for a contentlet's content type.
6
+ * Only visible in development mode.
7
+ */
8
+ type __VLS_Props = {
9
+ contentlet: DotCMSBasicContentlet;
10
+ userNoComponent?: Component;
11
+ };
12
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { DotPageAssetLayoutRow } from '@dotcms/types';
2
+ /**
3
+ * @internal
4
+ * Renders a layout row and its columns. The `id` is the section anchor the
5
+ * editor scrolls to; the inner grid spans 12 columns.
6
+ */
7
+ type __VLS_Props = {
8
+ row: DotPageAssetLayoutRow;
9
+ /** 1-based section index used as the scroll-to-section anchor id. */
10
+ index: number;
11
+ };
12
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
13
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * @internal
4
+ *
5
+ * Composable that reports whether an element rendered visible content (measured
6
+ * height greater than zero). Used in development mode to give empty contentlets
7
+ * a minimum height so the editor can still target them.
8
+ *
9
+ * Takes a getter for the element (rather than a template ref) so the caller can
10
+ * resolve it from the component instance's root element and avoid attaching a
11
+ * template ref to a wrapper vnode — which Vue may hoist, triggering a warning.
12
+ *
13
+ * @param getElement returns the element to measure (called on mount)
14
+ * @returns a ref that is `true` when the element has a measurable height
15
+ */
16
+ export declare function useCheckVisibleContent(getElement: () => Element | null | undefined): Ref<boolean>;
@@ -0,0 +1,18 @@
1
+ import { Ref } from 'vue';
2
+ import { UVE_MODE } from '@dotcms/types';
3
+ /**
4
+ * Composable that reports whether the current UVE mode matches the given mode.
5
+ *
6
+ * Useful for conditionally rendering content based on the editor mode (EDIT,
7
+ * PREVIEW, LIVE). It resolves after mount (returns `false` during SSR), matching
8
+ * the React SDK's `useDotCMSShowWhen` behavior.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const showInEditMode = useDotCMSShowWhen(UVE_MODE.EDIT);
13
+ * ```
14
+ *
15
+ * @param when the UVE mode to check against
16
+ * @returns a readonly ref that is `true` when the current UVE mode matches
17
+ */
18
+ export declare function useDotCMSShowWhen(when: UVE_MODE): Readonly<Ref<boolean>>;
@@ -0,0 +1,34 @@
1
+ import { Ref } from 'vue';
2
+ import { DotCMSComposedPageResponse, DotCMSExtendedPageResponse } from '@dotcms/types';
3
+ /**
4
+ * Composable to manage the editable state of a dotCMS page inside the Universal
5
+ * Visual Editor (UVE).
6
+ *
7
+ * It initializes the UVE, keeps the navigation in sync, and subscribes to
8
+ * content changes so the returned page response updates live while an editor is
9
+ * working. Outside of the UVE it is a pass-through: the returned ref simply
10
+ * holds the initial response.
11
+ *
12
+ * This is the Vue analog of the React SDK's `useEditableDotCMSPage` hook and the
13
+ * Angular SDK's `DotCMSEditablePageService.listen()`.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { useEditableDotCMSPage } from '@dotcms/vue';
18
+ * import { createDotCMSClient } from '@dotcms/client';
19
+ *
20
+ * const client = createDotCMSClient({
21
+ * dotcmsUrl: 'https://your-dotcms-instance.com',
22
+ * authToken: 'your-auth-token'
23
+ * });
24
+ *
25
+ * const pageResponse = await client.page.get('/');
26
+ * const page = useEditableDotCMSPage(pageResponse);
27
+ *
28
+ * // page.value.pageAsset — reactive; re-renders on UVE content changes.
29
+ * ```
30
+ *
31
+ * @param pageResponse the initial page response from `client.page.get()`
32
+ * @returns a reactive ref holding the (possibly live-updating) page response
33
+ */
34
+ export declare function useEditableDotCMSPage<T extends DotCMSExtendedPageResponse>(pageResponse: DotCMSComposedPageResponse<T>): Ref<DotCMSComposedPageResponse<T>>;
@@ -0,0 +1,14 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * @internal
4
+ *
5
+ * Composable that tracks whether dotCMS Analytics is active on the page.
6
+ *
7
+ * Analytics may initialize after the page renders, so in addition to reading the
8
+ * current state on mount we subscribe to the `dotcms:analytics:ready` window
9
+ * event and re-evaluate when it fires. Used in live mode to decide whether the
10
+ * minimal contentlet attributes Analytics needs should be kept.
11
+ *
12
+ * @returns a ref that is `true` when Analytics is active
13
+ */
14
+ export declare function useIsAnalyticsActive(): Ref<boolean>;
@@ -0,0 +1,23 @@
1
+ import { ComputedRef, MaybeRefOrGetter } from 'vue';
2
+ import { DotCMSPageRendererMode } from '@dotcms/types';
3
+ /**
4
+ * @internal
5
+ *
6
+ * Resolve whether we are rendering in "development" mode — i.e. whether editor
7
+ * metadata (`data-dot-*` attributes, empty-state placeholders, fallback
8
+ * components) should be emitted. Inside the UVE it follows the UVE state (dev
9
+ * when mode is EDIT); otherwise it follows the renderer `mode`.
10
+ */
11
+ export declare function resolveDevMode(mode: DotCMSPageRendererMode | undefined): boolean;
12
+ /**
13
+ * @internal
14
+ *
15
+ * Computed development-mode flag. `getUVEState()` and the renderer `mode` are
16
+ * both available synchronously, so this resolves during setup — the editor
17
+ * `data-dot-*` attributes are present on the first render (which the UVE relies
18
+ * on to attach its tooling) with no per-instance `onMounted`.
19
+ *
20
+ * Called once at the layout root ({@link DotCMSLayoutBody}); the result is
21
+ * shared with the whole tree via the page context.
22
+ */
23
+ export declare function useIsDevMode(mode: MaybeRefOrGetter<DotCMSPageRendererMode | undefined>): ComputedRef<boolean>;