@janbox/storefront-builder 2.0.17 → 2.0.19
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.
- package/dist/components/composer/dataset.d.ts +5 -3
- package/dist/constants/index.d.ts +3 -1
- package/dist/editor/components/index.d.ts +0 -1
- package/dist/editor/controls/index.d.ts +37 -0
- package/dist/editor/hooks/index.d.ts +1 -0
- package/dist/editor/hooks/use-editor.d.ts +11 -1
- package/dist/editor/hooks/use-inline-editable.d.ts +1 -0
- package/dist/editor/index.d.ts +1 -0
- package/dist/editor/lib/index.d.ts +4 -3
- package/dist/editor/lib/node-renderer/index.d.ts +0 -2
- package/dist/editor/lib/node-renderer/node-renderer.d.ts +1 -1
- package/dist/editor/toolbars/index.d.ts +5 -37
- package/dist/editor/toolbars/inline-utils.d.ts +20 -0
- package/dist/editor/toolbars/insert-inline-toolbar.d.ts +1 -0
- package/dist/editor/toolbars/insert-link-toolbar.d.ts +1 -0
- package/dist/editor/toolbars/node-delete-toolbar.d.ts +1 -0
- package/dist/editor/toolbars/node-drag-toolbar.d.ts +1 -0
- package/dist/editor/toolbars/node-name-toolbar.d.ts +1 -0
- package/dist/editor.js +1252 -10300
- package/dist/hooks/use-paragraph-editable.d.ts +10 -0
- package/dist/index-CAk0Z6SL.js +60 -0
- package/dist/index-DxdUdXU0.js +4 -0
- package/dist/index.js +102 -92
- package/dist/lib/fragment/fragment.node/fragment.node.d.ts +2 -0
- package/dist/lib/fragment/fragment.node/index.d.ts +2 -0
- package/dist/lib/fragment/fragment.node/types.d.ts +3 -0
- package/dist/lib/fragment/index.d.ts +1 -0
- package/dist/lib/heading/heading/heading.d.ts +1 -1
- package/dist/lib/heading/heading/helpers.d.ts +2 -0
- package/dist/lib/heading/heading.node/heading.node.d.ts +1 -1
- package/dist/lib/heading/heading.toolbar/heading.toolbar.d.ts +1 -0
- package/dist/lib/heading/heading.toolbar/index.d.ts +1 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/inline/index.d.ts +2 -0
- package/dist/lib/inline/inline.inspector/index.d.ts +1 -0
- package/dist/lib/inline/inline.inspector/inline.inspector.d.ts +1 -0
- package/dist/lib/inline/inline.node/helpers.d.ts +3 -0
- package/dist/lib/inline/inline.node/index.d.ts +2 -0
- package/dist/lib/inline/inline.node/inline.node.d.ts +2 -0
- package/dist/lib/inline/inline.node/types.d.ts +11 -0
- package/dist/lib/link/link.node/link.node.d.ts +1 -1
- package/dist/lib/link/link.toolbar/index.d.ts +1 -0
- package/dist/lib/link/link.toolbar/link.toolbar.d.ts +1 -0
- package/dist/lib/paragraph/paragraph/helpers.d.ts +2 -0
- package/dist/lib/paragraph/paragraph/index.d.ts +2 -0
- package/dist/lib/paragraph/paragraph/paragraph.d.ts +2 -0
- package/dist/lib/paragraph/paragraph/types.d.ts +2 -0
- package/dist/lib/paragraph/paragraph.node/paragraph.node.d.ts +1 -1
- package/dist/lib/paragraph/paragraph.toolbar/index.d.ts +1 -0
- package/dist/lib/paragraph/paragraph.toolbar/paragraph.toolbar.d.ts +1 -0
- package/dist/templates.js +91 -194
- package/dist/toaster-j03A1kAt.js +17829 -0
- package/dist/types/index.d.ts +1 -3
- package/package.json +1 -4
- package/dist/countdown-timer.node-B1zlySOV.js +0 -8373
- package/dist/editor/components/text-inline-editor.d.ts +0 -10
- package/dist/editor/lib/node-renderer/node-actions.d.ts +0 -1
- package/dist/index-Cl02EX34.js +0 -187
- package/dist/index-D6iOLmDe.js +0 -4
- package/dist/lib/heading/heading.renderer/heading.renderer.d.ts +0 -2
- package/dist/lib/heading/heading.renderer/index.d.ts +0 -1
- package/dist/lib/paragraph/paragraph.renderer/index.d.ts +0 -1
- package/dist/lib/paragraph/paragraph.renderer/paragraph.renderer.d.ts +0 -2
- package/dist/minus-BrRnjbhB.js +0 -4
- package/dist/tooltip-CLs3ofGk.js +0 -75
- /package/dist/editor/{toolbars → controls}/aspect-ratio/aspect-ratio.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/aspect-ratio/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/background/background-toolbar.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/background/bg-color-tab.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/background/bg-image-tab.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/background/dataset.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/background/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/background/types.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/border/border.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/border/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/border/types.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/border-radius/border-radius.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/border-radius/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/child-nodes/child-node.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/child-nodes/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/color/color.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/color/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/color-variant/color-variant.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/color-variant/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/column-gap/column-gap.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/column-gap/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/css-font-weight/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/css-width/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/display/display.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/display/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/flex/flex.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/flex/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/flex-align-items/flex-align-items.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/flex-align-items/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/flex-wrap/flex-wrap.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/flex-wrap/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/font-size/font-size.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/font-size/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/grid-align-items/grid-align-items.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/grid-align-items/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/height/height.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/height/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/html-anchor-target/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/justify-content/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/justify-content/justify-content.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/justify-items/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/justify-items/justify-items.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/line-height/dataset.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/line-height/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/line-height/line-height.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/margin/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/margin/margin.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/min-width/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/min-width/min-width.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/number-field/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/number-field/number-field.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/number-field-mix-options/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/number-field-mix-options/number-field-mix-options.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/object-fit/dataset.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/object-fit/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/object-fit/object-fit.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/order/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/order/order.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/padding/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/padding/padding.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/row-gap/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/row-gap/row-gap.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/svg-source/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/svg-source/svg-source.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/svg-source/uploaded-source.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/tag-name/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/tag-name/tag-name.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-align/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-style/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-style/text-style.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-style-group/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-style-group/text-style-group.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-transform/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-transform/text-transform.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-variant/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/text-variant/text-variant.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/visibility/index.d.ts +0 -0
- /package/dist/editor/{toolbars → controls}/visibility/visibility.d.ts +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare const defaultResolver: {
|
|
2
2
|
root: ({ children }: import('../../lib/root/root.node').RootNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
unknown: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
fragment: ({ children }: import('../../lib/fragment/fragment.node').FragmentNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
inline: ({ as, contentVariable, sx, children }: import('../../lib/inline/inline.node').InlineNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
6
|
button: ({ anchor, ...props }: import('../../lib/button/button.node').ButtonNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
-
paragraph: (props: import('../../lib/paragraph/paragraph.node').ParagraphNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
-
heading: (props: import('../../lib/heading/heading.node').HeadingNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
paragraph: ({ children, ...props }: import('../../lib/paragraph/paragraph.node').ParagraphNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
heading: ({ children, ...props }: import('../../lib/heading/heading.node').HeadingNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
9
|
grid: (props: import('../../lib/grid/grid.node').GridNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
10
|
cell: ({ children, ...props }: import('../../lib/cell/cell.node').CellNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
11
|
flexbox: (props: import('../../lib/flexbox/flexbox.node').FlexboxNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -13,7 +15,7 @@ export declare const defaultResolver: {
|
|
|
13
15
|
image: (props: import('../../lib/image/image.node').ImageNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
16
|
video: ({ ...props }: import('../../lib/video/video.node').VideoNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
17
|
icon: (props: import('../../lib/icon/icon.node').IconNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
-
link: (props: import('../../lib/link/link.node').LinkNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
link: ({ children, ...props }: import('../../lib/link/link.node').LinkNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
19
|
"unordered-list": (props: import('../../lib/unordered-list/unordered-list.node').UnorderedListNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
20
|
"list-item": (props: import('../../lib/list-item/list-item.node').ListItemNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
21
|
swiper: (props: import('../../lib/swiper/swiper.node').SwiperNodeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ export { ROOT_NODE } from '@craftjs/core';
|
|
|
2
2
|
export declare enum CoreNodeResolvedEnum {
|
|
3
3
|
Root = "root",
|
|
4
4
|
Unknown = "unknown",
|
|
5
|
+
Fragment = "fragment",
|
|
5
6
|
Box = "box",
|
|
6
7
|
Paragraph = "paragraph",
|
|
7
8
|
Heading = "heading",
|
|
@@ -31,7 +32,8 @@ export declare enum CoreNodeResolvedEnum {
|
|
|
31
32
|
AccordionSummary = "accordion-summary",
|
|
32
33
|
AccordionContent = "accordion-content",
|
|
33
34
|
Container = "container",
|
|
34
|
-
CountdownTimer = "countdown-timer"
|
|
35
|
+
CountdownTimer = "countdown-timer",
|
|
36
|
+
Inline = "inline"
|
|
35
37
|
}
|
|
36
38
|
export declare enum NodeDatasetAttributes {
|
|
37
39
|
DATA_NODE_ID = "data-node-id",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export * from './text-align';
|
|
2
|
+
export * from './text-style';
|
|
3
|
+
export * from './text-transform';
|
|
4
|
+
export * from './css-width';
|
|
5
|
+
export * from './height';
|
|
6
|
+
export * from './color';
|
|
7
|
+
export * from './background';
|
|
8
|
+
export * from './child-nodes';
|
|
9
|
+
export * from './border';
|
|
10
|
+
export * from './border-radius';
|
|
11
|
+
export * from './text-variant';
|
|
12
|
+
export * from './line-height';
|
|
13
|
+
export * from './font-size';
|
|
14
|
+
export * from './css-font-weight';
|
|
15
|
+
export * from './tag-name';
|
|
16
|
+
export * from './object-fit';
|
|
17
|
+
export * from './display';
|
|
18
|
+
export * from './column-gap';
|
|
19
|
+
export * from './row-gap';
|
|
20
|
+
export * from './svg-source';
|
|
21
|
+
export * from './flex-align-items';
|
|
22
|
+
export * from './justify-content';
|
|
23
|
+
export * from './color-variant';
|
|
24
|
+
export * from './flex';
|
|
25
|
+
export * from './number-field';
|
|
26
|
+
export * from './number-field-mix-options';
|
|
27
|
+
export * from './visibility';
|
|
28
|
+
export * from './justify-items';
|
|
29
|
+
export * from './grid-align-items';
|
|
30
|
+
export * from './aspect-ratio';
|
|
31
|
+
export * from './padding';
|
|
32
|
+
export * from './min-width';
|
|
33
|
+
export * from './order';
|
|
34
|
+
export * from './margin';
|
|
35
|
+
export * from './flex-wrap';
|
|
36
|
+
export * from './text-style-group';
|
|
37
|
+
export * from './html-anchor-target';
|
|
@@ -2,6 +2,7 @@ import { Screen } from '@janbox/storefront-ui/theme';
|
|
|
2
2
|
import { ToResponsiveProps } from '@janbox/storefront-ui/types';
|
|
3
3
|
import { Get, Paths } from 'type-fest';
|
|
4
4
|
export * from './use-editor';
|
|
5
|
+
export * from './use-inline-editable';
|
|
5
6
|
export declare const useEditorResponsive: () => {
|
|
6
7
|
getResponsiveProp: <O extends object, P extends Paths<O>, R = Get<O, `${P}`>>(record: ToResponsiveProps<O>, field: P, screen?: Screen, options?: {
|
|
7
8
|
condition?: (value?: R) => boolean;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { Screen, Theme } from '@janbox/storefront-ui/theme';
|
|
2
2
|
import { SerializedNodes } from '../../types';
|
|
3
3
|
export type EditorMode = 'full' | 'compact';
|
|
4
|
+
export type VariableOption = {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
export type VariableDefinition = {
|
|
9
|
+
label: string;
|
|
10
|
+
key: string;
|
|
11
|
+
options: [VariableOption, ...VariableOption[]];
|
|
12
|
+
};
|
|
4
13
|
export type EditorHandlers = {
|
|
5
14
|
close: () => void;
|
|
6
15
|
submit: (abc: SerializedNodes) => void | Promise<void>;
|
|
@@ -13,8 +22,9 @@ export type EditorState = {
|
|
|
13
22
|
mode: EditorMode;
|
|
14
23
|
screen: Screen;
|
|
15
24
|
action?: string;
|
|
25
|
+
variableDefinitions?: VariableDefinition[];
|
|
16
26
|
};
|
|
17
|
-
type MutableEditorState = Pick<EditorState, 'theme' | 'mode' | 'screen' | 'action'>;
|
|
27
|
+
type MutableEditorState = Pick<EditorState, 'theme' | 'mode' | 'screen' | 'action' | 'variableDefinitions'>;
|
|
18
28
|
type EditorStateValue = EditorState & {
|
|
19
29
|
setState: (partial: Partial<MutableEditorState>) => void;
|
|
20
30
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useInlineEditable: () => void;
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Theme } from '@janbox/storefront-ui/theme';
|
|
2
2
|
import { SidebarProps } from './sidebar';
|
|
3
3
|
import { Resolver, SerializedNodes } from '../../types';
|
|
4
|
-
import { EditorHandlers } from '../hooks/use-editor';
|
|
4
|
+
import { EditorHandlers, VariableDefinition } from '../hooks/use-editor';
|
|
5
5
|
import { PropsWithChildren } from 'react';
|
|
6
6
|
export type EditorProps = PropsWithChildren<{
|
|
7
7
|
theme: Theme;
|
|
@@ -9,7 +9,8 @@ export type EditorProps = PropsWithChildren<{
|
|
|
9
9
|
resolver?: Resolver;
|
|
10
10
|
handlers: EditorHandlers;
|
|
11
11
|
serializedNodes?: SerializedNodes;
|
|
12
|
+
variableDefinitions?: VariableDefinition[];
|
|
12
13
|
}>;
|
|
13
|
-
export type { EditorHandlers } from '../hooks/use-editor';
|
|
14
|
+
export type { EditorHandlers, VariableDefinition, VariableOption } from '../hooks/use-editor';
|
|
14
15
|
export type { InsertTemplate, InsertTemplateGroup } from './sidebar/insert-action';
|
|
15
|
-
export declare const Editor: ({ theme, insert, resolver, handlers, serializedNodes, children }: EditorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Editor: ({ theme, insert, resolver, handlers, serializedNodes, variableDefinitions, children, }: EditorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,37 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './color';
|
|
7
|
-
export * from './background';
|
|
8
|
-
export * from './child-nodes';
|
|
9
|
-
export * from './border';
|
|
10
|
-
export * from './border-radius';
|
|
11
|
-
export * from './text-variant';
|
|
12
|
-
export * from './line-height';
|
|
13
|
-
export * from './font-size';
|
|
14
|
-
export * from './css-font-weight';
|
|
15
|
-
export * from './tag-name';
|
|
16
|
-
export * from './object-fit';
|
|
17
|
-
export * from './display';
|
|
18
|
-
export * from './column-gap';
|
|
19
|
-
export * from './row-gap';
|
|
20
|
-
export * from './svg-source';
|
|
21
|
-
export * from './flex-align-items';
|
|
22
|
-
export * from './justify-content';
|
|
23
|
-
export * from './color-variant';
|
|
24
|
-
export * from './flex';
|
|
25
|
-
export * from './number-field';
|
|
26
|
-
export * from './number-field-mix-options';
|
|
27
|
-
export * from './visibility';
|
|
28
|
-
export * from './justify-items';
|
|
29
|
-
export * from './grid-align-items';
|
|
30
|
-
export * from './aspect-ratio';
|
|
31
|
-
export * from './padding';
|
|
32
|
-
export * from './min-width';
|
|
33
|
-
export * from './order';
|
|
34
|
-
export * from './margin';
|
|
35
|
-
export * from './flex-wrap';
|
|
36
|
-
export * from './text-style-group';
|
|
37
|
-
export * from './html-anchor-target';
|
|
1
|
+
export * from './node-drag-toolbar';
|
|
2
|
+
export * from './node-name-toolbar';
|
|
3
|
+
export * from './node-delete-toolbar';
|
|
4
|
+
export * from './insert-inline-toolbar';
|
|
5
|
+
export * from './insert-link-toolbar';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NodeTree } from '@craftjs/core';
|
|
2
|
+
import { useComposer } from '../../hooks';
|
|
3
|
+
type ComposerReturn = ReturnType<typeof useComposer>;
|
|
4
|
+
type CraftQuery = ComposerReturn['query'];
|
|
5
|
+
type CraftActions = ComposerReturn['actions'];
|
|
6
|
+
export type MakeNodeTree = (text: string) => NodeTree;
|
|
7
|
+
export declare const getCharOffsetShallow: (root: Element, container: Node, nodeOffset: number) => number;
|
|
8
|
+
export declare const getChildLen: (query: CraftQuery, childId: string) => number;
|
|
9
|
+
export declare const findChildAt: (query: CraftQuery, childIds: string[], charOffset: number) => {
|
|
10
|
+
childId: string;
|
|
11
|
+
childIndex: number;
|
|
12
|
+
localOffset: number;
|
|
13
|
+
} | null;
|
|
14
|
+
export declare const convertPlainText: (id: string, actions: CraftActions, query: CraftQuery) => {
|
|
15
|
+
fragmentId: string | null;
|
|
16
|
+
fullText: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const spliceChild: (id: string, childId: string, childIndex: number, localStart: number, localEnd: number, makeNodeTree: MakeNodeTree, actions: CraftActions, query: CraftQuery) => string | null;
|
|
19
|
+
export declare const insertAtSelection: (id: string, makeNodeTree: MakeNodeTree, fallbackText: string, frameDocument: Document, actions: CraftActions, query: CraftQuery, onDone: () => void) => string | null;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InsertInlineToolbar: () => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InsertLinkToolbar: () => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NodeDeleteToolbar: () => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NodeDragToolbar: () => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NodeNameToolbar: () => import("@emotion/react/jsx-runtime").JSX.Element | null;
|