@templatical/types
Advanced tools
+1
-63
@@ -889,31 +889,2 @@ //#region src/blocks.d.ts | ||
| //#region ../media-library/src/types.d.ts | ||
| type MediaCategory = "images" | "documents" | "videos" | "audio"; | ||
| interface MediaItem { | ||
| id: string; | ||
| filename: string; | ||
| mime_type: string; | ||
| size: number; | ||
| url: string; | ||
| small_url: string | null; | ||
| medium_url: string | null; | ||
| large_url: string | null; | ||
| folder_id: string | null; | ||
| conversions_generated: boolean; | ||
| width: number | null; | ||
| height: number | null; | ||
| alt_text: string; | ||
| created_at: string; | ||
| updated_at: string; | ||
| } | ||
| interface MediaRequestContext { | ||
| accept?: MediaCategory[]; | ||
| /** | ||
| * Image files dragged directly onto an image block/field (issue #229). | ||
| * Present only on drag-and-drop requests; absent for click → Browse Media. | ||
| * The media handler should upload these and return the resulting | ||
| * `MediaResult`. Plural for forward-compat, but the editor currently sends | ||
| * a single file per drop. | ||
| */ | ||
| files?: File[]; | ||
| } | ||
| interface StorageInfo { | ||
@@ -1095,35 +1066,2 @@ used_bytes: number; | ||
| } | ||
| interface TemplaticalConfig { | ||
| container: string | HTMLElement; | ||
| auth: Omit<AuthConfig, "onError">; | ||
| baseUrl?: string; | ||
| theme?: ThemeOverrides; | ||
| locale?: string; | ||
| ai?: AiConfig | false; | ||
| onCreate?: (template: Template) => void; | ||
| onLoad?: (template: Template) => void; | ||
| onSave?: (result: SaveResult) => void; | ||
| onError?: (error: Error) => void; | ||
| onUnmount?: () => void; | ||
| mergeTags?: MergeTagsConfig; | ||
| onRequestMedia?: (context: MediaRequestContext) => Promise<MediaItem | null>; | ||
| displayConditions?: DisplayConditionsConfig; | ||
| fonts?: FontsConfig; | ||
| autoSave?: boolean; | ||
| autoSaveDebounce?: number; | ||
| onBeforeTestEmail?: (html: string) => string | Promise<string>; | ||
| customBlocks?: CustomBlockDefinition[]; | ||
| commenting?: boolean; | ||
| onComment?: (event: CommentEvent) => void; | ||
| mcp?: McpConfig; | ||
| collaboration?: CollaborationConfig; | ||
| modules?: boolean; | ||
| } | ||
| interface TemplaticalInstance { | ||
| setTheme(theme: ThemeOverrides): void; | ||
| create(content?: TemplateContent): Promise<Template>; | ||
| load(templateId: string): Promise<Template>; | ||
| save(): Promise<SaveResult>; | ||
| unmount(): void; | ||
| } | ||
| interface EditorState { | ||
@@ -1219,3 +1157,3 @@ template: Template | null; | ||
| //#endregion | ||
| export { type AiChatMessage, type AiConfig, type AiGenerateOptions, type AiScoreOptions, type AiStreamEvent, type ApiError, type ApiResponse, type AuthConfig, type AuthRequestOptions, BUTTON_BLOCK_DEFAULTS, type BaseBlock, type Block, type BlockDefaults, type BlockStyles, type BlockType, type BlockVisibility, type ButtonBlock, COUNTDOWN_BLOCK_DEFAULTS, type CategoryScore, type CollaborationConfig, type Collaborator, type ColorsConfig, type ColumnLayout, type Comment, type CommentEvent, type CommentEventType, type CommentThread, type CountdownBlock, type CreateCommentData, type CustomBlock, type CustomBlockBooleanField, type CustomBlockColorField, type CustomBlockDefinition, type CustomBlockField, type CustomBlockFieldBase, type CustomBlockFieldType, type CustomBlockImageField, type CustomBlockNumberField, type CustomBlockRepeatableField, type CustomBlockSelectField, type CustomBlockTextField, type CustomBlockTextareaField, type CustomFont, DEFAULT_BLOCK_DEFAULTS, DEFAULT_TEMPLATE_DEFAULTS, DIVIDER_BLOCK_DEFAULTS, type DataSourceConfig, type DataSourceFetchContext, type DirectAuthConfig, type DisplayCondition, type DisplayConditionsConfig, type DividerBlock, type EditorState, EventEmitter, type ExportResult, type FindingSeverity, type FontsConfig, HEADING_LEVEL_FONT_SIZE, HTML_BLOCK_DEFAULTS, type HeadingLevel, type HealthCheckResult, type HtmlBlock, IMAGE_BLOCK_DEFAULTS, type ImageBlock, type LogicPair, type LogicTag, type LogicTagsConfig, MENU_BLOCK_DEFAULTS, type McpConfig, type McpOperation, type McpOperationPayload, type MediaResult, type MenuBlock, type MenuItemData, type MergeTag, type MergeTagsConfig, PARAGRAPH_BLOCK_DEFAULTS, type ParagraphBlock, type PlanConfig, type PlanFeatures, type PlanLimits, type ProxyAuthConfig, type RewriteData, SECTION_BLOCK_DEFAULTS, SOCIAL_ICONS_BLOCK_DEFAULTS, SOCIAL_ICON_GLYPHS, SPACER_BLOCK_DEFAULTS, SYNTAX_PRESETS, type SaveResult, type SavedBlock, type SavedBlockInput, type SavedBlockPatch, type SavedBlocksListParams, type SavedBlocksProvider, type ScoringCategory, type ScoringFinding, type ScoringResult, type SdkAuthConfig, SdkError, type SectionBlock, type SectionWrapper, type SelectOption, type SocialIcon, type SocialIconGlyph, type SocialIconSize, type SocialIconStyle, type SocialIconsBlock, type SocialPlatform, type SpacerBlock, type SpacingValue, type SyntaxPreset, type SyntaxPresetName, TABLE_BLOCK_DEFAULTS, TITLE_BLOCK_DEFAULTS, type TableBlock, type TableCellData, type TableRowData, type Template, type TemplateContent, type TemplateDefaults, type TemplateSettings, type TemplateSnapshot, type TemplaticalConfig, type TemplaticalInstance, type TestEmailConfig, type ThemeOverrides, type TitleBlock, type TokenData, type UiTheme, type UpdateCommentData, type UserConfig, VIDEO_BLOCK_DEFAULTS, type VideoBlock, type ViewportSize, type WebSocketServerConfig, cloneBlock, containsMergeTag, createBlock, createButtonBlock, createCountdownBlock, createCustomBlock, createDefaultTemplateContent, createDividerBlock, createHtmlBlock, createImageBlock, createMenuBlock, createParagraphBlock, createSectionBlock, createSocialIconsBlock, createSpacerBlock, createTableBlock, createTitleBlock, createVideoBlock, deepMergeDefaults, generateId, getLogicMergeTagKeyword, getMergeTagLabel, getSyntaxClosingChar, getSyntaxTriggerChar, isButton, isCountdown, isCustomBlock, isDivider, isHtml, isImage, isLogicMergeTagValue, isMenu, isMergeTagValue, isParagraph, isSection, isSocialIcons, isSpacer, isTable, isTitle, isVideo, resolveHtmlLogicMergeTagLabels, resolveHtmlMergeTagLabels, resolveSyntax, restoreMergeTagMarkup, safeClone }; | ||
| export { type AiChatMessage, type AiConfig, type AiGenerateOptions, type AiScoreOptions, type AiStreamEvent, type ApiError, type ApiResponse, type AuthConfig, type AuthRequestOptions, BUTTON_BLOCK_DEFAULTS, type BaseBlock, type Block, type BlockDefaults, type BlockStyles, type BlockType, type BlockVisibility, type ButtonBlock, COUNTDOWN_BLOCK_DEFAULTS, type CategoryScore, type CollaborationConfig, type Collaborator, type ColorsConfig, type ColumnLayout, type Comment, type CommentEvent, type CommentEventType, type CommentThread, type CountdownBlock, type CreateCommentData, type CustomBlock, type CustomBlockBooleanField, type CustomBlockColorField, type CustomBlockDefinition, type CustomBlockField, type CustomBlockFieldBase, type CustomBlockFieldType, type CustomBlockImageField, type CustomBlockNumberField, type CustomBlockRepeatableField, type CustomBlockSelectField, type CustomBlockTextField, type CustomBlockTextareaField, type CustomFont, DEFAULT_BLOCK_DEFAULTS, DEFAULT_TEMPLATE_DEFAULTS, DIVIDER_BLOCK_DEFAULTS, type DataSourceConfig, type DataSourceFetchContext, type DirectAuthConfig, type DisplayCondition, type DisplayConditionsConfig, type DividerBlock, type EditorState, EventEmitter, type ExportResult, type FindingSeverity, type FontsConfig, HEADING_LEVEL_FONT_SIZE, HTML_BLOCK_DEFAULTS, type HeadingLevel, type HealthCheckResult, type HtmlBlock, IMAGE_BLOCK_DEFAULTS, type ImageBlock, type LogicPair, type LogicTag, type LogicTagsConfig, MENU_BLOCK_DEFAULTS, type McpConfig, type McpOperation, type McpOperationPayload, type MediaResult, type MenuBlock, type MenuItemData, type MergeTag, type MergeTagsConfig, PARAGRAPH_BLOCK_DEFAULTS, type ParagraphBlock, type PlanConfig, type PlanFeatures, type PlanLimits, type ProxyAuthConfig, type RewriteData, SECTION_BLOCK_DEFAULTS, SOCIAL_ICONS_BLOCK_DEFAULTS, SOCIAL_ICON_GLYPHS, SPACER_BLOCK_DEFAULTS, SYNTAX_PRESETS, type SaveResult, type SavedBlock, type SavedBlockInput, type SavedBlockPatch, type SavedBlocksListParams, type SavedBlocksProvider, type ScoringCategory, type ScoringFinding, type ScoringResult, type SdkAuthConfig, SdkError, type SectionBlock, type SectionWrapper, type SelectOption, type SocialIcon, type SocialIconGlyph, type SocialIconSize, type SocialIconStyle, type SocialIconsBlock, type SocialPlatform, type SpacerBlock, type SpacingValue, type SyntaxPreset, type SyntaxPresetName, TABLE_BLOCK_DEFAULTS, TITLE_BLOCK_DEFAULTS, type TableBlock, type TableCellData, type TableRowData, type Template, type TemplateContent, type TemplateDefaults, type TemplateSettings, type TemplateSnapshot, type TestEmailConfig, type ThemeOverrides, type TitleBlock, type TokenData, type UiTheme, type UpdateCommentData, type UserConfig, VIDEO_BLOCK_DEFAULTS, type VideoBlock, type ViewportSize, type WebSocketServerConfig, cloneBlock, containsMergeTag, createBlock, createButtonBlock, createCountdownBlock, createCustomBlock, createDefaultTemplateContent, createDividerBlock, createHtmlBlock, createImageBlock, createMenuBlock, createParagraphBlock, createSectionBlock, createSocialIconsBlock, createSpacerBlock, createTableBlock, createTitleBlock, createVideoBlock, deepMergeDefaults, generateId, getLogicMergeTagKeyword, getMergeTagLabel, getSyntaxClosingChar, getSyntaxTriggerChar, isButton, isCountdown, isCustomBlock, isDivider, isHtml, isImage, isLogicMergeTagValue, isMenu, isMergeTagValue, isParagraph, isSection, isSocialIcons, isSpacer, isTable, isTitle, isVideo, resolveHtmlLogicMergeTagLabels, resolveHtmlMergeTagLabels, resolveSyntax, restoreMergeTagMarkup, safeClone }; | ||
| //# sourceMappingURL=index.d.ts.map |
+2
-2
| { | ||
| "name": "@templatical/types", | ||
| "description": "Shared TypeScript types, block factory functions, and event emitter for Templatical email editor", | ||
| "version": "0.21.1", | ||
| "version": "0.21.2", | ||
| "bugs": "https://github.com/templatical/sdk/issues", | ||
@@ -9,3 +9,3 @@ "devDependencies": { | ||
| "vitest": "^4.1.10", | ||
| "@templatical/media-library": "0.21.1" | ||
| "@templatical/media-library": "0.21.2" | ||
| }, | ||
@@ -12,0 +12,0 @@ "exports": { |
149075
-1.33%1890
-3.18%