@maily-to/core 0.0.26 → 0.0.27

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.
@@ -10,6 +10,7 @@ import * as _tiptap_extension_image from '@tiptap/extension-image';
10
10
  import { Node as Node$1 } from '@tiptap/pm/model';
11
11
  import { PluginKey } from '@tiptap/pm/state';
12
12
  import * as react from 'react';
13
+ import { ComponentType } from 'react';
13
14
 
14
15
  declare module '@tiptap/core' {
15
16
  interface Commands<ReturnType> {
@@ -305,6 +306,6 @@ type VariableListProps = {
305
306
  items: Variable[];
306
307
  };
307
308
  declare const VariableList: react.ForwardRefExoticComponent<VariableListProps & react.RefAttributes<unknown>>;
308
- declare function getVariableSuggestions(variables?: Variables, char?: string): Omit<SuggestionOptions, 'editor'>;
309
+ declare function getVariableSuggestions(variables?: Variables, char?: string, variableListComponent?: ComponentType<VariableListProps>): Omit<SuggestionOptions, 'editor'>;
309
310
 
310
- export { type AllowedButtonBorderRadius, type AllowedButtonVariant, type AllowedColumnVerticalAlign, type AllowedLogoAlignment, type AllowedLogoSize, type AllowedSpacerSize, type ButtonAttributes, ButtonExtension, Color, ColumnExtension, ColumnsExtension, DEFAULT_BUTTON_ALIGNMENT, DEFAULT_BUTTON_BACKGROUND_COLOR, DEFAULT_BUTTON_BORDER_RADIUS, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_BUTTON_TEXT_COLOR, DEFAULT_BUTTON_VARIANT, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMN_VERTICAL_ALIGN, DEFAULT_COLUMN_WIDTH, DEFAULT_LOGO_SIZE, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_RADIUS, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, DEFAULT_SECTION_SHOW_IF_KEY, Footer, type FooterOptions, HorizontalRule, ImageExtension, LinkExtension, type LogoAttributes, LogoExtension, MailyKit, type MailyKitOptions, RepeatExtension, SectionExtension, SlashCommandExtension, type SlashCommandOptions, Spacer, type SpacerOptions, VariableExtension, VariableList, type VariableOptions, VariablePluginKey, allowedButtonBorderRadius, allowedButtonVariant, allowedLogoAlignment, allowedLogoSize, allowedSpacerSize, getSlashCommandSuggestions, getVariableSuggestions, logoSizes };
311
+ export { type AllowedButtonBorderRadius, type AllowedButtonVariant, type AllowedColumnVerticalAlign, type AllowedLogoAlignment, type AllowedLogoSize, type AllowedSpacerSize, type ButtonAttributes, ButtonExtension, Color, ColumnExtension, ColumnsExtension, DEFAULT_BUTTON_ALIGNMENT, DEFAULT_BUTTON_BACKGROUND_COLOR, DEFAULT_BUTTON_BORDER_RADIUS, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_BUTTON_TEXT_COLOR, DEFAULT_BUTTON_VARIANT, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMN_VERTICAL_ALIGN, DEFAULT_COLUMN_WIDTH, DEFAULT_LOGO_SIZE, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_RADIUS, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, DEFAULT_SECTION_SHOW_IF_KEY, Footer, type FooterOptions, HorizontalRule, ImageExtension, LinkExtension, type LogoAttributes, LogoExtension, MailyKit, type MailyKitOptions, RepeatExtension, SectionExtension, SlashCommandExtension, type SlashCommandOptions, Spacer, type SpacerOptions, VariableExtension, VariableList, type VariableListProps, type VariableOptions, VariablePluginKey, allowedButtonBorderRadius, allowedButtonVariant, allowedLogoAlignment, allowedLogoSize, allowedSpacerSize, getSlashCommandSuggestions, getVariableSuggestions, logoSizes };
@@ -10,6 +10,7 @@ import * as _tiptap_extension_image from '@tiptap/extension-image';
10
10
  import { Node as Node$1 } from '@tiptap/pm/model';
11
11
  import { PluginKey } from '@tiptap/pm/state';
12
12
  import * as react from 'react';
13
+ import { ComponentType } from 'react';
13
14
 
14
15
  declare module '@tiptap/core' {
15
16
  interface Commands<ReturnType> {
@@ -305,6 +306,6 @@ type VariableListProps = {
305
306
  items: Variable[];
306
307
  };
307
308
  declare const VariableList: react.ForwardRefExoticComponent<VariableListProps & react.RefAttributes<unknown>>;
308
- declare function getVariableSuggestions(variables?: Variables, char?: string): Omit<SuggestionOptions, 'editor'>;
309
+ declare function getVariableSuggestions(variables?: Variables, char?: string, variableListComponent?: ComponentType<VariableListProps>): Omit<SuggestionOptions, 'editor'>;
309
310
 
310
- export { type AllowedButtonBorderRadius, type AllowedButtonVariant, type AllowedColumnVerticalAlign, type AllowedLogoAlignment, type AllowedLogoSize, type AllowedSpacerSize, type ButtonAttributes, ButtonExtension, Color, ColumnExtension, ColumnsExtension, DEFAULT_BUTTON_ALIGNMENT, DEFAULT_BUTTON_BACKGROUND_COLOR, DEFAULT_BUTTON_BORDER_RADIUS, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_BUTTON_TEXT_COLOR, DEFAULT_BUTTON_VARIANT, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMN_VERTICAL_ALIGN, DEFAULT_COLUMN_WIDTH, DEFAULT_LOGO_SIZE, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_RADIUS, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, DEFAULT_SECTION_SHOW_IF_KEY, Footer, type FooterOptions, HorizontalRule, ImageExtension, LinkExtension, type LogoAttributes, LogoExtension, MailyKit, type MailyKitOptions, RepeatExtension, SectionExtension, SlashCommandExtension, type SlashCommandOptions, Spacer, type SpacerOptions, VariableExtension, VariableList, type VariableOptions, VariablePluginKey, allowedButtonBorderRadius, allowedButtonVariant, allowedLogoAlignment, allowedLogoSize, allowedSpacerSize, getSlashCommandSuggestions, getVariableSuggestions, logoSizes };
311
+ export { type AllowedButtonBorderRadius, type AllowedButtonVariant, type AllowedColumnVerticalAlign, type AllowedLogoAlignment, type AllowedLogoSize, type AllowedSpacerSize, type ButtonAttributes, ButtonExtension, Color, ColumnExtension, ColumnsExtension, DEFAULT_BUTTON_ALIGNMENT, DEFAULT_BUTTON_BACKGROUND_COLOR, DEFAULT_BUTTON_BORDER_RADIUS, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_BUTTON_TEXT_COLOR, DEFAULT_BUTTON_VARIANT, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMN_VERTICAL_ALIGN, DEFAULT_COLUMN_WIDTH, DEFAULT_LOGO_SIZE, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_RADIUS, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, DEFAULT_SECTION_SHOW_IF_KEY, Footer, type FooterOptions, HorizontalRule, ImageExtension, LinkExtension, type LogoAttributes, LogoExtension, MailyKit, type MailyKitOptions, RepeatExtension, SectionExtension, SlashCommandExtension, type SlashCommandOptions, Spacer, type SpacerOptions, VariableExtension, VariableList, type VariableListProps, type VariableOptions, VariablePluginKey, allowedButtonBorderRadius, allowedButtonVariant, allowedLogoAlignment, allowedLogoSize, allowedSpacerSize, getSlashCommandSuggestions, getVariableSuggestions, logoSizes };
@@ -4253,11 +4253,10 @@ var VariableExtension = import_core14.Node.create({
4253
4253
  var import_react34 = require("@tiptap/react");
4254
4254
  var import_react35 = require("react");
4255
4255
  var import_tippy2 = __toESM(require("tippy.js"));
4256
- var import_react36 = require("react");
4257
4256
  var import_jsx_runtime29 = require("react/jsx-runtime");
4258
4257
  var VariableList = (0, import_react35.forwardRef)((props, ref) => {
4259
4258
  const { items = [] } = props;
4260
- const popoverRef = (0, import_react36.useRef)(null);
4259
+ const popoverRef = (0, import_react35.useRef)(null);
4261
4260
  (0, import_react35.useImperativeHandle)(ref, () => ({
4262
4261
  onKeyDown: ({ event }) => {
4263
4262
  if (!popoverRef.current) {
@@ -4297,7 +4296,7 @@ var VariableList = (0, import_react35.forwardRef)((props, ref) => {
4297
4296
  );
4298
4297
  });
4299
4298
  VariableList.displayName = "VariableList";
4300
- function getVariableSuggestions(variables = DEFAULT_VARIABLES, char = DEFAULT_VARIABLE_TRIGGER_CHAR) {
4299
+ function getVariableSuggestions(variables = DEFAULT_VARIABLES, char = DEFAULT_VARIABLE_TRIGGER_CHAR, variableListComponent = VariableList) {
4301
4300
  return {
4302
4301
  char,
4303
4302
  items: ({ query, editor }) => {
@@ -4312,7 +4311,7 @@ function getVariableSuggestions(variables = DEFAULT_VARIABLES, char = DEFAULT_VA
4312
4311
  let popup = null;
4313
4312
  return {
4314
4313
  onStart: (props) => {
4315
- component = new import_react34.ReactRenderer(VariableList, {
4314
+ component = new import_react34.ReactRenderer(variableListComponent, {
4316
4315
  props,
4317
4316
  editor: props.editor
4318
4317
  });