easy-email-extensions 4.3.0 → 4.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. package/lib/AttributePanel/AttributePanel.d.ts +3 -3
  2. package/lib/AttributePanel/components/UI/Help/index.d.ts +7 -7
  3. package/lib/AttributePanel/components/UI/HtmlEditor.d.ts +5 -5
  4. package/lib/AttributePanel/components/attributes/Align.d.ts +3 -3
  5. package/lib/AttributePanel/components/attributes/AttributesPanelWrapper/index.d.ts +6 -6
  6. package/lib/AttributePanel/components/attributes/Background.d.ts +1 -1
  7. package/lib/AttributePanel/components/attributes/BackgroundColor.d.ts +3 -3
  8. package/lib/AttributePanel/components/attributes/Border.d.ts +1 -1
  9. package/lib/AttributePanel/components/attributes/BorderColor.d.ts +1 -1
  10. package/lib/AttributePanel/components/attributes/BorderStyle.d.ts +5 -5
  11. package/lib/AttributePanel/components/attributes/BorderWidth.d.ts +1 -1
  12. package/lib/AttributePanel/components/attributes/ClassName.d.ts +1 -1
  13. package/lib/AttributePanel/components/attributes/CollapseWrapper/index.d.ts +5 -5
  14. package/lib/AttributePanel/components/attributes/Color.d.ts +4 -4
  15. package/lib/AttributePanel/components/attributes/Condition.d.ts +1 -1
  16. package/lib/AttributePanel/components/attributes/ContainerBackgroundColor.d.ts +3 -3
  17. package/lib/AttributePanel/components/attributes/Decoration.d.ts +1 -1
  18. package/lib/AttributePanel/components/attributes/Direction.d.ts +1 -1
  19. package/lib/AttributePanel/components/attributes/FontFamily.d.ts +3 -3
  20. package/lib/AttributePanel/components/attributes/FontSize.d.ts +1 -1
  21. package/lib/AttributePanel/components/attributes/FontStyle.d.ts +3 -3
  22. package/lib/AttributePanel/components/attributes/FontWeight.d.ts +3 -3
  23. package/lib/AttributePanel/components/attributes/Height.d.ts +3 -3
  24. package/lib/AttributePanel/components/attributes/Iteration.d.ts +1 -1
  25. package/lib/AttributePanel/components/attributes/LetterSpacing.d.ts +3 -3
  26. package/lib/AttributePanel/components/attributes/LineHeight.d.ts +3 -3
  27. package/lib/AttributePanel/components/attributes/Link.d.ts +1 -1
  28. package/lib/AttributePanel/components/attributes/Margin.d.ts +1 -1
  29. package/lib/AttributePanel/components/attributes/MergeTags.d.ts +6 -6
  30. package/lib/AttributePanel/components/attributes/NavbarLinkPadding.d.ts +3 -3
  31. package/lib/AttributePanel/components/attributes/Padding.d.ts +6 -6
  32. package/lib/AttributePanel/components/attributes/TextAlign.d.ts +3 -3
  33. package/lib/AttributePanel/components/attributes/TextDecoration.d.ts +3 -3
  34. package/lib/AttributePanel/components/attributes/TextTransform.d.ts +3 -3
  35. package/lib/AttributePanel/components/attributes/VerticalAlign.d.ts +3 -3
  36. package/lib/AttributePanel/components/attributes/Width.d.ts +5 -5
  37. package/lib/AttributePanel/components/attributes/index.d.ts +30 -30
  38. package/lib/AttributePanel/components/blocks/Accordion/index.d.ts +1 -1
  39. package/lib/AttributePanel/components/blocks/AccordionElement/index.d.ts +1 -1
  40. package/lib/AttributePanel/components/blocks/AccordionText/index.d.ts +1 -1
  41. package/lib/AttributePanel/components/blocks/AccordionTitle/index.d.ts +1 -1
  42. package/lib/AttributePanel/components/blocks/Button/index.d.ts +1 -1
  43. package/lib/AttributePanel/components/blocks/Carousel/index.d.ts +1 -1
  44. package/lib/AttributePanel/components/blocks/Column/index.d.ts +1 -1
  45. package/lib/AttributePanel/components/blocks/Divider/index.d.ts +1 -1
  46. package/lib/AttributePanel/components/blocks/Group/index.d.ts +1 -1
  47. package/lib/AttributePanel/components/blocks/Hero/index.d.ts +1 -1
  48. package/lib/AttributePanel/components/blocks/Image/index.d.ts +1 -1
  49. package/lib/AttributePanel/components/blocks/Navbar/index.d.ts +1 -1
  50. package/lib/AttributePanel/components/blocks/Page/index.d.ts +1 -1
  51. package/lib/AttributePanel/components/blocks/Raw/index.d.ts +1 -1
  52. package/lib/AttributePanel/components/blocks/Section/index.d.ts +1 -1
  53. package/lib/AttributePanel/components/blocks/Social/index.d.ts +1 -1
  54. package/lib/AttributePanel/components/blocks/Spacer/index.d.ts +1 -1
  55. package/lib/AttributePanel/components/blocks/Table/index.d.ts +1 -1
  56. package/lib/AttributePanel/components/blocks/Text/index.d.ts +1 -1
  57. package/lib/AttributePanel/components/blocks/Wrapper/index.d.ts +1 -1
  58. package/lib/AttributePanel/components/blocks/index.d.ts +55 -55
  59. package/lib/AttributePanel/components/provider/PresetColorsProvider/index.d.ts +6 -6
  60. package/lib/AttributePanel/components/provider/SelectionRangeProvider/index.d.ts +6 -6
  61. package/lib/AttributePanel/hooks/useSelectionRange.d.ts +7 -7
  62. package/lib/AttributePanel/index.d.ts +3 -3
  63. package/lib/AttributePanel/utils/BlockAttributeConfigurationManager.d.ts +10 -10
  64. package/lib/AttributePanel/utils/InputNumberAdapter.d.ts +2 -2
  65. package/lib/AttributePanel/utils/PromiseEach.d.ts +1 -1
  66. package/lib/AttributePanel/utils/Uploader.d.ts +35 -35
  67. package/lib/AttributePanel/utils/awaitForElement.d.ts +4 -4
  68. package/lib/AttributePanel/utils/classnames.d.ts +1 -1
  69. package/lib/AttributePanel/utils/getImg.d.ts +8 -8
  70. package/lib/AttributePanel/utils/onDrag.d.ts +10 -10
  71. package/lib/AttributePanel/utils/previewLoadImage.d.ts +1 -1
  72. package/lib/BlockLayer/components/BlockTree/index.d.ts +51 -51
  73. package/lib/BlockLayer/components/BlockTree/transparentImage.d.ts +1 -1
  74. package/lib/BlockLayer/components/ContextMenu/index.d.ts +14 -14
  75. package/lib/BlockLayer/components/EyeIcon/index.d.ts +7 -7
  76. package/lib/BlockLayer/hooks/useAvatarWrapperDrop.d.ts +24 -24
  77. package/lib/BlockLayer/index.d.ts +13 -13
  78. package/lib/ConfigurationPanel/index.d.ts +7 -7
  79. package/lib/EditPanel/Blocks/index.d.ts +1 -1
  80. package/lib/EditPanel/ConfigurationDrawer/index.d.ts +4 -4
  81. package/lib/EditPanel/index.d.ts +1 -1
  82. package/lib/InteractivePrompt/components/FocusTooltip.d.ts +1 -1
  83. package/lib/InteractivePrompt/components/HoverTooltip.d.ts +1 -1
  84. package/lib/InteractivePrompt/components/Toolbar.d.ts +1 -1
  85. package/lib/InteractivePrompt/index.d.ts +1 -1
  86. package/lib/InteractivePrompt/utils/awaitForElement.d.ts +4 -4
  87. package/lib/MergeTagBadgePrompt/index.d.ts +1 -1
  88. package/lib/ShortcutToolbar/ShortcutToolbar.d.ts +1 -1
  89. package/lib/ShortcutToolbar/components/BlockMaskWrapper/index.d.ts +6 -6
  90. package/lib/ShortcutToolbar/components/BlocksPanel/index.d.ts +2 -2
  91. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/AccordionBlockItem/index.d.ts +1 -1
  92. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ButtonBlockItem/index.d.ts +1 -1
  93. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/CarouselBlockItem/index.d.ts +1 -1
  94. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ColumnBlockItem/index.d.ts +1 -1
  95. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/DividerBlockItem/index.d.ts +1 -1
  96. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/GroupBlockItem/index.d.ts +1 -1
  97. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/HeroBlockItem/index.d.ts +1 -1
  98. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/ImageBlockItem/index.d.ts +1 -1
  99. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/NavbarBlockItem/index.d.ts +1 -1
  100. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/RawBlockItem/index.d.ts +1 -1
  101. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SectionBlockItem/index.d.ts +1 -1
  102. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SocialBlockItem/index.d.ts +1 -1
  103. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/SpacerBlockItem/index.d.ts +1 -1
  104. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/TextBlockItem/index.d.ts +1 -1
  105. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/WrapperBlockItem/index.d.ts +1 -1
  106. package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/index.d.ts +18 -18
  107. package/lib/ShortcutToolbar/components/DragIcon/index.d.ts +8 -8
  108. package/lib/ShortcutToolbar/components/Picture/index.d.ts +7 -7
  109. package/lib/ShortcutToolbar/index.d.ts +4 -4
  110. package/lib/ShortcutToolbar/utils/BlockMarketManager.d.ts +32 -32
  111. package/lib/ShortcutToolbar/utils/getImg.d.ts +68 -68
  112. package/lib/SimpleLayout/SimpleLayout.d.ts +6 -6
  113. package/lib/SimpleLayout/index.d.ts +1 -1
  114. package/lib/SourceCodePanel/index.d.ts +1 -1
  115. package/lib/StandardLayout/StandardLayout.d.ts +3 -3
  116. package/lib/StandardLayout/index.d.ts +1 -1
  117. package/lib/components/AddToCollection/index.d.ts +5 -5
  118. package/lib/components/Form/AddFont.d.ts +1 -1
  119. package/lib/components/Form/AutoComplete.d.ts +11 -11
  120. package/lib/components/Form/CheckBoxGroup.d.ts +14 -14
  121. package/lib/components/Form/CodemirrorEditor/index.d.ts +8 -8
  122. package/lib/components/Form/ColorPicker/ColorPickerContent.d.ts +5 -5
  123. package/lib/components/Form/ColorPicker/index.d.ts +11 -11
  124. package/lib/components/Form/ColorPicker2.d.ts +10 -10
  125. package/lib/components/Form/EditGridTab.d.ts +10 -10
  126. package/lib/components/Form/EditTab.d.ts +10 -10
  127. package/lib/components/Form/ImageUploader/index.d.ts +13 -13
  128. package/lib/components/Form/InlineTextField/index.d.ts +7 -7
  129. package/lib/components/Form/Input.d.ts +7 -7
  130. package/lib/components/Form/InputWithUnit.d.ts +10 -10
  131. package/lib/components/Form/RadioGroup.d.ts +13 -13
  132. package/lib/components/Form/RichTextField/index.d.ts +2 -2
  133. package/lib/components/Form/RichTextToolBar/RichTextToolBar.d.ts +3 -3
  134. package/lib/components/Form/RichTextToolBar/components/BasicTools.d.ts +1 -1
  135. package/lib/components/Form/RichTextToolBar/components/Bold/index.d.ts +6 -6
  136. package/lib/components/Form/RichTextToolBar/components/FontFamily/index.d.ts +5 -5
  137. package/lib/components/Form/RichTextToolBar/components/FontSize/index.d.ts +5 -5
  138. package/lib/components/Form/RichTextToolBar/components/Heading/index.d.ts +3 -3
  139. package/lib/components/Form/RichTextToolBar/components/Italic/index.d.ts +6 -6
  140. package/lib/components/Form/RichTextToolBar/components/Link/index.d.ts +12 -12
  141. package/lib/components/Form/RichTextToolBar/components/MergeTags/index.d.ts +5 -5
  142. package/lib/components/Form/RichTextToolBar/components/StrikeThrough/index.d.ts +6 -6
  143. package/lib/components/Form/RichTextToolBar/components/ToolItem/index.d.ts +9 -9
  144. package/lib/components/Form/RichTextToolBar/components/Tools/IconBgColor/index.d.ts +5 -5
  145. package/lib/components/Form/RichTextToolBar/components/Tools/IconFontColor/index.d.ts +5 -5
  146. package/lib/components/Form/RichTextToolBar/components/Tools/Tools.d.ts +4 -4
  147. package/lib/components/Form/RichTextToolBar/components/Tools/index.d.ts +1 -1
  148. package/lib/components/Form/RichTextToolBar/components/Underline/index.d.ts +6 -6
  149. package/lib/components/Form/RichTextToolBar/components/Unlink/index.d.ts +12 -12
  150. package/lib/components/Form/RichTextToolBar/index.d.ts +1 -1
  151. package/lib/components/Form/Select.d.ts +11 -11
  152. package/lib/components/Form/UploadField.d.ts +8 -8
  153. package/lib/components/Form/enhancer.d.ts +20 -20
  154. package/lib/components/Form/index.d.ts +34 -34
  155. package/lib/components/FullHeightOverlayScrollbars/index.d.ts +5 -5
  156. package/lib/components/Providers/ExtensionProvider.d.ts +39 -39
  157. package/lib/components/RenderCount/index.d.ts +1 -1
  158. package/lib/components/ShadowDom/index.d.ts +2 -2
  159. package/lib/constants.d.ts +1 -1
  160. package/lib/hooks/useAddToCollection.d.ts +6 -6
  161. package/lib/hooks/useFontFamily.d.ts +6 -6
  162. package/lib/index.d.ts +15 -15
  163. package/lib/index2.js +85 -49
  164. package/lib/index2.js.map +1 -1
  165. package/lib/index3.js.map +1 -1
  166. package/lib/utils/awaitForElement.d.ts +4 -4
  167. package/lib/utils/classnames.d.ts +1 -1
  168. package/lib/utils/getBlockTitle.d.ts +2 -2
  169. package/lib/utils/getContextMergeTags.d.ts +7 -7
  170. package/lib/utils/getIconNameByBlockType.d.ts +1 -1
  171. package/lib/utils/getPreviewClassName.d.ts +1 -1
  172. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- export interface MergeTagsProps {
2
- execCommand: (cmd: string, value: any) => void;
3
- getPopupContainer: () => HTMLElement;
4
- }
5
- export declare function MergeTags(props: MergeTagsProps): JSX.Element;
1
+ export interface MergeTagsProps {
2
+ execCommand: (cmd: string, value: any) => void;
3
+ getPopupContainer: () => HTMLElement;
4
+ }
5
+ export declare function MergeTags(props: MergeTagsProps): JSX.Element;
@@ -1,6 +1,6 @@
1
- import { PopoverProps } from '@arco-design/web-react';
2
- export interface LinkProps extends PopoverProps {
3
- currentRange: Range | null | undefined;
4
- onChange: () => void;
5
- }
6
- export declare function StrikeThrough(props: LinkProps): JSX.Element;
1
+ import { PopoverProps } from '@arco-design/web-react';
2
+ export interface LinkProps extends PopoverProps {
3
+ currentRange: Range | null | undefined;
4
+ onChange: () => void;
5
+ }
6
+ export declare function StrikeThrough(props: LinkProps): JSX.Element;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
- export declare const ToolItem: React.FC<{
3
- title?: string;
4
- icon: React.ReactNode;
5
- onClick?: React.MouseEventHandler<any>;
6
- trigger?: string;
7
- style?: React.CSSProperties;
8
- isActive?: boolean;
9
- }>;
1
+ import React from 'react';
2
+ export declare const ToolItem: React.FC<{
3
+ title?: string;
4
+ icon: React.ReactNode;
5
+ onClick?: React.MouseEventHandler<any>;
6
+ trigger?: string;
7
+ style?: React.CSSProperties;
8
+ isActive?: boolean;
9
+ }>;
@@ -1,5 +1,5 @@
1
- export declare function IconBgColor({ selectionRange, execCommand, getPopoverMountNode }: {
2
- selectionRange: Range | null;
3
- execCommand: (cmd: string, val?: any) => void;
4
- getPopoverMountNode: () => HTMLElement;
5
- }): JSX.Element;
1
+ export declare function IconBgColor({ selectionRange, execCommand, getPopoverMountNode }: {
2
+ selectionRange: Range | null;
3
+ execCommand: (cmd: string, val?: any) => void;
4
+ getPopoverMountNode: () => HTMLElement;
5
+ }): JSX.Element;
@@ -1,5 +1,5 @@
1
- export declare function IconFontColor({ selectionRange, execCommand, getPopoverMountNode }: {
2
- selectionRange: Range | null;
3
- execCommand: (cmd: string, val?: any) => void;
4
- getPopoverMountNode: () => HTMLElement;
5
- }): JSX.Element;
1
+ export declare function IconFontColor({ selectionRange, execCommand, getPopoverMountNode }: {
2
+ selectionRange: Range | null;
3
+ execCommand: (cmd: string, val?: any) => void;
4
+ getPopoverMountNode: () => HTMLElement;
5
+ }): JSX.Element;
@@ -1,4 +1,4 @@
1
- export interface ToolsProps {
2
- onChange: (content: string) => any;
3
- }
4
- export declare function Tools(props: ToolsProps): JSX.Element;
1
+ export interface ToolsProps {
2
+ onChange: (content: string) => any;
3
+ }
4
+ export declare function Tools(props: ToolsProps): JSX.Element;
@@ -1 +1 @@
1
- export { Tools } from './Tools';
1
+ export { Tools } from './Tools';
@@ -1,6 +1,6 @@
1
- import { PopoverProps } from '@arco-design/web-react';
2
- export interface LinkProps extends PopoverProps {
3
- currentRange: Range | null | undefined;
4
- onChange: () => void;
5
- }
6
- export declare function Underline(props: LinkProps): JSX.Element;
1
+ import { PopoverProps } from '@arco-design/web-react';
2
+ export interface LinkProps extends PopoverProps {
3
+ currentRange: Range | null | undefined;
4
+ onChange: () => void;
5
+ }
6
+ export declare function Underline(props: LinkProps): JSX.Element;
@@ -1,12 +1,12 @@
1
- import { PopoverProps } from '@arco-design/web-react';
2
- export interface LinkParams {
3
- link: string;
4
- blank: boolean;
5
- underline: boolean;
6
- linkNode: HTMLAnchorElement | null;
7
- }
8
- export interface LinkProps extends PopoverProps {
9
- currentRange: Range | null | undefined;
10
- onChange: () => void;
11
- }
12
- export declare function Unlink(props: LinkProps): JSX.Element;
1
+ import { PopoverProps } from '@arco-design/web-react';
2
+ export interface LinkParams {
3
+ link: string;
4
+ blank: boolean;
5
+ underline: boolean;
6
+ linkNode: HTMLAnchorElement | null;
7
+ }
8
+ export interface LinkProps extends PopoverProps {
9
+ currentRange: Range | null | undefined;
10
+ onChange: () => void;
11
+ }
12
+ export declare function Unlink(props: LinkProps): JSX.Element;
@@ -1 +1 @@
1
- export { RichTextToolBar } from './RichTextToolBar';
1
+ export { RichTextToolBar } from './RichTextToolBar';
@@ -1,11 +1,11 @@
1
- import { SelectProps as ArcoSelectProps } from '@arco-design/web-react';
2
- import React from 'react';
3
- export interface SelectProps extends ArcoSelectProps {
4
- options: Array<{
5
- value: string;
6
- label: React.ReactNode;
7
- }>;
8
- onChange?: (val: string) => void;
9
- value: string;
10
- }
11
- export declare function Select(props: SelectProps): JSX.Element;
1
+ import { SelectProps as ArcoSelectProps } from '@arco-design/web-react';
2
+ import React from 'react';
3
+ export interface SelectProps extends ArcoSelectProps {
4
+ options: Array<{
5
+ value: string;
6
+ label: React.ReactNode;
7
+ }>;
8
+ onChange?: (val: string) => void;
9
+ value: string;
10
+ }
11
+ export declare function Select(props: SelectProps): JSX.Element;
@@ -1,8 +1,8 @@
1
- export interface UploadFieldProps {
2
- onChange: (val: string) => void;
3
- value: string;
4
- inputDisabled?: boolean;
5
- accept?: string;
6
- uploadHandler: (file: File) => Promise<string>;
7
- }
8
- export declare function UploadField(props: UploadFieldProps): JSX.Element;
1
+ export interface UploadFieldProps {
2
+ onChange: (val: string) => void;
3
+ value: string;
4
+ inputDisabled?: boolean;
5
+ accept?: string;
6
+ uploadHandler: (file: File) => Promise<string>;
7
+ }
8
+ export declare function UploadField(props: UploadFieldProps): JSX.Element;
@@ -1,20 +1,20 @@
1
- import { StackProps } from 'easy-email-editor';
2
- import { FieldProps } from 'react-final-form';
3
- import React from 'react';
4
- import { InputProps } from './Input';
5
- export interface EnhancerProps<T> extends Partial<FieldProps<T, any>> {
6
- name: string;
7
- label: React.ReactNode | null;
8
- labelHidden?: boolean;
9
- alignment?: StackProps['alignment'];
10
- distribution?: StackProps['distribution'];
11
- helpText?: React.ReactNode;
12
- inline?: boolean;
13
- required?: boolean;
14
- valueAdapter?: (value: any) => any;
15
- onChangeAdapter?: (value: any) => any;
16
- validate?: (value: any) => string | undefined | Promise<string | undefined>;
17
- wrapper?: boolean;
18
- size?: InputProps['size'];
19
- }
20
- export default function enhancer<P, C extends (...rest: any[]) => any = any>(Component: any, changeAdapter: C): (props: EnhancerProps<P> & Omit<P, 'value' | 'onChange' | 'mutators'>) => JSX.Element;
1
+ import { StackProps } from 'easy-email-editor';
2
+ import { FieldProps } from 'react-final-form';
3
+ import React from 'react';
4
+ import { InputProps } from './Input';
5
+ export interface EnhancerProps<T> extends Partial<FieldProps<T, any>> {
6
+ name: string;
7
+ label: React.ReactNode | null;
8
+ labelHidden?: boolean;
9
+ alignment?: StackProps['alignment'];
10
+ distribution?: StackProps['distribution'];
11
+ helpText?: React.ReactNode;
12
+ inline?: boolean;
13
+ required?: boolean;
14
+ valueAdapter?: (value: any) => any;
15
+ onChangeAdapter?: (value: any) => any;
16
+ validate?: (value: any) => string | undefined | Promise<string | undefined>;
17
+ wrapper?: boolean;
18
+ size?: InputProps['size'];
19
+ }
20
+ export default function enhancer<P, C extends (...rest: any[]) => any = any>(Component: any, changeAdapter: C): (props: EnhancerProps<P> & Omit<P, 'value' | 'onChange' | 'mutators'>) => JSX.Element;
@@ -1,34 +1,34 @@
1
- import { SliderProps, InputNumberProps, SwitchProps, DatePickerProps, TextAreaProps, CheckboxGroupProps, TreeSelectProps } from '@arco-design/web-react';
2
- import { ImageUploaderProps } from './ImageUploader';
3
- import { UploadFieldProps } from './UploadField';
4
- import { ColorPickerProps } from './ColorPicker';
5
- import { SelectProps } from './Select';
6
- import { RadioGroupProps } from './RadioGroup';
7
- import enhancer from './enhancer';
8
- import { InputProps } from './Input';
9
- import { InputWithUnitProps } from './InputWithUnit';
10
- import { EditTabProps } from './EditTab';
11
- import { EditGridTabProps } from './EditGridTab';
12
- import { InlineTextProps } from './InlineTextField';
13
- import { AutoCompleteProps } from './AutoComplete';
14
- export { RichTextField } from './RichTextField';
15
- export declare const TextField: (props: import("./enhancer").EnhancerProps<InputProps> & Omit<InputProps, "value" | "onChange" | "mutators">) => JSX.Element;
16
- export declare const InputWithUnitField: (props: import("./enhancer").EnhancerProps<InputWithUnitProps> & Omit<InputWithUnitProps, "value" | "onChange" | "mutators">) => JSX.Element;
17
- export declare const SearchField: (props: import("./enhancer").EnhancerProps<InputProps> & Omit<InputProps, "value" | "onChange" | "mutators">) => JSX.Element;
18
- export declare const TextAreaField: (props: import("./enhancer").EnhancerProps<TextAreaProps> & Omit<TextAreaProps, "value" | "onChange" | "mutators">) => JSX.Element;
19
- export declare const NumberField: (props: import("./enhancer").EnhancerProps<InputNumberProps> & Omit<InputNumberProps, "value" | "onChange" | "mutators">) => JSX.Element;
20
- export declare const SliderField: (props: import("./enhancer").EnhancerProps<SliderProps> & Omit<SliderProps, "value" | "onChange" | "mutators">) => JSX.Element;
21
- export declare const ColorPickerField: (props: import("./enhancer").EnhancerProps<ColorPickerProps> & Omit<ColorPickerProps, "value" | "onChange" | "mutators">) => JSX.Element;
22
- export declare const UploadField: (props: import("./enhancer").EnhancerProps<UploadFieldProps> & Omit<UploadFieldProps, "value" | "onChange" | "mutators">) => JSX.Element;
23
- export declare const ImageUploaderField: (props: import("./enhancer").EnhancerProps<ImageUploaderProps> & Omit<ImageUploaderProps, "value" | "onChange" | "mutators">) => JSX.Element;
24
- export declare const SelectField: (props: import("./enhancer").EnhancerProps<SelectProps> & Omit<SelectProps, "value" | "onChange" | "mutators">) => JSX.Element;
25
- export declare const TreeSelectField: (props: import("./enhancer").EnhancerProps<TreeSelectProps> & Omit<TreeSelectProps, "value" | "onChange" | "mutators">) => JSX.Element;
26
- export declare const AutoCompleteField: (props: import("./enhancer").EnhancerProps<AutoCompleteProps> & Omit<AutoCompleteProps, "value" | "onChange" | "mutators">) => JSX.Element;
27
- export declare const RadioGroupField: (props: import("./enhancer").EnhancerProps<RadioGroupProps> & Omit<RadioGroupProps, "value" | "onChange" | "mutators">) => JSX.Element;
28
- export declare const SwitchField: (props: import("./enhancer").EnhancerProps<SwitchProps> & Omit<SwitchProps, "value" | "onChange" | "mutators">) => JSX.Element;
29
- export declare const DatePickerField: (props: import("./enhancer").EnhancerProps<DatePickerProps> & Omit<DatePickerProps, "value" | "onChange" | "mutators">) => JSX.Element;
30
- export declare const CheckboxField: (props: import("./enhancer").EnhancerProps<CheckboxGroupProps<any>> & Omit<CheckboxGroupProps<any>, "value" | "onChange" | "mutators">) => JSX.Element;
31
- export declare const EditTabField: (props: import("./enhancer").EnhancerProps<EditTabProps<any>> & Omit<EditTabProps<any>, "value" | "onChange" | "mutators">) => JSX.Element;
32
- export declare const EditGridTabField: (props: import("./enhancer").EnhancerProps<EditGridTabProps<any>> & Omit<EditGridTabProps<any>, "value" | "onChange" | "mutators">) => JSX.Element;
33
- export declare const InlineTextField: (props: import("./enhancer").EnhancerProps<InlineTextProps> & Omit<InlineTextProps, "value" | "onChange" | "mutators">) => JSX.Element;
34
- export { enhancer };
1
+ import { SliderProps, InputNumberProps, SwitchProps, DatePickerProps, TextAreaProps, CheckboxGroupProps, TreeSelectProps } from '@arco-design/web-react';
2
+ import { ImageUploaderProps } from './ImageUploader';
3
+ import { UploadFieldProps } from './UploadField';
4
+ import { ColorPickerProps } from './ColorPicker';
5
+ import { SelectProps } from './Select';
6
+ import { RadioGroupProps } from './RadioGroup';
7
+ import enhancer from './enhancer';
8
+ import { InputProps } from './Input';
9
+ import { InputWithUnitProps } from './InputWithUnit';
10
+ import { EditTabProps } from './EditTab';
11
+ import { EditGridTabProps } from './EditGridTab';
12
+ import { InlineTextProps } from './InlineTextField';
13
+ import { AutoCompleteProps } from './AutoComplete';
14
+ export { RichTextField } from './RichTextField';
15
+ export declare const TextField: (props: import("./enhancer").EnhancerProps<InputProps> & Omit<InputProps, "value" | "onChange" | "mutators">) => JSX.Element;
16
+ export declare const InputWithUnitField: (props: import("./enhancer").EnhancerProps<InputWithUnitProps> & Omit<InputWithUnitProps, "value" | "onChange" | "mutators">) => JSX.Element;
17
+ export declare const SearchField: (props: import("./enhancer").EnhancerProps<InputProps> & Omit<InputProps, "value" | "onChange" | "mutators">) => JSX.Element;
18
+ export declare const TextAreaField: (props: import("./enhancer").EnhancerProps<TextAreaProps> & Omit<TextAreaProps, "value" | "onChange" | "mutators">) => JSX.Element;
19
+ export declare const NumberField: (props: import("./enhancer").EnhancerProps<InputNumberProps> & Omit<InputNumberProps, "value" | "onChange" | "mutators">) => JSX.Element;
20
+ export declare const SliderField: (props: import("./enhancer").EnhancerProps<SliderProps> & Omit<SliderProps, "value" | "onChange" | "mutators">) => JSX.Element;
21
+ export declare const ColorPickerField: (props: import("./enhancer").EnhancerProps<ColorPickerProps> & Omit<ColorPickerProps, "value" | "onChange" | "mutators">) => JSX.Element;
22
+ export declare const UploadField: (props: import("./enhancer").EnhancerProps<UploadFieldProps> & Omit<UploadFieldProps, "value" | "onChange" | "mutators">) => JSX.Element;
23
+ export declare const ImageUploaderField: (props: import("./enhancer").EnhancerProps<ImageUploaderProps> & Omit<ImageUploaderProps, "value" | "onChange" | "mutators">) => JSX.Element;
24
+ export declare const SelectField: (props: import("./enhancer").EnhancerProps<SelectProps> & Omit<SelectProps, "value" | "onChange" | "mutators">) => JSX.Element;
25
+ export declare const TreeSelectField: (props: import("./enhancer").EnhancerProps<TreeSelectProps> & Omit<TreeSelectProps, "value" | "onChange" | "mutators">) => JSX.Element;
26
+ export declare const AutoCompleteField: (props: import("./enhancer").EnhancerProps<AutoCompleteProps> & Omit<AutoCompleteProps, "value" | "onChange" | "mutators">) => JSX.Element;
27
+ export declare const RadioGroupField: (props: import("./enhancer").EnhancerProps<RadioGroupProps> & Omit<RadioGroupProps, "value" | "onChange" | "mutators">) => JSX.Element;
28
+ export declare const SwitchField: (props: import("./enhancer").EnhancerProps<SwitchProps> & Omit<SwitchProps, "value" | "onChange" | "mutators">) => JSX.Element;
29
+ export declare const DatePickerField: (props: import("./enhancer").EnhancerProps<DatePickerProps> & Omit<DatePickerProps, "value" | "onChange" | "mutators">) => JSX.Element;
30
+ export declare const CheckboxField: (props: import("./enhancer").EnhancerProps<CheckboxGroupProps<any>> & Omit<CheckboxGroupProps<any>, "value" | "onChange" | "mutators">) => JSX.Element;
31
+ export declare const EditTabField: (props: import("./enhancer").EnhancerProps<EditTabProps<any>> & Omit<EditTabProps<any>, "value" | "onChange" | "mutators">) => JSX.Element;
32
+ export declare const EditGridTabField: (props: import("./enhancer").EnhancerProps<EditGridTabProps<any>> & Omit<EditGridTabProps<any>, "value" | "onChange" | "mutators">) => JSX.Element;
33
+ export declare const InlineTextField: (props: import("./enhancer").EnhancerProps<InlineTextProps> & Omit<InlineTextProps, "value" | "onChange" | "mutators">) => JSX.Element;
34
+ export { enhancer };
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import 'overlayscrollbars/css/OverlayScrollbars.css';
3
- export declare const FullHeightOverlayScrollbars: React.FC<{
4
- height: string | number;
5
- }>;
1
+ import React from 'react';
2
+ import 'overlayscrollbars/css/OverlayScrollbars.css';
3
+ export declare const FullHeightOverlayScrollbars: React.FC<{
4
+ height: string | number;
5
+ }>;
@@ -1,39 +1,39 @@
1
- import { BlockLayerProps } from '../../BlockLayer';
2
- import React from 'react';
3
- export interface ExtensionProps extends BlockLayerProps {
4
- categories: Array<{
5
- label: string;
6
- active?: boolean;
7
- blocks: Array<{
8
- type: string;
9
- payload?: any;
10
- title?: string | undefined;
11
- }>;
12
- displayType?: 'grid';
13
- } | {
14
- label: string;
15
- active?: boolean;
16
- blocks: Array<{
17
- payload?: any;
18
- title?: string | undefined;
19
- }>;
20
- displayType: 'column';
21
- } | {
22
- label: string;
23
- active?: boolean;
24
- blocks: Array<{
25
- payload?: any;
26
- }>;
27
- displayType: 'widget';
28
- } | {
29
- label: string;
30
- active?: boolean;
31
- blocks: Array<React.ReactNode>;
32
- displayType: 'custom';
33
- }>;
34
- showSourceCode?: boolean;
35
- compact?: boolean;
36
- }
37
- export declare const ExtensionContext: React.Context<ExtensionProps>;
38
- export declare const ExtensionProvider: React.FC<ExtensionProps>;
39
- export declare function useExtensionProps(): ExtensionProps;
1
+ import { BlockLayerProps } from '../../BlockLayer';
2
+ import React from 'react';
3
+ export interface ExtensionProps extends BlockLayerProps {
4
+ categories: Array<{
5
+ label: string;
6
+ active?: boolean;
7
+ blocks: Array<{
8
+ type: string;
9
+ payload?: any;
10
+ title?: string | undefined;
11
+ }>;
12
+ displayType?: 'grid';
13
+ } | {
14
+ label: string;
15
+ active?: boolean;
16
+ blocks: Array<{
17
+ payload?: any;
18
+ title?: string | undefined;
19
+ }>;
20
+ displayType: 'column';
21
+ } | {
22
+ label: string;
23
+ active?: boolean;
24
+ blocks: Array<{
25
+ payload?: any;
26
+ }>;
27
+ displayType: 'widget';
28
+ } | {
29
+ label: string;
30
+ active?: boolean;
31
+ blocks: Array<React.ReactNode>;
32
+ displayType: 'custom';
33
+ }>;
34
+ showSourceCode?: boolean;
35
+ compact?: boolean;
36
+ }
37
+ export declare const ExtensionContext: React.Context<ExtensionProps>;
38
+ export declare const ExtensionProvider: React.FC<ExtensionProps>;
39
+ export declare function useExtensionProps(): ExtensionProps;
@@ -1 +1 @@
1
- export declare function RenderCount(): JSX.Element;
1
+ export declare function RenderCount(): JSX.Element;
@@ -1,2 +1,2 @@
1
- import React from 'react';
2
- export declare const ShadowDom: React.FC<React.HTMLProps<HTMLElement>>;
1
+ import React from 'react';
2
+ export declare const ShadowDom: React.FC<React.HTMLProps<HTMLElement>>;
@@ -1 +1 @@
1
- export declare const RICH_TEXT_TOOL_BAR = "Tools";
1
+ export declare const RICH_TEXT_TOOL_BAR = "Tools";
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- export declare function useAddToCollection(): {
3
- modal: JSX.Element;
4
- modalVisible: boolean;
5
- setModalVisible: React.Dispatch<React.SetStateAction<boolean>>;
6
- };
1
+ import React from 'react';
2
+ export declare function useAddToCollection(): {
3
+ modal: JSX.Element;
4
+ modalVisible: boolean;
5
+ setModalVisible: React.Dispatch<React.SetStateAction<boolean>>;
6
+ };
@@ -1,6 +1,6 @@
1
- export declare function useFontFamily(): {
2
- fontList: {
3
- value: string;
4
- label: JSX.Element;
5
- }[];
6
- };
1
+ export declare function useFontFamily(): {
2
+ fontList: {
3
+ value: string;
4
+ label: JSX.Element;
5
+ }[];
6
+ };
package/lib/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import './index.scss';
2
- export * from './BlockLayer';
3
- export * from './AttributePanel';
4
- export * from './ShortcutToolbar';
5
- export * from './SourceCodePanel';
6
- export * from './InteractivePrompt';
7
- export * from './SimpleLayout';
8
- export * from './StandardLayout';
9
- export * from './MergeTagBadgePrompt';
10
- export * from './components/Providers/ExtensionProvider';
11
- export * from './constants';
12
- export * from './components/Form';
13
- export { getContextMergeTags } from './utils/getContextMergeTags';
14
- export { getIconNameByBlockType } from './utils/getIconNameByBlockType';
15
- export { getBlockTitle } from './utils/getBlockTitle';
1
+ import './index.scss';
2
+ export * from './BlockLayer';
3
+ export * from './AttributePanel';
4
+ export * from './ShortcutToolbar';
5
+ export * from './SourceCodePanel';
6
+ export * from './InteractivePrompt';
7
+ export * from './SimpleLayout';
8
+ export * from './StandardLayout';
9
+ export * from './MergeTagBadgePrompt';
10
+ export * from './components/Providers/ExtensionProvider';
11
+ export * from './constants';
12
+ export * from './components/Form';
13
+ export { getContextMergeTags } from './utils/getContextMergeTags';
14
+ export { getIconNameByBlockType } from './utils/getIconNameByBlockType';
15
+ export { getBlockTitle } from './utils/getBlockTitle';
package/lib/index2.js CHANGED
@@ -36140,22 +36140,6 @@ function Input(props) {
36140
36140
  onKeyDown
36141
36141
  }));
36142
36142
  }
36143
- const defaultUnitOptions = [
36144
- {
36145
- value: "px",
36146
- label: "px"
36147
- }
36148
- ];
36149
- const percentUnitOptions = [
36150
- {
36151
- value: "px",
36152
- label: "px"
36153
- },
36154
- {
36155
- value: "%",
36156
- label: "%"
36157
- }
36158
- ];
36159
36143
  function InputWithUnit(props) {
36160
36144
  const _a = props, {
36161
36145
  value = "",
@@ -36166,32 +36150,6 @@ function InputWithUnit(props) {
36166
36150
  "onKeyDown",
36167
36151
  "unitOptions"
36168
36152
  ]);
36169
- const unitOptions = useMemo(() => {
36170
- if (propsUnitOptions === "percent")
36171
- return percentUnitOptions;
36172
- if (Array.isArray(propsUnitOptions))
36173
- return propsUnitOptions;
36174
- return defaultUnitOptions;
36175
- }, [propsUnitOptions]);
36176
- useMemo(() => {
36177
- if (Number(value) === parseFloat(value)) {
36178
- return {
36179
- text: value,
36180
- unit: ""
36181
- };
36182
- }
36183
- if (isNaN(Number(value)) && isNaN(parseFloat(value)) && unitOptions.some((u) => u.value === value)) {
36184
- return {
36185
- text: "",
36186
- unit: value
36187
- };
36188
- }
36189
- const arr = value.split(/(\d+(\.\d+)?)(\D+)$/);
36190
- return {
36191
- text: arr[1] || "",
36192
- unit: arr[3] || unitOptions[0].value
36193
- };
36194
- }, [value, unitOptions]);
36195
36153
  return /* @__PURE__ */ React__default.createElement(Input, __spreadProps(__spreadValues({
36196
36154
  value
36197
36155
  }, restProps), {
@@ -38459,10 +38417,24 @@ function Spacer() {
38459
38417
  }
38460
38418
  function Raw() {
38461
38419
  const { focusIdx: focusIdx2 } = useFocusIdx();
38462
- return /* @__PURE__ */ React__default.createElement(Stack$4, null, /* @__PURE__ */ React__default.createElement(TextField, {
38463
- label: "content",
38420
+ const [visible, setVisible] = useState(false);
38421
+ return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, {
38422
+ style: { padding: 20 },
38423
+ extra: /* @__PURE__ */ React__default.createElement(Tooltip$1, {
38424
+ content: "Html mode"
38425
+ }, /* @__PURE__ */ React__default.createElement(Button$4, {
38426
+ onClick: () => setVisible(true),
38427
+ icon: /* @__PURE__ */ React__default.createElement(IconFont, {
38428
+ iconName: "icon-html"
38429
+ })
38430
+ }))
38431
+ }, /* @__PURE__ */ React__default.createElement(TextAreaField, {
38432
+ label: "",
38464
38433
  name: `${focusIdx2}.data.value.content`,
38465
- inline: true
38434
+ rows: 5
38435
+ }), /* @__PURE__ */ React__default.createElement(HtmlEditor, {
38436
+ visible,
38437
+ setVisible
38466
38438
  }));
38467
38439
  }
38468
38440
  const positionOptions = [
@@ -42537,7 +42509,7 @@ const list = [
42537
42509
  }
42538
42510
  }
42539
42511
  ];
42540
- const defaultCategories = [
42512
+ const defaultCategories$1 = [
42541
42513
  {
42542
42514
  title: "Content",
42543
42515
  name: "CONTENT",
@@ -42657,7 +42629,7 @@ const defaultCategories = [
42657
42629
  ]
42658
42630
  }
42659
42631
  ];
42660
- BlockMarketManager.addCategories(defaultCategories);
42632
+ BlockMarketManager.addCategories(defaultCategories$1);
42661
42633
  const BlocksPanel = (props) => {
42662
42634
  const { isDragging } = useHoverIdx();
42663
42635
  const [visible, setVisible] = useState(false);
@@ -48934,16 +48906,80 @@ function EditPanel() {
48934
48906
  compact: Boolean(compact)
48935
48907
  }));
48936
48908
  }
48909
+ const defaultCategories = [
48910
+ {
48911
+ label: "Content",
48912
+ active: true,
48913
+ blocks: [
48914
+ {
48915
+ type: AdvancedType.TEXT
48916
+ },
48917
+ {
48918
+ type: AdvancedType.IMAGE,
48919
+ payload: { attributes: { padding: "0px 0px 0px 0px" } }
48920
+ },
48921
+ {
48922
+ type: AdvancedType.BUTTON
48923
+ },
48924
+ {
48925
+ type: AdvancedType.SOCIAL
48926
+ },
48927
+ {
48928
+ type: AdvancedType.DIVIDER
48929
+ },
48930
+ {
48931
+ type: AdvancedType.SPACER
48932
+ },
48933
+ {
48934
+ type: AdvancedType.HERO
48935
+ },
48936
+ {
48937
+ type: AdvancedType.WRAPPER
48938
+ }
48939
+ ]
48940
+ },
48941
+ {
48942
+ label: "Layout",
48943
+ active: true,
48944
+ displayType: "column",
48945
+ blocks: [
48946
+ {
48947
+ title: "2 columns",
48948
+ payload: [
48949
+ ["50%", "50%"],
48950
+ ["33%", "67%"],
48951
+ ["67%", "33%"],
48952
+ ["25%", "75%"],
48953
+ ["75%", "25%"]
48954
+ ]
48955
+ },
48956
+ {
48957
+ title: "3 columns",
48958
+ payload: [
48959
+ ["33.33%", "33.33%", "33.33%"],
48960
+ ["25%", "25%", "50%"],
48961
+ ["50%", "25%", "25%"]
48962
+ ]
48963
+ },
48964
+ {
48965
+ title: "4 columns",
48966
+ payload: [[["25%", "25%", "25%", "25%"]]]
48967
+ }
48968
+ ]
48969
+ }
48970
+ ];
48937
48971
  const StandardLayout = (props) => {
48938
48972
  const { height: containerHeight } = useEditorProps();
48939
- const { showSourceCode = true, compact = true } = props;
48973
+ const { showSourceCode = true, compact = true, categories = defaultCategories } = props;
48940
48974
  const { setFocusIdx } = useFocusIdx();
48941
48975
  useEffect(() => {
48942
48976
  if (!compact) {
48943
48977
  setFocusIdx("");
48944
48978
  }
48945
48979
  }, [compact, setFocusIdx]);
48946
- return /* @__PURE__ */ React__default.createElement(ExtensionProvider, __spreadValues({}, props), /* @__PURE__ */ React__default.createElement(ConfigProvider, {
48980
+ return /* @__PURE__ */ React__default.createElement(ExtensionProvider, __spreadProps(__spreadValues({}, props), {
48981
+ categories
48982
+ }), /* @__PURE__ */ React__default.createElement(ConfigProvider, {
48947
48983
  locale: enUS
48948
48984
  }, /* @__PURE__ */ React__default.createElement(Card$1, {
48949
48985
  style: { padding: 0 },