@janbox/storefront-builder 2.0.1 → 2.0.3

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 (51) hide show
  1. package/README.md +2 -2
  2. package/dist/{dialog-header-DPLOS7TT.js → countdown-timer.node-CZrTzirS.js} +3939 -2463
  3. package/dist/editor/components/index.d.ts +0 -1
  4. package/dist/editor/hooks/index.d.ts +0 -12
  5. package/dist/editor/hooks/use-editor.d.ts +6 -2
  6. package/dist/editor/index.d.ts +4 -0
  7. package/dist/editor/lib/index.d.ts +6 -4
  8. package/dist/editor/toolbars/css-font-weight/index.d.ts +9 -0
  9. package/dist/editor/toolbars/{width/width.d.ts → css-width/index.d.ts} +5 -5
  10. package/dist/editor/toolbars/html-anchor-target/index.d.ts +7 -0
  11. package/dist/editor/toolbars/index.d.ts +3 -3
  12. package/dist/editor/toolbars/text-align/index.d.ts +9 -1
  13. package/dist/editor/ui/button-group/button-group.d.ts +1 -1
  14. package/dist/editor/ui/dialog/dialog-body/dialog-body.d.ts +1 -1
  15. package/dist/editor/ui/form-label/form-label.d.ts +1 -1
  16. package/dist/editor/ui/input/input.d.ts +1 -2
  17. package/dist/editor/ui/loading-overlay/loading-overlay.d.ts +1 -1
  18. package/dist/editor/ui/popover/popover-close.d.ts +1 -1
  19. package/dist/editor/ui/tabs/tab-content.d.ts +1 -1
  20. package/dist/editor/ui/tabs/tab-list.d.ts +2 -4
  21. package/dist/editor/ui/tabs/tab-panel.d.ts +1 -1
  22. package/dist/editor/ui/tabs/tab.d.ts +2 -5
  23. package/dist/editor/ui/tabs/tabs.d.ts +1 -1
  24. package/dist/editor.js +1471 -739
  25. package/dist/index-B1b2lC5K.js +4 -0
  26. package/dist/index-CdI5y-ul.js +8326 -0
  27. package/dist/index.js +176 -334
  28. package/dist/style.css +1 -1
  29. package/dist/templates.js +27 -31
  30. package/dist/theme/index.d.ts +293 -0
  31. package/dist/tooltip-npH7aBjY.js +75 -0
  32. package/dist/utils/common.d.ts +0 -2
  33. package/package.json +1 -11
  34. package/dist/anchor-target-BlOvysAr.js +0 -2329
  35. package/dist/color-picker-popover-B3AVFuei.js +0 -201
  36. package/dist/countdown-timer.node-OmDiT-pz.js +0 -825
  37. package/dist/date-picker-B4Rju7gG.js +0 -115
  38. package/dist/dropzone-Dbfed3jK.js +0 -490
  39. package/dist/editor/components/toolbar-container.d.ts +0 -1
  40. package/dist/editor/toolbars/anchor-target/anchor-target.d.ts +0 -7
  41. package/dist/editor/toolbars/anchor-target/index.d.ts +0 -1
  42. package/dist/editor/toolbars/font-weight/dataset.d.ts +0 -5
  43. package/dist/editor/toolbars/font-weight/font-weight.d.ts +0 -9
  44. package/dist/editor/toolbars/font-weight/index.d.ts +0 -1
  45. package/dist/editor/toolbars/text-align/text-align.d.ts +0 -8
  46. package/dist/editor/toolbars/width/index.d.ts +0 -1
  47. package/dist/editor/toolbars.js +0 -336
  48. package/dist/editor/ui.js +0 -110
  49. package/dist/index-BbiQ0n_-.js +0 -4
  50. package/dist/index-CwrFnubn.js +0 -4448
  51. package/dist/tooltip-KbIHELP2.js +0 -65
@@ -6,6 +6,5 @@ export * from './degree-picker';
6
6
  export * from './image-source-selection';
7
7
  export * from './toolbar-field';
8
8
  export * from './toolbar-group';
9
- export * from './toolbar-container';
10
9
  export * from './text-inline-editor';
11
10
  export * from './frame-preview';
@@ -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
  };
@@ -1,2 +1,6 @@
1
1
  export * from './lib';
2
2
  export * from './hooks';
3
+ export * from './components';
4
+ export * from './types';
5
+ export * from './toolbars';
6
+ export * from './ui';
@@ -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
- export type EditorProps = {
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 CssWidthValue = {
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 WidthToolbarProps {
9
+ interface CssWidthToolbarProps {
10
10
  name?: string;
11
11
  responsive?: boolean;
12
- value?: CssWidthValue;
13
- onChange?: (value: CssWidthValue) => void;
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 WidthToolbar: ({ name, value, onChange, responsive, menu }: WidthToolbarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
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
- export * from './text-align';
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 {};
@@ -5,4 +5,4 @@ export type WbButtonGroupProps<T> = ShallowMerge<JSX.IntrinsicElements['div'], {
5
5
  value?: T;
6
6
  defaultValue?: T;
7
7
  }>;
8
- export declare const WbButtonGroup: <T extends string = string>({ children, defaultValue, value, onSelectionChange, className, ...props }: WbButtonGroupProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare const WbButtonGroup: <T extends string = string>({ children, defaultValue, value, onSelectionChange, ...props }: WbButtonGroupProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { WbDialogBodyProps } from './types';
2
- export declare const WbDialogBody: ({ className, ref, ...props }: WbDialogBodyProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const WbDialogBody: ({ ref, ...props }: WbDialogBodyProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -3,4 +3,4 @@ import { ShallowMerge } from '@janbox/storefront-ui/types';
3
3
  export type FormLabelProps = ShallowMerge<JSX.IntrinsicElements['div'], {
4
4
  required?: boolean;
5
5
  }>;
6
- export declare const WbFormLabel: ({ required, className, children, ...props }: FormLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export declare const WbFormLabel: ({ required, children, ...props }: FormLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -7,7 +7,6 @@ export type WbInputProps = ShallowMerge<JSX.IntrinsicElements['input'], {
7
7
  classes?: {
8
8
  input?: string;
9
9
  main?: string;
10
- container?: string;
11
10
  };
12
11
  fullWidth?: boolean;
13
12
  value?: string | number;
@@ -19,4 +18,4 @@ export type WbInputProps = ShallowMerge<JSX.IntrinsicElements['input'], {
19
18
  helperText?: string;
20
19
  selectOnFocus?: boolean;
21
20
  }>;
22
- export declare const WbInput: ({ prefix, suffix, classes, className, size, transform, fullWidth, wrapRef, onChange: onChangeProp, mode, debounce, value, ref, error, helperText, selectOnFocus, ...props }: WbInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
21
+ export declare const WbInput: ({ prefix, suffix, classes, size, transform, fullWidth, wrapRef, onChange: onChangeProp, mode, debounce, value, ref, error, helperText, selectOnFocus, ...props }: WbInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -5,4 +5,4 @@ export type EsLoadingOverlayProps = ShallowMerge<JSX.IntrinsicElements['div'], {
5
5
  hideChildrenOnLoading?: boolean;
6
6
  size?: number;
7
7
  }>;
8
- export declare const WbLoadingOverlay: ({ className, style, children, isLoading, hideChildrenOnLoading, size, ...props }: EsLoadingOverlayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare const WbLoadingOverlay: ({ style, children, isLoading, hideChildrenOnLoading, size, ...props }: EsLoadingOverlayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -5,4 +5,4 @@ export type WbPopoverCloseProps = ShallowMerge<JSX.IntrinsicElements['div'], {
5
5
  event?: keyof HTMLElementEventMap;
6
6
  reason?: OpenChangeReason;
7
7
  }>;
8
- export declare const WbPopoverClose: ({ event, reason, className, ref, ...props }: WbPopoverCloseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare const WbPopoverClose: ({ event, reason, ref, ...props }: WbPopoverCloseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { JSX } from 'react';
2
- export declare const WbTabContent: ({ children, className, ...props }: JSX.IntrinsicElements["div"]) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const WbTabContent: ({ children, ...props }: JSX.IntrinsicElements["div"]) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,6 +1,4 @@
1
1
  import { JSX } from 'react';
2
2
  import { ShallowMerge } from '@janbox/storefront-ui/types';
3
- export type WbTabListProps = ShallowMerge<JSX.IntrinsicElements['ul'], {
4
- layout?: 'auto-fit' | 'auto-fill';
5
- }>;
6
- export declare const WbTabList: ({ className, children, layout, ...props }: WbTabListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export type WbTabListProps = ShallowMerge<JSX.IntrinsicElements['ul'], {}>;
4
+ export declare const WbTabList: ({ children, ...props }: WbTabListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { JSX } from 'react';
2
- export declare const WbTabPanel: ({ className, ...props }: JSX.IntrinsicElements["div"]) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const WbTabPanel: ({ ...props }: JSX.IntrinsicElements["div"]) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,8 +1,5 @@
1
1
  import { JSX } from 'react';
2
- import { ShallowMerge } from '@janbox/storefront-ui/types';
3
2
  export type WbTabProps = ShallowMerge<JSX.IntrinsicElements['li'], {
4
- classes?: {
5
- active?: string;
6
- };
3
+ fill?: boolean;
7
4
  }>;
8
- export declare const WbTab: ({ className, classes, ...props }: WbTabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export declare const WbTab: ({ fill, ...props }: WbTabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -4,5 +4,5 @@ type WbTabsProps = ShallowMerge<React.JSX.IntrinsicElements['div'], {
4
4
  defaultIndex?: number;
5
5
  onTabChange?: (tabIndex: number) => void;
6
6
  }>;
7
- export declare const WbTabs: ({ defaultIndex, activeIndex, children, onTabChange, className, ...props }: WbTabsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export declare const WbTabs: ({ defaultIndex, activeIndex, children, onTabChange, ...props }: WbTabsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
8
  export {};