@aswin.dev/editor 0.6.3 → 0.7.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/AccessibilityPanel-CvQGLdu6.js +108 -0
- package/dist/AiChatSidebar-B3SJIKG_.js +229 -0
- package/dist/AiFeatureMenu-BLLKoOos.js +63 -0
- package/dist/BlockA11yBadge-CXDLqkcJ.js +34 -0
- package/dist/CloudEditor-BCz1ZTYC.js +1172 -0
- package/dist/CollaboratorBar-DuPYW5iF.js +95 -0
- package/dist/CommentsSidebar-B1pvJdqF.js +441 -0
- package/dist/CountdownBlock-BNSj1jvJ.js +92 -0
- package/dist/CountdownToolbar-ClJr2GzL.js +210 -0
- package/dist/DesignReferenceSidebar-B8V_F2yF.js +276 -0
- package/dist/LoadingTrack-B0CWFHXQ.js +10 -0
- package/dist/ModuleBrowserModal-DrUFMTDx.js +206 -0
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +106 -0
- package/dist/NumberWithSuffix-DkXUez9t.js +422 -0
- package/dist/ParagraphEditor-D75wl3BX.js +695 -0
- package/dist/RichTextEditorContent-DYkIauIk.js +137 -0
- package/dist/SaveModuleDialog-FZ9lxY7_.js +123 -0
- package/dist/SnapshotHistory-BR3eV120.js +127 -0
- package/dist/TemplateScoringPanel-4GTNHej5.js +256 -0
- package/dist/TestEmailModal--ue5w9fT.js +94 -0
- package/dist/TitleEditor-fStSADI-.js +172 -0
- package/dist/TplModal-BwSfxIHf.js +44 -0
- package/dist/_plugin-vue_export-helper-B0hnzhyu.js +8 -0
- package/dist/accessibility-e8JYu_zd.js +27 -0
- package/dist/blockTypeIcons-BcTrDjmH.js +126 -0
- package/dist/bundle-stats.json +10 -0
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +97 -0
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +1 -0
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +59 -0
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +1 -0
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +33 -0
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +1143 -0
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +51 -0
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +1 -0
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +195 -0
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +107 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +1 -0
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +423 -0
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +544 -0
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +106 -0
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +1 -0
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +119 -0
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +1 -0
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +171 -0
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +1 -0
- package/dist/cdn/chunks/de-Ce-LbJ2J.js +89 -0
- package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +1 -0
- package/dist/cdn/chunks/de-D8CnZxV9.js +523 -0
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +1 -0
- package/dist/cdn/chunks/de-RQrZR56a.js +209 -0
- package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -0
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +11572 -0
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +19 -0
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -0
- package/dist/cdn/chunks/en-8FHaQv4V.js +523 -0
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +1 -0
- package/dist/cdn/chunks/en-Bl1ecfRF.js +209 -0
- package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -0
- package/dist/cdn/chunks/en-DiCWK5fG.js +89 -0
- package/dist/cdn/chunks/en-DiCWK5fG.js.map +1 -0
- package/dist/cdn/chunks/extensions-DIxF31tA.js +598 -0
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +1 -0
- package/dist/cdn/chunks/features-DEMb13KS.js +6814 -0
- package/dist/cdn/chunks/features-DEMb13KS.js.map +1 -0
- package/dist/cdn/chunks/icons-CsLTcirh.js +700 -0
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +3279 -0
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +1 -0
- package/dist/cdn/chunks/media-library-CVaNvhpM.js +6014 -0
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +1 -0
- package/dist/cdn/chunks/pusher-CDbNlZBE.js +2508 -0
- package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +1 -0
- package/dist/cdn/chunks/quality-BaBfc54_.js +1456 -0
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
- package/dist/cdn/chunks/renderer-CUxvx7ro.js +548 -0
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
- package/dist/cdn/chunks/src-CRaqN-p8.js +497 -0
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +57 -0
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -0
- package/dist/cdn/chunks/styles-BHJULjNR.js +2947 -0
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +1 -0
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +14654 -0
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +1 -0
- package/dist/cdn/editor.css +2 -0
- package/dist/cdn/editor.js +250 -0
- package/dist/cdn/editor.js.map +1 -0
- package/dist/check-Da05j8yl.js +7 -0
- package/dist/chevron-down-R2uY34iD.js +7 -0
- package/dist/circle-alert-DZuGWPX-.js +25 -0
- package/dist/clock-CRp2sIub.js +12 -0
- package/dist/cloud-DEk_b4CR.js +1733 -0
- package/dist/createLucideIcon-C3pa2siy.js +43 -0
- package/dist/de-Brqvgr43.js +521 -0
- package/dist/de-DCaaCE5s.js +207 -0
- package/dist/dist-B1IR0bpH.js +326 -0
- package/dist/dist-BFawx6IS.js +519 -0
- package/dist/dist-BaQIYPsn.js +35 -0
- package/dist/dist-Cp0zXPAD.js +189 -0
- package/dist/dist-D6uC2xhi.js +5 -0
- package/dist/dist-D90y8dvT.js +2082 -0
- package/dist/dist-DDJIWTRY.js +776 -0
- package/dist/dist-DJmnUmW9.js +362 -0
- package/dist/dist-DjviJBCi.js +74 -0
- package/dist/dist-KoBJjK1G.js +61 -0
- package/dist/dist-aRzjfSRN.js +35 -0
- package/dist/dist-iLBdeBDR.js +10658 -0
- package/dist/dist-us-RpCWN.js +47 -0
- package/dist/dist-wzMIGj-D.js +5 -0
- package/dist/emojiData-PQyVa4bU.js +17 -0
- package/dist/en-DXCyK4-X.js +207 -0
- package/dist/en-WDVp87TE.js +521 -0
- package/dist/extensions-CUcl9Ok4.js +799 -0
- package/dist/formatRelativeTime-BOEf47hq.js +12 -0
- package/dist/image-up-MBZKKg9p.js +23 -0
- package/dist/index.d.ts +275 -0
- package/dist/info-CJEC7piy.js +19 -0
- package/dist/keys-ciNfSSGj.js +10 -0
- package/dist/liquid.browser-CdMv1BTn.js +3277 -0
- package/dist/loader-circle-DsY5Yg33.js +7 -0
- package/dist/message-circle-yElBbR2C.js +7 -0
- package/dist/readableTextColor-CY3SiRnt.js +30 -0
- package/dist/refresh-cw-CE_AGtn8.js +29 -0
- package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
- package/dist/scan-line-D0vcUekt.js +25 -0
- package/dist/send-DH4oDQqC.js +10 -0
- package/dist/shield-check-CfJgs2Hd.js +10 -0
- package/dist/sparkles-CvRXGqFs.js +23 -0
- package/dist/style.css +2 -0
- package/dist/styleConstants-fWzlIIwN.js +55 -0
- package/dist/styles-DEXEkBvg.js +3176 -0
- package/dist/templatical-editor.js +249 -0
- package/dist/text-align-start-BT9VUDxK.js +43 -0
- package/dist/timeouts-BSGxjuUF.js +4 -0
- package/dist/trash-2-DbP2Y6t2.js +25 -0
- package/dist/triangle-alert-aOXceTSe.js +17 -0
- package/dist/useCloudI18n-BuIwR6OE.js +23 -0
- package/dist/useEditorCore-C6ost42Q.js +9342 -0
- package/dist/useI18n-lb2DHDiu.js +17 -0
- package/dist/useMergeTag-CBwKnnNB.js +34 -0
- package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +5775 -0
- package/dist/x-u2oVmjN_.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/utils/formatRelativeTime.ts
|
|
2
|
+
var e = 6e4, t = 36e5, n = 864e5;
|
|
3
|
+
function r(r, i, a, o) {
|
|
4
|
+
let s = new Date(r).getTime();
|
|
5
|
+
if (Number.isNaN(s)) return null;
|
|
6
|
+
let c = Date.now() - s;
|
|
7
|
+
if (c < -e) return null;
|
|
8
|
+
let l = Math.floor(c / e), u = Math.floor(c / t), d = Math.floor(c / n);
|
|
9
|
+
return l < 1 ? i.justNow : l < 60 ? a ? a(i.minutesAgo, { minutes: l }) : i.minutesAgo.replace("{minutes}", String(l)) : u < 24 ? a ? a(i.hoursAgo, { hours: u }) : i.hoursAgo.replace("{hours}", String(u)) : o !== void 0 && d >= o ? null : a ? a(i.daysAgo, { days: d }) : i.daysAgo.replace("{days}", String(d));
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { r as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { t as e } from "./createLucideIcon-C3pa2siy.js";
|
|
2
|
+
var t = e("image-up", [
|
|
3
|
+
["path", {
|
|
4
|
+
d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
|
|
5
|
+
key: "9csbqa"
|
|
6
|
+
}],
|
|
7
|
+
["path", {
|
|
8
|
+
d: "m14 19.5 3-3 3 3",
|
|
9
|
+
key: "9vmjn0"
|
|
10
|
+
}],
|
|
11
|
+
["path", {
|
|
12
|
+
d: "M17 22v-5.5",
|
|
13
|
+
key: "1aa6fl"
|
|
14
|
+
}],
|
|
15
|
+
["circle", {
|
|
16
|
+
cx: "9",
|
|
17
|
+
cy: "9",
|
|
18
|
+
r: "2",
|
|
19
|
+
key: "af1f0g"
|
|
20
|
+
}]
|
|
21
|
+
]);
|
|
22
|
+
//#endregion
|
|
23
|
+
export { t };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { A11yOptions } from '../../quality/src/index.ts';
|
|
2
|
+
import { A11yOptions as A11yOptions_2 } from '../../../quality/src/index.ts';
|
|
3
|
+
import { AiConfig } from '../../../types/src/index.ts';
|
|
4
|
+
import { BlockDefaults } from '../../types/src/index.ts';
|
|
5
|
+
import { BlockDefaults as BlockDefaults_2 } from '../../../types/src/index.ts';
|
|
6
|
+
import { CollaborationConfig } from '../../../types/src/index.ts';
|
|
7
|
+
import { CommentEvent } from '../../../types/src/index.ts';
|
|
8
|
+
import { ComputedRef } from 'vue';
|
|
9
|
+
import { CustomBlock } from '../../types/src/index.ts';
|
|
10
|
+
import { CustomBlockDefinition } from '../../types/src/index.ts';
|
|
11
|
+
import { CustomBlockDefinition as CustomBlockDefinition_2 } from '../../../types/src/index.ts';
|
|
12
|
+
import { CustomFont } from '../../types/src/index.ts';
|
|
13
|
+
import { CustomFont as CustomFont_2 } from '../../../types/src/index.ts';
|
|
14
|
+
import { DisplayConditionsConfig } from '../../types/src/index.ts';
|
|
15
|
+
import { DisplayConditionsConfig as DisplayConditionsConfig_2 } from '../../../types/src/index.ts';
|
|
16
|
+
import { FontsConfig } from '../../types/src/index.ts';
|
|
17
|
+
import { FontsConfig as FontsConfig_2 } from '../../../types/src/index.ts';
|
|
18
|
+
import { McpConfig } from '../../../types/src/index.ts';
|
|
19
|
+
import { MediaItem } from '../../../media-library/src/index.ts';
|
|
20
|
+
import { MediaRequestContext } from '../../media-library/src/index.ts';
|
|
21
|
+
import { MediaRequestContext as MediaRequestContext_2 } from '../../../media-library/src/index.ts';
|
|
22
|
+
import { MediaResult } from '../../types/src/index.ts';
|
|
23
|
+
import { MergeTagsConfig } from '../../types/src/index.ts';
|
|
24
|
+
import { MergeTagsConfig as MergeTagsConfig_2 } from '../../../types/src/index.ts';
|
|
25
|
+
import { Ref } from 'vue';
|
|
26
|
+
import { SaveResult } from '../../types/src/index.ts';
|
|
27
|
+
import { SaveResult as SaveResult_2 } from '../../../types/src/index.ts';
|
|
28
|
+
import { Template } from '../../types/src/index.ts';
|
|
29
|
+
import { Template as Template_2 } from '../../../types/src/index.ts';
|
|
30
|
+
import { TemplateContent } from '../../types/src/index.ts';
|
|
31
|
+
import { TemplateContent as TemplateContent_2 } from '../../../types/src/index.ts';
|
|
32
|
+
import { TemplateDefaults } from '../../types/src/index.ts';
|
|
33
|
+
import { TemplateDefaults as TemplateDefaults_2 } from '../../../types/src/index.ts';
|
|
34
|
+
import { ThemeOverrides } from '../../types/src/index.ts';
|
|
35
|
+
import { ThemeOverrides as ThemeOverrides_2 } from '../../../types/src/index.ts';
|
|
36
|
+
import { UiTheme } from '../../types/src/index.ts';
|
|
37
|
+
import { UiTheme as UiTheme_2 } from '../../../types/src/index.ts';
|
|
38
|
+
import { ViewportSize } from '../../types/src/index.ts';
|
|
39
|
+
|
|
40
|
+
export { BlockDefaults }
|
|
41
|
+
|
|
42
|
+
export { CustomBlockDefinition }
|
|
43
|
+
|
|
44
|
+
export { CustomFont }
|
|
45
|
+
|
|
46
|
+
export { DisplayConditionsConfig }
|
|
47
|
+
|
|
48
|
+
export declare interface EditorCapabilities {
|
|
49
|
+
plan?: {
|
|
50
|
+
hasFeature(feature: string): boolean;
|
|
51
|
+
};
|
|
52
|
+
ai?: {
|
|
53
|
+
isFeatureEnabled(feature: string): boolean;
|
|
54
|
+
};
|
|
55
|
+
comments?: {
|
|
56
|
+
getBlockCount(blockId: string): number;
|
|
57
|
+
openForBlock(blockId: string): void;
|
|
58
|
+
};
|
|
59
|
+
savedModules?: {
|
|
60
|
+
openSaveDialog(blockId: string): void;
|
|
61
|
+
openBrowser(): void;
|
|
62
|
+
moduleCount: ComputedRef<number>;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export declare interface FontOption {
|
|
67
|
+
value: string;
|
|
68
|
+
label: string;
|
|
69
|
+
isCustom?: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { FontsConfig }
|
|
73
|
+
|
|
74
|
+
export declare function init(config: TemplaticalEditorConfig): Promise<TemplaticalEditor>;
|
|
75
|
+
|
|
76
|
+
export declare function initCloud(config: TemplaticalCloudEditorConfig): Promise<TemplaticalCloudEditor>;
|
|
77
|
+
|
|
78
|
+
export { MergeTagsConfig }
|
|
79
|
+
|
|
80
|
+
/** Function type for media browser requests, used by both OSS and Cloud editors. */
|
|
81
|
+
export declare type OnRequestMedia = (context?: MediaRequestContext) => Promise<MediaResult | null>;
|
|
82
|
+
|
|
83
|
+
export { SaveResult }
|
|
84
|
+
|
|
85
|
+
export { Template }
|
|
86
|
+
|
|
87
|
+
export { TemplateContent }
|
|
88
|
+
|
|
89
|
+
export { TemplateDefaults }
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Cloud editor does not expose `toMjml` or `renderCustomBlock`: the cloud
|
|
93
|
+
* backend performs MJML conversion server-side with additional processing
|
|
94
|
+
* (e.g., signed image URLs, attachment handling) that isn't available client
|
|
95
|
+
* side. Use the cloud `save()` flow to persist content; the backend handles
|
|
96
|
+
* MJML/HTML export from there.
|
|
97
|
+
*/
|
|
98
|
+
export declare interface TemplaticalCloudEditor extends TemplaticalEditorBase {
|
|
99
|
+
create(content?: TemplateContent): Promise<Template>;
|
|
100
|
+
load(templateId: string): Promise<Template>;
|
|
101
|
+
save(): Promise<SaveResult>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export declare interface TemplaticalCloudEditorConfig {
|
|
105
|
+
container: string | HTMLElement;
|
|
106
|
+
content?: TemplateContent_2;
|
|
107
|
+
auth: {
|
|
108
|
+
url: string;
|
|
109
|
+
baseUrl?: string;
|
|
110
|
+
requestOptions?: {
|
|
111
|
+
method?: "GET" | "POST";
|
|
112
|
+
headers?: Record<string, string>;
|
|
113
|
+
body?: Record<string, unknown>;
|
|
114
|
+
credentials?: RequestCredentials;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
theme?: ThemeOverrides_2;
|
|
118
|
+
uiTheme?: UiTheme_2;
|
|
119
|
+
locale?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Show the "Powered by Templatical" footer. Defaults to `true`.
|
|
122
|
+
* Set to `false` to hide the footer (no attribution required by the license).
|
|
123
|
+
* Cloud white-label plans hide the footer regardless of this setting.
|
|
124
|
+
*/
|
|
125
|
+
branding?: boolean;
|
|
126
|
+
ai?: AiConfig | false;
|
|
127
|
+
commenting?: boolean;
|
|
128
|
+
collaboration?: CollaborationConfig;
|
|
129
|
+
mcp?: McpConfig;
|
|
130
|
+
blockDefaults?: BlockDefaults_2;
|
|
131
|
+
templateDefaults?: TemplateDefaults_2;
|
|
132
|
+
modules?: boolean;
|
|
133
|
+
autoSave?: boolean;
|
|
134
|
+
autoSaveDebounce?: number;
|
|
135
|
+
mergeTags?: MergeTagsConfig_2;
|
|
136
|
+
displayConditions?: DisplayConditionsConfig_2;
|
|
137
|
+
customBlocks?: CustomBlockDefinition_2[];
|
|
138
|
+
fonts?: FontsConfig_2;
|
|
139
|
+
onChange?: (content: TemplateContent_2) => void;
|
|
140
|
+
onSave?: (result: SaveResult_2) => void;
|
|
141
|
+
onCreate?: (template: Template_2) => void;
|
|
142
|
+
onLoad?: (template: Template_2) => void;
|
|
143
|
+
onError?: (error: Error) => void;
|
|
144
|
+
onComment?: (event: CommentEvent) => void;
|
|
145
|
+
onUnmount?: () => void;
|
|
146
|
+
onRequestMedia?: (context: MediaRequestContext_2) => Promise<MediaItem | null>;
|
|
147
|
+
onBeforeTestEmail?: (html: string) => string | Promise<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Accessibility linter (`@templatical/quality`) configuration. Cloud
|
|
150
|
+
* additionally merges `planConfig.accessibility` from the server (server
|
|
151
|
+
* policy wins on conflict) — this option sets the consumer-supplied baseline.
|
|
152
|
+
*/
|
|
153
|
+
accessibility?: A11yOptions_2;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export declare interface TemplaticalEditor extends TemplaticalEditorBase {
|
|
157
|
+
/**
|
|
158
|
+
* Render the current template to an MJML string. Resolves custom blocks
|
|
159
|
+
* via the editor's internal block registry. Throws if the optional
|
|
160
|
+
* `@templatical/renderer` package is not installed.
|
|
161
|
+
*/
|
|
162
|
+
toMjml(): Promise<string>;
|
|
163
|
+
/**
|
|
164
|
+
* Render a single custom block to its HTML representation, using the
|
|
165
|
+
* registered custom block definition's template and the block's current
|
|
166
|
+
* field values. Exposed for headless callers that want to reuse the
|
|
167
|
+
* editor's renderer (e.g., to drive `@templatical/renderer`'s
|
|
168
|
+
* `renderCustomBlock` option from outside the editor instance).
|
|
169
|
+
*/
|
|
170
|
+
renderCustomBlock(block: CustomBlock): Promise<string>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
declare interface TemplaticalEditorBase {
|
|
174
|
+
getContent(): TemplateContent;
|
|
175
|
+
setContent(content: TemplateContent): void;
|
|
176
|
+
setTheme(theme: UiTheme): void;
|
|
177
|
+
unmount(): void;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export declare interface TemplaticalEditorConfig {
|
|
181
|
+
container: string | HTMLElement;
|
|
182
|
+
content?: TemplateContent;
|
|
183
|
+
onChange?: (content: TemplateContent) => void;
|
|
184
|
+
onSave?: (content: TemplateContent) => void;
|
|
185
|
+
onError?: (error: Error) => void;
|
|
186
|
+
onRequestMedia?: OnRequestMedia;
|
|
187
|
+
mergeTags?: MergeTagsConfig;
|
|
188
|
+
displayConditions?: DisplayConditionsConfig;
|
|
189
|
+
customBlocks?: CustomBlockDefinition[];
|
|
190
|
+
fonts?: FontsConfig;
|
|
191
|
+
blockDefaults?: BlockDefaults;
|
|
192
|
+
templateDefaults?: TemplateDefaults;
|
|
193
|
+
theme?: ThemeOverrides;
|
|
194
|
+
uiTheme?: UiTheme;
|
|
195
|
+
locale?: string;
|
|
196
|
+
/**
|
|
197
|
+
* Show the "Powered by Templatical" footer. Defaults to `true`.
|
|
198
|
+
* Set to `false` to hide the footer (no attribution required by the license).
|
|
199
|
+
*/
|
|
200
|
+
branding?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Accessibility linter (`@templatical/quality`) configuration.
|
|
203
|
+
*
|
|
204
|
+
* - When unset, the linter loads on demand once the user opens the panel.
|
|
205
|
+
* - When `disabled: true`, the optional peer is never imported (saves the
|
|
206
|
+
* chunk download) and the sidebar tab + inline badges are suppressed.
|
|
207
|
+
* - `rules`/`thresholds` follow the shape exported by `@templatical/quality`.
|
|
208
|
+
*/
|
|
209
|
+
accessibility?: A11yOptions;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export { ThemeOverrides }
|
|
213
|
+
|
|
214
|
+
export { UiTheme }
|
|
215
|
+
|
|
216
|
+
export declare function unmount(): void;
|
|
217
|
+
|
|
218
|
+
export declare function useFonts(config?: FontsConfig_2): UseFontsReturn;
|
|
219
|
+
|
|
220
|
+
export declare interface UseFontsReturn {
|
|
221
|
+
fonts: ComputedRef<FontOption[]>;
|
|
222
|
+
defaultFont: ComputedRef<string>;
|
|
223
|
+
defaultFallback: ComputedRef<string>;
|
|
224
|
+
customFonts: Ref<CustomFont_2[]>;
|
|
225
|
+
customFontsEnabled: Ref<boolean>;
|
|
226
|
+
isLoaded: Ref<boolean>;
|
|
227
|
+
setCustomFontsEnabled: (enabled: boolean) => void;
|
|
228
|
+
loadCustomFonts: () => Promise<void>;
|
|
229
|
+
cleanupFontLinks: () => void;
|
|
230
|
+
getFontWithFallback: (fontName: string) => string;
|
|
231
|
+
getDefaultFont: () => string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export { ViewportSize }
|
|
235
|
+
|
|
236
|
+
export { }
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
declare module "@tiptap/core" {
|
|
240
|
+
interface Commands<ReturnType> {
|
|
241
|
+
letterSpacing: {
|
|
242
|
+
setLetterSpacing: (spacing: string) => ReturnType;
|
|
243
|
+
unsetLetterSpacing: () => ReturnType;
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
declare module "@tiptap/core" {
|
|
250
|
+
interface Commands<ReturnType> {
|
|
251
|
+
lineHeight: {
|
|
252
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
253
|
+
unsetLineHeight: () => ReturnType;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
declare module "@tiptap/core" {
|
|
260
|
+
interface Commands<ReturnType> {
|
|
261
|
+
mergeTagNode: {
|
|
262
|
+
insertMergeTag: (attrs: MergeTag) => ReturnType;
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
declare module "@tiptap/core" {
|
|
269
|
+
interface Commands<ReturnType> {
|
|
270
|
+
fontSize: {
|
|
271
|
+
setFontSize: (size: string) => ReturnType;
|
|
272
|
+
unsetFontSize: () => ReturnType;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as e } from "./createLucideIcon-C3pa2siy.js";
|
|
2
|
+
var t = e("info", [
|
|
3
|
+
["circle", {
|
|
4
|
+
cx: "12",
|
|
5
|
+
cy: "12",
|
|
6
|
+
r: "10",
|
|
7
|
+
key: "1mglay"
|
|
8
|
+
}],
|
|
9
|
+
["path", {
|
|
10
|
+
d: "M12 16v-4",
|
|
11
|
+
key: "1dtifu"
|
|
12
|
+
}],
|
|
13
|
+
["path", {
|
|
14
|
+
d: "M12 8h.01",
|
|
15
|
+
key: "e9boi3"
|
|
16
|
+
}]
|
|
17
|
+
]);
|
|
18
|
+
//#endregion
|
|
19
|
+
export { t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { E as e } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
|
|
2
|
+
//#region src/keys.ts
|
|
3
|
+
var t = Symbol("translations"), n = Symbol("editor"), r = Symbol("history"), i = Symbol("blockActions"), a = Symbol("conditionPreview"), o = Symbol("fontsManager"), s = Symbol("themeStyles"), c = Symbol("tplUiTheme"), l = Symbol("blockDefaults"), u = Symbol("blockRegistry"), d = Symbol("customBlockDefinitions"), f = Symbol("mergeTags"), p = Symbol("mergeTagSyntax"), m = Symbol("onRequestMergeTag"), h = Symbol("mergeTagAutocomplete"), g = Symbol("onRequestMedia"), _ = Symbol("displayConditions"), v = Symbol("allowCustomConditions"), y = Symbol("capabilities"), b = Symbol("keyboardReorder"), x = Symbol("accessibilityLint"), S = Symbol("authManager"), C = Symbol("aiConfig"), w = Symbol("comments"), T = Symbol("savedModulesHeadless"), E = Symbol("scoring"), D = Symbol("cloudTranslations");
|
|
4
|
+
function O(t, n) {
|
|
5
|
+
let r = e(t, null);
|
|
6
|
+
if (r == null) throw Error(`${n} requires a provider for ${t.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
7
|
+
return r;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { T as C, c as D, t as E, O, m as S, s as T, b as _, i as a, p as b, y as c, a as d, d as f, r as g, o as h, S as i, D as l, n as m, C as n, l as o, _ as p, v as r, u as s, x as t, w as u, f as v, E as w, g as x, h as y };
|