@dotcms/react 0.0.1-alpha.1 → 0.0.1-alpha.10

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.
@@ -1,48 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * `PageEditorOptions` is an interface that defines the options for the `usePageEditor` hook.
4
- * It includes an optional `reloadFunction` that is called when the editor needs to reload the page to get changes,
5
- * and an optional `pathname` that represents the path of the page that the editor is editing.
6
- *
7
- * @interface PageEditorOptions
8
- *
9
- * @property {Function} reloadFunction - An optional function that is called when the editor needs to reload the page to get changes.
10
- * @property {string} pathname - An optional string that represents the path of the page that the editor is editing.
11
- */
12
- interface PageEditorOptions {
13
- /**
14
- * `reloadFunction` is an optional function that can be provided to the `PageEditorOptions` object.
15
- * It is called when the dotcms editor needs to reload the page to get changes.
16
- *
17
- * @property {Function} reloadFunction
18
- * @default window.location.reload
19
- * @memberof PageEditorOptions
20
- * @type {() => void}
21
- * @optional
22
- */
23
- reloadFunction?: () => void;
24
- /**
25
- * `pathname` is an optional string that can be provided to the `PageEditorOptions` object.
26
- * It represents the path of the page that the editor is editing.
27
- * When this path changes, the editor will update its own state and reload the page to get the changes.
28
- * @property {string} pathname
29
- * @memberof PageEditorOptions
30
- * @type {string}
31
- * @optional
32
- */
33
- pathname?: string;
34
- }
35
- /**
36
- * `usePageEditor` is a custom React hook that sets up the page editor for a DotCMS page.
37
- * It takes a `PageEditorOptions` object as a parameter and returns a reference to the rows of the page.
38
- *
39
- * This hook is the main brigde between your webapp and the dotcms page editor.
40
- *
41
- *
42
- * @category Hooks
43
- * @param {PageEditorOptions} props - The options for the page editor. Includes a `reloadFunction` and a `pathname`.
44
- * @returns {React.RefObject<HTMLDivElement>[]} - A reference to the rows of the page.
45
- * @throws {Error} - Throws an error if the `pathname` is not provided.
46
- */
47
- export declare const usePageEditor: (props: PageEditorOptions) => import("react").MutableRefObject<HTMLDivElement[]>;
48
- export {};