@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.
Files changed (61) hide show
  1. package/dist/{dialog-header-Bh3Dkw2q.js → countdown-timer.node-CZA-i5xq.js} +3303 -2187
  2. package/dist/editor/components/index.d.ts +0 -1
  3. package/dist/editor/hooks/index.d.ts +0 -12
  4. package/dist/editor/hooks/use-editor.d.ts +6 -2
  5. package/dist/editor/index.d.ts +4 -0
  6. package/dist/editor/lib/index.d.ts +6 -4
  7. package/dist/editor/toolbars/css-font-weight/index.d.ts +9 -0
  8. package/dist/editor/toolbars/{width/width.d.ts → css-width/index.d.ts} +5 -5
  9. package/dist/editor/toolbars/html-anchor-target/index.d.ts +7 -0
  10. package/dist/editor/toolbars/index.d.ts +3 -3
  11. package/dist/editor/toolbars/text-align/index.d.ts +9 -1
  12. package/dist/editor/ui/floating/wb-floating/types.d.ts +2 -2
  13. package/dist/editor/ui/floating/wb-floating/wb-floating.d.ts +2 -0
  14. package/dist/editor.js +1209 -673
  15. package/dist/hooks/use-composer.d.ts +464 -0
  16. package/dist/index-B58cYfCo.js +4 -0
  17. package/dist/index-ekIAycpt.js +8326 -0
  18. package/dist/index.js +173 -371
  19. package/dist/lib/accordion/accordion.node/helpers.d.ts +3 -0
  20. package/dist/lib/accordion-group/accordion-group.node/helpers.d.ts +3 -0
  21. package/dist/lib/box/box.node/helpers.d.ts +3 -0
  22. package/dist/lib/button/button.node/helpers.d.ts +3 -0
  23. package/dist/lib/cell/cell.node/helpers.d.ts +3 -0
  24. package/dist/lib/container/container.node/helpers.d.ts +3 -0
  25. package/dist/lib/countdown-timer/countdown-timer.node/helpers.d.ts +3 -0
  26. package/dist/lib/flex-item/flex-item.node/helpers.d.ts +3 -0
  27. package/dist/lib/flexbox/flexbox.node/helpers.d.ts +3 -0
  28. package/dist/lib/grid/grid.node/helpers.d.ts +3 -0
  29. package/dist/lib/heading/heading.node/helpers.d.ts +3 -0
  30. package/dist/lib/icon/icon.node/helpers.d.ts +3 -0
  31. package/dist/lib/image/image.node/helpers.d.ts +3 -0
  32. package/dist/lib/link/link.node/helpers.d.ts +3 -0
  33. package/dist/lib/list-item/list-item.node/helpers.d.ts +3 -0
  34. package/dist/lib/marquee/marquee.node/helpers.d.ts +3 -0
  35. package/dist/lib/paragraph/paragraph.node/helpers.d.ts +3 -0
  36. package/dist/lib/swiper/swiper.node/helpers.d.ts +3 -0
  37. package/dist/lib/tab/tab.node/helpers.d.ts +3 -0
  38. package/dist/lib/tab-panel/tab-panel.node/helpers.d.ts +3 -0
  39. package/dist/lib/tabs/tabs.node/helpers.d.ts +3 -0
  40. package/dist/lib/unordered-list/unordered-list.node/helpers.d.ts +3 -0
  41. package/dist/lib/video/video.node/helpers.d.ts +3 -0
  42. package/dist/templates.js +26 -28
  43. package/dist/{tooltip-CXOlTkGg.js → tooltip-BFrdgixm.js} +1 -1
  44. package/package.json +2 -10
  45. package/dist/anchor-target-CtXzdkBu.js +0 -2918
  46. package/dist/color-picker-popover-XeaVfYS8.js +0 -225
  47. package/dist/countdown-timer.node-Bh5fTSJ8.js +0 -913
  48. package/dist/date-picker-D9K6HWl-.js +0 -157
  49. package/dist/dropzone-CF4CWXth.js +0 -546
  50. package/dist/editor/components/toolbar-container.d.ts +0 -1
  51. package/dist/editor/toolbars/anchor-target/anchor-target.d.ts +0 -7
  52. package/dist/editor/toolbars/anchor-target/index.d.ts +0 -1
  53. package/dist/editor/toolbars/font-weight/dataset.d.ts +0 -5
  54. package/dist/editor/toolbars/font-weight/font-weight.d.ts +0 -9
  55. package/dist/editor/toolbars/font-weight/index.d.ts +0 -1
  56. package/dist/editor/toolbars/text-align/text-align.d.ts +0 -8
  57. package/dist/editor/toolbars/width/index.d.ts +0 -1
  58. package/dist/editor/toolbars.js +0 -346
  59. package/dist/editor/ui.js +0 -120
  60. package/dist/index-800HnUOi.js +0 -4
  61. package/dist/index-CXyljfMv.js +0 -4593
@@ -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 {};
@@ -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;
@@ -0,0 +1,2 @@
1
+ import { WbFloatingProps } from './types';
2
+ export declare const WbFloating: (props: WbFloatingProps) => import("@emotion/react/jsx-runtime").JSX.Element;