@marlinjai/email-editor-core 0.2.0 → 0.3.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.mts CHANGED
@@ -35652,6 +35652,8 @@ interface CreateRootStoreOptions {
35652
35652
  /** Debounce time for onChange callback (ms) */
35653
35653
  onChangeDebounce?: number;
35654
35654
  }
35655
+ /** How long the store waits after the last edit before it reports `onChange`, unless the caller sets `onChangeDebounce`. */
35656
+ declare const DEFAULT_ON_CHANGE_DEBOUNCE_MS = 300;
35655
35657
  /**
35656
35658
  * Create a new RootStore instance
35657
35659
  */
@@ -35661,4 +35663,4 @@ declare function createRootStore(options?: CreateRootStoreOptions): RootStoreIns
35661
35663
  */
35662
35664
  declare function createEmptyStore(): RootStoreInstance;
35663
35665
 
35664
- export { AccordionBlockSchema, BackgroundGradient, BackgroundGradientSchema, Block, type BlockCategory, type BlockDefinition, BlockInstance, type BlockRegistry, BlockRegistryImpl, BlockSchema, BlockSnapshotIn, BlockType, ButtonBlockSchema, CONTAINER_BLOCK_TYPES, CURRENT_TEMPLATE_VERSION, CarouselBlockSchema, ColumnInstance, ColumnSchema, ColumnSnapshotIn, type CreateRootStoreOptions, type CustomFont, CustomFontSchema, DividerBlockSchema, type DragData, type DropIntent, type EditorUIInstance, type EditorUISnapshotIn, EditorUIStore, EmailTemplate, EmailTemplateSchema, EmailTemplateSchemaV1_0, EmailTemplateSchemaV1_1, ExtraAttributesSchema, FooterBlockSchema, GradientStopSchema, HeaderBlockSchema, HeroBlockSchema, HistoryManager, ImageBlockSchema, LEAF_BLOCK_TYPES, MjmlHead, MjmlHeadSchema, NavbarBlockSchema, type PrebuiltCategory, type PrebuiltTemplate, type PrebuiltTemplateRegistry, type PreviewDevice, RawBlockSchema, type ResizeState, RootStore, type RootStoreInstance, type RootStoreSnapshotIn, SUPPORTED_TEMPLATE_VERSIONS, Section, SectionInstance, SectionSchema, SectionSchemaV1_0, SectionSnapshotIn, SelectionManager, type SelectionState, type SelectionType, type SidebarTab, SocialBlockSchema, SpacerBlockSchema, SpacingSchema, type SubColumnInstance, SubColumnModel, type SubColumnSnapshotIn, type SubColumnSnapshotOut, TableBlockSchema, TemplateMetadataSchema, TemplateMigrationError, type TemplateMigrationErrorCode, TemplateModel, TemplateSnapshotIn, TextBlockSchema, TopLevelItemInstance, TopLevelItemSchema, WrapperInstance, WrapperProperties, WrapperSchema, WrapperSnapshotIn, createBlockRegistry, createEmptyStore, createHistoryManager, createPrebuiltTemplateRegistry, createRootStore, createSelectionManager, createSubColumn, isLeafBlockType, isTemplateMigrationError, migrateTemplate, migrateV1_0ToV1_1, validateTemplate, withTemplateId };
35666
+ export { AccordionBlockSchema, BackgroundGradient, BackgroundGradientSchema, Block, type BlockCategory, type BlockDefinition, BlockInstance, type BlockRegistry, BlockRegistryImpl, BlockSchema, BlockSnapshotIn, BlockType, ButtonBlockSchema, CONTAINER_BLOCK_TYPES, CURRENT_TEMPLATE_VERSION, CarouselBlockSchema, ColumnInstance, ColumnSchema, ColumnSnapshotIn, type CreateRootStoreOptions, type CustomFont, CustomFontSchema, DEFAULT_ON_CHANGE_DEBOUNCE_MS, DividerBlockSchema, type DragData, type DropIntent, type EditorUIInstance, type EditorUISnapshotIn, EditorUIStore, EmailTemplate, EmailTemplateSchema, EmailTemplateSchemaV1_0, EmailTemplateSchemaV1_1, ExtraAttributesSchema, FooterBlockSchema, GradientStopSchema, HeaderBlockSchema, HeroBlockSchema, HistoryManager, ImageBlockSchema, LEAF_BLOCK_TYPES, MjmlHead, MjmlHeadSchema, NavbarBlockSchema, type PrebuiltCategory, type PrebuiltTemplate, type PrebuiltTemplateRegistry, type PreviewDevice, RawBlockSchema, type ResizeState, RootStore, type RootStoreInstance, type RootStoreSnapshotIn, SUPPORTED_TEMPLATE_VERSIONS, Section, SectionInstance, SectionSchema, SectionSchemaV1_0, SectionSnapshotIn, SelectionManager, type SelectionState, type SelectionType, type SidebarTab, SocialBlockSchema, SpacerBlockSchema, SpacingSchema, type SubColumnInstance, SubColumnModel, type SubColumnSnapshotIn, type SubColumnSnapshotOut, TableBlockSchema, TemplateMetadataSchema, TemplateMigrationError, type TemplateMigrationErrorCode, TemplateModel, TemplateSnapshotIn, TextBlockSchema, TopLevelItemInstance, TopLevelItemSchema, WrapperInstance, WrapperProperties, WrapperSchema, WrapperSnapshotIn, createBlockRegistry, createEmptyStore, createHistoryManager, createPrebuiltTemplateRegistry, createRootStore, createSelectionManager, createSubColumn, isLeafBlockType, isTemplateMigrationError, migrateTemplate, migrateV1_0ToV1_1, validateTemplate, withTemplateId };
package/dist/index.d.ts CHANGED
@@ -35652,6 +35652,8 @@ interface CreateRootStoreOptions {
35652
35652
  /** Debounce time for onChange callback (ms) */
35653
35653
  onChangeDebounce?: number;
35654
35654
  }
35655
+ /** How long the store waits after the last edit before it reports `onChange`, unless the caller sets `onChangeDebounce`. */
35656
+ declare const DEFAULT_ON_CHANGE_DEBOUNCE_MS = 300;
35655
35657
  /**
35656
35658
  * Create a new RootStore instance
35657
35659
  */
@@ -35661,4 +35663,4 @@ declare function createRootStore(options?: CreateRootStoreOptions): RootStoreIns
35661
35663
  */
35662
35664
  declare function createEmptyStore(): RootStoreInstance;
35663
35665
 
35664
- export { AccordionBlockSchema, BackgroundGradient, BackgroundGradientSchema, Block, type BlockCategory, type BlockDefinition, BlockInstance, type BlockRegistry, BlockRegistryImpl, BlockSchema, BlockSnapshotIn, BlockType, ButtonBlockSchema, CONTAINER_BLOCK_TYPES, CURRENT_TEMPLATE_VERSION, CarouselBlockSchema, ColumnInstance, ColumnSchema, ColumnSnapshotIn, type CreateRootStoreOptions, type CustomFont, CustomFontSchema, DividerBlockSchema, type DragData, type DropIntent, type EditorUIInstance, type EditorUISnapshotIn, EditorUIStore, EmailTemplate, EmailTemplateSchema, EmailTemplateSchemaV1_0, EmailTemplateSchemaV1_1, ExtraAttributesSchema, FooterBlockSchema, GradientStopSchema, HeaderBlockSchema, HeroBlockSchema, HistoryManager, ImageBlockSchema, LEAF_BLOCK_TYPES, MjmlHead, MjmlHeadSchema, NavbarBlockSchema, type PrebuiltCategory, type PrebuiltTemplate, type PrebuiltTemplateRegistry, type PreviewDevice, RawBlockSchema, type ResizeState, RootStore, type RootStoreInstance, type RootStoreSnapshotIn, SUPPORTED_TEMPLATE_VERSIONS, Section, SectionInstance, SectionSchema, SectionSchemaV1_0, SectionSnapshotIn, SelectionManager, type SelectionState, type SelectionType, type SidebarTab, SocialBlockSchema, SpacerBlockSchema, SpacingSchema, type SubColumnInstance, SubColumnModel, type SubColumnSnapshotIn, type SubColumnSnapshotOut, TableBlockSchema, TemplateMetadataSchema, TemplateMigrationError, type TemplateMigrationErrorCode, TemplateModel, TemplateSnapshotIn, TextBlockSchema, TopLevelItemInstance, TopLevelItemSchema, WrapperInstance, WrapperProperties, WrapperSchema, WrapperSnapshotIn, createBlockRegistry, createEmptyStore, createHistoryManager, createPrebuiltTemplateRegistry, createRootStore, createSelectionManager, createSubColumn, isLeafBlockType, isTemplateMigrationError, migrateTemplate, migrateV1_0ToV1_1, validateTemplate, withTemplateId };
35666
+ export { AccordionBlockSchema, BackgroundGradient, BackgroundGradientSchema, Block, type BlockCategory, type BlockDefinition, BlockInstance, type BlockRegistry, BlockRegistryImpl, BlockSchema, BlockSnapshotIn, BlockType, ButtonBlockSchema, CONTAINER_BLOCK_TYPES, CURRENT_TEMPLATE_VERSION, CarouselBlockSchema, ColumnInstance, ColumnSchema, ColumnSnapshotIn, type CreateRootStoreOptions, type CustomFont, CustomFontSchema, DEFAULT_ON_CHANGE_DEBOUNCE_MS, DividerBlockSchema, type DragData, type DropIntent, type EditorUIInstance, type EditorUISnapshotIn, EditorUIStore, EmailTemplate, EmailTemplateSchema, EmailTemplateSchemaV1_0, EmailTemplateSchemaV1_1, ExtraAttributesSchema, FooterBlockSchema, GradientStopSchema, HeaderBlockSchema, HeroBlockSchema, HistoryManager, ImageBlockSchema, LEAF_BLOCK_TYPES, MjmlHead, MjmlHeadSchema, NavbarBlockSchema, type PrebuiltCategory, type PrebuiltTemplate, type PrebuiltTemplateRegistry, type PreviewDevice, RawBlockSchema, type ResizeState, RootStore, type RootStoreInstance, type RootStoreSnapshotIn, SUPPORTED_TEMPLATE_VERSIONS, Section, SectionInstance, SectionSchema, SectionSchemaV1_0, SectionSnapshotIn, SelectionManager, type SelectionState, type SelectionType, type SidebarTab, SocialBlockSchema, SpacerBlockSchema, SpacingSchema, type SubColumnInstance, SubColumnModel, type SubColumnSnapshotIn, type SubColumnSnapshotOut, TableBlockSchema, TemplateMetadataSchema, TemplateMigrationError, type TemplateMigrationErrorCode, TemplateModel, TemplateSnapshotIn, TextBlockSchema, TopLevelItemInstance, TopLevelItemSchema, WrapperInstance, WrapperProperties, WrapperSchema, WrapperSnapshotIn, createBlockRegistry, createEmptyStore, createHistoryManager, createPrebuiltTemplateRegistry, createRootStore, createSelectionManager, createSubColumn, isLeafBlockType, isTemplateMigrationError, migrateTemplate, migrateV1_0ToV1_1, validateTemplate, withTemplateId };
package/dist/index.js CHANGED
@@ -35,6 +35,7 @@ __export(index_exports, {
35
35
  ColumnModel: () => ColumnModel,
36
36
  ColumnSchema: () => ColumnSchema,
37
37
  CustomFontSchema: () => CustomFontSchema,
38
+ DEFAULT_ON_CHANGE_DEBOUNCE_MS: () => DEFAULT_ON_CHANGE_DEBOUNCE_MS,
38
39
  DividerBlockSchema: () => DividerBlockSchema,
39
40
  EditorUIStore: () => EditorUIStore,
40
41
  EmailTemplateSchema: () => EmailTemplateSchema,
@@ -3186,8 +3187,9 @@ var RootStore = import_mobx_state_tree8.types.model("RootStore", {
3186
3187
  };
3187
3188
  }
3188
3189
  }));
3190
+ var DEFAULT_ON_CHANGE_DEBOUNCE_MS = 300;
3189
3191
  function createRootStore(options = {}) {
3190
- const { template: initialTemplate, onChange, onChangeDebounce = 300 } = options;
3192
+ const { template: initialTemplate, onChange, onChangeDebounce = DEFAULT_ON_CHANGE_DEBOUNCE_MS } = options;
3191
3193
  const store = RootStore.create({
3192
3194
  template: initialTemplate || createTemplateWithDefaultSection(),
3193
3195
  editorUI: {}
@@ -3231,6 +3233,7 @@ function createEmptyStore() {
3231
3233
  ColumnModel,
3232
3234
  ColumnSchema,
3233
3235
  CustomFontSchema,
3236
+ DEFAULT_ON_CHANGE_DEBOUNCE_MS,
3234
3237
  DividerBlockSchema,
3235
3238
  EditorUIStore,
3236
3239
  EmailTemplateSchema,
package/dist/index.mjs CHANGED
@@ -2175,8 +2175,9 @@ var RootStore = types7.model("RootStore", {
2175
2175
  };
2176
2176
  }
2177
2177
  }));
2178
+ var DEFAULT_ON_CHANGE_DEBOUNCE_MS = 300;
2178
2179
  function createRootStore(options = {}) {
2179
- const { template: initialTemplate, onChange, onChangeDebounce = 300 } = options;
2180
+ const { template: initialTemplate, onChange, onChangeDebounce = DEFAULT_ON_CHANGE_DEBOUNCE_MS } = options;
2180
2181
  const store = RootStore.create({
2181
2182
  template: initialTemplate || createTemplateWithDefaultSection(),
2182
2183
  editorUI: {}
@@ -2219,6 +2220,7 @@ export {
2219
2220
  ColumnModel,
2220
2221
  ColumnSchema,
2221
2222
  CustomFontSchema,
2223
+ DEFAULT_ON_CHANGE_DEBOUNCE_MS,
2222
2224
  DividerBlockSchema,
2223
2225
  EditorUIStore,
2224
2226
  EmailTemplateSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marlinjai/email-editor-core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Framework-agnostic engine of the email editor: document schema, block registry, MobX State Tree store, and the server-only MJML compiler",
5
5
  "license": "MIT",
6
6
  "repository": {