@janbox/storefront-builder 2.0.2 → 2.0.4
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/{dialog-header-Bh3Dkw2q.js → countdown-timer.node-CZA-i5xq.js} +3303 -2187
- package/dist/editor/components/index.d.ts +0 -1
- package/dist/editor/hooks/index.d.ts +0 -12
- package/dist/editor/hooks/use-editor.d.ts +6 -2
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor/lib/index.d.ts +6 -4
- package/dist/editor/toolbars/css-font-weight/index.d.ts +9 -0
- package/dist/editor/toolbars/{width/width.d.ts → css-width/index.d.ts} +5 -5
- package/dist/editor/toolbars/html-anchor-target/index.d.ts +7 -0
- package/dist/editor/toolbars/index.d.ts +3 -3
- package/dist/editor/toolbars/text-align/index.d.ts +9 -1
- package/dist/editor/ui/floating/wb-floating/types.d.ts +2 -2
- package/dist/editor/ui/floating/wb-floating/wb-floating.d.ts +2 -0
- package/dist/editor.js +1209 -673
- package/dist/hooks/use-composer.d.ts +464 -0
- package/dist/index-B58cYfCo.js +4 -0
- package/dist/index-ekIAycpt.js +8326 -0
- package/dist/index.js +173 -371
- package/dist/lib/accordion/accordion.node/helpers.d.ts +3 -0
- package/dist/lib/accordion-group/accordion-group.node/helpers.d.ts +3 -0
- package/dist/lib/box/box.node/helpers.d.ts +3 -0
- package/dist/lib/button/button.node/helpers.d.ts +3 -0
- package/dist/lib/cell/cell.node/helpers.d.ts +3 -0
- package/dist/lib/container/container.node/helpers.d.ts +3 -0
- package/dist/lib/countdown-timer/countdown-timer.node/helpers.d.ts +3 -0
- package/dist/lib/flex-item/flex-item.node/helpers.d.ts +3 -0
- package/dist/lib/flexbox/flexbox.node/helpers.d.ts +3 -0
- package/dist/lib/grid/grid.node/helpers.d.ts +3 -0
- package/dist/lib/heading/heading.node/helpers.d.ts +3 -0
- package/dist/lib/icon/icon.node/helpers.d.ts +3 -0
- package/dist/lib/image/image.node/helpers.d.ts +3 -0
- package/dist/lib/link/link.node/helpers.d.ts +3 -0
- package/dist/lib/list-item/list-item.node/helpers.d.ts +3 -0
- package/dist/lib/marquee/marquee.node/helpers.d.ts +3 -0
- package/dist/lib/paragraph/paragraph.node/helpers.d.ts +3 -0
- package/dist/lib/swiper/swiper.node/helpers.d.ts +3 -0
- package/dist/lib/tab/tab.node/helpers.d.ts +3 -0
- package/dist/lib/tab-panel/tab-panel.node/helpers.d.ts +3 -0
- package/dist/lib/tabs/tabs.node/helpers.d.ts +3 -0
- package/dist/lib/unordered-list/unordered-list.node/helpers.d.ts +3 -0
- package/dist/lib/video/video.node/helpers.d.ts +3 -0
- package/dist/templates.js +26 -28
- package/dist/{tooltip-CXOlTkGg.js → tooltip-BFrdgixm.js} +1 -1
- package/package.json +2 -10
- package/dist/anchor-target-CtXzdkBu.js +0 -2918
- package/dist/color-picker-popover-XeaVfYS8.js +0 -225
- package/dist/countdown-timer.node-Bh5fTSJ8.js +0 -913
- package/dist/date-picker-D9K6HWl-.js +0 -157
- package/dist/dropzone-CF4CWXth.js +0 -546
- package/dist/editor/components/toolbar-container.d.ts +0 -1
- package/dist/editor/toolbars/anchor-target/anchor-target.d.ts +0 -7
- package/dist/editor/toolbars/anchor-target/index.d.ts +0 -1
- package/dist/editor/toolbars/font-weight/dataset.d.ts +0 -5
- package/dist/editor/toolbars/font-weight/font-weight.d.ts +0 -9
- package/dist/editor/toolbars/font-weight/index.d.ts +0 -1
- package/dist/editor/toolbars/text-align/text-align.d.ts +0 -8
- package/dist/editor/toolbars/width/index.d.ts +0 -1
- package/dist/editor/toolbars.js +0 -346
- package/dist/editor/ui.js +0 -120
- package/dist/index-800HnUOi.js +0 -4
- package/dist/index-CXyljfMv.js +0 -4593
|
@@ -8,15 +8,3 @@ export declare const useEditorResponsive: () => {
|
|
|
8
8
|
}) => R;
|
|
9
9
|
currentScreen: Screen;
|
|
10
10
|
};
|
|
11
|
-
export declare const useEditorQueryParams: () => {
|
|
12
|
-
queryParams: {
|
|
13
|
-
mode: "compact" | "full";
|
|
14
|
-
screen: Screen;
|
|
15
|
-
action: string | undefined;
|
|
16
|
-
};
|
|
17
|
-
setQueryParams: (newParams: Partial<{
|
|
18
|
-
mode: "compact" | "full";
|
|
19
|
-
screen: Screen;
|
|
20
|
-
action: string | undefined;
|
|
21
|
-
}>, navigateOpts?: import('react-router').NavigateOptions) => void;
|
|
22
|
-
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Theme } from '@janbox/storefront-ui/theme';
|
|
1
|
+
import { Screen, Theme } from '@janbox/storefront-ui/theme';
|
|
2
2
|
import { SerializedNodes } from '../../types';
|
|
3
|
+
export type EditorMode = 'full' | 'compact';
|
|
3
4
|
export type EditorHandlers = {
|
|
4
5
|
close: () => void;
|
|
5
6
|
submit: (abc: SerializedNodes) => void | Promise<void>;
|
|
@@ -8,8 +9,11 @@ export type EditorHandlers = {
|
|
|
8
9
|
export type EditorState = {
|
|
9
10
|
theme: Theme;
|
|
10
11
|
handlers: Readonly<EditorHandlers>;
|
|
12
|
+
mode: EditorMode;
|
|
13
|
+
screen: Screen;
|
|
14
|
+
action?: string;
|
|
11
15
|
};
|
|
12
|
-
type MutableEditorState = Pick<EditorState, 'theme'>;
|
|
16
|
+
type MutableEditorState = Pick<EditorState, 'theme' | 'mode' | 'screen' | 'action'>;
|
|
13
17
|
type EditorStateValue = EditorState & {
|
|
14
18
|
setState: (partial: Partial<MutableEditorState>) => void;
|
|
15
19
|
};
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { Theme } from '@janbox/storefront-ui/theme';
|
|
2
2
|
import { SidebarProps } from './sidebar';
|
|
3
|
-
import { Resolver } from '../../types';
|
|
3
|
+
import { Resolver, SerializedNodes } from '../../types';
|
|
4
4
|
import { EditorHandlers } from '../hooks/use-editor';
|
|
5
|
-
|
|
5
|
+
import { PropsWithChildren } from 'react';
|
|
6
|
+
export type EditorProps = PropsWithChildren<{
|
|
6
7
|
theme: Theme;
|
|
7
8
|
insert?: SidebarProps['insert'];
|
|
8
9
|
resolver?: Resolver;
|
|
9
10
|
handlers: EditorHandlers;
|
|
10
|
-
|
|
11
|
+
serializedNodes?: SerializedNodes;
|
|
12
|
+
}>;
|
|
11
13
|
export type { EditorHandlers } from '../hooks/use-editor';
|
|
12
14
|
export type { InsertTemplate, InsertTemplateGroup } from './sidebar/insert-action';
|
|
13
|
-
export declare const Editor: ({ theme, insert, resolver, handlers }: EditorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Editor: ({ theme, insert, resolver, handlers, serializedNodes, children }: EditorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StyledCSS } from '@janbox/storefront-ui/types';
|
|
2
|
+
export type CssFontWeightToolbarValue = Pick<StyledCSS, 'fontWeight'>;
|
|
3
|
+
export interface CssFontWeightToolbarProps {
|
|
4
|
+
responsive?: boolean;
|
|
5
|
+
name?: string;
|
|
6
|
+
value?: CssFontWeightToolbarValue;
|
|
7
|
+
onChange?: (value: CssFontWeightToolbarValue) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const CssFontWeightToolbar: ({ value, responsive, name, onChange }: CssFontWeightToolbarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { StyledCSS } from '@janbox/storefront-ui/types';
|
|
2
|
-
export type
|
|
2
|
+
export type CssWidthToolbarValue = {
|
|
3
3
|
width?: StyledCSS['width'];
|
|
4
4
|
};
|
|
5
5
|
type MenuOptionState = {
|
|
6
6
|
visible?: boolean;
|
|
7
7
|
clearable?: boolean;
|
|
8
8
|
};
|
|
9
|
-
interface
|
|
9
|
+
interface CssWidthToolbarProps {
|
|
10
10
|
name?: string;
|
|
11
11
|
responsive?: boolean;
|
|
12
|
-
value?:
|
|
13
|
-
onChange?: (value:
|
|
12
|
+
value?: CssWidthToolbarValue;
|
|
13
|
+
onChange?: (value: CssWidthToolbarValue) => void;
|
|
14
14
|
menu?: {
|
|
15
15
|
autoOption?: MenuOptionState;
|
|
16
16
|
fitContentOption?: MenuOptionState;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const CssWidthToolbar: ({ name, value, onChange, responsive, menu }: CssWidthToolbarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributeAnchorTarget } from 'react';
|
|
2
|
+
export type HtmlAnchorTargetToolbarProps = {
|
|
3
|
+
value?: HTMLAttributeAnchorTarget;
|
|
4
|
+
onChange?: (value: HTMLAttributeAnchorTarget) => void;
|
|
5
|
+
name?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const HtmlAnchorTargetToolbar: ({ value, onChange, name }: HtmlAnchorTargetToolbarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './text-align';
|
|
2
2
|
export * from './text-style';
|
|
3
3
|
export * from './text-transform';
|
|
4
|
-
export * from './width';
|
|
4
|
+
export * from './css-width';
|
|
5
5
|
export * from './height';
|
|
6
6
|
export * from './color';
|
|
7
7
|
export * from './background';
|
|
@@ -12,7 +12,7 @@ export * from './border-radius';
|
|
|
12
12
|
export * from './text-variant';
|
|
13
13
|
export * from './line-height';
|
|
14
14
|
export * from './font-size';
|
|
15
|
-
export * from './font-weight';
|
|
15
|
+
export * from './css-font-weight';
|
|
16
16
|
export * from './tag-name';
|
|
17
17
|
export * from './object-fit';
|
|
18
18
|
export * from './display';
|
|
@@ -35,4 +35,4 @@ export * from './order';
|
|
|
35
35
|
export * from './margin';
|
|
36
36
|
export * from './flex-wrap';
|
|
37
37
|
export * from './text-style-group';
|
|
38
|
-
export * from './anchor-target';
|
|
38
|
+
export * from './html-anchor-target';
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { StyledCSS } from '@janbox/storefront-ui/types';
|
|
2
|
+
export type CssTextAlignToolbarValue = Pick<StyledCSS, 'textAlign'>;
|
|
3
|
+
interface TextAlignToolbarProps {
|
|
4
|
+
value?: CssTextAlignToolbarValue;
|
|
5
|
+
onChange?: (value: CssTextAlignToolbarValue) => void;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CssTextAlignToolbar: ({ value, onChange, label }: TextAlignToolbarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, Ref } from 'react';
|
|
2
2
|
import { AutoUpdateOptions, OffsetOptions, Placement, SizeOptions, UseClickProps, UseDismissProps, UseFloatingOptions, UseFloatingReturn, UseFocusProps, UseHoverProps } from '@floating-ui/react';
|
|
3
3
|
export type WbFloatingProps = PropsWithChildren<{
|
|
4
4
|
placement?: Placement;
|
|
@@ -12,5 +12,5 @@ export type WbFloatingProps = PropsWithChildren<{
|
|
|
12
12
|
offsetOptions?: OffsetOptions;
|
|
13
13
|
sizeOptions?: SizeOptions;
|
|
14
14
|
autoUpdateOptions?: AutoUpdateOptions;
|
|
15
|
+
ref?: Ref<UseFloatingReturn>;
|
|
15
16
|
}>;
|
|
16
|
-
export type WbFloatingRef = UseFloatingReturn;
|