@janbox/storefront-builder 2.0.2 → 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 (35) hide show
  1. package/dist/{dialog-header-Bh3Dkw2q.js → countdown-timer.node-CZrTzirS.js} +3315 -2157
  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.js +1189 -693
  13. package/dist/index-B1b2lC5K.js +4 -0
  14. package/dist/index-CdI5y-ul.js +8326 -0
  15. package/dist/index.js +173 -371
  16. package/dist/templates.js +26 -28
  17. package/dist/{tooltip-CXOlTkGg.js → tooltip-npH7aBjY.js} +1 -1
  18. package/package.json +1 -10
  19. package/dist/anchor-target-CtXzdkBu.js +0 -2918
  20. package/dist/color-picker-popover-XeaVfYS8.js +0 -225
  21. package/dist/countdown-timer.node-Bh5fTSJ8.js +0 -913
  22. package/dist/date-picker-D9K6HWl-.js +0 -157
  23. package/dist/dropzone-CF4CWXth.js +0 -546
  24. package/dist/editor/components/toolbar-container.d.ts +0 -1
  25. package/dist/editor/toolbars/anchor-target/anchor-target.d.ts +0 -7
  26. package/dist/editor/toolbars/anchor-target/index.d.ts +0 -1
  27. package/dist/editor/toolbars/font-weight/dataset.d.ts +0 -5
  28. package/dist/editor/toolbars/font-weight/font-weight.d.ts +0 -9
  29. package/dist/editor/toolbars/font-weight/index.d.ts +0 -1
  30. package/dist/editor/toolbars/text-align/text-align.d.ts +0 -8
  31. package/dist/editor/toolbars/width/index.d.ts +0 -1
  32. package/dist/editor/toolbars.js +0 -346
  33. package/dist/editor/ui.js +0 -120
  34. package/dist/index-800HnUOi.js +0 -4
  35. 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 {};