@kontakto/email-template-editor 2.3.1 → 2.5.0

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/index.d.cts CHANGED
@@ -4797,6 +4797,9 @@ declare function EmailLayoutReader(props: EmailLayoutProps): React.JSX.Element;
4797
4797
 
4798
4798
  declare const THEME: _mui_material_styles.Theme;
4799
4799
 
4800
+ declare const SUPPORTED_LOCALES: readonly ["en", "sv", "fi"];
4801
+ type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
4802
+
4800
4803
  declare const EditorBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", any>, BlockConfiguration<{
4801
4804
  Avatar: z.ZodObject<{
4802
4805
  style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
@@ -5955,10 +5958,12 @@ interface EmailEditorContextType {
5955
5958
  currentTemplateId: string | null;
5956
5959
  currentTemplateName: string | null;
5957
5960
  currentTemplateKind: TemplateKind$1 | null;
5961
+ currentTemplateTags: string[];
5958
5962
  saveTemplate: () => TEditorConfiguration;
5959
- loadTemplate: (template: TEditorConfiguration, templateId?: string, templateName?: string, kind?: TemplateKind$1 | null) => void;
5963
+ loadTemplate: (template: TEditorConfiguration, templateId?: string, templateName?: string, kind?: TemplateKind$1 | null, tags?: string[] | null) => void;
5960
5964
  registerSaveListener: (callback: (template: TEditorConfiguration) => void) => () => void;
5961
- setCurrentTemplate: (templateId: string | null, templateName: string | null, kind?: TemplateKind$1 | null) => void;
5965
+ setCurrentTemplate: (templateId: string | null, templateName: string | null, kind?: TemplateKind$1 | null, tags?: string[] | null) => void;
5966
+ setCurrentTemplateTags: (tags: string[]) => void;
5962
5967
  }
5963
5968
  interface EmailEditorProviderProps {
5964
5969
  children: React.ReactNode;
@@ -6129,7 +6134,13 @@ interface EmailEditorProps {
6129
6134
  * This allows for easy styling without requiring a separate ThemeProvider.
6130
6135
  */
6131
6136
  theme?: Theme;
6137
+ /**
6138
+ * UI language. One of "en", "sv", or "fi". Unknown values fall back to "en"
6139
+ * with a console.warn. Defaults to "en". Applies to editor chrome only —
6140
+ * email content and user data are never translated.
6141
+ */
6142
+ locale?: SupportedLocale | string;
6132
6143
  }
6133
6144
  declare const EmailEditor: React.ForwardRefExoticComponent<EmailEditorProps & React.RefAttributes<EmailEditorRef>>;
6134
6145
 
6135
- export { Avatar, AvatarProps, AvatarPropsDefaults, AvatarPropsSchema, BlockConfiguration, Button, ButtonProps, ButtonPropsDefaults, ButtonPropsSchema, ColumnsContainer, ColumnsContainerProps$1 as ColumnsContainerProps, ColumnsContainerPropsSchema$1 as ColumnsContainerPropsSchema, ColumnsContainerReader, Container, ContainerProps$1 as ContainerProps, ContainerPropsSchema$1 as ContainerPropsSchema, ContainerReader, Divider, DividerProps, DividerPropsDefaults, DividerPropsSchema, DocumentBlocksDictionary, EmailEditor, type EmailEditorContextType, type EmailEditorProps, EmailEditorProvider, type EmailEditorProviderProps, type EmailEditorRef, EmailLayoutPropsSchema, EmailLayoutReader, EmailMarkdown, type HandlebarsContext, Heading, HeadingProps, HeadingPropsDefaults, HeadingPropsSchema, Html, HtmlProps, HtmlPropsSchema, Image, type ImageCallbacks, ImageProps, ImagePropsSchema, type LibraryImage, Reader, ReaderBlock, ReaderBlockSchema, ReaderDocumentSchema, type SavePayload, Signature, SignatureProps, SignaturePropsDefaults, SignaturePropsSchema, Spacer, SpacerProps, SpacerPropsDefaults, SpacerPropsSchema, type TReaderBlock, type TReaderBlockProps, type TReaderDocument, type TReaderProps, type TemplateKind, type TemplateListItem, TemplateVariableSchema, Text, TextProps, TextPropsDefaults, TextPropsSchema, type UploadedImage, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, editorHandlebars, evaluateHandlebars, htmlToEditorConfig, renderToStaticMarkup, renderToText, THEME as theme, useEmailEditor };
6146
+ export { Avatar, AvatarProps, AvatarPropsDefaults, AvatarPropsSchema, BlockConfiguration, Button, ButtonProps, ButtonPropsDefaults, ButtonPropsSchema, ColumnsContainer, ColumnsContainerProps$1 as ColumnsContainerProps, ColumnsContainerPropsSchema$1 as ColumnsContainerPropsSchema, ColumnsContainerReader, Container, ContainerProps$1 as ContainerProps, ContainerPropsSchema$1 as ContainerPropsSchema, ContainerReader, Divider, DividerProps, DividerPropsDefaults, DividerPropsSchema, DocumentBlocksDictionary, EmailEditor, type EmailEditorContextType, type EmailEditorProps, EmailEditorProvider, type EmailEditorProviderProps, type EmailEditorRef, EmailLayoutPropsSchema, EmailLayoutReader, EmailMarkdown, type HandlebarsContext, Heading, HeadingProps, HeadingPropsDefaults, HeadingPropsSchema, Html, HtmlProps, HtmlPropsSchema, Image, type ImageCallbacks, ImageProps, ImagePropsSchema, type LibraryImage, Reader, ReaderBlock, ReaderBlockSchema, ReaderDocumentSchema, SUPPORTED_LOCALES, type SavePayload, Signature, SignatureProps, SignaturePropsDefaults, SignaturePropsSchema, Spacer, SpacerProps, SpacerPropsDefaults, SpacerPropsSchema, type SupportedLocale, type TReaderBlock, type TReaderBlockProps, type TReaderDocument, type TReaderProps, type TemplateKind, type TemplateListItem, TemplateVariableSchema, Text, TextProps, TextPropsDefaults, TextPropsSchema, type UploadedImage, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, editorHandlebars, evaluateHandlebars, htmlToEditorConfig, renderToStaticMarkup, renderToText, THEME as theme, useEmailEditor };
package/dist/index.d.ts CHANGED
@@ -4797,6 +4797,9 @@ declare function EmailLayoutReader(props: EmailLayoutProps): React.JSX.Element;
4797
4797
 
4798
4798
  declare const THEME: _mui_material_styles.Theme;
4799
4799
 
4800
+ declare const SUPPORTED_LOCALES: readonly ["en", "sv", "fi"];
4801
+ type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
4802
+
4800
4803
  declare const EditorBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", any>, BlockConfiguration<{
4801
4804
  Avatar: z.ZodObject<{
4802
4805
  style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
@@ -5955,10 +5958,12 @@ interface EmailEditorContextType {
5955
5958
  currentTemplateId: string | null;
5956
5959
  currentTemplateName: string | null;
5957
5960
  currentTemplateKind: TemplateKind$1 | null;
5961
+ currentTemplateTags: string[];
5958
5962
  saveTemplate: () => TEditorConfiguration;
5959
- loadTemplate: (template: TEditorConfiguration, templateId?: string, templateName?: string, kind?: TemplateKind$1 | null) => void;
5963
+ loadTemplate: (template: TEditorConfiguration, templateId?: string, templateName?: string, kind?: TemplateKind$1 | null, tags?: string[] | null) => void;
5960
5964
  registerSaveListener: (callback: (template: TEditorConfiguration) => void) => () => void;
5961
- setCurrentTemplate: (templateId: string | null, templateName: string | null, kind?: TemplateKind$1 | null) => void;
5965
+ setCurrentTemplate: (templateId: string | null, templateName: string | null, kind?: TemplateKind$1 | null, tags?: string[] | null) => void;
5966
+ setCurrentTemplateTags: (tags: string[]) => void;
5962
5967
  }
5963
5968
  interface EmailEditorProviderProps {
5964
5969
  children: React.ReactNode;
@@ -6129,7 +6134,13 @@ interface EmailEditorProps {
6129
6134
  * This allows for easy styling without requiring a separate ThemeProvider.
6130
6135
  */
6131
6136
  theme?: Theme;
6137
+ /**
6138
+ * UI language. One of "en", "sv", or "fi". Unknown values fall back to "en"
6139
+ * with a console.warn. Defaults to "en". Applies to editor chrome only —
6140
+ * email content and user data are never translated.
6141
+ */
6142
+ locale?: SupportedLocale | string;
6132
6143
  }
6133
6144
  declare const EmailEditor: React.ForwardRefExoticComponent<EmailEditorProps & React.RefAttributes<EmailEditorRef>>;
6134
6145
 
6135
- export { Avatar, AvatarProps, AvatarPropsDefaults, AvatarPropsSchema, BlockConfiguration, Button, ButtonProps, ButtonPropsDefaults, ButtonPropsSchema, ColumnsContainer, ColumnsContainerProps$1 as ColumnsContainerProps, ColumnsContainerPropsSchema$1 as ColumnsContainerPropsSchema, ColumnsContainerReader, Container, ContainerProps$1 as ContainerProps, ContainerPropsSchema$1 as ContainerPropsSchema, ContainerReader, Divider, DividerProps, DividerPropsDefaults, DividerPropsSchema, DocumentBlocksDictionary, EmailEditor, type EmailEditorContextType, type EmailEditorProps, EmailEditorProvider, type EmailEditorProviderProps, type EmailEditorRef, EmailLayoutPropsSchema, EmailLayoutReader, EmailMarkdown, type HandlebarsContext, Heading, HeadingProps, HeadingPropsDefaults, HeadingPropsSchema, Html, HtmlProps, HtmlPropsSchema, Image, type ImageCallbacks, ImageProps, ImagePropsSchema, type LibraryImage, Reader, ReaderBlock, ReaderBlockSchema, ReaderDocumentSchema, type SavePayload, Signature, SignatureProps, SignaturePropsDefaults, SignaturePropsSchema, Spacer, SpacerProps, SpacerPropsDefaults, SpacerPropsSchema, type TReaderBlock, type TReaderBlockProps, type TReaderDocument, type TReaderProps, type TemplateKind, type TemplateListItem, TemplateVariableSchema, Text, TextProps, TextPropsDefaults, TextPropsSchema, type UploadedImage, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, editorHandlebars, evaluateHandlebars, htmlToEditorConfig, renderToStaticMarkup, renderToText, THEME as theme, useEmailEditor };
6146
+ export { Avatar, AvatarProps, AvatarPropsDefaults, AvatarPropsSchema, BlockConfiguration, Button, ButtonProps, ButtonPropsDefaults, ButtonPropsSchema, ColumnsContainer, ColumnsContainerProps$1 as ColumnsContainerProps, ColumnsContainerPropsSchema$1 as ColumnsContainerPropsSchema, ColumnsContainerReader, Container, ContainerProps$1 as ContainerProps, ContainerPropsSchema$1 as ContainerPropsSchema, ContainerReader, Divider, DividerProps, DividerPropsDefaults, DividerPropsSchema, DocumentBlocksDictionary, EmailEditor, type EmailEditorContextType, type EmailEditorProps, EmailEditorProvider, type EmailEditorProviderProps, type EmailEditorRef, EmailLayoutPropsSchema, EmailLayoutReader, EmailMarkdown, type HandlebarsContext, Heading, HeadingProps, HeadingPropsDefaults, HeadingPropsSchema, Html, HtmlProps, HtmlPropsSchema, Image, type ImageCallbacks, ImageProps, ImagePropsSchema, type LibraryImage, Reader, ReaderBlock, ReaderBlockSchema, ReaderDocumentSchema, SUPPORTED_LOCALES, type SavePayload, Signature, SignatureProps, SignaturePropsDefaults, SignaturePropsSchema, Spacer, SpacerProps, SpacerPropsDefaults, SpacerPropsSchema, type SupportedLocale, type TReaderBlock, type TReaderBlockProps, type TReaderDocument, type TReaderProps, type TemplateKind, type TemplateListItem, TemplateVariableSchema, Text, TextProps, TextPropsDefaults, TextPropsSchema, type UploadedImage, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, editorHandlebars, evaluateHandlebars, htmlToEditorConfig, renderToStaticMarkup, renderToText, THEME as theme, useEmailEditor };