@templatical/editor 0.21.2 → 0.23.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/README.md +1 -1
- package/dist/{AiChatSidebar-K_AehWc-.js → AiChatSidebar-Bru6-ziQ.js} +1 -1
- package/dist/{AiFeatureMenu-CcqQDHzJ.js → AiFeatureMenu-CcqjRMFW.js} +1 -1
- package/dist/{SavedBlockPreviewCanvas-2-mzAnZE.js → BlockPreviewCanvas-MD9BGuXV.js} +36 -30
- package/dist/{CloudEditor-DOjGJwPe.js → CloudEditor-iK4vkpNm.js} +275 -279
- package/dist/{CollaboratorBar-Bj4NZiie.js → CollaboratorBar-C_1SF7Xf.js} +1 -1
- package/dist/{DesignReferenceSidebar-DNmK3dxp.js → DesignReferenceSidebar-BxPo0zyx.js} +1 -1
- package/dist/{MergeTagSuggestion-DMe4rqn0.js → MergeTagSuggestion-D9eCryMC.js} +2 -2
- package/dist/{ParagraphEditor--_zWfxps.js → ParagraphEditor-MKJYyWN9.js} +13 -13
- package/dist/{SaveBlockDialog-CYIEHABH.js → SaveBlockDialog-CFAJHP3v.js} +99 -98
- package/dist/{SavedBlocksBrowserModal-D5V5yF_3.js → SavedBlocksBrowserModal-C_-Xcm0Q.js} +4 -4
- package/dist/{SavedBlocksPanels-Dff38YXu.js → SavedBlocksPanels-CRf7zzFn.js} +1 -1
- package/dist/{SavedBlocksPickBar-rB6iyji6.js → SavedBlocksPickBar-C1FTJP-I.js} +1 -1
- package/dist/{SnapshotHistory-FtzDq8f0.js → SnapshotHistory-DWlQ3Eh0.js} +1 -1
- package/dist/TestEmailModal-D90-3Yex.js +162 -0
- package/dist/TestEmailPanel-B0u_Yd3X.js +33 -0
- package/dist/{TitleEditor-CPda5lh-.js → TitleEditor-DzsPxKv4.js} +5 -5
- package/dist/{TplModal-C7Koj5gM.js → TplModal-CykwWFhF.js} +1 -1
- package/dist/ViewportToggle-BjmbNoao.js +97 -0
- package/dist/{blockTypeIcons-CgwECCut.js → blockTypeIcons-CpKkI47V.js} +1 -1
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-BBgad6y5.js → ca-D47BxSGu.js} +14 -0
- package/dist/cdn/chunks/{AiChatSidebar-A1CuWGY0.js → AiChatSidebar-BMnsF8G6.js} +2 -2
- package/dist/cdn/chunks/{AiChatSidebar-A1CuWGY0.js.map → AiChatSidebar-BMnsF8G6.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-Duwg413F.js → AiFeatureMenu-hWgWQg11.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Duwg413F.js.map → AiFeatureMenu-hWgWQg11.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlockPreviewCanvas-DZOMgNsz.js → BlockPreviewCanvas-eASrdFSN.js} +37 -31
- package/dist/cdn/chunks/BlockPreviewCanvas-eASrdFSN.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-C0Y4RD4c.js → CloudEditor-S8zLHtKb.js} +253 -257
- package/dist/cdn/chunks/CloudEditor-S8zLHtKb.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BS3rJy6-.js → CollaboratorBar-mkJVAkSh.js} +2 -2
- package/dist/cdn/chunks/{CollaboratorBar-BS3rJy6-.js.map → CollaboratorBar-mkJVAkSh.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-Dre99DTH.js → DesignReferenceSidebar-CM-k15pd.js} +2 -2
- package/dist/cdn/chunks/{DesignReferenceSidebar-Dre99DTH.js.map → DesignReferenceSidebar-CM-k15pd.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-D7TsECll.js → MergeTagSuggestion-BM349_QH.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-D7TsECll.js.map → MergeTagSuggestion-BM349_QH.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CtaRa1vr.js → ParagraphEditor-J-1RLyi7.js} +14 -14
- package/dist/cdn/chunks/{ParagraphEditor-CtaRa1vr.js.map → ParagraphEditor-J-1RLyi7.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-Bb3fdUEZ.js → SaveBlockDialog-Bi_Z3kuA.js} +100 -99
- package/dist/cdn/chunks/SaveBlockDialog-Bi_Z3kuA.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CeUWcPv0.js → SavedBlocksBrowserModal-CesYxFsH.js} +4 -4
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CesYxFsH.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-D-pA_wfk.js → SavedBlocksPanels-BsSpJwrW.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-D-pA_wfk.js.map → SavedBlocksPanels-BsSpJwrW.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-1rf1KpqS.js → SavedBlocksPickBar-CduR1Cpb.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPickBar-1rf1KpqS.js.map → SavedBlocksPickBar-CduR1Cpb.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-Bf1uovti.js → SnapshotHistory-DO-gzr3i.js} +2 -2
- package/dist/cdn/chunks/{SnapshotHistory-Bf1uovti.js.map → SnapshotHistory-DO-gzr3i.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js +162 -0
- package/dist/cdn/chunks/TestEmailModal-CCWEVrE2.js.map +1 -0
- package/dist/cdn/chunks/TestEmailPanel-048m0kxX.js +35 -0
- package/dist/cdn/chunks/TestEmailPanel-048m0kxX.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BJ7LFykI.js → TitleEditor-J1vgU_J6.js} +6 -6
- package/dist/cdn/chunks/{TitleEditor-BJ7LFykI.js.map → TitleEditor-J1vgU_J6.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-CH9RzKF7.js → TplModal-BN53d9Se.js} +2 -2
- package/dist/cdn/chunks/{TplModal-CH9RzKF7.js.map → TplModal-BN53d9Se.js.map} +1 -1
- package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js +66 -0
- package/dist/cdn/chunks/ViewportToggle-CFmF-N4i.js.map +1 -0
- package/dist/cdn/chunks/{ca-BBgad6y5.js → ca-D47BxSGu.js} +15 -1
- package/dist/cdn/chunks/{ca-BBgad6y5.js.map → ca-D47BxSGu.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-BJlbXGTJ.js → cloud-F-aVi9hj.js} +45 -41
- package/dist/cdn/chunks/cloud-F-aVi9hj.js.map +1 -0
- package/dist/{de-D7WbpFBR.js → cdn/chunks/de-CnnxBwh7.js} +16 -0
- package/dist/cdn/chunks/{de-D7WbpFBR.js.map → de-CnnxBwh7.js.map} +1 -1
- package/dist/{de-Bw6fB5JU.js → cdn/chunks/de-uVoSP1xF.js} +2 -9
- package/dist/cdn/chunks/de-uVoSP1xF.js.map +1 -0
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js +8 -0
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js.map +1 -0
- package/dist/{en-BrZ0uGK2.js → cdn/chunks/en-5gW-bYy2.js} +16 -0
- package/dist/cdn/chunks/{en-BrZ0uGK2.js.map → en-5gW-bYy2.js.map} +1 -1
- package/dist/{en-DAdHJz7h.js → cdn/chunks/en-CjhsJxb-.js} +2 -9
- package/dist/cdn/chunks/en-CjhsJxb-.js.map +1 -0
- package/dist/{es-tLSLysPs.js → cdn/chunks/es-sQ9SdI0l.js} +16 -0
- package/dist/cdn/chunks/{es-tLSLysPs.js.map → es-sQ9SdI0l.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-ZX2oarW6.js → extensions-C49c51P1.js} +3 -3
- package/dist/cdn/chunks/{extensions-ZX2oarW6.js.map → extensions-C49c51P1.js.map} +1 -1
- package/dist/cdn/chunks/fr-DBZ5w21C.js +624 -0
- package/dist/cdn/chunks/fr-DBZ5w21C.js.map +1 -0
- package/dist/cdn/chunks/fr-Dswns199.js +89 -0
- package/dist/cdn/chunks/fr-Dswns199.js.map +1 -0
- package/dist/cdn/chunks/nl-CbcPJlrL.js +89 -0
- package/dist/cdn/chunks/nl-CbcPJlrL.js.map +1 -0
- package/dist/cdn/chunks/nl-DOL7Fnfo.js +624 -0
- package/dist/cdn/chunks/nl-DOL7Fnfo.js.map +1 -0
- package/dist/{pt-BR-w2sGzHNX.js → cdn/chunks/pt-BR-CTzHTqJD.js} +2 -9
- package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-BWFokdTU.js → pt-BR-DRCdHX1d.js} +15 -1
- package/dist/cdn/chunks/{pt-BR-BWFokdTU.js.map → pt-BR-DRCdHX1d.js.map} +1 -1
- package/dist/cdn/chunks/{src-D6F_3XkE.js → src-CzoMNRq4.js} +19 -17
- package/dist/cdn/chunks/{src-D6F_3XkE.js.map → src-CzoMNRq4.js.map} +1 -1
- package/dist/cdn/chunks/{src-BuC_IHzN.js → src-SluTVSz_.js} +2 -2
- package/dist/cdn/chunks/{src-BuC_IHzN.js.map → src-SluTVSz_.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DMOEiSX9.js → styles-BbfU2w9R.js} +617 -585
- package/dist/cdn/chunks/styles-BbfU2w9R.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BMZ-OENR.js → tiptap-DUTbZTeR.js} +5 -5
- package/dist/cdn/chunks/{tiptap-BMZ-OENR.js.map → tiptap-DUTbZTeR.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-BA6mspzD.js → useEditorCore-CzMhD6Gd.js} +3 -3
- package/dist/cdn/chunks/{useEditorCore-BA6mspzD.js.map → useEditorCore-CzMhD6Gd.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +164 -145
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-Du7mnkz2.js → cloud-CeZPgo1V.js} +41 -39
- package/dist/{cdn/chunks/de-D7WbpFBR.js → de-CnnxBwh7.js} +14 -2
- package/dist/{cdn/chunks/de-Bw6fB5JU.js → de-uVoSP1xF.js} +0 -11
- package/dist/{dist-CDO52Rxy.js → dist-3DHaYEiT.js} +2 -2
- package/dist/{dist-BEpCh2mG.js → dist-3HenmYIg.js} +1 -1
- package/dist/{dist-CrjzhIxB.js → dist-BCnJcAQc.js} +2 -2
- package/dist/{dist-BgPYC_8-.js → dist-B_etKYyh.js} +5 -5
- package/dist/{dist-CBzCU-a-.js → dist-CL_CfQ3Q.js} +2 -2
- package/dist/dist-CcQLJeWV.js +5 -0
- package/dist/{dist-CuXha2_7.js → dist-CclnU_v0.js} +2 -2
- package/dist/{dist-BkM8A17N.js → dist-DKWoZJAV.js} +2 -2
- package/dist/{dist-DYClLqy8.js → dist-DOtLGnLr.js} +2 -2
- package/dist/dist-DerdmERj.js +5 -0
- package/dist/{dist-BuNDAAVp.js → dist-Ih7ejWzn.js} +2 -2
- package/dist/{dist-CtcgoC_R.js → dist-bivrM-nS.js} +2 -2
- package/dist/emailFrameWidth-BmFCN2dp.js +6 -0
- package/dist/{cdn/chunks/en-BrZ0uGK2.js → en-5gW-bYy2.js} +14 -2
- package/dist/{cdn/chunks/en-DAdHJz7h.js → en-CjhsJxb-.js} +0 -11
- package/dist/{cdn/chunks/es-tLSLysPs.js → es-sQ9SdI0l.js} +14 -2
- package/dist/{extensions-ClY5Sh7S.js → extensions-3870a_3R.js} +3 -3
- package/dist/fr-DBZ5w21C.js +622 -0
- package/dist/index.d.ts +74 -0
- package/dist/nl-DOL7Fnfo.js +622 -0
- package/dist/{cdn/chunks/pt-BR-w2sGzHNX.js → pt-BR-CTzHTqJD.js} +0 -11
- package/dist/{pt-BR-BWFokdTU.js → pt-BR-DRCdHX1d.js} +14 -0
- package/dist/style.css +1 -1
- package/dist/{styles-PcOPXvLO.js → styles-BWTIgN5L.js} +672 -673
- package/dist/templatical-editor.js +128 -108
- package/dist/{useEditorCore-CT1slufs.js → useEditorCore-CuMMIfiS.js} +2 -2
- package/package.json +20 -20
- package/dist/TestEmailModal-DL2O1H8M.js +0 -95
- package/dist/cdn/chunks/CloudEditor-C0Y4RD4c.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js.map +0 -1
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js +0 -96
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js.map +0 -1
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +0 -1
- package/dist/cdn/chunks/de-Bw6fB5JU.js.map +0 -1
- package/dist/cdn/chunks/en-DAdHJz7h.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-w2sGzHNX.js.map +0 -1
- package/dist/cdn/chunks/styles-DMOEiSX9.js.map +0 -1
- package/dist/dist-CweLDZrs.js +0 -5
- package/dist/dist-DOsdqAEZ.js +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ import { SaveResult } from '@templatical/types';
|
|
|
28
28
|
import { Template } from '@templatical/types';
|
|
29
29
|
import { TemplateContent } from '@templatical/types';
|
|
30
30
|
import { TemplateDefaults } from '@templatical/types';
|
|
31
|
+
import { TestEmailPayload } from '@templatical/types';
|
|
32
|
+
import { TestEmailProvider } from '@templatical/types';
|
|
31
33
|
import { ThemeOverrides } from '@templatical/types';
|
|
32
34
|
import { UiTheme } from '@templatical/types';
|
|
33
35
|
import { ViewportSize } from '@templatical/types';
|
|
@@ -100,6 +102,23 @@ export declare interface EditorCapabilities {
|
|
|
100
102
|
canUpdate: ComputedRef<boolean>;
|
|
101
103
|
canDelete: ComputedRef<boolean>;
|
|
102
104
|
};
|
|
105
|
+
/**
|
|
106
|
+
* Present only when a `TestEmailProvider` is configured — in OSS via
|
|
107
|
+
* `init({ testEmail })`, in Cloud whenever cloud mode is active (or when a
|
|
108
|
+
* consumer supplied their own sender to `initCloud()`).
|
|
109
|
+
*/
|
|
110
|
+
testEmail?: {
|
|
111
|
+
/** Open the send dialog. A no-op while {@link isAvailable} is false. */
|
|
112
|
+
open(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Whether the feature is usable right now. Reactive for the same reason as
|
|
115
|
+
* `savedBlocks.isAvailable`: Cloud resolves its plan entitlement and its
|
|
116
|
+
* allowed-recipient list *after* capabilities are provided, and an
|
|
117
|
+
* explicitly empty allowlist makes the feature unusable. UI must gate on
|
|
118
|
+
* this or it renders a button that does nothing.
|
|
119
|
+
*/
|
|
120
|
+
isAvailable: ComputedRef<boolean>;
|
|
121
|
+
};
|
|
103
122
|
}
|
|
104
123
|
|
|
105
124
|
export declare interface FontOption {
|
|
@@ -318,7 +337,28 @@ export declare interface TemplaticalCloudEditorConfig {
|
|
|
318
337
|
onComment?: (event: CommentEvent) => void;
|
|
319
338
|
onUnmount?: () => void;
|
|
320
339
|
onRequestMedia?: (context: MediaRequestContext) => Promise<MediaItem | null>;
|
|
340
|
+
/**
|
|
341
|
+
* Transform the rendered HTML just before Cloud sends a test email.
|
|
342
|
+
*
|
|
343
|
+
* Cloud-only, and deliberately so: it exists because *Cloud* renders the HTML,
|
|
344
|
+
* so a consumer needs a seam into it. A consumer-supplied {@link testEmail}
|
|
345
|
+
* provider *is* that seam, and this hook is not applied to it.
|
|
346
|
+
*/
|
|
321
347
|
onBeforeTestEmail?: (html: string) => string | Promise<string>;
|
|
348
|
+
/**
|
|
349
|
+
* Sending backend for test emails.
|
|
350
|
+
*
|
|
351
|
+
* - **omitted** — sent by Templatical Cloud, gated on the `test_email` plan
|
|
352
|
+
* feature and its signed allowed-recipient list.
|
|
353
|
+
* - **a {@link TestEmailProvider}** — sent by *you* instead, which is what to
|
|
354
|
+
* reach for when mail must leave your own infrastructure for compliance or
|
|
355
|
+
* data-residency reasons.
|
|
356
|
+
*
|
|
357
|
+
* The same type `init()` takes, so moving an OSS integration to Cloud means
|
|
358
|
+
* deleting this key (to adopt Cloud's sender) or leaving it exactly as-is (to
|
|
359
|
+
* keep your own) — never rewriting it.
|
|
360
|
+
*/
|
|
361
|
+
testEmail?: TestEmailProvider;
|
|
322
362
|
/**
|
|
323
363
|
* Template linter (`@templatical/quality`) configuration. Runs every
|
|
324
364
|
* linter exported by the package (accessibility + structure). Cloud
|
|
@@ -518,6 +558,36 @@ export declare interface TemplaticalEditorConfig {
|
|
|
518
558
|
* block *types* with their own templates and field schemas.
|
|
519
559
|
*/
|
|
520
560
|
savedBlocks?: SavedBlocksProvider;
|
|
561
|
+
/**
|
|
562
|
+
* Sending backend for **test emails** — letting a user mail themselves the
|
|
563
|
+
* template they're editing.
|
|
564
|
+
*
|
|
565
|
+
* The editor owns the trigger, the dialog, recipient validation and the
|
|
566
|
+
* sending/success/error states; you own delivery. One method is enough:
|
|
567
|
+
*
|
|
568
|
+
* ```ts
|
|
569
|
+
* init({
|
|
570
|
+
* container,
|
|
571
|
+
* testEmail: {
|
|
572
|
+
* send: ({ recipient, content }) =>
|
|
573
|
+
* fetch("/api/test-email", {
|
|
574
|
+
* method: "POST",
|
|
575
|
+
* headers: { "Content-Type": "application/json" },
|
|
576
|
+
* body: JSON.stringify({ recipient, content }),
|
|
577
|
+
* }).then((r) => {
|
|
578
|
+
* if (!r.ok) throw new Error("Could not send the test email");
|
|
579
|
+
* }),
|
|
580
|
+
* },
|
|
581
|
+
* });
|
|
582
|
+
* ```
|
|
583
|
+
*
|
|
584
|
+
* **Omitted by default.** With no provider the feature is entirely off — no
|
|
585
|
+
* button, and none of its UI code is downloaded.
|
|
586
|
+
*
|
|
587
|
+
* `allowedRecipients` restricts the picker but is **not** a security boundary:
|
|
588
|
+
* it lives in the user's browser. Validate the recipient on your server.
|
|
589
|
+
*/
|
|
590
|
+
testEmail?: TestEmailProvider;
|
|
521
591
|
blockDefaults?: BlockDefaults;
|
|
522
592
|
templateDefaults?: TemplateDefaults;
|
|
523
593
|
theme?: ThemeOverrides;
|
|
@@ -556,6 +626,10 @@ export declare interface TemplaticalEditorConfig {
|
|
|
556
626
|
lint?: LintOptions;
|
|
557
627
|
}
|
|
558
628
|
|
|
629
|
+
export { TestEmailPayload }
|
|
630
|
+
|
|
631
|
+
export { TestEmailProvider }
|
|
632
|
+
|
|
559
633
|
export { ThemeOverrides }
|
|
560
634
|
|
|
561
635
|
export { UiTheme }
|