Skip to content

Commit

Permalink
feat(app-page-builder): export useful editor hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel910 committed Mar 28, 2024
1 parent 2ec0d59 commit d82711a
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 73 deletions.
2 changes: 2 additions & 0 deletions packages/app-page-builder/src/blockEditor/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { useBlock } from "./useBlock";
export { useBlockCategories } from "./useBlockCategories";
2 changes: 2 additions & 0 deletions packages/app-page-builder/src/blockEditor/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./hooks";
export * from "./editorConfig/BlockEditorConfig";

This file was deleted.

17 changes: 17 additions & 0 deletions packages/app-page-builder/src/editor/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export { useActiveElement } from "./useActiveElement";
export { useActiveElementId } from "./useActiveElementId";
export { useCurrentBlockElement } from "./useCurrentBlockElement";
export { useCurrentElement } from "./useCurrentElement";
export { useDisplayMode } from "./useDisplayMode";
export { useElementById } from "./useElementById";
export { useElementSidebar } from "./useElementSidebar";
export { useElementVariables, useElementVariableValue } from "./useElementVariableValue";
export { useEventActionHandler } from "./useEventActionHandler";
export { useHighlightElement } from "./useHighlightElement";
export { useKeyHandler } from "./useKeyHandler";
export { useParentBlock } from "./useParentBlock";
export { useRefreshBlock } from "./useRefreshBlock";
export { useRootElement } from "./useRootElement";
export { useUI } from "./useUI";
export { useUpdateElement } from "./useUpdateElement";
export { useUpdateHandlers } from "./useUpdateHandlers";
3 changes: 1 addition & 2 deletions packages/app-page-builder/src/editor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { DefaultEditorConfig } from "./defaultConfig/DefaultEditorConfig";
export * from "./config";
export * from "./components/Editor/EditorBar";
export { EditorProvider } from "./contexts/EditorProvider";
export * from "./hooks";
export { default as DropZone } from "../editor/components/DropZone";
4 changes: 4 additions & 0 deletions packages/app-page-builder/src/pageEditor/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { usePage } from "./usePage";
export { usePageSettings } from "./usePageSettings";
export { useRevisions } from "./useRevisions";
export { useTemplateMode } from "./useTemplateMode";
3 changes: 2 additions & 1 deletion packages/app-page-builder/src/pageEditor/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { PublishPageButton } from "./config/TopBar/PublishPageButton/PublishPageButton";
export { usePage } from "./hooks/usePage";
export * from "./hooks";
export * from "./editorConfig/PageEditorConfig";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { useTemplate } from "./useTemplate";
3 changes: 2 additions & 1 deletion packages/app-page-builder/src/templateEditor/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { useTemplate } from "./hooks/useTemplate";
export * from "./hooks";
export * from "./editorConfig/TemplateEditorConfig";

0 comments on commit d82711a

Please sign in to comment.