@templatical/editor 0.25.2 → 0.26.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/{AiChatSidebar-JLsbPnsH.js → AiChatSidebar-c-3yyjN1.js} +8 -8
- package/dist/{AiFeatureMenu-BvA-lViN.js → AiFeatureMenu-B-COyG7k.js} +4 -4
- package/dist/{BlockIssueBadge-Cf0-GC3o.js → BlockIssueBadge-Buk3_6QF.js} +2 -2
- package/dist/{BlockPreviewCanvas-CnJIM5TO.js → BlockPreviewCanvas-CJPHGI93.js} +1 -1
- package/dist/{CloudEditor-Caq7z4-7.js → CloudEditor-BdSQ8hfv.js} +19 -19
- package/dist/{CollaboratorBar-BFz4LgA0.js → CollaboratorBar-mGoi6yye.js} +2 -2
- package/dist/{ColorPicker-B5xXWWX5.js → ColorPicker-ClETsjA3.js} +1 -1
- package/dist/{CommentsSidebar-CGihWwn9.js → CommentsSidebar-CdRCCSDD.js} +10 -10
- package/dist/{CountdownToolbar-DpNCZAUI.js → CountdownToolbar-CBE9wRaV.js} +2 -2
- package/dist/{DesignReferenceSidebar-CiIHHiil.js → DesignReferenceSidebar-CgYkySre.js} +6 -6
- package/dist/{IssuesPanel-CUkmAC_S.js → IssuesPanel-Do7RLXsP.js} +5 -5
- package/dist/{MergeTagModeToggle-C6nS3qri.js → MergeTagModeToggle-hAJgIKhw.js} +3 -3
- package/dist/{MergeTagSuggestion-98fAcuM-.js → MergeTagSuggestion-BJ43ihWR.js} +9 -9
- package/dist/{NumberWithSuffix-DB-1GNvx.js → NumberWithSuffix-D37ZWiZh.js} +1 -1
- package/dist/{ParagraphEditor-NgW-T9YV.js → ParagraphEditor-DBG63S70.js} +19 -19
- package/dist/{RichTextEditorContent-CN7OVR6u.js → RichTextEditorContent-fbYJXAio.js} +3 -3
- package/dist/{SaveBlockDialog-lgcmhAsO.js → SaveBlockDialog-Dq9UVihi.js} +6 -6
- package/dist/{SavedBlocksBrowserModal-3u247V2z.js → SavedBlocksBrowserModal-CtFG4zeV.js} +7 -7
- package/dist/{SavedBlocksPanels-Dh6dABJt.js → SavedBlocksPanels-DNVdso_W.js} +1 -1
- package/dist/{SavedBlocksPickBar-Bo82D3Qy.js → SavedBlocksPickBar-Cv4dIpP-.js} +2 -2
- package/dist/{SnapshotHistory-Dsb1i40w.js → SnapshotHistory-DsOtMHOV.js} +11 -11
- package/dist/{TemplateScoringPanel-Bzd_YSag.js → TemplateScoringPanel-BZUsb3FD.js} +10 -10
- package/dist/{TestEmailModal-DvqDTOcO.js → TestEmailModal-CIwqtGfr.js} +7 -7
- package/dist/{TestEmailPanel-BXoVnAqu.js → TestEmailPanel-l6LDmBGM.js} +1 -1
- package/dist/{TitleEditor-DWSi998C.js → TitleEditor-imoBUynh.js} +8 -8
- package/dist/{TplModal-DKn0h2qe.js → TplModal-DDDHcoir.js} +1 -1
- package/dist/{blockTypeIcons-DKlza6aR.js → blockTypeIcons-CfLN4A6t.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiChatSidebar-BY1Iy-e8.js → AiChatSidebar-BHqNxNcX.js} +35 -35
- package/dist/cdn/chunks/{AiChatSidebar-BY1Iy-e8.js.map → AiChatSidebar-BHqNxNcX.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-BS4Rek6j.js → AiFeatureMenu-D2AIDwEG.js} +11 -11
- package/dist/cdn/chunks/{AiFeatureMenu-BS4Rek6j.js.map → AiFeatureMenu-D2AIDwEG.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BcIQUe_Q.js → BlockIssueBadge-BEEY9o2o.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BcIQUe_Q.js.map → BlockIssueBadge-BEEY9o2o.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-oND1iXLL.js → BlockPreviewCanvas-DH5ULGkw.js} +22 -22
- package/dist/cdn/chunks/{BlockPreviewCanvas-oND1iXLL.js.map → BlockPreviewCanvas-DH5ULGkw.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BaqiFbf0.js → CloudEditor-C0nB1JfD.js} +65 -65
- package/dist/cdn/chunks/{CloudEditor-BaqiFbf0.js.map → CloudEditor-C0nB1JfD.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DF02nTwF.js → CollaboratorBar-f6Ni7KNH.js} +12 -12
- package/dist/cdn/chunks/{CollaboratorBar-DF02nTwF.js.map → CollaboratorBar-f6Ni7KNH.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-BXH44v2H.js → ColorPicker-W_UyiVGc.js} +131 -131
- package/dist/cdn/chunks/{ColorPicker-BXH44v2H.js.map → ColorPicker-W_UyiVGc.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-B9bWvvbl.js → CommentsSidebar-BLRZRSSC.js} +112 -112
- package/dist/cdn/chunks/{CommentsSidebar-B9bWvvbl.js.map → CommentsSidebar-BLRZRSSC.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-BTpRd0Hn.js → CountdownBlock-vLTkTI9e.js} +11 -11
- package/dist/cdn/chunks/{CountdownBlock-BTpRd0Hn.js.map → CountdownBlock-vLTkTI9e.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CW10rbWt.js → CountdownToolbar-DPjcgcVR.js} +41 -41
- package/dist/cdn/chunks/{CountdownToolbar-CW10rbWt.js.map → CountdownToolbar-DPjcgcVR.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BXjH47QC.js → DesignReferenceSidebar-DBoEBKxQ.js} +28 -28
- package/dist/cdn/chunks/{DesignReferenceSidebar-BXjH47QC.js.map → DesignReferenceSidebar-DBoEBKxQ.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DStHCHfr.js → IssuesPanel-DKTS4QVb.js} +32 -32
- package/dist/cdn/chunks/{IssuesPanel-DStHCHfr.js.map → IssuesPanel-DKTS4QVb.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-DQowK3MV.js → LoadingTrack-C52ZGL5q.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DQowK3MV.js.map → LoadingTrack-C52ZGL5q.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BCmQg4Qe.js → MergeTagModeToggle-D8iKvz7v.js} +20 -20
- package/dist/cdn/chunks/{MergeTagModeToggle-BCmQg4Qe.js.map → MergeTagModeToggle-D8iKvz7v.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-BgExdloL.js → MergeTagSuggestion-Dn8dExNa.js} +18 -18
- package/dist/cdn/chunks/{MergeTagSuggestion-BgExdloL.js.map → MergeTagSuggestion-Dn8dExNa.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-BANVbpT0.js → NumberWithSuffix-BXrRdfq1.js} +22 -22
- package/dist/cdn/chunks/{NumberWithSuffix-BANVbpT0.js.map → NumberWithSuffix-BXrRdfq1.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DqilB4_f.js → ParagraphEditor-Cuc83Blj.js} +43 -43
- package/dist/cdn/chunks/{ParagraphEditor-DqilB4_f.js.map → ParagraphEditor-Cuc83Blj.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BeJx4LVH.js → RichTextEditorContent-DtL49Jpo.js} +20 -20
- package/dist/cdn/chunks/{RichTextEditorContent-BeJx4LVH.js.map → RichTextEditorContent-DtL49Jpo.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-Dm31xRZy.js → SaveBlockDialog-B8KHhVkI.js} +43 -43
- package/dist/cdn/chunks/{SaveBlockDialog-Dm31xRZy.js.map → SaveBlockDialog-B8KHhVkI.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-Tp37b4y7.js → SavedBlocksBrowserModal-B-sjsIJv.js} +62 -62
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-Tp37b4y7.js.map → SavedBlocksBrowserModal-B-sjsIJv.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-ElerTTa_.js → SavedBlocksPanels-Bb-eDMAh.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-ElerTTa_.js.map → SavedBlocksPanels-Bb-eDMAh.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-QHJ-Mjx0.js → SavedBlocksPickBar-GudFfXa4.js} +12 -12
- package/dist/cdn/chunks/{SavedBlocksPickBar-QHJ-Mjx0.js.map → SavedBlocksPickBar-GudFfXa4.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-jogWGLB-.js → SnapshotHistory-Srpzt2na.js} +26 -26
- package/dist/cdn/chunks/{SnapshotHistory-jogWGLB-.js.map → SnapshotHistory-Srpzt2na.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-B2XIOTl-.js → TemplateScoringPanel-NucRtAP0.js} +34 -34
- package/dist/cdn/chunks/{TemplateScoringPanel-B2XIOTl-.js.map → TemplateScoringPanel-NucRtAP0.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-BcPjQygV.js → TestEmailModal-DLeoJqaJ.js} +31 -31
- package/dist/cdn/chunks/{TestEmailModal-BcPjQygV.js.map → TestEmailModal-DLeoJqaJ.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-1zxRa00s.js → TestEmailPanel-Dr7Dkq2P.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-1zxRa00s.js.map → TestEmailPanel-Dr7Dkq2P.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DTrmublj.js → TitleEditor-DzYRr18C.js} +35 -35
- package/dist/cdn/chunks/{TitleEditor-DTrmublj.js.map → TitleEditor-DzYRr18C.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-By50gtwa.js → TplModal-byw7-3wg.js} +17 -17
- package/dist/cdn/chunks/{TplModal-By50gtwa.js.map → TplModal-byw7-3wg.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BhFhHuFt.js → blockTypeIcons-FXlMM3PL.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-BhFhHuFt.js.map → blockTypeIcons-FXlMM3PL.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-B0f7Ub8f.js → cloud-CuItCnN_.js} +3 -3
- package/dist/cdn/chunks/{cloud-B0f7Ub8f.js.map → cloud-CuItCnN_.js.map} +1 -1
- package/dist/cdn/chunks/{dist-H51neg3K.js → dist-B2HKGHnc.js} +3 -3
- package/dist/cdn/chunks/{dist-H51neg3K.js.map → dist-B2HKGHnc.js.map} +1 -1
- package/dist/cdn/chunks/{dist-B4VIlp1g.js → dist-C6z8AjBC.js} +2 -2
- package/dist/cdn/chunks/{dist-B4VIlp1g.js.map → dist-C6z8AjBC.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-Z4XXmbPC.js → draggable-DCs9qL-b.js} +2 -2
- package/dist/cdn/chunks/{draggable-Z4XXmbPC.js.map → draggable-DCs9qL-b.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-Dq0D79tq.js → extensions-B7laxHjs.js} +22 -22
- package/dist/cdn/chunks/{extensions-Dq0D79tq.js.map → extensions-B7laxHjs.js.map} +1 -1
- package/dist/cdn/chunks/{icons-C_kRN0_C.js → icons-CvYN6zrM.js} +8 -8
- package/dist/cdn/chunks/{icons-C_kRN0_C.js.map → icons-CvYN6zrM.js.map} +1 -1
- package/dist/cdn/chunks/{keys-DsoX52o_.js → keys-Cmc2Yl3D.js} +2 -2
- package/dist/cdn/chunks/{keys-DsoX52o_.js.map → keys-Cmc2Yl3D.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-DrGys_ek.js → liquid.browser-UlAOKBjI.js} +99 -91
- package/dist/cdn/chunks/liquid.browser-UlAOKBjI.js.map +1 -0
- package/dist/cdn/chunks/{src-Aea1Vl1H.js → src-BYKYmEOD.js} +7 -6
- package/dist/cdn/chunks/src-BYKYmEOD.js.map +1 -0
- package/dist/cdn/chunks/{src-_GNJgPcS.js → src-Bi-Qhtfs.js} +2 -2
- package/dist/cdn/chunks/{src-_GNJgPcS.js.map → src-Bi-Qhtfs.js.map} +1 -1
- package/dist/cdn/chunks/{src-CRvTVX4F.js → src-C0N74uvF.js} +201 -201
- package/dist/cdn/chunks/{src-CRvTVX4F.js.map → src-C0N74uvF.js.map} +1 -1
- package/dist/cdn/chunks/{src-CZjSXPYq.js → src-EKTTBQ0y.js} +3 -2
- package/dist/cdn/chunks/src-EKTTBQ0y.js.map +1 -0
- package/dist/cdn/chunks/{styles-znpPfrFd.js → styles-C7s-VtJi.js} +1112 -1094
- package/dist/cdn/chunks/styles-C7s-VtJi.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C5vzWlHv.js → tiptap-C44S1Cmh.js} +3480 -2806
- package/dist/cdn/chunks/tiptap-C44S1Cmh.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-4IDYQRNu.js → useAliveFlag-Dxwgo6P4.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-4IDYQRNu.js.map → useAliveFlag-Dxwgo6P4.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-D4JpHTPk.js → useCloudI18n-8wkJtuJD.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-D4JpHTPk.js.map → useCloudI18n-8wkJtuJD.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-BMXBmdd8.js → useEditorCore-C_nUXiph.js} +268 -268
- package/dist/cdn/chunks/useEditorCore-C_nUXiph.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-BvcEYzrI.js → useI18n-UMs0F71x.js} +3 -3
- package/dist/cdn/chunks/{useI18n-BvcEYzrI.js.map → useI18n-UMs0F71x.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BSdxMUzg.js → useMergeTag-CPa_9VOq.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-BSdxMUzg.js.map → useMergeTag-CPa_9VOq.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-ig-71caO.js → usePopoverPosition-cf8Y-ynK.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-ig-71caO.js.map → usePopoverPosition-cf8Y-ynK.js.map} +1 -1
- package/dist/cdn/editor.js +47 -47
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-COV27dGb.js → check-On4TSac-.js} +1 -1
- package/dist/{chevron-down-vsU88vcr.js → chevron-down-69EiBGoB.js} +1 -1
- package/dist/{chevron-up-RrZ0Rjn9.js → chevron-up-Dh3MG1Dw.js} +1 -1
- package/dist/{circle-alert-B6GlHmmi.js → circle-alert-cilwzafX.js} +1 -1
- package/dist/{clock-egOt8zjQ.js → clock-Dt0APH92.js} +1 -1
- package/dist/{cloud-D-2StbvU.js → cloud-C7-FhzMc.js} +1 -1
- package/dist/{createLucideIcon-D6cqT5Pm.js → createLucideIcon-C8WzBYCv.js} +2 -2
- package/dist/dist-6YJAWMuf.js +5 -0
- package/dist/dist-8vlm9kfO.js +5 -0
- package/dist/{dist-DHwnYYx0.js → dist-BImfm-46.js} +2 -2
- package/dist/{dist-DzzTB4eE.js → dist-C08jiemd.js} +7 -7
- package/dist/{dist-CqV4XslQ.js → dist-C27SeFL5.js} +15 -15
- package/dist/{dist-MwT7T6Xp.js → dist-CYx-E82k.js} +2 -2
- package/dist/{dist-CHxPjcxA.js → dist-ChYLhoJ4.js} +2143 -1583
- package/dist/{dist-UkG5ZJ1P.js → dist-Cl8J0IES.js} +258 -172
- package/dist/{dist-CQ0fVBQ3.js → dist-D5zCZFdU.js} +2 -1
- package/dist/{dist-D4GoAr2g.js → dist-DMJRSouD.js} +464 -436
- package/dist/{dist-GUZZpDK3.js → dist-DfpeSdmE.js} +2 -2
- package/dist/{dist-Du95Y9M3.js → dist-M7m1lYRe.js} +47 -47
- package/dist/{dist-vpuiQ7_Q.js → dist-g6cbzhZW.js} +2 -2
- package/dist/{extensions-y6KjLr9t.js → extensions-CxwhoG8v.js} +16 -16
- package/dist/{image-up-CycES-MQ.js → image-up-Ceggh_R3.js} +1 -1
- package/dist/{info-BUdvm046.js → info-DO5odBcZ.js} +1 -1
- package/dist/{liquid.browser-Di5zMIEx.js → liquid.browser-B-rGrnrQ.js} +98 -90
- package/dist/{list-checks-BAeuuATD.js → list-checks-BSkPKbuI.js} +1 -1
- package/dist/{loader-circle-L5yuAx_j.js → loader-circle-bO7o7_HD.js} +1 -1
- package/dist/{message-circle-DRdaapVc.js → message-circle-BEkAk65X.js} +1 -1
- package/dist/{pencil-BfErVPf_.js → pencil-t6m0EtKL.js} +1 -1
- package/dist/{refresh-cw-D0PYatER.js → refresh-cw-CkOYVzK5.js} +1 -1
- package/dist/{scan-line-Byi3fJcr.js → scan-line-DwSVj25O.js} +1 -1
- package/dist/{send-DuyNexMY.js → send-CWsWN8PQ.js} +1 -1
- package/dist/{shield-check-BkkN_1qw.js → shield-check-qje8Kufw.js} +1 -1
- package/dist/{sparkles-DAw2sBXk.js → sparkles-DumaWRW-.js} +1 -1
- package/dist/{styles-BzwheHH_.js → styles-C_slTGwp.js} +446 -428
- package/dist/templatical-editor.js +9 -9
- package/dist/{text-align-start-Ba3xJKn6.js → text-align-start-Ir8Ah4mT.js} +1 -1
- package/dist/{trash-2-CapEBXBI.js → trash-2-CklAFCmO.js} +1 -1
- package/dist/{triangle-alert-52pdw8jI.js → triangle-alert-BBi4n93g.js} +1 -1
- package/dist/{upload-oAgigC31.js → upload-sVqqppuv.js} +1 -1
- package/dist/{useEditorCore-BhjEMSeE.js → useEditorCore-r4gWzCBA.js} +889 -889
- package/dist/{useMergeTag-DTSOQnyr.js → useMergeTag-C-_WxrgL.js} +1 -1
- package/dist/{x-DvBgbDuf.js → x-Mby7KlhS.js} +1 -1
- package/package.json +22 -22
- package/dist/cdn/chunks/liquid.browser-DrGys_ek.js.map +0 -1
- package/dist/cdn/chunks/src-Aea1Vl1H.js.map +0 -1
- package/dist/cdn/chunks/src-CZjSXPYq.js.map +0 -1
- package/dist/cdn/chunks/styles-znpPfrFd.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C5vzWlHv.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-BMXBmdd8.js.map +0 -1
- package/dist/dist-B56SufAv.js +0 -5
- package/dist/dist-BQZkRg05.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as e } from "./draggable-
|
|
1
|
+
import { T as e } from "./draggable-DCs9qL-b.js";
|
|
2
2
|
//#region src/keys.ts
|
|
3
3
|
var t = Symbol("translations"), n = Symbol("editor"), r = Symbol("history"), i = Symbol("blockActions"), a = Symbol("conditionPreview"), o = Symbol("appliesConditionFilter"), s = Symbol("fontsManager"), c = Symbol("themeStyles"), l = Symbol("tplUiTheme"), u = Symbol("blockDefaults"), d = Symbol("blockRegistry"), f = Symbol("customBlockDefinitions"), p = Symbol("paletteBlocks"), m = Symbol("htmlBlockPreview"), h = Symbol("colors"), g = Symbol("customBlockStylesheets"), _ = Symbol("mergeTags"), v = Symbol("mergeTagSyntax"), y = Symbol("onRequestMergeTag"), b = Symbol("mergeTagAutocomplete"), x = Symbol("mergeTagSampleMode"), S = Symbol("useMergeTagSamples"), C = Symbol("resolvePreview"), w = Symbol("previewResolution"), T = Symbol("mergeTagPicker"), E = Symbol("logicTags"), D = Symbol("logicPairs"), O = Symbol("logicPicker"), k = Symbol("onRequestLogic"), A = Symbol("onRequestMedia"), j = Symbol("imageUrlResolver"), M = Symbol("displayConditions"), N = Symbol("allowCustomConditions"), P = Symbol("capabilities"), F = Symbol("keyboardReorder"), I = Symbol("templateLint"), L = Symbol("editorRoot"), R = Symbol("popoverRoot"), z = Symbol("savedBlocks"), B = Symbol("authManager"), V = Symbol("aiConfig"), H = Symbol("comments"), U = Symbol("scoring"), W = Symbol("cloudTranslations");
|
|
4
4
|
function G(t, n) {
|
|
@@ -9,4 +9,4 @@ function G(t, n) {
|
|
|
9
9
|
//#endregion
|
|
10
10
|
export { v as A, I as B, D as C, b as D, _ as E, R as F, G, t as H, w as I, C as L, A as M, y as N, T as O, p as P, z as R, F as S, O as T, l as U, c as V, S as W, L as _, i as a, m as b, P as c, H as d, a as f, n as g, M as h, B as i, k as j, x as k, W as l, g as m, N as n, u as o, f as p, o as r, d as s, V as t, h as u, s as v, E as w, j as x, r as y, U as z };
|
|
11
11
|
|
|
12
|
-
//# sourceMappingURL=keys-
|
|
12
|
+
//# sourceMappingURL=keys-Cmc2Yl3D.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys-DsoX52o_.js","names":[],"sources":["../../../src/keys.ts"],"sourcesContent":["import { inject, type InjectionKey, type ComputedRef, type Ref } from \"vue\";\nimport type {\n UseHistoryReturn,\n UseBlockActionsReturn,\n UseConditionPreviewReturn,\n} from \"@templatical/core\";\nimport type {\n BlockDefaults,\n CustomBlockDefinition,\n DisplayCondition,\n LogicPair,\n LogicTag,\n MergeTag,\n ResolvePreview,\n SyntaxPreset,\n} from \"@templatical/types\";\nimport type { Translations, CloudTranslations } from \"./i18n\";\nimport type {\n AuthManager,\n UseAiConfigReturn,\n UseCommentsReturn,\n UseTemplateScoringReturn,\n} from \"@templatical/core/cloud\";\nimport type { UseSavedBlocksReturn } from \"@templatical/core\";\nimport type { BaseEditorReturn } from \"./composables/useEditorCore\";\nimport type { ImageUrlResolver } from \"./composables/useImageUrlResolver\";\nimport type { UseFontsReturn } from \"./composables/useFonts\";\nimport type { UseBlockRegistryReturn } from \"./composables/useBlockRegistry\";\nimport type { UseKeyboardReorderReturn } from \"./composables/useKeyboardReorder\";\nimport type { EditorCapabilities } from \"./types/editor-capabilities\";\nimport type { OnRequestMedia } from \"./index\";\n\n// ---------------------------------------------------------------------------\n// Shared keys (provided by useEditorCore, consumed by all components)\n// ---------------------------------------------------------------------------\n\nexport const TRANSLATIONS_KEY: InjectionKey<Translations> =\n Symbol(\"translations\");\n\nexport const EDITOR_KEY: InjectionKey<BaseEditorReturn> = Symbol(\"editor\");\n\nexport const HISTORY_KEY: InjectionKey<UseHistoryReturn> = Symbol(\"history\");\n\nexport const BLOCK_ACTIONS_KEY: InjectionKey<UseBlockActionsReturn> =\n Symbol(\"blockActions\");\n\nexport const CONDITION_PREVIEW_KEY: InjectionKey<UseConditionPreviewReturn> =\n Symbol(\"conditionPreview\");\n\n/**\n * Whether the hand-toggled display-condition filter applies on this surface —\n * provided per-surface, exactly like `USE_MERGE_TAG_SAMPLES_KEY`, and for the\n * same reason: the rule folds in both `previewMode` and whether a resolver owns\n * the preview, so a component that re-derived it from `CONDITION_PREVIEW_KEY`\n * plus the editor's `previewMode` could get one half wrong on its own.\n *\n * Absent means \"applies\" — a surface with no provider filters as it always has.\n */\nexport const APPLIES_CONDITION_FILTER_KEY: InjectionKey<ComputedRef<boolean>> =\n Symbol(\"appliesConditionFilter\");\n\nexport const FONTS_MANAGER_KEY: InjectionKey<UseFontsReturn> =\n Symbol(\"fontsManager\");\n\nexport const THEME_STYLES_KEY: InjectionKey<\n ComputedRef<Record<string, string>>\n> = Symbol(\"themeStyles\");\n\nexport const UI_THEME_KEY: InjectionKey<ComputedRef<string>> =\n Symbol(\"tplUiTheme\");\n\nexport const BLOCK_DEFAULTS_KEY: InjectionKey<BlockDefaults | undefined> =\n Symbol(\"blockDefaults\");\n\nexport const BLOCK_REGISTRY_KEY: InjectionKey<UseBlockRegistryReturn> =\n Symbol(\"blockRegistry\");\n\nexport const CUSTOM_BLOCK_DEFINITIONS_KEY: InjectionKey<\n CustomBlockDefinition[]\n> = Symbol(\"customBlockDefinitions\");\n\n/**\n * Consumer-supplied block-palette allowlist + order (`config.paletteBlocks`).\n * `undefined` means the default full palette. Consumed by `Sidebar.vue`.\n */\nexport const PALETTE_BLOCKS_KEY: InjectionKey<string[] | undefined> =\n Symbol(\"paletteBlocks\");\n\n/**\n * Whether HTML blocks render a live sandboxed-iframe preview in the canvas\n * (`config.htmlBlockPreview`), normalized to a boolean. `false` (the default)\n * keeps the static placeholder card. Consumed by `HtmlBlock.vue`.\n */\nexport const HTML_BLOCK_PREVIEW_KEY: InjectionKey<boolean> =\n Symbol(\"htmlBlockPreview\");\n\n/**\n * Consumer-supplied color-picker palette (`config.colors`), normalized to\n * `{ presets, allowCustom, allowCustomIgnored }` by `resolveColorsConfig`.\n * Provided by `useEditorCore`, consumed by every `ColorPicker`. The inject\n * default (`DEFAULT_RESOLVED_COLORS` = `{ presets: [], allowCustom: true,\n * allowCustomIgnored: false }`) makes an unconfigured picker render exactly\n * as before.\n */\nexport const COLORS_KEY: InjectionKey<\n import(\"./utils/resolveColorsConfig\").ResolvedColors\n> = Symbol(\"colors\");\n\nexport const CUSTOM_BLOCK_STYLESHEETS_KEY: InjectionKey<ComputedRef<string[]>> =\n Symbol(\"customBlockStylesheets\");\n\nexport const MERGE_TAGS_KEY: InjectionKey<MergeTag[]> = Symbol(\"mergeTags\");\n\nexport const MERGE_TAG_SYNTAX_KEY: InjectionKey<SyntaxPreset> =\n Symbol(\"mergeTagSyntax\");\n\nexport const ON_REQUEST_MERGE_TAG_KEY: InjectionKey<\n (() => Promise<MergeTag | null>) | null\n> = Symbol(\"onRequestMergeTag\");\n\nexport const MERGE_TAG_AUTOCOMPLETE_KEY: InjectionKey<boolean> = Symbol(\n \"mergeTagAutocomplete\",\n);\n\n/**\n * The user's choice between the previews' two merge-tag views: `true` for\n * Sample (tags replaced by their `MergeTag.sample`, rendered as ordinary text)\n * and `false` for Label (tags shown as their label with the usual cue).\n *\n * Session state owned by `useEditorCore` and driven by a toggle that exists\n * only on preview surfaces. Defaults to Sample.\n */\nexport const MERGE_TAG_SAMPLE_MODE_KEY: InjectionKey<Ref<boolean>> =\n Symbol(\"mergeTagSampleMode\");\n\n/**\n * Whether **the current render surface** substitutes samples.\n *\n * Provided per surface rather than globally, and that is the whole point:\n * substitution must never happen while editing, so `Canvas.vue` folds in its\n * `previewMode` flag and provides `false` whenever the canvas is editable, no\n * matter what the mode ref says. Preview surfaces provide the mode directly.\n *\n * Block components inject **this** key. They must never read\n * `MERGE_TAG_SAMPLE_MODE_KEY`, which would bypass the editing guard.\n */\nexport const USE_MERGE_TAG_SAMPLES_KEY: InjectionKey<ComputedRef<boolean>> =\n Symbol(\"useMergeTagSamples\");\n\n/**\n * The `resolvePreview` seam — resolved content plus its loading and failure\n * state. Provided by `useEditorCore` so every preview surface shares one\n * lifecycle; `null` when the consumer configured no hook.\n *\n * Surfaces read `content` from here instead of `editor.content`, and gate the\n * Sample/Label toggle on `supersedesSamples`.\n */\n/**\n * The raw `config.resolvePreview` hook.\n *\n * Provided alongside PREVIEW_RESOLUTION_KEY because the test-email dialog needs\n * its **own** resolution instance — it resolves for the selected recipient,\n * which the editor's canvas has no notion of — and so cannot reuse the shared\n * one. `undefined` when the consumer configured no hook.\n */\nexport const RESOLVE_PREVIEW_KEY: InjectionKey<ResolvePreview | undefined> =\n Symbol(\"resolvePreview\");\n\nexport const PREVIEW_RESOLUTION_KEY: InjectionKey<\n import(\"./composables/usePreviewResolution\").UsePreviewResolutionReturn | null\n> = Symbol(\"previewResolution\");\n\n/**\n * Singleton state for the built-in merge tag picker modal. Provided by\n * `useEditorCore`, consumed by `useMergeTag.requestMergeTag()` (to open\n * the modal as a fall-through when only `mergeTags.tags` is configured)\n * and by `MergeTagPickerModal.vue` (to render and resolve).\n */\nexport const MERGE_TAG_PICKER_KEY: InjectionKey<\n import(\"./composables/useMergeTagPicker\").UseMergeTagPickerReturn\n> = Symbol(\"mergeTagPicker\");\n\n// ---------------------------------------------------------------------------\n// Logic tags — a standalone feature, separate from merge tags. Native\n// highlighting (LogicMergeTagNode) is always on; these drive the dedicated\n// logic picker + insertion.\n// ---------------------------------------------------------------------------\n\nexport const LOGIC_TAGS_KEY: InjectionKey<LogicTag[]> = Symbol(\"logicTags\");\n\nexport const LOGIC_PAIRS_KEY: InjectionKey<LogicPair[]> = Symbol(\"logicPairs\");\n\n/**\n * Singleton state for the built-in logic picker modal. Provided by\n * `useEditorCore`, consumed by `useLogicTag.requestLogicTag()` (to open the modal)\n * and by `LogicTagPickerModal.vue` (to render and resolve).\n */\nexport const LOGIC_TAG_PICKER_KEY: InjectionKey<\n import(\"./composables/useLogicTagPicker\").UseLogicTagPickerReturn\n> = Symbol(\"logicPicker\");\n\nexport const ON_REQUEST_LOGIC_TAG_KEY: InjectionKey<\n (() => Promise<LogicTag | LogicPair | null>) | null\n> = Symbol(\"onRequestLogic\");\n\nexport const ON_REQUEST_MEDIA_KEY: InjectionKey<OnRequestMedia | null> =\n Symbol(\"onRequestMedia\");\n\n/**\n * Per-editor display-only image URL resolver (`config.resolveImageUrl`),\n * wrapped with a per-src cache by `createImageUrlResolver`. `null` when the\n * host doesn't resolve — the canvas then displays canonical src values\n * verbatim. Consumed via `useResolvedImageSrc` in image-displaying blocks.\n */\nexport const IMAGE_URL_RESOLVER_KEY: InjectionKey<ImageUrlResolver | null> =\n Symbol(\"imageUrlResolver\");\n\nexport const DISPLAY_CONDITIONS_KEY: InjectionKey<DisplayCondition[]> =\n Symbol(\"displayConditions\");\n\nexport const ALLOW_CUSTOM_CONDITIONS_KEY: InjectionKey<boolean> = Symbol(\n \"allowCustomConditions\",\n);\n\nexport const CAPABILITIES_KEY: InjectionKey<EditorCapabilities> =\n Symbol(\"capabilities\");\n\nexport const KEYBOARD_REORDER_KEY: InjectionKey<UseKeyboardReorderReturn> =\n Symbol(\"keyboardReorder\");\n\nexport const TEMPLATE_LINT_KEY: InjectionKey<\n import(\"./composables/useTemplateLint\").UseTemplateLintReturn | null\n> = Symbol(\"templateLint\");\n\n/**\n * The editor's effective DOM root — `Document` in light-DOM mode, `ShadowRoot`\n * when `shadowDom: true`. Composables that read `document.activeElement`,\n * popup mount targets, etc. should inject this and use the root-aware API\n * (both `Document` and `ShadowRoot` expose `activeElement` etc.).\n */\nexport const EDITOR_ROOT_KEY: InjectionKey<Document | ShadowRoot> =\n Symbol(\"editorRoot\");\n\n/**\n * Mount target for popovers, toolbars, and modal dialogs that previously\n * teleported to `document.body`. Provided by `useEditorCore` as a ref bound\n * to a `<div class=\"tpl-popover-root\" />` rendered at the top level of the\n * editor template. Teleports use `:to=\"popoverRoot\"` so popups land inside\n * the editor's effective root — `document` in light-DOM mode, `ShadowRoot`\n * when `shadowDom: true` — instead of escaping the shadow boundary.\n *\n * Null until the editor's template mounts; consumers must guard with\n * `v-if=\"popoverRoot\"` before passing to `<Teleport>`.\n */\nexport const POPOVER_ROOT_KEY: InjectionKey<Ref<HTMLElement | null>> =\n Symbol(\"popoverRoot\");\n\n/**\n * Reactive saved-blocks state, provided by `useSavedBlocksFeature` when a\n * `SavedBlocksProvider` is configured. Shared by OSS and Cloud — the storage\n * transport lives behind the provider, so this key is not cloud-specific.\n */\nexport const SAVED_BLOCKS_KEY: InjectionKey<UseSavedBlocksReturn> =\n Symbol(\"savedBlocks\");\n\n// ---------------------------------------------------------------------------\n// Cloud-only keys (provided by CloudEditor, consumed by cloud components)\n// ---------------------------------------------------------------------------\n\nexport const AUTH_MANAGER_KEY: InjectionKey<AuthManager> =\n Symbol(\"authManager\");\n\nexport const AI_CONFIG_KEY: InjectionKey<UseAiConfigReturn> =\n Symbol(\"aiConfig\");\n\nexport const COMMENTS_KEY: InjectionKey<UseCommentsReturn> = Symbol(\"comments\");\n\nexport const SCORING_KEY: InjectionKey<UseTemplateScoringReturn> =\n Symbol(\"scoring\");\n\nexport const CLOUD_TRANSLATIONS_KEY: InjectionKey<CloudTranslations> =\n Symbol(\"cloudTranslations\");\n\n// ---------------------------------------------------------------------------\n// Helper for required injections with explicit null default + throw\n// ---------------------------------------------------------------------------\n\nexport function requireInject<T>(\n key: InjectionKey<T>,\n componentName: string,\n): T {\n const value = inject(key, null) as T | null;\n if (value === null || value === undefined) {\n throw new Error(\n `${componentName} requires a provider for ${key.description ?? \"unknown key\"}. Ensure it is a descendant of Editor or CloudEditor.`,\n );\n }\n return value;\n}\n"],"mappings":";;AAoCA,IAAa,IACX,OAAO,cAAc,GAEV,IAA6C,OAAO,QAAQ,GAE5D,IAA8C,OAAO,SAAS,GAE9D,IACX,OAAO,cAAc,GAEV,IACX,OAAO,kBAAkB,GAWd,IACX,OAAO,wBAAwB,GAEpB,IACX,OAAO,cAAc,GAEV,IAET,OAAO,aAAa,GAEX,IACX,OAAO,YAAY,GAER,IACX,OAAO,eAAe,GAEX,IACX,OAAO,eAAe,GAEX,IAET,OAAO,wBAAwB,GAMtB,IACX,OAAO,eAAe,GAOX,IACX,OAAO,kBAAkB,GAUd,IAET,OAAO,QAAQ,GAEN,IACX,OAAO,wBAAwB,GAEpB,IAA2C,OAAO,WAAW,GAE7D,IACX,OAAO,gBAAgB,GAEZ,IAET,OAAO,mBAAmB,GAEjB,IAAoD,OAC/D,sBACF,GAUa,IACX,OAAO,oBAAoB,GAahB,IACX,OAAO,oBAAoB,GAkBhB,IACX,OAAO,gBAAgB,GAEZ,IAET,OAAO,mBAAmB,GAQjB,IAET,OAAO,gBAAgB,GAQd,IAA2C,OAAO,WAAW,GAE7D,IAA6C,OAAO,YAAY,GAOhE,IAET,OAAO,aAAa,GAEX,IAET,OAAO,gBAAgB,GAEd,IACX,OAAO,gBAAgB,GAQZ,IACX,OAAO,kBAAkB,GAEd,IACX,OAAO,mBAAmB,GAEf,IAAqD,OAChE,uBACF,GAEa,IACX,OAAO,cAAc,GAEV,IACX,OAAO,iBAAiB,GAEb,IAET,OAAO,cAAc,GAQZ,IACX,OAAO,YAAY,GAaR,IACX,OAAO,aAAa,GAOT,IACX,OAAO,aAAa,GAMT,IACX,OAAO,aAAa,GAET,IACX,OAAO,UAAU,GAEN,IAAgD,OAAO,UAAU,GAEjE,IACX,OAAO,SAAS,GAEL,IACX,OAAO,mBAAmB;AAM5B,SAAgB,EACd,GACA,GACG;CACH,IAAM,IAAQ,EAAO,GAAK,IAAI;CAC9B,IAAI,KAAU,MACZ,MAAU,MACR,GAAG,EAAc,2BAA2B,EAAI,eAAe,cAAc,sDAC/E;CAEF,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"keys-Cmc2Yl3D.js","names":[],"sources":["../../../src/keys.ts"],"sourcesContent":["import { inject, type InjectionKey, type ComputedRef, type Ref } from \"vue\";\nimport type {\n UseHistoryReturn,\n UseBlockActionsReturn,\n UseConditionPreviewReturn,\n} from \"@templatical/core\";\nimport type {\n BlockDefaults,\n CustomBlockDefinition,\n DisplayCondition,\n LogicPair,\n LogicTag,\n MergeTag,\n ResolvePreview,\n SyntaxPreset,\n} from \"@templatical/types\";\nimport type { Translations, CloudTranslations } from \"./i18n\";\nimport type {\n AuthManager,\n UseAiConfigReturn,\n UseCommentsReturn,\n UseTemplateScoringReturn,\n} from \"@templatical/core/cloud\";\nimport type { UseSavedBlocksReturn } from \"@templatical/core\";\nimport type { BaseEditorReturn } from \"./composables/useEditorCore\";\nimport type { ImageUrlResolver } from \"./composables/useImageUrlResolver\";\nimport type { UseFontsReturn } from \"./composables/useFonts\";\nimport type { UseBlockRegistryReturn } from \"./composables/useBlockRegistry\";\nimport type { UseKeyboardReorderReturn } from \"./composables/useKeyboardReorder\";\nimport type { EditorCapabilities } from \"./types/editor-capabilities\";\nimport type { OnRequestMedia } from \"./index\";\n\n// ---------------------------------------------------------------------------\n// Shared keys (provided by useEditorCore, consumed by all components)\n// ---------------------------------------------------------------------------\n\nexport const TRANSLATIONS_KEY: InjectionKey<Translations> =\n Symbol(\"translations\");\n\nexport const EDITOR_KEY: InjectionKey<BaseEditorReturn> = Symbol(\"editor\");\n\nexport const HISTORY_KEY: InjectionKey<UseHistoryReturn> = Symbol(\"history\");\n\nexport const BLOCK_ACTIONS_KEY: InjectionKey<UseBlockActionsReturn> =\n Symbol(\"blockActions\");\n\nexport const CONDITION_PREVIEW_KEY: InjectionKey<UseConditionPreviewReturn> =\n Symbol(\"conditionPreview\");\n\n/**\n * Whether the hand-toggled display-condition filter applies on this surface —\n * provided per-surface, exactly like `USE_MERGE_TAG_SAMPLES_KEY`, and for the\n * same reason: the rule folds in both `previewMode` and whether a resolver owns\n * the preview, so a component that re-derived it from `CONDITION_PREVIEW_KEY`\n * plus the editor's `previewMode` could get one half wrong on its own.\n *\n * Absent means \"applies\" — a surface with no provider filters as it always has.\n */\nexport const APPLIES_CONDITION_FILTER_KEY: InjectionKey<ComputedRef<boolean>> =\n Symbol(\"appliesConditionFilter\");\n\nexport const FONTS_MANAGER_KEY: InjectionKey<UseFontsReturn> =\n Symbol(\"fontsManager\");\n\nexport const THEME_STYLES_KEY: InjectionKey<\n ComputedRef<Record<string, string>>\n> = Symbol(\"themeStyles\");\n\nexport const UI_THEME_KEY: InjectionKey<ComputedRef<string>> =\n Symbol(\"tplUiTheme\");\n\nexport const BLOCK_DEFAULTS_KEY: InjectionKey<BlockDefaults | undefined> =\n Symbol(\"blockDefaults\");\n\nexport const BLOCK_REGISTRY_KEY: InjectionKey<UseBlockRegistryReturn> =\n Symbol(\"blockRegistry\");\n\nexport const CUSTOM_BLOCK_DEFINITIONS_KEY: InjectionKey<\n CustomBlockDefinition[]\n> = Symbol(\"customBlockDefinitions\");\n\n/**\n * Consumer-supplied block-palette allowlist + order (`config.paletteBlocks`).\n * `undefined` means the default full palette. Consumed by `Sidebar.vue`.\n */\nexport const PALETTE_BLOCKS_KEY: InjectionKey<string[] | undefined> =\n Symbol(\"paletteBlocks\");\n\n/**\n * Whether HTML blocks render a live sandboxed-iframe preview in the canvas\n * (`config.htmlBlockPreview`), normalized to a boolean. `false` (the default)\n * keeps the static placeholder card. Consumed by `HtmlBlock.vue`.\n */\nexport const HTML_BLOCK_PREVIEW_KEY: InjectionKey<boolean> =\n Symbol(\"htmlBlockPreview\");\n\n/**\n * Consumer-supplied color-picker palette (`config.colors`), normalized to\n * `{ presets, allowCustom, allowCustomIgnored }` by `resolveColorsConfig`.\n * Provided by `useEditorCore`, consumed by every `ColorPicker`. The inject\n * default (`DEFAULT_RESOLVED_COLORS` = `{ presets: [], allowCustom: true,\n * allowCustomIgnored: false }`) makes an unconfigured picker render exactly\n * as before.\n */\nexport const COLORS_KEY: InjectionKey<\n import(\"./utils/resolveColorsConfig\").ResolvedColors\n> = Symbol(\"colors\");\n\nexport const CUSTOM_BLOCK_STYLESHEETS_KEY: InjectionKey<ComputedRef<string[]>> =\n Symbol(\"customBlockStylesheets\");\n\nexport const MERGE_TAGS_KEY: InjectionKey<MergeTag[]> = Symbol(\"mergeTags\");\n\nexport const MERGE_TAG_SYNTAX_KEY: InjectionKey<SyntaxPreset> =\n Symbol(\"mergeTagSyntax\");\n\nexport const ON_REQUEST_MERGE_TAG_KEY: InjectionKey<\n (() => Promise<MergeTag | null>) | null\n> = Symbol(\"onRequestMergeTag\");\n\nexport const MERGE_TAG_AUTOCOMPLETE_KEY: InjectionKey<boolean> = Symbol(\n \"mergeTagAutocomplete\",\n);\n\n/**\n * The user's choice between the previews' two merge-tag views: `true` for\n * Sample (tags replaced by their `MergeTag.sample`, rendered as ordinary text)\n * and `false` for Label (tags shown as their label with the usual cue).\n *\n * Session state owned by `useEditorCore` and driven by a toggle that exists\n * only on preview surfaces. Defaults to Sample.\n */\nexport const MERGE_TAG_SAMPLE_MODE_KEY: InjectionKey<Ref<boolean>> =\n Symbol(\"mergeTagSampleMode\");\n\n/**\n * Whether **the current render surface** substitutes samples.\n *\n * Provided per surface rather than globally, and that is the whole point:\n * substitution must never happen while editing, so `Canvas.vue` folds in its\n * `previewMode` flag and provides `false` whenever the canvas is editable, no\n * matter what the mode ref says. Preview surfaces provide the mode directly.\n *\n * Block components inject **this** key. They must never read\n * `MERGE_TAG_SAMPLE_MODE_KEY`, which would bypass the editing guard.\n */\nexport const USE_MERGE_TAG_SAMPLES_KEY: InjectionKey<ComputedRef<boolean>> =\n Symbol(\"useMergeTagSamples\");\n\n/**\n * The `resolvePreview` seam — resolved content plus its loading and failure\n * state. Provided by `useEditorCore` so every preview surface shares one\n * lifecycle; `null` when the consumer configured no hook.\n *\n * Surfaces read `content` from here instead of `editor.content`, and gate the\n * Sample/Label toggle on `supersedesSamples`.\n */\n/**\n * The raw `config.resolvePreview` hook.\n *\n * Provided alongside PREVIEW_RESOLUTION_KEY because the test-email dialog needs\n * its **own** resolution instance — it resolves for the selected recipient,\n * which the editor's canvas has no notion of — and so cannot reuse the shared\n * one. `undefined` when the consumer configured no hook.\n */\nexport const RESOLVE_PREVIEW_KEY: InjectionKey<ResolvePreview | undefined> =\n Symbol(\"resolvePreview\");\n\nexport const PREVIEW_RESOLUTION_KEY: InjectionKey<\n import(\"./composables/usePreviewResolution\").UsePreviewResolutionReturn | null\n> = Symbol(\"previewResolution\");\n\n/**\n * Singleton state for the built-in merge tag picker modal. Provided by\n * `useEditorCore`, consumed by `useMergeTag.requestMergeTag()` (to open\n * the modal as a fall-through when only `mergeTags.tags` is configured)\n * and by `MergeTagPickerModal.vue` (to render and resolve).\n */\nexport const MERGE_TAG_PICKER_KEY: InjectionKey<\n import(\"./composables/useMergeTagPicker\").UseMergeTagPickerReturn\n> = Symbol(\"mergeTagPicker\");\n\n// ---------------------------------------------------------------------------\n// Logic tags — a standalone feature, separate from merge tags. Native\n// highlighting (LogicMergeTagNode) is always on; these drive the dedicated\n// logic picker + insertion.\n// ---------------------------------------------------------------------------\n\nexport const LOGIC_TAGS_KEY: InjectionKey<LogicTag[]> = Symbol(\"logicTags\");\n\nexport const LOGIC_PAIRS_KEY: InjectionKey<LogicPair[]> = Symbol(\"logicPairs\");\n\n/**\n * Singleton state for the built-in logic picker modal. Provided by\n * `useEditorCore`, consumed by `useLogicTag.requestLogicTag()` (to open the modal)\n * and by `LogicTagPickerModal.vue` (to render and resolve).\n */\nexport const LOGIC_TAG_PICKER_KEY: InjectionKey<\n import(\"./composables/useLogicTagPicker\").UseLogicTagPickerReturn\n> = Symbol(\"logicPicker\");\n\nexport const ON_REQUEST_LOGIC_TAG_KEY: InjectionKey<\n (() => Promise<LogicTag | LogicPair | null>) | null\n> = Symbol(\"onRequestLogic\");\n\nexport const ON_REQUEST_MEDIA_KEY: InjectionKey<OnRequestMedia | null> =\n Symbol(\"onRequestMedia\");\n\n/**\n * Per-editor display-only image URL resolver (`config.resolveImageUrl`),\n * wrapped with a per-src cache by `createImageUrlResolver`. `null` when the\n * host doesn't resolve — the canvas then displays canonical src values\n * verbatim. Consumed via `useResolvedImageSrc` in image-displaying blocks.\n */\nexport const IMAGE_URL_RESOLVER_KEY: InjectionKey<ImageUrlResolver | null> =\n Symbol(\"imageUrlResolver\");\n\nexport const DISPLAY_CONDITIONS_KEY: InjectionKey<DisplayCondition[]> =\n Symbol(\"displayConditions\");\n\nexport const ALLOW_CUSTOM_CONDITIONS_KEY: InjectionKey<boolean> = Symbol(\n \"allowCustomConditions\",\n);\n\nexport const CAPABILITIES_KEY: InjectionKey<EditorCapabilities> =\n Symbol(\"capabilities\");\n\nexport const KEYBOARD_REORDER_KEY: InjectionKey<UseKeyboardReorderReturn> =\n Symbol(\"keyboardReorder\");\n\nexport const TEMPLATE_LINT_KEY: InjectionKey<\n import(\"./composables/useTemplateLint\").UseTemplateLintReturn | null\n> = Symbol(\"templateLint\");\n\n/**\n * The editor's effective DOM root — `Document` in light-DOM mode, `ShadowRoot`\n * when `shadowDom: true`. Composables that read `document.activeElement`,\n * popup mount targets, etc. should inject this and use the root-aware API\n * (both `Document` and `ShadowRoot` expose `activeElement` etc.).\n */\nexport const EDITOR_ROOT_KEY: InjectionKey<Document | ShadowRoot> =\n Symbol(\"editorRoot\");\n\n/**\n * Mount target for popovers, toolbars, and modal dialogs that previously\n * teleported to `document.body`. Provided by `useEditorCore` as a ref bound\n * to a `<div class=\"tpl-popover-root\" />` rendered at the top level of the\n * editor template. Teleports use `:to=\"popoverRoot\"` so popups land inside\n * the editor's effective root — `document` in light-DOM mode, `ShadowRoot`\n * when `shadowDom: true` — instead of escaping the shadow boundary.\n *\n * Null until the editor's template mounts; consumers must guard with\n * `v-if=\"popoverRoot\"` before passing to `<Teleport>`.\n */\nexport const POPOVER_ROOT_KEY: InjectionKey<Ref<HTMLElement | null>> =\n Symbol(\"popoverRoot\");\n\n/**\n * Reactive saved-blocks state, provided by `useSavedBlocksFeature` when a\n * `SavedBlocksProvider` is configured. Shared by OSS and Cloud — the storage\n * transport lives behind the provider, so this key is not cloud-specific.\n */\nexport const SAVED_BLOCKS_KEY: InjectionKey<UseSavedBlocksReturn> =\n Symbol(\"savedBlocks\");\n\n// ---------------------------------------------------------------------------\n// Cloud-only keys (provided by CloudEditor, consumed by cloud components)\n// ---------------------------------------------------------------------------\n\nexport const AUTH_MANAGER_KEY: InjectionKey<AuthManager> =\n Symbol(\"authManager\");\n\nexport const AI_CONFIG_KEY: InjectionKey<UseAiConfigReturn> =\n Symbol(\"aiConfig\");\n\nexport const COMMENTS_KEY: InjectionKey<UseCommentsReturn> = Symbol(\"comments\");\n\nexport const SCORING_KEY: InjectionKey<UseTemplateScoringReturn> =\n Symbol(\"scoring\");\n\nexport const CLOUD_TRANSLATIONS_KEY: InjectionKey<CloudTranslations> =\n Symbol(\"cloudTranslations\");\n\n// ---------------------------------------------------------------------------\n// Helper for required injections with explicit null default + throw\n// ---------------------------------------------------------------------------\n\nexport function requireInject<T>(\n key: InjectionKey<T>,\n componentName: string,\n): T {\n const value = inject(key, null) as T | null;\n if (value === null || value === undefined) {\n throw new Error(\n `${componentName} requires a provider for ${key.description ?? \"unknown key\"}. Ensure it is a descendant of Editor or CloudEditor.`,\n );\n }\n return value;\n}\n"],"mappings":";;AAoCA,IAAa,IACX,OAAO,cAAc,GAEV,IAA6C,OAAO,QAAQ,GAE5D,IAA8C,OAAO,SAAS,GAE9D,IACX,OAAO,cAAc,GAEV,IACX,OAAO,kBAAkB,GAWd,IACX,OAAO,wBAAwB,GAEpB,IACX,OAAO,cAAc,GAEV,IAET,OAAO,aAAa,GAEX,IACX,OAAO,YAAY,GAER,IACX,OAAO,eAAe,GAEX,IACX,OAAO,eAAe,GAEX,IAET,OAAO,wBAAwB,GAMtB,IACX,OAAO,eAAe,GAOX,IACX,OAAO,kBAAkB,GAUd,IAET,OAAO,QAAQ,GAEN,IACX,OAAO,wBAAwB,GAEpB,IAA2C,OAAO,WAAW,GAE7D,IACX,OAAO,gBAAgB,GAEZ,IAET,OAAO,mBAAmB,GAEjB,IAAoD,OAC/D,sBACF,GAUa,IACX,OAAO,oBAAoB,GAahB,IACX,OAAO,oBAAoB,GAkBhB,IACX,OAAO,gBAAgB,GAEZ,IAET,OAAO,mBAAmB,GAQjB,IAET,OAAO,gBAAgB,GAQd,IAA2C,OAAO,WAAW,GAE7D,IAA6C,OAAO,YAAY,GAOhE,IAET,OAAO,aAAa,GAEX,IAET,OAAO,gBAAgB,GAEd,IACX,OAAO,gBAAgB,GAQZ,IACX,OAAO,kBAAkB,GAEd,IACX,OAAO,mBAAmB,GAEf,IAAqD,OAChE,uBACF,GAEa,IACX,OAAO,cAAc,GAEV,IACX,OAAO,iBAAiB,GAEb,IAET,OAAO,cAAc,GAQZ,IACX,OAAO,YAAY,GAaR,IACX,OAAO,aAAa,GAOT,IACX,OAAO,aAAa,GAMT,IACX,OAAO,aAAa,GAET,IACX,OAAO,UAAU,GAEN,IAAgD,OAAO,UAAU,GAEjE,IACX,OAAO,SAAS,GAEL,IACX,OAAO,mBAAmB;AAM5B,SAAgB,EACd,GACA,GACG;CACH,IAAM,IAAQ,EAAO,GAAK,IAAI;CAC9B,IAAI,KAAU,MACZ,MAAU,MACR,GAAG,EAAc,2BAA2B,EAAI,eAAe,cAAc,sDAC/E;CAEF,OAAO;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/liquidjs@10.
|
|
1
|
+
//#region ../../node_modules/.pnpm/liquidjs@10.29.0/node_modules/liquidjs/dist/liquid.browser.mjs
|
|
2
2
|
var e = class {
|
|
3
3
|
constructor(e, t, n, r, i) {
|
|
4
4
|
this.kind = e, this.input = t, this.begin = n, this.end = r, this.file = i;
|
|
@@ -2514,29 +2514,33 @@ function ki(e) {
|
|
|
2514
2514
|
return this.context.memoryLimit.use(t.length), t.replace(/\r?\n/gm, "");
|
|
2515
2515
|
}
|
|
2516
2516
|
function Ai(e) {
|
|
2517
|
+
let t = l(e);
|
|
2518
|
+
return this.context.memoryLimit.use(t.length), t.replace(/\s+/g, " ").trim();
|
|
2519
|
+
}
|
|
2520
|
+
function ji(e) {
|
|
2517
2521
|
return e = l(e), this.context.memoryLimit.use(e.length), e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
2518
2522
|
}
|
|
2519
|
-
function
|
|
2523
|
+
function Mi(e, t, n) {
|
|
2520
2524
|
let r = l(e);
|
|
2521
2525
|
t = l(t), n = l(n);
|
|
2522
2526
|
let i = r.split(t), a = r.length + (i.length - 1) * (n.length - t.length);
|
|
2523
2527
|
return this.context.memoryLimit.use(a), i.join(n);
|
|
2524
2528
|
}
|
|
2525
|
-
function
|
|
2529
|
+
function Ni(e, t, n) {
|
|
2526
2530
|
let r = l(e);
|
|
2527
2531
|
return t = l(t), n = l(n), this.context.memoryLimit.use(r.length + t.length + n.length), r.replace(t, () => n);
|
|
2528
2532
|
}
|
|
2529
|
-
function
|
|
2533
|
+
function Pi(e, t, n) {
|
|
2530
2534
|
let r = l(e), i = l(t), a = l(n);
|
|
2531
2535
|
this.context.memoryLimit.use(r.length + i.length + a.length);
|
|
2532
2536
|
let o = r.lastIndexOf(i);
|
|
2533
2537
|
return o === -1 ? r : r.substring(0, o) + a + r.substring(o + i.length);
|
|
2534
2538
|
}
|
|
2535
|
-
function
|
|
2539
|
+
function Fi(e, t = 50, n = "...") {
|
|
2536
2540
|
let r = l(e);
|
|
2537
2541
|
return n = l(n), this.context.memoryLimit.use(r.length + n.length), r.length <= t ? e : r.substring(0, t - n.length) + n;
|
|
2538
2542
|
}
|
|
2539
|
-
function
|
|
2543
|
+
function Ii(e, t = 15, n = "...") {
|
|
2540
2544
|
let r = l(e);
|
|
2541
2545
|
n = l(n), this.context.memoryLimit.use(r.length + n.length);
|
|
2542
2546
|
let i = r.split(/\s+/);
|
|
@@ -2544,11 +2548,11 @@ function Fi(e, t = 15, n = "...") {
|
|
|
2544
2548
|
let a = i.slice(0, t).join(" ");
|
|
2545
2549
|
return i.length >= t && (a += n), a;
|
|
2546
2550
|
}
|
|
2547
|
-
function
|
|
2551
|
+
function Li(e) {
|
|
2548
2552
|
let t = l(e);
|
|
2549
2553
|
return this.context.memoryLimit.use(t.length), t.replace(/\s+/g, " ");
|
|
2550
2554
|
}
|
|
2551
|
-
function
|
|
2555
|
+
function Ri(e, t) {
|
|
2552
2556
|
let n = l(e);
|
|
2553
2557
|
if (this.context.memoryLimit.use(n.length), e = n.trim(), !e) return 0;
|
|
2554
2558
|
switch (t) {
|
|
@@ -2557,7 +2561,7 @@ function Li(e, t) {
|
|
|
2557
2561
|
default: return e.split(/\s+/).length;
|
|
2558
2562
|
}
|
|
2559
2563
|
}
|
|
2560
|
-
function
|
|
2564
|
+
function zi(e, t = "and") {
|
|
2561
2565
|
t = l(t);
|
|
2562
2566
|
let n = t.length + e.length * 2;
|
|
2563
2567
|
for (let t = 0; t < e.length; t++) n += l(e[t]).length;
|
|
@@ -2568,7 +2572,7 @@ function Ri(e, t = "and") {
|
|
|
2568
2572
|
default: return `${e.slice(0, -1).join(", ")}, ${t} ${e[e.length - 1]}`;
|
|
2569
2573
|
}
|
|
2570
2574
|
}
|
|
2571
|
-
var
|
|
2575
|
+
var Bi = /*#__PURE__*/ Object.freeze({
|
|
2572
2576
|
__proto__: null,
|
|
2573
2577
|
append: vi,
|
|
2574
2578
|
prepend: yi,
|
|
@@ -2582,69 +2586,70 @@ var zi = /*#__PURE__*/ Object.freeze({
|
|
|
2582
2586
|
split: Di,
|
|
2583
2587
|
strip: Oi,
|
|
2584
2588
|
strip_newlines: ki,
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2589
|
+
squish: Ai,
|
|
2590
|
+
capitalize: ji,
|
|
2591
|
+
replace: Mi,
|
|
2592
|
+
replace_first: Ni,
|
|
2593
|
+
replace_last: Pi,
|
|
2594
|
+
truncate: Fi,
|
|
2595
|
+
truncatewords: Ii,
|
|
2596
|
+
normalize_whitespace: Li,
|
|
2597
|
+
number_of_words: Ri,
|
|
2598
|
+
array_to_sentence_string: zi
|
|
2594
2599
|
});
|
|
2595
|
-
function
|
|
2600
|
+
function Vi(e) {
|
|
2596
2601
|
return btoa(String.fromCharCode(...new TextEncoder().encode(e)));
|
|
2597
2602
|
}
|
|
2598
|
-
function
|
|
2603
|
+
function Hi(e) {
|
|
2599
2604
|
return new TextDecoder().decode(Uint8Array.from(atob(e), (e) => e.charCodeAt(0)));
|
|
2600
2605
|
}
|
|
2601
|
-
function
|
|
2606
|
+
function Ui(e) {
|
|
2602
2607
|
if (typeof Buffer < "u" && Buffer.isBuffer(e)) return this.context.memoryLimit.use(e.byteLength), e.toString("base64");
|
|
2603
2608
|
let t = l(e);
|
|
2604
|
-
return this.context.memoryLimit.use(t.length),
|
|
2609
|
+
return this.context.memoryLimit.use(t.length), Vi(t);
|
|
2605
2610
|
}
|
|
2606
|
-
function
|
|
2611
|
+
function Wi(e) {
|
|
2607
2612
|
let t = l(e);
|
|
2608
|
-
return this.context.memoryLimit.use(t.length),
|
|
2613
|
+
return this.context.memoryLimit.use(t.length), Hi(t);
|
|
2609
2614
|
}
|
|
2610
|
-
var
|
|
2615
|
+
var Gi = /*#__PURE__*/ Object.freeze({
|
|
2611
2616
|
__proto__: null,
|
|
2612
|
-
base64_encode:
|
|
2613
|
-
base64_decode:
|
|
2617
|
+
base64_encode: Ui,
|
|
2618
|
+
base64_decode: Wi
|
|
2614
2619
|
});
|
|
2615
|
-
function
|
|
2620
|
+
function Ki(e) {
|
|
2616
2621
|
let t = new Uint8Array(e), n = "";
|
|
2617
2622
|
for (let e = 0; e < t.length; e++) n += t[e].toString(16).padStart(2, "0");
|
|
2618
2623
|
return n;
|
|
2619
2624
|
}
|
|
2620
|
-
function
|
|
2625
|
+
function qi(e) {
|
|
2621
2626
|
return T(this, void 0, void 0, function* () {
|
|
2622
2627
|
let t = new TextEncoder().encode(e);
|
|
2623
|
-
return
|
|
2628
|
+
return Ki(yield crypto.subtle.digest("SHA-256", t));
|
|
2624
2629
|
});
|
|
2625
2630
|
}
|
|
2626
|
-
function
|
|
2631
|
+
function Ji(e, t) {
|
|
2627
2632
|
return T(this, void 0, void 0, function* () {
|
|
2628
2633
|
let n = new TextEncoder(), r = yield crypto.subtle.importKey("raw", n.encode(t), {
|
|
2629
2634
|
name: "HMAC",
|
|
2630
2635
|
hash: "SHA-256"
|
|
2631
2636
|
}, !1, ["sign"]);
|
|
2632
|
-
return
|
|
2637
|
+
return Ki(yield crypto.subtle.sign("HMAC", r, n.encode(e)));
|
|
2633
2638
|
});
|
|
2634
2639
|
}
|
|
2635
|
-
function
|
|
2640
|
+
function Yi(e) {
|
|
2636
2641
|
let t = l(e);
|
|
2637
|
-
return this.context.memoryLimit.use(t.length),
|
|
2642
|
+
return this.context.memoryLimit.use(t.length), qi(t);
|
|
2638
2643
|
}
|
|
2639
|
-
function
|
|
2644
|
+
function Xi(e, t) {
|
|
2640
2645
|
let n = l(e), r = l(t);
|
|
2641
|
-
return this.context.memoryLimit.use(n.length + r.length),
|
|
2646
|
+
return this.context.memoryLimit.use(n.length + r.length), Ji(n, r);
|
|
2642
2647
|
}
|
|
2643
|
-
var
|
|
2648
|
+
var Zi = /*#__PURE__*/ Object.freeze({
|
|
2644
2649
|
__proto__: null,
|
|
2645
|
-
sha256:
|
|
2646
|
-
hmac_sha256:
|
|
2647
|
-
}),
|
|
2650
|
+
sha256: Yi,
|
|
2651
|
+
hmac_sha256: Xi
|
|
2652
|
+
}), Qi = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, xn), hr), wr), si), hi), Bi), Gi), Zi), pn), $i = class extends R {
|
|
2648
2653
|
constructor(e, t, n) {
|
|
2649
2654
|
super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.key = this.identifier.content, this.tokenizer.assert(this.key, "expected variable name"), this.tokenizer.skipBlank(), this.tokenizer.assert(this.tokenizer.peek() === "=", "expected \"=\""), this.tokenizer.advance(), this.value = new B(this.tokenizer.readFilteredValue(), this.liquid);
|
|
2650
2655
|
}
|
|
@@ -2657,11 +2662,11 @@ var Xi = /*#__PURE__*/ Object.freeze({
|
|
|
2657
2662
|
*localScope() {
|
|
2658
2663
|
yield this.identifier;
|
|
2659
2664
|
}
|
|
2660
|
-
},
|
|
2665
|
+
}, ea = [
|
|
2661
2666
|
"offset",
|
|
2662
2667
|
"limit",
|
|
2663
2668
|
"reversed"
|
|
2664
|
-
],
|
|
2669
|
+
], ta = class extends R {
|
|
2665
2670
|
constructor(e, t, n, r) {
|
|
2666
2671
|
super(e, t, n);
|
|
2667
2672
|
let i = this.tokenizer.readIdentifier(), a = this.tokenizer.readIdentifier(), o = this.tokenizer.readValue();
|
|
@@ -2685,7 +2690,7 @@ var Xi = /*#__PURE__*/ Object.freeze({
|
|
|
2685
2690
|
let i = "continue-" + this.variable + "-" + this.collection.getText();
|
|
2686
2691
|
e.push(Z({ continue: e.getRegister(i, {}) }));
|
|
2687
2692
|
let a = yield this.hash.render(e);
|
|
2688
|
-
e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(a).filter((e) =>
|
|
2693
|
+
e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(a).filter((e) => ea.includes(e)) : ea.filter((e) => a[e] !== void 0)).reduce((e, t) => t === "offset" ? ra(e, a.offset) : t === "limit" ? ia(e, a.limit) : na(e), r), e.setRegister(i, (a.offset || 0) + r.length);
|
|
2689
2694
|
let o = Z({ forloop: new Re(r.length, this.collection.getText(), this.variable) });
|
|
2690
2695
|
e.push(o);
|
|
2691
2696
|
for (let i of r) {
|
|
@@ -2706,16 +2711,16 @@ var Xi = /*#__PURE__*/ Object.freeze({
|
|
|
2706
2711
|
return [this.variable, "forloop"];
|
|
2707
2712
|
}
|
|
2708
2713
|
};
|
|
2709
|
-
function
|
|
2714
|
+
function na(e) {
|
|
2710
2715
|
return [...e].reverse();
|
|
2711
2716
|
}
|
|
2712
|
-
function
|
|
2717
|
+
function ra(e, t) {
|
|
2713
2718
|
return e.slice(t);
|
|
2714
2719
|
}
|
|
2715
|
-
function
|
|
2720
|
+
function ia(e, t) {
|
|
2716
2721
|
return e.slice(0, t);
|
|
2717
2722
|
}
|
|
2718
|
-
var
|
|
2723
|
+
var aa = class extends R {
|
|
2719
2724
|
constructor(e, t, n, r) {
|
|
2720
2725
|
for (super(e, t, n), this.templates = [], this.identifier = this.readVariable(), this.variable = this.identifier.content; t.length;) {
|
|
2721
2726
|
let e = t.shift();
|
|
@@ -2739,7 +2744,7 @@ var ia = class extends R {
|
|
|
2739
2744
|
*localScope() {
|
|
2740
2745
|
yield this.identifier;
|
|
2741
2746
|
}
|
|
2742
|
-
},
|
|
2747
|
+
}, oa = class extends R {
|
|
2743
2748
|
constructor(e, t, n, r) {
|
|
2744
2749
|
super(e, t, n), this.branches = [], this.elseTemplates = [], this.value = new B(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
|
|
2745
2750
|
let i = [], a = 0, o = r.parseStream(t).on("tag:when", (e) => {
|
|
@@ -2775,7 +2780,7 @@ var ia = class extends R {
|
|
|
2775
2780
|
let e = this.branches.flatMap((e) => e.templates);
|
|
2776
2781
|
return this.elseTemplates && e.push(...this.elseTemplates), e;
|
|
2777
2782
|
}
|
|
2778
|
-
},
|
|
2783
|
+
}, sa = class extends R {
|
|
2779
2784
|
constructor(e, t, n) {
|
|
2780
2785
|
for (super(e, t, n); t.length;) {
|
|
2781
2786
|
let e = t.shift();
|
|
@@ -2784,11 +2789,11 @@ var ia = class extends R {
|
|
|
2784
2789
|
throw Error(`tag ${e.getText()} not closed`);
|
|
2785
2790
|
}
|
|
2786
2791
|
render() {}
|
|
2787
|
-
},
|
|
2792
|
+
}, ca = class extends R {
|
|
2788
2793
|
constructor(e, t, n, r) {
|
|
2789
2794
|
super(e, t, n);
|
|
2790
2795
|
let i = this.tokenizer;
|
|
2791
|
-
for (this.file =
|
|
2796
|
+
for (this.file = la(i, this.liquid, r), this.currentFile = e.file; !i.end();) {
|
|
2792
2797
|
i.skipBlank();
|
|
2793
2798
|
let e = i.p, t = i.readIdentifier();
|
|
2794
2799
|
if ((t.content === "with" || t.content === "for") && (i.skipBlank(), i.peek() !== ":")) {
|
|
@@ -2810,7 +2815,7 @@ var ia = class extends R {
|
|
|
2810
2815
|
this.hash = new z(i, n.options.keyValueSeparator);
|
|
2811
2816
|
}
|
|
2812
2817
|
*render(e, t) {
|
|
2813
|
-
let { liquid: n, hash: r } = this, i = yield
|
|
2818
|
+
let { liquid: n, hash: r } = this, i = yield da(this.file, e, n);
|
|
2814
2819
|
C(i, () => `illegal file path "${i}"`);
|
|
2815
2820
|
let a = e.spawn(), o = a.bottom();
|
|
2816
2821
|
if (qe(o, yield r.render(e)), this.with) {
|
|
@@ -2863,30 +2868,30 @@ var ia = class extends R {
|
|
|
2863
2868
|
}
|
|
2864
2869
|
}
|
|
2865
2870
|
};
|
|
2866
|
-
function
|
|
2871
|
+
function la(e, t, n) {
|
|
2867
2872
|
if (t.options.dynamicPartials) {
|
|
2868
2873
|
let t = e.readValue();
|
|
2869
|
-
return e.assert(t, "illegal file path"), t.getText() === "none" ? void 0 : Jn(t) ?
|
|
2874
|
+
return e.assert(t, "illegal file path"), t.getText() === "none" ? void 0 : Jn(t) ? ua(n.parse(Gt(t))) : t;
|
|
2870
2875
|
}
|
|
2871
|
-
let r = [...e.readFileNameTemplate(t.options)], i =
|
|
2876
|
+
let r = [...e.readFileNameTemplate(t.options)], i = ua(n.parseTokens(r));
|
|
2872
2877
|
return i === "none" ? void 0 : i;
|
|
2873
2878
|
}
|
|
2874
|
-
function
|
|
2879
|
+
function ua(e) {
|
|
2875
2880
|
return e.length === 1 && Kn(e[0].token) ? e[0].token.getContent() : e;
|
|
2876
2881
|
}
|
|
2877
|
-
function*
|
|
2882
|
+
function* da(e, t, n) {
|
|
2878
2883
|
return typeof e == "string" ? e : Array.isArray(e) ? n.renderer.renderTemplates(e, t) : yield A(e, t);
|
|
2879
2884
|
}
|
|
2880
|
-
var
|
|
2885
|
+
var fa = class extends R {
|
|
2881
2886
|
constructor(e, t, n, r) {
|
|
2882
2887
|
super(e, t, n);
|
|
2883
2888
|
let { tokenizer: i } = e;
|
|
2884
|
-
this.file =
|
|
2889
|
+
this.file = la(i, this.liquid, r), this.currentFile = e.file;
|
|
2885
2890
|
let a = i.p;
|
|
2886
2891
|
i.readIdentifier().content === "with" ? (i.skipBlank(), i.peek() === ":" ? i.p = a : this.withVar = i.readValue()) : i.p = a, this.hash = new z(i, n.options.jekyllInclude || n.options.keyValueSeparator);
|
|
2887
2892
|
}
|
|
2888
2893
|
*render(e, t) {
|
|
2889
|
-
let { liquid: n, hash: r, withVar: i } = this, { renderer: a } = n, o = yield
|
|
2894
|
+
let { liquid: n, hash: r, withVar: i } = this, { renderer: a } = n, o = yield da(this.file, e, n);
|
|
2890
2895
|
C(o, () => `illegal file path "${o}"`);
|
|
2891
2896
|
let s = e.saveRegister("blocks", "blockMode");
|
|
2892
2897
|
e.setRegister("blocks", {}), e.setRegister("blockMode", $.OUTPUT);
|
|
@@ -2911,7 +2916,7 @@ var da = class extends R {
|
|
|
2911
2916
|
*arguments() {
|
|
2912
2917
|
yield* Object.values(this.hash.hash).filter(Y), Y(this.file) && (yield this.file), Y(this.withVar) && (yield this.withVar);
|
|
2913
2918
|
}
|
|
2914
|
-
},
|
|
2919
|
+
}, pa = class extends R {
|
|
2915
2920
|
constructor(e, t, n) {
|
|
2916
2921
|
super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
|
|
2917
2922
|
}
|
|
@@ -2922,7 +2927,7 @@ var da = class extends R {
|
|
|
2922
2927
|
*localScope() {
|
|
2923
2928
|
yield this.identifier;
|
|
2924
2929
|
}
|
|
2925
|
-
},
|
|
2930
|
+
}, ma = class extends R {
|
|
2926
2931
|
constructor(e, t, n) {
|
|
2927
2932
|
super(e, t, n), this.candidates = [];
|
|
2928
2933
|
let r = this.tokenizer.readValue();
|
|
@@ -2941,7 +2946,7 @@ var da = class extends R {
|
|
|
2941
2946
|
*arguments() {
|
|
2942
2947
|
yield* this.candidates, this.group && (yield this.group);
|
|
2943
2948
|
}
|
|
2944
|
-
},
|
|
2949
|
+
}, ha = class extends R {
|
|
2945
2950
|
constructor(e, t, n, r) {
|
|
2946
2951
|
super(e, t, n), this.branches = [];
|
|
2947
2952
|
let i = [];
|
|
@@ -2976,7 +2981,7 @@ var da = class extends R {
|
|
|
2976
2981
|
arguments() {
|
|
2977
2982
|
return this.branches.map((e) => e.value);
|
|
2978
2983
|
}
|
|
2979
|
-
},
|
|
2984
|
+
}, ga = class extends R {
|
|
2980
2985
|
constructor(e, t, n) {
|
|
2981
2986
|
super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
|
|
2982
2987
|
}
|
|
@@ -2989,9 +2994,9 @@ var da = class extends R {
|
|
|
2989
2994
|
*localScope() {
|
|
2990
2995
|
yield this.identifier;
|
|
2991
2996
|
}
|
|
2992
|
-
},
|
|
2997
|
+
}, _a = class extends R {
|
|
2993
2998
|
constructor(e, t, n, r) {
|
|
2994
|
-
super(e, t, n), this.file =
|
|
2999
|
+
super(e, t, n), this.file = la(this.tokenizer, this.liquid, r), this.currentFile = e.file, this.args = new z(this.tokenizer, n.options.keyValueSeparator), this.templates = r.parseTokens(t);
|
|
2995
3000
|
}
|
|
2996
3001
|
*render(e, t) {
|
|
2997
3002
|
let { liquid: n, args: r, file: i } = this, { renderer: a } = n;
|
|
@@ -2999,7 +3004,7 @@ var da = class extends R {
|
|
|
2999
3004
|
e.setRegister("blockMode", $.OUTPUT), yield a.renderTemplates(this.templates, e, t);
|
|
3000
3005
|
return;
|
|
3001
3006
|
}
|
|
3002
|
-
let o = yield
|
|
3007
|
+
let o = yield da(this.file, e, n);
|
|
3003
3008
|
C(o, () => `illegal file path "${o}"`);
|
|
3004
3009
|
let s = yield n._parseLayoutFile(o, e.sync, this.currentFile);
|
|
3005
3010
|
e.setRegister("blockMode", $.STORE);
|
|
@@ -3021,7 +3026,7 @@ var da = class extends R {
|
|
|
3021
3026
|
scope: Object.keys(this.args.hash)
|
|
3022
3027
|
};
|
|
3023
3028
|
}
|
|
3024
|
-
},
|
|
3029
|
+
}, va = class extends R {
|
|
3025
3030
|
constructor(e, t, n, r) {
|
|
3026
3031
|
super(e, t, n), this.templates = [];
|
|
3027
3032
|
let i = /\w+/.exec(e.args);
|
|
@@ -3051,7 +3056,7 @@ var da = class extends R {
|
|
|
3051
3056
|
blockScope() {
|
|
3052
3057
|
return ["block"];
|
|
3053
3058
|
}
|
|
3054
|
-
},
|
|
3059
|
+
}, ya = class extends R {
|
|
3055
3060
|
constructor(e, t, n) {
|
|
3056
3061
|
for (super(e, t, n), this.tokens = []; t.length;) {
|
|
3057
3062
|
let e = t.shift();
|
|
@@ -3063,7 +3068,7 @@ var da = class extends R {
|
|
|
3063
3068
|
render() {
|
|
3064
3069
|
return this.tokens.map((e) => e.getText()).join("");
|
|
3065
3070
|
}
|
|
3066
|
-
},
|
|
3071
|
+
}, ba = class extends Re {
|
|
3067
3072
|
constructor(e, t, n, r) {
|
|
3068
3073
|
super(e, n, r), this.length = e, this.cols = t;
|
|
3069
3074
|
}
|
|
@@ -3082,21 +3087,21 @@ var da = class extends R {
|
|
|
3082
3087
|
col_last() {
|
|
3083
3088
|
return this.col() === this.cols;
|
|
3084
3089
|
}
|
|
3085
|
-
},
|
|
3086
|
-
assign:
|
|
3087
|
-
for:
|
|
3088
|
-
capture:
|
|
3089
|
-
case:
|
|
3090
|
-
comment:
|
|
3091
|
-
include:
|
|
3092
|
-
render:
|
|
3093
|
-
decrement:
|
|
3094
|
-
increment:
|
|
3095
|
-
cycle:
|
|
3096
|
-
if:
|
|
3097
|
-
layout:
|
|
3098
|
-
block:
|
|
3099
|
-
raw:
|
|
3090
|
+
}, xa = {
|
|
3091
|
+
assign: $i,
|
|
3092
|
+
for: ta,
|
|
3093
|
+
capture: aa,
|
|
3094
|
+
case: oa,
|
|
3095
|
+
comment: sa,
|
|
3096
|
+
include: fa,
|
|
3097
|
+
render: ca,
|
|
3098
|
+
decrement: pa,
|
|
3099
|
+
increment: ga,
|
|
3100
|
+
cycle: ma,
|
|
3101
|
+
if: ha,
|
|
3102
|
+
layout: _a,
|
|
3103
|
+
block: va,
|
|
3104
|
+
raw: ya,
|
|
3100
3105
|
tablerow: class extends R {
|
|
3101
3106
|
constructor(e, t, n, r) {
|
|
3102
3107
|
super(e, t, n);
|
|
@@ -3113,7 +3118,7 @@ var da = class extends R {
|
|
|
3113
3118
|
*render(e, t) {
|
|
3114
3119
|
let n = d(yield A(this.collection, e)), r = yield this.args.render(e), i = r.offset || 0;
|
|
3115
3120
|
n = n.slice(i, i + (r.limit === void 0 ? n.length : r.limit));
|
|
3116
|
-
let a = r.cols || n.length, o = this.liquid.renderer, s = new
|
|
3121
|
+
let a = r.cols || n.length, o = this.liquid.renderer, s = new ba(n.length, a, this.collection.getText(), this.variable), c = Z({ tablerowloop: s });
|
|
3117
3122
|
e.push(c);
|
|
3118
3123
|
for (let r = 0; r < n.length; r++, s.next()) c[this.variable] = n[r], s.col0() === 0 && (s.row() !== 1 && t.write("</tr>"), t.write(`<tr class="row${s.row()}">`)), t.write(`<td class="col${s.col()}">`), yield o.renderTemplates(this.templates, e, t), t.write("</td>");
|
|
3119
3124
|
n.length && t.write("</tr>"), e.pop();
|
|
@@ -3215,9 +3220,9 @@ var da = class extends R {
|
|
|
3215
3220
|
}
|
|
3216
3221
|
render() {}
|
|
3217
3222
|
}
|
|
3218
|
-
},
|
|
3223
|
+
}, Sa = class e {
|
|
3219
3224
|
constructor(e = {}) {
|
|
3220
|
-
this.renderer = new zt(), this.filters = Object.create(null), this.tags = Object.create(null), this.options = Cn(e), this.parser = new K(this), ae(
|
|
3225
|
+
this.renderer = new zt(), this.filters = Object.create(null), this.tags = Object.create(null), this.options = Cn(e), this.parser = new K(this), ae(xa, (e, t) => this.registerTag(t, e)), ae(Qi, (e, t) => this.registerFilter(t, e));
|
|
3221
3226
|
}
|
|
3222
3227
|
parse(e, t) {
|
|
3223
3228
|
return new K(this).parse(e, t);
|
|
@@ -3300,6 +3305,9 @@ var da = class extends R {
|
|
|
3300
3305
|
registerFilter(e, t) {
|
|
3301
3306
|
this.filters[e] = t;
|
|
3302
3307
|
}
|
|
3308
|
+
unregisterFilter(e) {
|
|
3309
|
+
delete this.filters[e];
|
|
3310
|
+
}
|
|
3303
3311
|
registerTag(e, t) {
|
|
3304
3312
|
this.tags[e] = o(t) ? t : An(t);
|
|
3305
3313
|
}
|
|
@@ -3396,6 +3404,6 @@ var da = class extends R {
|
|
|
3396
3404
|
};
|
|
3397
3405
|
/* istanbul ignore file */
|
|
3398
3406
|
//#endregion
|
|
3399
|
-
export {
|
|
3407
|
+
export { Sa as Liquid };
|
|
3400
3408
|
|
|
3401
|
-
//# sourceMappingURL=liquid.browser-
|
|
3409
|
+
//# sourceMappingURL=liquid.browser-UlAOKBjI.js.map
|