@templatical/editor 0.26.2 → 0.27.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 +3 -1
- package/dist/{AiChatSidebar-CMBz6Wix.js → AiChatSidebar-iVJDzqjr.js} +60 -60
- package/dist/AiFeatureMenu-DvrK-dzj.js +57 -0
- package/dist/{BlockIssueBadge-Buk3_6QF.js → BlockIssueBadge-BHysq7XQ.js} +11 -11
- package/dist/BlockPreviewCanvas-GZbr0ph5.js +121 -0
- package/dist/CloudHeaderExtras-Cx8gFWu2.js +59 -0
- package/dist/CloudPanels-D0X449DD.js +227 -0
- package/dist/{CollaboratorBar-zvfvE7f-.js → CollaboratorBar-DMSWCrX3.js} +21 -21
- package/dist/ColorPicker-DCjFQCAg.js +501 -0
- package/dist/CommentsPanel-D5wQB1Kf.js +18 -0
- package/dist/CommentsSidebar-BoTIxpLE.js +481 -0
- package/dist/{cdn/chunks/CountdownBlock-vLTkTI9e.js → CountdownBlock-BFX8iU90.js} +19 -21
- package/dist/{cdn/chunks/CountdownToolbar-DPjcgcVR.js → CountdownToolbar-CSftc9Ma.js} +52 -53
- package/dist/{DesignReferenceSidebar-Bx96XFmK.js → DesignReferenceSidebar-DKsx2TiL.js} +72 -71
- package/dist/{IssuesPanel-Do7RLXsP.js → IssuesPanel-flKKwKpM.js} +38 -38
- package/dist/{LoadingTrack-BexpNuTV.js → LoadingTrack-C2T8ixEL.js} +3 -3
- package/dist/{MergeTagModeToggle-P-UguQHc.js → MergeTagModeToggle-PKCoKAoF.js} +43 -43
- package/dist/{MergeTagSuggestion-BJ43ihWR.js → MergeTagSuggestion-DGha0WRp.js} +46 -46
- package/dist/{cdn/chunks/NumberWithSuffix-BXrRdfq1.js → NumberWithSuffix-DdPCXfKf.js} +42 -44
- package/dist/{ParagraphEditor-CLvv5Ija.js → ParagraphEditor-vDU-5y6r.js} +202 -199
- package/dist/RestoreVersionDialog-DIn1muFD.js +86 -0
- package/dist/{RichTextEditorContent-fbYJXAio.js → RichTextEditorContent-I83k5DtQ.js} +44 -44
- package/dist/SaveBlockDialog-C_QvYAeL.js +266 -0
- package/dist/{SavedBlocksBrowserModal-KWlaiLlr.js → SavedBlocksBrowserModal-CefWWcdT.js} +116 -115
- package/dist/{cdn/chunks/SavedBlocksPanels-e4HyTZ8v.js → SavedBlocksPanels-DnQwO-7O.js} +9 -11
- package/dist/{SavedBlocksPickBar-C3h8oL3r.js → SavedBlocksPickBar-BsFubArH.js} +17 -17
- package/dist/{TemplateScoringPanel-BZUsb3FD.js → TemplateScoringPanel-Bv_bBsJi.js} +87 -87
- package/dist/TestEmailModal-STPWDP79.js +206 -0
- package/dist/{cdn/chunks/TestEmailPanel-CZAG1gQE.js → TestEmailPanel-HYVjApKZ.js} +4 -6
- package/dist/TitleEditor-DnB0EJ_g.js +198 -0
- package/dist/TplModal-chvLhXmC.js +49 -0
- package/dist/VersionHistoryMenu-Cq4rH56t.js +155 -0
- package/dist/VersionHistoryPanels-D7k_F7-9.js +46 -0
- package/dist/VersionPreviewBanner-DthyHe6C.js +38 -0
- package/dist/{blockTypeIcons-2_85L_CL.js → blockTypeIcons-B8r4jMBn.js} +6 -6
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-D1zgI9fQ.js → ca-Cqg9O8mx.js} +69 -6
- package/dist/cdn/chunks/{AiChatSidebar-CQ8KUmNB.js → AiChatSidebar-DTUoBH5a.js} +54 -54
- package/dist/cdn/chunks/AiChatSidebar-DTUoBH5a.js.map +1 -0
- package/dist/cdn/chunks/AiFeatureMenu-Dyh7mUMB.js +57 -0
- package/dist/cdn/chunks/AiFeatureMenu-Dyh7mUMB.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js → BlockIssueBadge-UzSSOM_2.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js.map → BlockIssueBadge-UzSSOM_2.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DPtiMsVz.js → BlockPreviewCanvas-DStQFo9P.js} +42 -42
- package/dist/cdn/chunks/{BlockPreviewCanvas-DPtiMsVz.js.map → BlockPreviewCanvas-DStQFo9P.js.map} +1 -1
- package/dist/cdn/chunks/CloudHeaderExtras-BZVu7dnO.js +60 -0
- package/dist/cdn/chunks/CloudHeaderExtras-BZVu7dnO.js.map +1 -0
- package/dist/cdn/chunks/CloudPanels-CXbaBKHQ.js +227 -0
- package/dist/cdn/chunks/CloudPanels-CXbaBKHQ.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BF469_AN.js → CollaboratorBar-BH_lZlat.js} +22 -22
- package/dist/cdn/chunks/CollaboratorBar-BH_lZlat.js.map +1 -0
- package/dist/cdn/chunks/ColorPicker-CStXen0Y.js +502 -0
- package/dist/cdn/chunks/ColorPicker-CStXen0Y.js.map +1 -0
- package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js +20 -0
- package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js.map +1 -0
- package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js +460 -0
- package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js.map +1 -0
- package/dist/{CountdownBlock-DuyvGcr8.js → cdn/chunks/CountdownBlock-BYSrJWxg.js} +25 -23
- package/dist/cdn/chunks/{CountdownBlock-vLTkTI9e.js.map → CountdownBlock-BYSrJWxg.js.map} +1 -1
- package/dist/{CountdownToolbar-CBE9wRaV.js → cdn/chunks/CountdownToolbar-CZPtQIb8.js} +66 -63
- package/dist/cdn/chunks/{CountdownToolbar-DPjcgcVR.js.map → CountdownToolbar-CZPtQIb8.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-B-HFXV0W.js → DesignReferenceSidebar-sZWciECR.js} +64 -64
- package/dist/cdn/chunks/DesignReferenceSidebar-sZWciECR.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-DKTS4QVb.js → IssuesPanel-CHtetM9i.js} +36 -36
- package/dist/cdn/chunks/IssuesPanel-CHtetM9i.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js → LoadingTrack-Dp_QZvAK.js} +3 -3
- package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js.map → LoadingTrack-Dp_QZvAK.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js → MergeTagModeToggle-ZwW-5EeN.js} +39 -39
- package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js.map → MergeTagModeToggle-ZwW-5EeN.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-Dn8dExNa.js → MergeTagSuggestion-DhllqTA3.js} +47 -47
- package/dist/cdn/chunks/MergeTagSuggestion-DhllqTA3.js.map +1 -0
- package/dist/{NumberWithSuffix-D37ZWiZh.js → cdn/chunks/NumberWithSuffix-yeQLcCyH.js} +37 -35
- package/dist/cdn/chunks/NumberWithSuffix-yeQLcCyH.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-Bzcma_Lm.js → ParagraphEditor-BJJ925sx.js} +235 -233
- package/dist/cdn/chunks/ParagraphEditor-BJJ925sx.js.map +1 -0
- package/dist/cdn/chunks/RestoreVersionDialog-B0Jadu6F.js +87 -0
- package/dist/cdn/chunks/RestoreVersionDialog-B0Jadu6F.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DtL49Jpo.js → RichTextEditorContent-CfSq2wPR.js} +44 -44
- package/dist/cdn/chunks/RichTextEditorContent-CfSq2wPR.js.map +1 -0
- package/dist/cdn/chunks/SaveBlockDialog-C1DXh6P9.js +265 -0
- package/dist/cdn/chunks/SaveBlockDialog-C1DXh6P9.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C59D4G5C.js → SavedBlocksBrowserModal-BerMxAUt.js} +114 -113
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BerMxAUt.js.map +1 -0
- package/dist/{SavedBlocksPanels-CQsZvWO_.js → cdn/chunks/SavedBlocksPanels-BUE4lzVP.js} +11 -9
- package/dist/cdn/chunks/{SavedBlocksPanels-e4HyTZ8v.js.map → SavedBlocksPanels-BUE4lzVP.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DMHxPCM4.js → SavedBlocksPickBar-4HrqQfvl.js} +17 -17
- package/dist/cdn/chunks/SavedBlocksPickBar-4HrqQfvl.js.map +1 -0
- package/dist/cdn/chunks/{TemplateScoringPanel-NucRtAP0.js → TemplateScoringPanel-Xdkp2EMY.js} +81 -81
- package/dist/cdn/chunks/TemplateScoringPanel-Xdkp2EMY.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-yfmFiavR.js +206 -0
- package/dist/cdn/chunks/TestEmailModal-yfmFiavR.js.map +1 -0
- package/dist/{TestEmailPanel-B6goIAxT.js → cdn/chunks/TestEmailPanel-DqTDh5ri.js} +6 -4
- package/dist/cdn/chunks/{TestEmailPanel-CZAG1gQE.js.map → TestEmailPanel-DqTDh5ri.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D0_LY2Ex.js → TitleEditor-nUAF7fKr.js} +85 -84
- package/dist/cdn/chunks/TitleEditor-nUAF7fKr.js.map +1 -0
- package/dist/cdn/chunks/TplModal-C0IqikoV.js +50 -0
- package/dist/cdn/chunks/TplModal-C0IqikoV.js.map +1 -0
- package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js +148 -0
- package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js.map +1 -0
- package/dist/cdn/chunks/VersionHistoryPanels-6Hz9w20W.js +48 -0
- package/dist/cdn/chunks/VersionHistoryPanels-6Hz9w20W.js.map +1 -0
- package/dist/cdn/chunks/VersionPreviewBanner-D098_6_I.js +40 -0
- package/dist/cdn/chunks/VersionPreviewBanner-D098_6_I.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js → blockTypeIcons-hX_W4dqo.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js.map → blockTypeIcons-hX_W4dqo.js.map} +1 -1
- package/dist/cdn/chunks/{ca-D1zgI9fQ.js → ca-Cqg9O8mx.js} +70 -7
- package/dist/cdn/chunks/ca-Cqg9O8mx.js.map +1 -0
- package/dist/{cloud-qINCmQbn.js → cdn/chunks/cloud-BA0OpRh-.js} +400 -609
- package/dist/cdn/chunks/cloud-BA0OpRh-.js.map +1 -0
- package/dist/cdn/chunks/createCloudRuntime-DmzV7OnU.js +344 -0
- package/dist/cdn/chunks/createCloudRuntime-DmzV7OnU.js.map +1 -0
- package/dist/{de-DHra3lvx.js → cdn/chunks/de-BXmeeFbX.js} +71 -6
- package/dist/cdn/chunks/de-BXmeeFbX.js.map +1 -0
- package/dist/{de-uVoSP1xF.js → cdn/chunks/de-Dbwm2cON.js} +3 -54
- package/dist/cdn/chunks/de-Dbwm2cON.js.map +1 -0
- package/dist/cdn/chunks/{dist-B2HKGHnc.js → dist-CM8TB0VD.js} +136 -136
- package/dist/cdn/chunks/{dist-B2HKGHnc.js.map → dist-CM8TB0VD.js.map} +1 -1
- package/dist/cdn/chunks/{dist-C6z8AjBC.js → dist-CYLJiSiH.js} +63 -63
- package/dist/cdn/chunks/{dist-C6z8AjBC.js.map → dist-CYLJiSiH.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DCs9qL-b.js → draggable-BfpsXFg7.js} +916 -905
- package/dist/cdn/chunks/{draggable-DCs9qL-b.js.map → draggable-BfpsXFg7.js.map} +1 -1
- package/dist/cdn/chunks/{en-DlqX2YWZ.js → en-DbBNy67B.js} +70 -7
- package/dist/cdn/chunks/en-DbBNy67B.js.map +1 -0
- package/dist/{en-CjhsJxb-.js → cdn/chunks/en-Dzw4EqNI.js} +3 -54
- package/dist/cdn/chunks/en-Dzw4EqNI.js.map +1 -0
- package/dist/cdn/chunks/{es-Cuss2snv.js → es-JUsAjxWu.js} +70 -7
- package/dist/cdn/chunks/es-JUsAjxWu.js.map +1 -0
- package/dist/cdn/chunks/{extensions-C7h52yuk.js → extensions-CMcVw2uu.js} +81 -67
- package/dist/cdn/chunks/extensions-CMcVw2uu.js.map +1 -0
- package/dist/{fr-Cm85vB2g.js → cdn/chunks/fr-J3qgXH4h.js} +71 -6
- package/dist/cdn/chunks/fr-J3qgXH4h.js.map +1 -0
- package/dist/cdn/chunks/{icons-CvYN6zrM.js → icons-C36Ha5VU.js} +11 -11
- package/dist/cdn/chunks/{icons-CvYN6zrM.js.map → icons-C36Ha5VU.js.map} +1 -1
- package/dist/{keys-fwF3qZax.js → cdn/chunks/keys-CbQuRX85.js} +6 -4
- package/dist/cdn/chunks/keys-CbQuRX85.js.map +1 -0
- package/dist/cdn/chunks/logger-ByvdoAwq.js +23 -0
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +1 -0
- package/dist/cdn/chunks/{nl-dmiIX7oT.js → nl-D_4DkqOi.js} +70 -7
- package/dist/cdn/chunks/nl-D_4DkqOi.js.map +1 -0
- package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js +23 -0
- package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js.map +1 -0
- package/dist/{pt-BR-CTzHTqJD.js → cdn/chunks/pt-BR-BxzQzWGJ.js} +3 -54
- package/dist/cdn/chunks/pt-BR-BxzQzWGJ.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-CaIG-7EM.js → pt-BR-KGURyEEQ.js} +70 -7
- package/dist/cdn/chunks/pt-BR-KGURyEEQ.js.map +1 -0
- package/dist/cdn/chunks/{src-CUKUsRzX.js → src-BOjFLNf7.js} +148 -134
- package/dist/cdn/chunks/src-BOjFLNf7.js.map +1 -0
- package/dist/cdn/chunks/{src-xkGep9eN.js → src-Dq3fgSIx.js} +1448 -1458
- package/dist/cdn/chunks/src-Dq3fgSIx.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-ByDqaYj_.js +61 -0
- package/dist/cdn/chunks/styleConstants-ByDqaYj_.js.map +1 -0
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +6 -0
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C44S1Cmh.js → tiptap-DmpGap5g.js} +40 -40
- package/dist/cdn/chunks/{tiptap-C44S1Cmh.js.map → tiptap-DmpGap5g.js.map} +1 -1
- package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js → useAliveFlag-Dtm174fG.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js.map → useAliveFlag-Dtm174fG.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js → useCloudI18n-NVa1aeY8.js} +5 -5
- package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js.map → useCloudI18n-NVa1aeY8.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CKQ9gmoo.js → useEditorCore-CTu_qZ3W.js} +1434 -1147
- package/dist/cdn/chunks/useEditorCore-CTu_qZ3W.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-UMs0F71x.js → useI18n-DVWCJJFH.js} +5 -5
- package/dist/cdn/chunks/{useI18n-UMs0F71x.js.map → useI18n-DVWCJJFH.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js → useMergeTag-BfZBRPQp.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js.map → useMergeTag-BfZBRPQp.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js → usePopoverPosition-BC-HA7TK.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js.map → usePopoverPosition-BC-HA7TK.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +5103 -284
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-On4TSac-.js → check-DZbmkMQe.js} +1 -1
- package/dist/{chevron-down-69EiBGoB.js → chevron-down-nYScOLeZ.js} +1 -1
- package/dist/{chevron-up-Dh3MG1Dw.js → chevron-up-CpYpDLnc.js} +1 -1
- package/dist/{circle-alert-cilwzafX.js → circle-alert-CuuK6thq.js} +1 -1
- package/dist/{clock-Dt0APH92.js → clock-DxkrtqOr.js} +1 -1
- package/dist/cloud-BAefVBb_.js +1444 -0
- package/dist/createCloudRuntime-Bt8W-ajI.js +342 -0
- package/dist/{createLucideIcon-C8WzBYCv.js → createLucideIcon-L-wQXW_R.js} +9 -9
- package/dist/{cdn/chunks/de-DHra3lvx.js → de-BXmeeFbX.js} +69 -8
- package/dist/{cdn/chunks/de-uVoSP1xF.js → de-Dbwm2cON.js} +1 -56
- package/dist/dist-B5iReTtK.js +251 -0
- package/dist/{dist-Cl8J0IES.js → dist-Ck9roB6K.js} +42 -42
- package/dist/{dist-BpKxrUi2.js → dist-CqcGTIiX.js} +46 -46
- package/dist/{en-DlqX2YWZ.js → en-DbBNy67B.js} +69 -6
- package/dist/{cdn/chunks/en-CjhsJxb-.js → en-Dzw4EqNI.js} +1 -56
- package/dist/{es-Cuss2snv.js → es-JUsAjxWu.js} +69 -6
- package/dist/{extensions-DzKNPITR.js → extensions-CX87G4aL.js} +71 -57
- package/dist/{cdn/chunks/fr-Cm85vB2g.js → fr-J3qgXH4h.js} +69 -8
- package/dist/{image-up-Ceggh_R3.js → image-up-DouZRGVt.js} +1 -1
- package/dist/index.d.ts +499 -23
- package/dist/{info-DO5odBcZ.js → info-puX5V6Iq.js} +1 -1
- package/dist/{cdn/chunks/keys-Cmc2Yl3D.js → keys-BxixS0TN.js} +4 -6
- package/dist/{list-checks-BSkPKbuI.js → list-checks-jw-ZlvWY.js} +1 -1
- package/dist/{loader-circle-bO7o7_HD.js → loader-circle-DqTxB7Kr.js} +1 -1
- package/dist/logger-BBlvSn6q.js +21 -0
- package/dist/{message-circle-BEkAk65X.js → message-circle-BZ7YpB22.js} +1 -1
- package/dist/{nl-dmiIX7oT.js → nl-D_4DkqOi.js} +69 -6
- package/dist/{pencil-t6m0EtKL.js → pencil-DmbRhTJu.js} +1 -1
- package/dist/preRenderCustomBlocks-BebjKtmw.js +21 -0
- package/dist/{cdn/chunks/pt-BR-CTzHTqJD.js → pt-BR-BxzQzWGJ.js} +1 -56
- package/dist/{pt-BR-CaIG-7EM.js → pt-BR-KGURyEEQ.js} +69 -6
- package/dist/{refresh-cw-CkOYVzK5.js → refresh-cw-OK_O-cL0.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-CepEmvwF.js → runtime-dom.esm-bundler-BgKXIPLV.js} +144 -144
- package/dist/{scan-line-DwSVj25O.js → scan-line-DyaSTsJ5.js} +1 -1
- package/dist/{send-CWsWN8PQ.js → send-B-wasJJC.js} +1 -1
- package/dist/{shield-check-qje8Kufw.js → shield-check-DUIyRrTo.js} +1 -1
- package/dist/{sparkles-DumaWRW-.js → sparkles-DYEMATWC.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-ByDqaYj_.js +59 -0
- package/dist/templatical-editor.js +5303 -289
- package/dist/{text-align-start-Ir8Ah4mT.js → text-align-start-CzjLeBLe.js} +1 -1
- package/dist/timeouts-DHPZQ0G3.js +4 -0
- package/dist/{trash-2-CklAFCmO.js → trash-2-C0shEPry.js} +1 -1
- package/dist/{triangle-alert-BBi4n93g.js → triangle-alert-Fw0ce8oQ.js} +1 -1
- package/dist/{upload-sVqqppuv.js → upload-D69C2CBx.js} +3 -4
- package/dist/{useAliveFlag-cvyBxHp7.js → useAliveFlag-BGIAZii_.js} +1 -1
- package/dist/{useCloudI18n-DKVm6PCa.js → useCloudI18n-CAZTZ9_a.js} +2 -2
- package/dist/{useEditorCore-idmPLUeb.js → useEditorCore-B-kONNRw.js} +1604 -1320
- package/dist/{useI18n-DoVKdCTH.js → useI18n-BfXff_Sy.js} +2 -2
- package/dist/{useMergeTag-CYZk7dZD.js → useMergeTag-Dd4I7kge.js} +3 -3
- package/dist/usePopoverPosition-CxhCX3SQ.js +59 -0
- package/dist/{vue.runtime.esm-bundler-D1diBMsm.js → vue.runtime.esm-bundler-DzEsDRtY.js} +447 -436
- package/dist/{x-Mby7KlhS.js → x-BjTlFqRv.js} +1 -1
- package/package.json +7 -7
- package/dist/AiFeatureMenu-BY6mubnR.js +0 -63
- package/dist/BlockPreviewCanvas-DbNOqSI1.js +0 -121
- package/dist/CloudEditor-DEnMNMbm.js +0 -1188
- package/dist/ColorPicker-ClETsjA3.js +0 -550
- package/dist/CommentsSidebar-CdRCCSDD.js +0 -435
- package/dist/SaveBlockDialog-fVp_PwZi.js +0 -265
- package/dist/SnapshotHistory-DjA3Ej_i.js +0 -128
- package/dist/TestEmailModal-EM0RP_9L.js +0 -205
- package/dist/TitleEditor-JEaP9jVF.js +0 -197
- package/dist/TplModal-DoneXIj_.js +0 -49
- package/dist/cdn/chunks/AiChatSidebar-CQ8KUmNB.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-Cwj8afsi.js +0 -63
- package/dist/cdn/chunks/AiFeatureMenu-Cwj8afsi.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-CQ830jJt.js +0 -1166
- package/dist/cdn/chunks/CloudEditor-CQ830jJt.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-BF469_AN.js.map +0 -1
- package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js +0 -552
- package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js +0 -412
- package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-B-HFXV0W.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-DKTS4QVb.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-Dn8dExNa.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-BXrRdfq1.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-Bzcma_Lm.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DtL49Jpo.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-BfNVeXXV.js +0 -264
- package/dist/cdn/chunks/SaveBlockDialog-BfNVeXXV.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-C59D4G5C.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-DMHxPCM4.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-80tAU_VX.js +0 -121
- package/dist/cdn/chunks/SnapshotHistory-80tAU_VX.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel-NucRtAP0.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DdWfAGNe.js +0 -205
- package/dist/cdn/chunks/TestEmailModal-DdWfAGNe.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-D0_LY2Ex.js.map +0 -1
- package/dist/cdn/chunks/TplModal-iCmoKB2k.js +0 -50
- package/dist/cdn/chunks/TplModal-iCmoKB2k.js.map +0 -1
- package/dist/cdn/chunks/ca-D1zgI9fQ.js.map +0 -1
- package/dist/cdn/chunks/cloud-DcC8bPwn.js +0 -1787
- package/dist/cdn/chunks/cloud-DcC8bPwn.js.map +0 -1
- package/dist/cdn/chunks/de-DHra3lvx.js.map +0 -1
- package/dist/cdn/chunks/de-uVoSP1xF.js.map +0 -1
- package/dist/cdn/chunks/en-CjhsJxb-.js.map +0 -1
- package/dist/cdn/chunks/en-DlqX2YWZ.js.map +0 -1
- package/dist/cdn/chunks/es-Cuss2snv.js.map +0 -1
- package/dist/cdn/chunks/extensions-C7h52yuk.js.map +0 -1
- package/dist/cdn/chunks/fr-Cm85vB2g.js.map +0 -1
- package/dist/cdn/chunks/keys-Cmc2Yl3D.js.map +0 -1
- package/dist/cdn/chunks/nl-dmiIX7oT.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CaIG-7EM.js.map +0 -1
- package/dist/cdn/chunks/src-CUKUsRzX.js.map +0 -1
- package/dist/cdn/chunks/src-xkGep9eN.js.map +0 -1
- package/dist/cdn/chunks/styles-CND3ey2g.js +0 -4140
- package/dist/cdn/chunks/styles-CND3ey2g.js.map +0 -1
- package/dist/cdn/chunks/timeouts-SsLMC4a3.js +0 -6
- package/dist/cdn/chunks/timeouts-SsLMC4a3.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CKQ9gmoo.js.map +0 -1
- package/dist/styles-BK36D1sy.js +0 -4318
- package/dist/usePopoverPosition-C0dPEF4X.js +0 -308
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPicker-CStXen0Y.js","names":["css","hueCss","saturationCss"],"sources":["../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/convert.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/compare.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/dom.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/components/slider.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/components/hue.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/components/saturation.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/styles/color-picker.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/styles/hue.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/styles/saturation.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/components/color-picker.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/entrypoints/hex.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/hex-color-picker.js","../../../src/components/ColorPicker.vue","../../../src/components/ColorPicker.vue"],"sourcesContent":["// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport const clamp = (number, min = 0, max = 1) => {\n return number > max ? max : number < min ? min : number;\n};\nexport const round = (number, digits = 0, base = Math.pow(10, digits)) => {\n return Math.round(base * number) / base;\n};\n//# sourceMappingURL=math.js.map","import { round } from './math.js';\n/**\n * Valid CSS <angle> units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nconst angleUnits = {\n grad: 360 / 400,\n turn: 360,\n rad: 360 / (Math.PI * 2)\n};\nexport const hexToHsva = (hex) => rgbaToHsva(hexToRgba(hex));\nexport const hexToRgba = (hex) => {\n if (hex[0] === '#')\n hex = hex.substring(1);\n if (hex.length < 6) {\n return {\n r: parseInt(hex[0] + hex[0], 16),\n g: parseInt(hex[1] + hex[1], 16),\n b: parseInt(hex[2] + hex[2], 16),\n a: hex.length === 4 ? round(parseInt(hex[3] + hex[3], 16) / 255, 2) : 1\n };\n }\n return {\n r: parseInt(hex.substring(0, 2), 16),\n g: parseInt(hex.substring(2, 4), 16),\n b: parseInt(hex.substring(4, 6), 16),\n a: hex.length === 8 ? round(parseInt(hex.substring(6, 8), 16) / 255, 2) : 1\n };\n};\nexport const parseHue = (value, unit = 'deg') => {\n return Number(value) * (angleUnits[unit] || 1);\n};\nexport const hslaStringToHsva = (hslString) => {\n const matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hslString);\n if (!match)\n return { h: 0, s: 0, v: 0, a: 1 };\n return hslaToHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n l: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n });\n};\nexport const hslStringToHsva = hslaStringToHsva;\nexport const hslaToHsva = ({ h, s, l, a }) => {\n s *= (l < 50 ? l : 100 - l) / 100;\n return {\n h: h,\n s: s > 0 ? ((2 * s) / (l + s)) * 100 : 0,\n v: l + s,\n a\n };\n};\nexport const hsvaToHex = (hsva) => rgbaToHex(hsvaToRgba(hsva));\nexport const hsvaToHsla = ({ h, s, v, a }) => {\n const hh = ((200 - s) * v) / 100;\n return {\n h: round(h),\n s: round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n l: round(hh / 2),\n a: round(a, 2)\n };\n};\nexport const hsvaToHsvString = (hsva) => {\n const { h, s, v } = roundHsva(hsva);\n return `hsv(${h}, ${s}%, ${v}%)`;\n};\nexport const hsvaToHsvaString = (hsva) => {\n const { h, s, v, a } = roundHsva(hsva);\n return `hsva(${h}, ${s}%, ${v}%, ${a})`;\n};\nexport const hsvaToHslString = (hsva) => {\n const { h, s, l } = hsvaToHsla(hsva);\n return `hsl(${h}, ${s}%, ${l}%)`;\n};\nexport const hsvaToHslaString = (hsva) => {\n const { h, s, l, a } = hsvaToHsla(hsva);\n return `hsla(${h}, ${s}%, ${l}%, ${a})`;\n};\nexport const hsvaToRgba = ({ h, s, v, a }) => {\n h = (h / 360) * 6;\n s = s / 100;\n v = v / 100;\n const hh = Math.floor(h), b = v * (1 - s), c = v * (1 - (h - hh) * s), d = v * (1 - (1 - h + hh) * s), module = hh % 6;\n return {\n r: round([v, c, b, b, d, v][module] * 255),\n g: round([d, v, v, c, b, b][module] * 255),\n b: round([b, b, d, v, v, c][module] * 255),\n a: round(a, 2)\n };\n};\nexport const hsvaToRgbString = (hsva) => {\n const { r, g, b } = hsvaToRgba(hsva);\n return `rgb(${r}, ${g}, ${b})`;\n};\nexport const hsvaToRgbaString = (hsva) => {\n const { r, g, b, a } = hsvaToRgba(hsva);\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n};\nexport const hsvaStringToHsva = (hsvString) => {\n const matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hsvString);\n if (!match)\n return { h: 0, s: 0, v: 0, a: 1 };\n return roundHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n v: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n });\n};\nexport const hsvStringToHsva = hsvaStringToHsva;\nexport const rgbaStringToHsva = (rgbaString) => {\n const matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(rgbaString);\n if (!match)\n return { h: 0, s: 0, v: 0, a: 1 };\n return rgbaToHsva({\n r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1)\n });\n};\nexport const rgbStringToHsva = rgbaStringToHsva;\nconst format = (number) => {\n const hex = number.toString(16);\n return hex.length < 2 ? '0' + hex : hex;\n};\nexport const rgbaToHex = ({ r, g, b, a }) => {\n const alphaHex = a < 1 ? format(round(a * 255)) : '';\n return '#' + format(r) + format(g) + format(b) + alphaHex;\n};\nexport const rgbaToHsva = ({ r, g, b, a }) => {\n const max = Math.max(r, g, b);\n const delta = max - Math.min(r, g, b);\n // prettier-ignore\n const hh = delta\n ? max === r\n ? (g - b) / delta\n : max === g\n ? 2 + (b - r) / delta\n : 4 + (r - g) / delta\n : 0;\n return {\n h: round(60 * (hh < 0 ? hh + 6 : hh)),\n s: round(max ? (delta / max) * 100 : 0),\n v: round((max / 255) * 100),\n a\n };\n};\nexport const roundHsva = (hsva) => ({\n h: round(hsva.h),\n s: round(hsva.s),\n v: round(hsva.v),\n a: round(hsva.a, 2)\n});\nexport const rgbaToRgb = ({ r, g, b }) => ({ r, g, b });\nexport const hslaToHsl = ({ h, s, l }) => ({ h, s, l });\nexport const hsvaToHsv = (hsva) => {\n const { h, s, v } = roundHsva(hsva);\n return { h, s, v };\n};\n//# sourceMappingURL=convert.js.map","import { hexToRgba } from './convert.js';\nexport const equalColorObjects = (first, second) => {\n if (first === second)\n return true;\n for (const prop in first) {\n // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n // we must cast our object to unknown (as RGB demands `r` be a key, while `Record<string, x>` does not care if\n // there is or not), and then as a type TS can iterate over.\n if (first[prop] !==\n second[prop])\n return false;\n }\n return true;\n};\nexport const equalColorString = (first, second) => {\n return first.replace(/\\s/g, '') === second.replace(/\\s/g, '');\n};\nexport const equalHex = (first, second) => {\n if (first.toLowerCase() === second.toLowerCase())\n return true;\n // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\n//# sourceMappingURL=compare.js.map","const cache = {};\nexport const tpl = (html) => {\n let template = cache[html];\n if (!template) {\n template = document.createElement('template');\n template.innerHTML = html;\n cache[html] = template;\n }\n return template;\n};\nexport const fire = (target, type, detail) => {\n target.dispatchEvent(new CustomEvent(type, {\n bubbles: true,\n detail\n }));\n};\n//# sourceMappingURL=dom.js.map","import { fire, tpl } from '../utils/dom.js';\nimport { clamp } from '../utils/math.js';\nlet hasTouched = false;\n// Check if an event was triggered by touch\nconst isTouch = (e) => 'touches' in e;\n// Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n// If we detected a touch interaction before, we prefer reacting to touch events only.\nconst isValid = (event) => {\n if (hasTouched && !isTouch(event))\n return false;\n if (!hasTouched)\n hasTouched = isTouch(event);\n return true;\n};\nconst pointerMove = (target, event) => {\n const pointer = isTouch(event) ? event.touches[0] : event;\n const rect = target.el.getBoundingClientRect();\n fire(target.el, 'move', target.getMove({\n x: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width),\n y: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height)\n }));\n};\nconst keyMove = (target, event) => {\n // We use `keyCode` instead of `key` to reduce the size of the library.\n const keyCode = event.keyCode;\n // Ignore all keys except arrow ones, Page Up, Page Down, Home and End.\n if (keyCode > 40 || (target.xy && keyCode < 37) || keyCode < 33)\n return;\n // Do not scroll page by keys when color picker element has focus.\n event.preventDefault();\n // Send relative offset to the parent component.\n fire(target.el, 'move', target.getMove({\n x: keyCode === 39 // Arrow Right\n ? 0.01\n : keyCode === 37 // Arrow Left\n ? -0.01\n : keyCode === 34 // Page Down\n ? 0.05\n : keyCode === 33 // Page Up\n ? -0.05\n : keyCode === 35 // End\n ? 1\n : keyCode === 36 // Home\n ? -1\n : 0,\n y: keyCode === 40 // Arrow down\n ? 0.01\n : keyCode === 38 // Arrow Up\n ? -0.01\n : 0\n }, true));\n};\nexport class Slider {\n constructor(root, part, aria, xy) {\n const template = tpl(`<div role=\"slider\" tabindex=\"0\" part=\"${part}\" ${aria}><div part=\"${part}-pointer\"></div></div>`);\n root.appendChild(template.content.cloneNode(true));\n const el = root.querySelector(`[part=${part}]`);\n el.addEventListener('mousedown', this);\n el.addEventListener('touchstart', this);\n el.addEventListener('keydown', this);\n this.el = el;\n this.xy = xy;\n this.nodes = [el.firstChild, el];\n }\n set dragging(state) {\n const toggleEvent = state ? document.addEventListener : document.removeEventListener;\n toggleEvent(hasTouched ? 'touchmove' : 'mousemove', this);\n toggleEvent(hasTouched ? 'touchend' : 'mouseup', this);\n }\n handleEvent(event) {\n switch (event.type) {\n case 'mousedown':\n case 'touchstart':\n event.preventDefault();\n // event.button is 0 in mousedown for left button activation\n if (!isValid(event) || (!hasTouched && event.button != 0))\n return;\n this.el.focus();\n pointerMove(this, event);\n this.dragging = true;\n break;\n case 'mousemove':\n case 'touchmove':\n event.preventDefault();\n pointerMove(this, event);\n break;\n case 'mouseup':\n case 'touchend':\n this.dragging = false;\n break;\n case 'keydown':\n keyMove(this, event);\n break;\n }\n }\n style(styles) {\n styles.forEach((style, i) => {\n for (const p in style) {\n this.nodes[i].style.setProperty(p, style[p]);\n }\n });\n }\n}\n//# sourceMappingURL=slider.js.map","import { Slider } from './slider.js';\nimport { hsvaToHslString } from '../utils/convert.js';\nimport { clamp, round } from '../utils/math.js';\nexport class Hue extends Slider {\n constructor(root) {\n super(root, 'hue', 'aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"', false);\n }\n update({ h }) {\n this.h = h;\n this.style([\n {\n left: `${(h / 360) * 100}%`,\n color: hsvaToHslString({ h, s: 100, v: 100, a: 1 })\n }\n ]);\n this.el.setAttribute('aria-valuenow', `${round(h)}`);\n }\n getMove(offset, key) {\n // Hue measured in degrees of the color circle ranging from 0 to 360\n return { h: key ? clamp(this.h + offset.x * 360, 0, 360) : 360 * offset.x };\n }\n}\n//# sourceMappingURL=hue.js.map","import { Slider } from './slider.js';\nimport { hsvaToHslString } from '../utils/convert.js';\nimport { clamp, round } from '../utils/math.js';\nexport class Saturation extends Slider {\n constructor(root) {\n super(root, 'saturation', 'aria-label=\"Color\"', true);\n }\n update(hsva) {\n this.hsva = hsva;\n this.style([\n {\n top: `${100 - hsva.v}%`,\n left: `${hsva.s}%`,\n color: hsvaToHslString(hsva)\n },\n {\n 'background-color': hsvaToHslString({ h: hsva.h, s: 100, v: 100, a: 1 })\n }\n ]);\n this.el.setAttribute('aria-valuetext', `Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`);\n }\n getMove(offset, key) {\n // Saturation and brightness always fit into [0, 100] range\n return {\n s: key ? clamp(this.hsva.s + offset.x * 100, 0, 100) : offset.x * 100,\n v: key ? clamp(this.hsva.v - offset.y * 100, 0, 100) : Math.round(100 - offset.y * 100)\n };\n }\n}\n//# sourceMappingURL=saturation.js.map","export default `:host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}`;\n//# sourceMappingURL=color-picker.js.map","export default `[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}`;\n//# sourceMappingURL=hue.js.map","export default `[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}`;\n//# sourceMappingURL=saturation.js.map","import { equalColorObjects } from '../utils/compare.js';\nimport { fire, tpl } from '../utils/dom.js';\nimport { Hue } from './hue.js';\nimport { Saturation } from './saturation.js';\nimport css from '../styles/color-picker.js';\nimport hueCss from '../styles/hue.js';\nimport saturationCss from '../styles/saturation.js';\nconst $isSame = Symbol('same');\nconst $color = Symbol('color');\nconst $hsva = Symbol('hsva');\nconst $update = Symbol('update');\nconst $parts = Symbol('parts');\nexport const $css = Symbol('css');\nexport const $sliders = Symbol('sliders');\nexport class ColorPicker extends HTMLElement {\n static get observedAttributes() {\n return ['color'];\n }\n get [$css]() {\n return [css, hueCss, saturationCss];\n }\n get [$sliders]() {\n return [Saturation, Hue];\n }\n get color() {\n return this[$color];\n }\n set color(newColor) {\n if (!this[$isSame](newColor)) {\n const newHsva = this.colorModel.toHsva(newColor);\n this[$update](newHsva);\n this[$color] = newColor;\n }\n }\n constructor() {\n super();\n const template = tpl(`<style>${this[$css].join('')}</style>`);\n const root = this.attachShadow({ mode: 'open' });\n root.appendChild(template.content.cloneNode(true));\n root.addEventListener('move', this);\n this[$parts] = this[$sliders].map((slider) => new slider(root));\n }\n connectedCallback() {\n // A user may set a property on an _instance_ of an element,\n // before its prototype has been connected to this class.\n // If so, we need to run it through the proper class setter.\n if (this.hasOwnProperty('color')) {\n const value = this.color;\n delete this['color'];\n this.color = value;\n }\n else if (!this.color) {\n this.color = this.colorModel.defaultColor;\n }\n }\n attributeChangedCallback(_attr, _oldVal, newVal) {\n const color = this.colorModel.fromAttr(newVal);\n if (!this[$isSame](color)) {\n this.color = color;\n }\n }\n handleEvent(event) {\n // Merge the current HSV color object with updated params.\n const oldHsva = this[$hsva];\n const newHsva = { ...oldHsva, ...event.detail };\n this[$update](newHsva);\n let newColor;\n if (!equalColorObjects(newHsva, oldHsva) &&\n !this[$isSame]((newColor = this.colorModel.fromHsva(newHsva)))) {\n this[$color] = newColor;\n fire(this, 'color-changed', { value: newColor });\n }\n }\n [$isSame](color) {\n return this.color && this.colorModel.equal(color, this.color);\n }\n [$update](hsva) {\n this[$hsva] = hsva;\n this[$parts].forEach((part) => part.update(hsva));\n }\n}\n//# sourceMappingURL=color-picker.js.map","import { ColorPicker } from '../components/color-picker.js';\nimport { hexToHsva, hsvaToHex } from '../utils/convert.js';\nimport { equalHex } from '../utils/compare.js';\nconst colorModel = {\n defaultColor: '#000',\n toHsva: hexToHsva,\n fromHsva: ({ h, s, v }) => hsvaToHex({ h, s, v, a: 1 }),\n equal: equalHex,\n fromAttr: (color) => color\n};\nexport class HexBase extends ColorPicker {\n get colorModel() {\n return colorModel;\n }\n}\n//# sourceMappingURL=hex.js.map","import { HexBase } from './lib/entrypoints/hex.js';\n/**\n * A color picker custom element that uses HEX format.\n *\n * @element hex-color-picker\n *\n * @prop {string} color - Selected color in HEX format.\n * @attr {string} color - Selected color in HEX format.\n *\n * @fires color-changed - Event fired when color property changes.\n *\n * @csspart hue - A hue selector container.\n * @csspart saturation - A saturation selector container\n * @csspart hue-pointer - A hue pointer element.\n * @csspart saturation-pointer - A saturation pointer element.\n */\nexport class HexColorPicker extends HexBase {\n}\ncustomElements.define('hex-color-picker', HexColorPicker);\n//# sourceMappingURL=hex-color-picker.js.map","<script setup lang=\"ts\">\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport { X } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { usePopoverPosition } from \"../composables/usePopoverPosition\";\nimport { colorTextClass } from \"../constants/styleConstants\";\nimport { canonicalizeHexColor, normalizeColorToHex } from \"../utils/color\";\nimport { COLORS_KEY, THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { DEFAULT_RESOLVED_COLORS } from \"../utils/resolveColorsConfig\";\nimport \"vanilla-colorful\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n placeholder?: string;\n /**\n * Color the picker wheel opens on while the field is unset. It only\n * positions the wheel — it never paints the swatch or fills the input,\n * so an unset field still reads as \"not set\".\n */\n seedColor?: string;\n swatchOnly?: boolean;\n disabled?: boolean;\n /**\n * Swatch trigger size. `\"md\"` (40px) is the default for sidebar panels;\n * `\"sm\"` (32px) matches the compact rich-text floating toolbar controls.\n */\n size?: \"sm\" | \"md\";\n /**\n * Accessible label (and hover title) for the swatch trigger. Falls back to\n * the generic \"pick color\" label. Set it when several pickers sit side by\n * side and must be told apart (e.g. text color vs highlight in the toolbar).\n */\n ariaLabel?: string;\n /**\n * Per-instance override of the editor-wide `colors.presets` for this one\n * picker. This is the extension seam a caller uses to scope a single picker\n * to its own palette; when omitted, the injected editor-level presets apply.\n */\n presets?: string[];\n /**\n * Per-instance override of the editor-wide `colors.allowCustom` for this one\n * picker. When omitted, the injected editor-level setting applies.\n */\n allowCustom?: boolean;\n }>(),\n {\n placeholder: \"\",\n seedColor: \"#ffffff\",\n swatchOnly: false,\n disabled: false,\n size: \"md\",\n ariaLabel: \"\",\n presets: undefined,\n allowCustom: undefined,\n },\n);\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", value: string): void;\n}>();\n\nconst { t } = useI18n();\n\nconst open = ref(false);\nconst popoverRef = ref<HTMLElement>();\nconst swatchRef = ref<HTMLElement>();\n\n// Whether the picker emitted a real change during the current pointer gesture.\n// vanilla-colorful only fires `color-changed` when the chosen color differs\n// from the one the wheel was seeded with — so picking a color equal to the\n// seed emits nothing. When the field is still unset after such a no-change\n// pick, we commit the seed ourselves on pointerup so the value persists\n// (otherwise e.g. white on an empty background can never be set — issue #282).\nconst pickerTouched = ref(false);\n\nonClickOutside(\n popoverRef,\n () => {\n open.value = false;\n },\n { ignore: [swatchRef] },\n);\n\nconst isUnset = computed(() => !props.modelValue);\n\n// vanilla-colorful and the hex field are hex-only, but a stored value read back\n// from the DOM (e.g. a TipTap textStyle/highlight color) can be `rgb(...)`. Show\n// and seed the wheel with the hex form; the raw value still drives unset/emit.\nconst displayValue = computed(() => normalizeColorToHex(props.modelValue));\n\n// The color handed to the wheel: the stored value, or the seed when unset.\nconst seed = computed(() =>\n normalizeColorToHex(props.modelValue || props.seedColor),\n);\n\n// The clear (×) sits inside whichever hex field is active — the inline field in\n// full mode, or the popover field in swatch-only mode — shown only when a value\n// is set. Not gated on swatchOnly: each field renders only in its own mode.\nconst showClear = computed(() => !props.disabled && !isUnset.value);\n\n// Color palette: a per-instance `presets`/`allowCustom` prop wins over the\n// injected editor-wide `colors` config, per property. Default keeps the picker\n// unchanged when neither is configured. \"preset\" is kept distinct from the\n// trigger \"swatch\" (swatchOnly/swatchRef) on purpose — they are two different\n// concepts in this file.\nconst editorColors = inject(COLORS_KEY, DEFAULT_RESOLVED_COLORS);\n// Deduplicated: a repeated entry in the configured palette would render a\n// pointless second chip and collide on the value-based `v-for` key.\nconst presets = computed(() => [\n ...new Set(props.presets ?? editorColors.presets),\n]);\nconst allowCustom = computed(\n () => props.allowCustom ?? editorColors.allowCustom,\n);\nconst hasPresets = computed(() => presets.value.length > 0);\n\n// Show the free-form controls (wheel + hex inputs) whenever custom entry is\n// allowed OR there are no presets to fall back on — so a picker is never left\n// with no way to choose a color. `resolveColorsConfig` already forbids\n// `allowCustom: false` without presets at the editor level; a custom-block\n// color field locking itself with no palette anywhere (`resolveFieldColors`)\n// relies on this guard instead.\nconst showFreeform = computed(() => allowCustom.value || !hasPresets.value);\n\n// A preset reads as selected when its hex equals the current value, compared in\n// the canonical (rgb→hex, 3-digit expanded, lowercased) form — so a `#abc`\n// preset matches an `#aabbcc` browser round-trip and case never matters.\nconst normalizedValue = computed(() => canonicalizeHexColor(props.modelValue));\nfunction isPresetSelected(preset: string): boolean {\n return (\n normalizedValue.value !== \"\" &&\n canonicalizeHexColor(preset) === normalizedValue.value\n );\n}\nfunction selectPreset(preset: string): void {\n emit(\"update:modelValue\", preset);\n}\n\n// A leading \"no colour\" (unset/inherit) chip is rendered ONLY in locked mode\n// (`!showFreeform`) — the one mode with no other clear affordance. The freeform\n// modes already own clear via the hex-field ×; a preset-only grid otherwise has\n// no way back to unset once a colour is picked.\nconst showNoneChip = computed(() => hasPresets.value && !showFreeform.value);\n\n// Group-position of preset `index`, shifted by the leading none chip when it's\n// present, so the whole grid indexes as one radio list.\nfunction presetPosition(index: number): number {\n return showNoneChip.value ? index + 1 : index;\n}\n\n// Roving tabindex (WAI-ARIA APG radio group): the grid exposes exactly one tab\n// stop — the checked radio, or the FIRST radio when nothing is checked (value\n// unset with no none chip, or off-palette) — so the group is reachable by Tab\n// but a single Tab steps past it. The none chip counts as checked when the\n// value is unset. Arrow keys then rove focus between the radios.\nconst rovingIndex = computed(() => {\n if (showNoneChip.value && isUnset.value) {\n return 0;\n }\n const selected = presets.value.findIndex((preset) =>\n isPresetSelected(preset),\n );\n return selected === -1 ? 0 : presetPosition(selected);\n});\nfunction noneChipTabindex(): number {\n return rovingIndex.value === 0 ? 0 : -1;\n}\nfunction presetTabindex(index: number): number {\n return presetPosition(index) === rovingIndex.value ? 0 : -1;\n}\n\n// Arrow keys rove FOCUS across the chips (wrapping); they do NOT select.\n// Enter/Space activate the focused chip via native button click. This\n// deviates from APG's default \"selection follows focus\" on purpose: every\n// selection emits `update:modelValue`, and on the rich-text toolbar path that\n// runs `editor.chain().focus().setColor()` (see the swatch-only field comment\n// in the template), which refocuses the canvas — so following focus would\n// steal focus after the first arrow key and break traversal. APG sanctions\n// explicit activation when moving focus has side effects.\nfunction onPresetGridKeydown(e: KeyboardEvent): void {\n const arrows = [\"ArrowRight\", \"ArrowDown\", \"ArrowLeft\", \"ArrowUp\"];\n if (!arrows.includes(e.key)) {\n return;\n }\n // Resolve the current chip from `event.target`, never `document.activeElement`\n // — the latter is unreliable across a shadow-DOM boundary (this editor can\n // mount in a shadow root; the repo threads the real root via EDITOR_ROOT_KEY\n // for the same reason).\n const group = e.currentTarget as HTMLElement;\n const radios = Array.from(\n group.querySelectorAll<HTMLElement>('[role=\"radio\"]'),\n );\n const current = (e.target as HTMLElement).closest('[role=\"radio\"]');\n const currentIndex = current ? radios.indexOf(current as HTMLElement) : -1;\n if (currentIndex === -1) {\n return;\n }\n const forward = e.key === \"ArrowRight\" || e.key === \"ArrowDown\";\n const nextIndex =\n (currentIndex + (forward ? 1 : -1) + radios.length) % radios.length;\n radios[nextIndex]?.focus();\n e.preventDefault();\n}\n\nfunction onPickerChange(e: Event): void {\n pickerTouched.value = true;\n emit(\"update:modelValue\", (e as CustomEvent).detail.value);\n}\n\nfunction onPickerPointerDown(): void {\n pickerTouched.value = false;\n}\n\nfunction onPickerPointerUp(): void {\n // A deliberate pick equal to the seed fires no `color-changed`; commit it.\n if (!pickerTouched.value && isUnset.value) {\n emit(\"update:modelValue\", seed.value);\n }\n}\n\nfunction onTextInput(e: Event): void {\n emit(\"update:modelValue\", (e.target as HTMLInputElement).value);\n}\n\nfunction clear(): void {\n emit(\"update:modelValue\", \"\");\n}\n\n// The popover teleports to the shared popover root so it escapes any clipping /\n// overflow-hidden ancestor (e.g. the link dialog's card, where clicking the\n// clipped wheel landed on the backdrop and closed the modal). Position is\n// captured from the swatch on open and applied as `absolute`, in coordinates\n// local to the popover root (`toLocal`) so a transformed ancestor of the\n// editor doesn't offset it — see usePopoverPosition.\nconst popoverRoot = usePopoverRoot();\nconst { toLocal } = usePopoverPosition();\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst tplUiTheme = inject(UI_THEME_KEY, null);\nconst popoverPosition = ref({ top: 0, left: 0 });\n\nfunction toggleOpen(): void {\n if (props.disabled) return;\n if (!open.value) {\n const rect = swatchRef.value?.getBoundingClientRect();\n if (rect) {\n const PICKER_HEIGHT = 240; // wheel + hue slider + padding, approx\n const gap = 8;\n // Open below the swatch, or flip above when it would overflow the viewport\n // bottom — the popover is `fixed`, so it can't scroll into view otherwise.\n const fitsBelow = rect.bottom + gap + PICKER_HEIGHT <= window.innerHeight;\n const viewportTop = fitsBelow\n ? rect.bottom + gap\n : Math.max(gap, rect.top - PICKER_HEIGHT - gap);\n popoverPosition.value = toLocal({ top: viewportTop, left: rect.left });\n }\n }\n open.value = !open.value;\n}\n</script>\n\n<template>\n <div\n :class=\"[\n 'tpl:flex tpl:items-center tpl:gap-2 tpl:relative',\n disabled && 'tpl:opacity-60 tpl:cursor-not-allowed',\n ]\"\n >\n <button\n ref=\"swatchRef\"\n type=\"button\"\n :disabled=\"disabled\"\n :aria-label=\"ariaLabel || t.colorPicker.pickColor\"\n :title=\"ariaLabel || undefined\"\n :aria-expanded=\"open\"\n :class=\"[\n 'tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]',\n disabled ? 'tpl:cursor-not-allowed' : 'tpl:cursor-pointer',\n open\n ? 'tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]'\n : !disabled && 'tpl:hover:border-[var(--tpl-text-dim)]',\n size === 'sm' ? 'tpl:size-8' : 'tpl:size-10',\n ]\"\n @click=\"toggleOpen\"\n >\n <span\n class=\"tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]\"\n :class=\"{ 'tpl-color-swatch-empty': isUnset }\"\n :style=\"isUnset ? undefined : { backgroundColor: displayValue }\"\n />\n </button>\n <div v-if=\"!swatchOnly && showFreeform\" class=\"tpl:relative tpl:flex-1\">\n <input\n type=\"text\"\n :class=\"[colorTextClass, 'tpl:w-full']\"\n :style=\"showClear ? { paddingRight: '2.25rem' } : undefined\"\n :value=\"displayValue\"\n :placeholder=\"placeholder || t.colorPicker.notSet\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @input=\"onTextInput\"\n />\n <button\n v-if=\"showClear\"\n type=\"button\"\n :aria-label=\"t.colorPicker.clear\"\n :title=\"t.colorPicker.clear\"\n class=\"tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]\"\n @click=\"clear\"\n >\n <X :size=\"14\" :stroke-width=\"1.5\" />\n </button>\n </div>\n <Teleport :to=\"popoverRoot\" :disabled=\"!popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]\"\n enter-from-class=\"tpl:opacity-0 tpl:scale-95 tpl:translate-y-1\"\n enter-to-class=\"tpl:opacity-100 tpl:scale-100 tpl:translate-y-0\"\n leave-active-class=\"tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]\"\n leave-from-class=\"tpl:opacity-100 tpl:scale-100 tpl:translate-y-0\"\n leave-to-class=\"tpl:opacity-0 tpl:scale-95 tpl:translate-y-1\"\n >\n <div\n v-if=\"open\"\n ref=\"popoverRef\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl-color-popover tpl:absolute tpl:z-modal tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"{\n top: `${popoverPosition.top}px`,\n left: `${popoverPosition.left}px`,\n ...themeStyles,\n }\"\n >\n <!-- Preset color grid — an ARIA radio group: each chip is a\n `role=\"radio\"`, arrow keys rove focus between them (roving\n tabindex), and Enter/Space activate. Supplements the wheel/hex\n field; the only control when `allowCustom` is false. Each preset\n carries its color value as its accessible label. -->\n <div\n v-if=\"hasPresets\"\n role=\"radiogroup\"\n :aria-label=\"t.colorPicker.presetColors\"\n :class=\"[\n 'tpl:flex tpl:flex-wrap tpl:gap-1.5',\n showFreeform && 'tpl:mb-2',\n ]\"\n @keydown=\"onPresetGridKeydown\"\n >\n <!-- Leading \"no colour\" (unset/inherit) chip — locked mode only.\n Always present, never gated on the current value: unset is a\n first-class member of the value domain, and a chip that\n disappeared on activation would strand keyboard focus mid-grid.\n Reuses the diagonal-slash unset visual and the same chip\n chrome; activating it emits \"\" to clear. -->\n <button\n v-if=\"showNoneChip\"\n type=\"button\"\n role=\"radio\"\n :aria-label=\"t.colorPicker.clear\"\n :title=\"t.colorPicker.clear\"\n :aria-checked=\"isUnset\"\n :tabindex=\"noneChipTabindex()\"\n :class=\"[\n 'tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]',\n isUnset\n ? 'tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]'\n : 'tpl:hover:border-[var(--tpl-text-dim)]',\n ]\"\n @click=\"clear\"\n />\n <button\n v-for=\"(preset, index) in presets\"\n :key=\"preset\"\n type=\"button\"\n role=\"radio\"\n :aria-label=\"preset\"\n :title=\"preset\"\n :aria-checked=\"isPresetSelected(preset)\"\n :tabindex=\"presetTabindex(index)\"\n :style=\"{ backgroundColor: preset }\"\n :class=\"[\n 'tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]',\n isPresetSelected(preset)\n ? 'tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]'\n : 'tpl:hover:border-[var(--tpl-text-dim)]',\n ]\"\n @click=\"selectPreset(preset)\"\n />\n </div>\n <hex-color-picker\n v-if=\"showFreeform\"\n :color=\"seed\"\n :aria-label=\"t.colorPicker.pickColor\"\n @color-changed=\"onPickerChange\"\n @pointerdown=\"onPickerPointerDown\"\n @pointerup=\"onPickerPointerUp\"\n @keydown.escape=\"open = false\"\n />\n <!-- Swatch-only mode has no inline field beside the swatch, so the\n popover carries the manual hex field (+ inline × clear) — the same\n control as the full-mode sidebar field. It commits on change/Enter,\n NOT @input: in the rich-text toolbar every emit calls\n editor.chain().focus().setColor(), and focusing the canvas mid-type\n would steal focus after the first character. Shown even when unset\n so a first color can be typed; the × appears only once a value is set. -->\n <div v-if=\"swatchOnly && showFreeform\" class=\"tpl:relative tpl:mt-2\">\n <input\n type=\"text\"\n :class=\"[colorTextClass, 'tpl:w-full']\"\n :style=\"showClear ? { paddingRight: '2.25rem' } : undefined\"\n :value=\"displayValue\"\n :placeholder=\"placeholder || t.colorPicker.notSet\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @change=\"onTextInput\"\n @keydown.enter.prevent=\"\n ($event.target as HTMLInputElement).blur()\n \"\n />\n <button\n v-if=\"showClear\"\n type=\"button\"\n :aria-label=\"t.colorPicker.clear\"\n :title=\"t.colorPicker.clear\"\n class=\"tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]\"\n @click=\"clear\"\n >\n <X :size=\"14\" :stroke-width=\"1.5\" />\n </button>\n </div>\n </div>\n </Transition>\n </Teleport>\n </div>\n</template>\n\n<style>\nhex-color-picker {\n --hcp-width: 200px;\n}\n\nhex-color-picker::part(hue) {\n border-radius: var(--tpl-radius-sm, 7px);\n}\n\nhex-color-picker::part(saturation) {\n border-radius: var(--tpl-radius-sm, 7px) var(--tpl-radius-sm, 7px) 0 0;\n}\n\n/* Unset swatch: paper with a single thin diagonal slash = \"no color set\".\n A neutral non-color signal — never Signal Amber (intent) or Danger. */\n.tpl-color-swatch-empty {\n background-color: var(--tpl-bg);\n background-image: linear-gradient(\n to top right,\n transparent calc(50% - 0.75px),\n var(--tpl-text-dim) calc(50% - 0.75px),\n var(--tpl-text-dim) calc(50% + 0.75px),\n transparent calc(50% + 0.75px)\n );\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport { X } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { usePopoverPosition } from \"../composables/usePopoverPosition\";\nimport { colorTextClass } from \"../constants/styleConstants\";\nimport { canonicalizeHexColor, normalizeColorToHex } from \"../utils/color\";\nimport { COLORS_KEY, THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { DEFAULT_RESOLVED_COLORS } from \"../utils/resolveColorsConfig\";\nimport \"vanilla-colorful\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n placeholder?: string;\n /**\n * Color the picker wheel opens on while the field is unset. It only\n * positions the wheel — it never paints the swatch or fills the input,\n * so an unset field still reads as \"not set\".\n */\n seedColor?: string;\n swatchOnly?: boolean;\n disabled?: boolean;\n /**\n * Swatch trigger size. `\"md\"` (40px) is the default for sidebar panels;\n * `\"sm\"` (32px) matches the compact rich-text floating toolbar controls.\n */\n size?: \"sm\" | \"md\";\n /**\n * Accessible label (and hover title) for the swatch trigger. Falls back to\n * the generic \"pick color\" label. Set it when several pickers sit side by\n * side and must be told apart (e.g. text color vs highlight in the toolbar).\n */\n ariaLabel?: string;\n /**\n * Per-instance override of the editor-wide `colors.presets` for this one\n * picker. This is the extension seam a caller uses to scope a single picker\n * to its own palette; when omitted, the injected editor-level presets apply.\n */\n presets?: string[];\n /**\n * Per-instance override of the editor-wide `colors.allowCustom` for this one\n * picker. When omitted, the injected editor-level setting applies.\n */\n allowCustom?: boolean;\n }>(),\n {\n placeholder: \"\",\n seedColor: \"#ffffff\",\n swatchOnly: false,\n disabled: false,\n size: \"md\",\n ariaLabel: \"\",\n presets: undefined,\n allowCustom: undefined,\n },\n);\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", value: string): void;\n}>();\n\nconst { t } = useI18n();\n\nconst open = ref(false);\nconst popoverRef = ref<HTMLElement>();\nconst swatchRef = ref<HTMLElement>();\n\n// Whether the picker emitted a real change during the current pointer gesture.\n// vanilla-colorful only fires `color-changed` when the chosen color differs\n// from the one the wheel was seeded with — so picking a color equal to the\n// seed emits nothing. When the field is still unset after such a no-change\n// pick, we commit the seed ourselves on pointerup so the value persists\n// (otherwise e.g. white on an empty background can never be set — issue #282).\nconst pickerTouched = ref(false);\n\nonClickOutside(\n popoverRef,\n () => {\n open.value = false;\n },\n { ignore: [swatchRef] },\n);\n\nconst isUnset = computed(() => !props.modelValue);\n\n// vanilla-colorful and the hex field are hex-only, but a stored value read back\n// from the DOM (e.g. a TipTap textStyle/highlight color) can be `rgb(...)`. Show\n// and seed the wheel with the hex form; the raw value still drives unset/emit.\nconst displayValue = computed(() => normalizeColorToHex(props.modelValue));\n\n// The color handed to the wheel: the stored value, or the seed when unset.\nconst seed = computed(() =>\n normalizeColorToHex(props.modelValue || props.seedColor),\n);\n\n// The clear (×) sits inside whichever hex field is active — the inline field in\n// full mode, or the popover field in swatch-only mode — shown only when a value\n// is set. Not gated on swatchOnly: each field renders only in its own mode.\nconst showClear = computed(() => !props.disabled && !isUnset.value);\n\n// Color palette: a per-instance `presets`/`allowCustom` prop wins over the\n// injected editor-wide `colors` config, per property. Default keeps the picker\n// unchanged when neither is configured. \"preset\" is kept distinct from the\n// trigger \"swatch\" (swatchOnly/swatchRef) on purpose — they are two different\n// concepts in this file.\nconst editorColors = inject(COLORS_KEY, DEFAULT_RESOLVED_COLORS);\n// Deduplicated: a repeated entry in the configured palette would render a\n// pointless second chip and collide on the value-based `v-for` key.\nconst presets = computed(() => [\n ...new Set(props.presets ?? editorColors.presets),\n]);\nconst allowCustom = computed(\n () => props.allowCustom ?? editorColors.allowCustom,\n);\nconst hasPresets = computed(() => presets.value.length > 0);\n\n// Show the free-form controls (wheel + hex inputs) whenever custom entry is\n// allowed OR there are no presets to fall back on — so a picker is never left\n// with no way to choose a color. `resolveColorsConfig` already forbids\n// `allowCustom: false` without presets at the editor level; a custom-block\n// color field locking itself with no palette anywhere (`resolveFieldColors`)\n// relies on this guard instead.\nconst showFreeform = computed(() => allowCustom.value || !hasPresets.value);\n\n// A preset reads as selected when its hex equals the current value, compared in\n// the canonical (rgb→hex, 3-digit expanded, lowercased) form — so a `#abc`\n// preset matches an `#aabbcc` browser round-trip and case never matters.\nconst normalizedValue = computed(() => canonicalizeHexColor(props.modelValue));\nfunction isPresetSelected(preset: string): boolean {\n return (\n normalizedValue.value !== \"\" &&\n canonicalizeHexColor(preset) === normalizedValue.value\n );\n}\nfunction selectPreset(preset: string): void {\n emit(\"update:modelValue\", preset);\n}\n\n// A leading \"no colour\" (unset/inherit) chip is rendered ONLY in locked mode\n// (`!showFreeform`) — the one mode with no other clear affordance. The freeform\n// modes already own clear via the hex-field ×; a preset-only grid otherwise has\n// no way back to unset once a colour is picked.\nconst showNoneChip = computed(() => hasPresets.value && !showFreeform.value);\n\n// Group-position of preset `index`, shifted by the leading none chip when it's\n// present, so the whole grid indexes as one radio list.\nfunction presetPosition(index: number): number {\n return showNoneChip.value ? index + 1 : index;\n}\n\n// Roving tabindex (WAI-ARIA APG radio group): the grid exposes exactly one tab\n// stop — the checked radio, or the FIRST radio when nothing is checked (value\n// unset with no none chip, or off-palette) — so the group is reachable by Tab\n// but a single Tab steps past it. The none chip counts as checked when the\n// value is unset. Arrow keys then rove focus between the radios.\nconst rovingIndex = computed(() => {\n if (showNoneChip.value && isUnset.value) {\n return 0;\n }\n const selected = presets.value.findIndex((preset) =>\n isPresetSelected(preset),\n );\n return selected === -1 ? 0 : presetPosition(selected);\n});\nfunction noneChipTabindex(): number {\n return rovingIndex.value === 0 ? 0 : -1;\n}\nfunction presetTabindex(index: number): number {\n return presetPosition(index) === rovingIndex.value ? 0 : -1;\n}\n\n// Arrow keys rove FOCUS across the chips (wrapping); they do NOT select.\n// Enter/Space activate the focused chip via native button click. This\n// deviates from APG's default \"selection follows focus\" on purpose: every\n// selection emits `update:modelValue`, and on the rich-text toolbar path that\n// runs `editor.chain().focus().setColor()` (see the swatch-only field comment\n// in the template), which refocuses the canvas — so following focus would\n// steal focus after the first arrow key and break traversal. APG sanctions\n// explicit activation when moving focus has side effects.\nfunction onPresetGridKeydown(e: KeyboardEvent): void {\n const arrows = [\"ArrowRight\", \"ArrowDown\", \"ArrowLeft\", \"ArrowUp\"];\n if (!arrows.includes(e.key)) {\n return;\n }\n // Resolve the current chip from `event.target`, never `document.activeElement`\n // — the latter is unreliable across a shadow-DOM boundary (this editor can\n // mount in a shadow root; the repo threads the real root via EDITOR_ROOT_KEY\n // for the same reason).\n const group = e.currentTarget as HTMLElement;\n const radios = Array.from(\n group.querySelectorAll<HTMLElement>('[role=\"radio\"]'),\n );\n const current = (e.target as HTMLElement).closest('[role=\"radio\"]');\n const currentIndex = current ? radios.indexOf(current as HTMLElement) : -1;\n if (currentIndex === -1) {\n return;\n }\n const forward = e.key === \"ArrowRight\" || e.key === \"ArrowDown\";\n const nextIndex =\n (currentIndex + (forward ? 1 : -1) + radios.length) % radios.length;\n radios[nextIndex]?.focus();\n e.preventDefault();\n}\n\nfunction onPickerChange(e: Event): void {\n pickerTouched.value = true;\n emit(\"update:modelValue\", (e as CustomEvent).detail.value);\n}\n\nfunction onPickerPointerDown(): void {\n pickerTouched.value = false;\n}\n\nfunction onPickerPointerUp(): void {\n // A deliberate pick equal to the seed fires no `color-changed`; commit it.\n if (!pickerTouched.value && isUnset.value) {\n emit(\"update:modelValue\", seed.value);\n }\n}\n\nfunction onTextInput(e: Event): void {\n emit(\"update:modelValue\", (e.target as HTMLInputElement).value);\n}\n\nfunction clear(): void {\n emit(\"update:modelValue\", \"\");\n}\n\n// The popover teleports to the shared popover root so it escapes any clipping /\n// overflow-hidden ancestor (e.g. the link dialog's card, where clicking the\n// clipped wheel landed on the backdrop and closed the modal). Position is\n// captured from the swatch on open and applied as `absolute`, in coordinates\n// local to the popover root (`toLocal`) so a transformed ancestor of the\n// editor doesn't offset it — see usePopoverPosition.\nconst popoverRoot = usePopoverRoot();\nconst { toLocal } = usePopoverPosition();\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst tplUiTheme = inject(UI_THEME_KEY, null);\nconst popoverPosition = ref({ top: 0, left: 0 });\n\nfunction toggleOpen(): void {\n if (props.disabled) return;\n if (!open.value) {\n const rect = swatchRef.value?.getBoundingClientRect();\n if (rect) {\n const PICKER_HEIGHT = 240; // wheel + hue slider + padding, approx\n const gap = 8;\n // Open below the swatch, or flip above when it would overflow the viewport\n // bottom — the popover is `fixed`, so it can't scroll into view otherwise.\n const fitsBelow = rect.bottom + gap + PICKER_HEIGHT <= window.innerHeight;\n const viewportTop = fitsBelow\n ? rect.bottom + gap\n : Math.max(gap, rect.top - PICKER_HEIGHT - gap);\n popoverPosition.value = toLocal({ top: viewportTop, left: rect.left });\n }\n }\n open.value = !open.value;\n}\n</script>\n\n<template>\n <div\n :class=\"[\n 'tpl:flex tpl:items-center tpl:gap-2 tpl:relative',\n disabled && 'tpl:opacity-60 tpl:cursor-not-allowed',\n ]\"\n >\n <button\n ref=\"swatchRef\"\n type=\"button\"\n :disabled=\"disabled\"\n :aria-label=\"ariaLabel || t.colorPicker.pickColor\"\n :title=\"ariaLabel || undefined\"\n :aria-expanded=\"open\"\n :class=\"[\n 'tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]',\n disabled ? 'tpl:cursor-not-allowed' : 'tpl:cursor-pointer',\n open\n ? 'tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]'\n : !disabled && 'tpl:hover:border-[var(--tpl-text-dim)]',\n size === 'sm' ? 'tpl:size-8' : 'tpl:size-10',\n ]\"\n @click=\"toggleOpen\"\n >\n <span\n class=\"tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]\"\n :class=\"{ 'tpl-color-swatch-empty': isUnset }\"\n :style=\"isUnset ? undefined : { backgroundColor: displayValue }\"\n />\n </button>\n <div v-if=\"!swatchOnly && showFreeform\" class=\"tpl:relative tpl:flex-1\">\n <input\n type=\"text\"\n :class=\"[colorTextClass, 'tpl:w-full']\"\n :style=\"showClear ? { paddingRight: '2.25rem' } : undefined\"\n :value=\"displayValue\"\n :placeholder=\"placeholder || t.colorPicker.notSet\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @input=\"onTextInput\"\n />\n <button\n v-if=\"showClear\"\n type=\"button\"\n :aria-label=\"t.colorPicker.clear\"\n :title=\"t.colorPicker.clear\"\n class=\"tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]\"\n @click=\"clear\"\n >\n <X :size=\"14\" :stroke-width=\"1.5\" />\n </button>\n </div>\n <Teleport :to=\"popoverRoot\" :disabled=\"!popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]\"\n enter-from-class=\"tpl:opacity-0 tpl:scale-95 tpl:translate-y-1\"\n enter-to-class=\"tpl:opacity-100 tpl:scale-100 tpl:translate-y-0\"\n leave-active-class=\"tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]\"\n leave-from-class=\"tpl:opacity-100 tpl:scale-100 tpl:translate-y-0\"\n leave-to-class=\"tpl:opacity-0 tpl:scale-95 tpl:translate-y-1\"\n >\n <div\n v-if=\"open\"\n ref=\"popoverRef\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl-color-popover tpl:absolute tpl:z-modal tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"{\n top: `${popoverPosition.top}px`,\n left: `${popoverPosition.left}px`,\n ...themeStyles,\n }\"\n >\n <!-- Preset color grid — an ARIA radio group: each chip is a\n `role=\"radio\"`, arrow keys rove focus between them (roving\n tabindex), and Enter/Space activate. Supplements the wheel/hex\n field; the only control when `allowCustom` is false. Each preset\n carries its color value as its accessible label. -->\n <div\n v-if=\"hasPresets\"\n role=\"radiogroup\"\n :aria-label=\"t.colorPicker.presetColors\"\n :class=\"[\n 'tpl:flex tpl:flex-wrap tpl:gap-1.5',\n showFreeform && 'tpl:mb-2',\n ]\"\n @keydown=\"onPresetGridKeydown\"\n >\n <!-- Leading \"no colour\" (unset/inherit) chip — locked mode only.\n Always present, never gated on the current value: unset is a\n first-class member of the value domain, and a chip that\n disappeared on activation would strand keyboard focus mid-grid.\n Reuses the diagonal-slash unset visual and the same chip\n chrome; activating it emits \"\" to clear. -->\n <button\n v-if=\"showNoneChip\"\n type=\"button\"\n role=\"radio\"\n :aria-label=\"t.colorPicker.clear\"\n :title=\"t.colorPicker.clear\"\n :aria-checked=\"isUnset\"\n :tabindex=\"noneChipTabindex()\"\n :class=\"[\n 'tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]',\n isUnset\n ? 'tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]'\n : 'tpl:hover:border-[var(--tpl-text-dim)]',\n ]\"\n @click=\"clear\"\n />\n <button\n v-for=\"(preset, index) in presets\"\n :key=\"preset\"\n type=\"button\"\n role=\"radio\"\n :aria-label=\"preset\"\n :title=\"preset\"\n :aria-checked=\"isPresetSelected(preset)\"\n :tabindex=\"presetTabindex(index)\"\n :style=\"{ backgroundColor: preset }\"\n :class=\"[\n 'tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]',\n isPresetSelected(preset)\n ? 'tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]'\n : 'tpl:hover:border-[var(--tpl-text-dim)]',\n ]\"\n @click=\"selectPreset(preset)\"\n />\n </div>\n <hex-color-picker\n v-if=\"showFreeform\"\n :color=\"seed\"\n :aria-label=\"t.colorPicker.pickColor\"\n @color-changed=\"onPickerChange\"\n @pointerdown=\"onPickerPointerDown\"\n @pointerup=\"onPickerPointerUp\"\n @keydown.escape=\"open = false\"\n />\n <!-- Swatch-only mode has no inline field beside the swatch, so the\n popover carries the manual hex field (+ inline × clear) — the same\n control as the full-mode sidebar field. It commits on change/Enter,\n NOT @input: in the rich-text toolbar every emit calls\n editor.chain().focus().setColor(), and focusing the canvas mid-type\n would steal focus after the first character. Shown even when unset\n so a first color can be typed; the × appears only once a value is set. -->\n <div v-if=\"swatchOnly && showFreeform\" class=\"tpl:relative tpl:mt-2\">\n <input\n type=\"text\"\n :class=\"[colorTextClass, 'tpl:w-full']\"\n :style=\"showClear ? { paddingRight: '2.25rem' } : undefined\"\n :value=\"displayValue\"\n :placeholder=\"placeholder || t.colorPicker.notSet\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @change=\"onTextInput\"\n @keydown.enter.prevent=\"\n ($event.target as HTMLInputElement).blur()\n \"\n />\n <button\n v-if=\"showClear\"\n type=\"button\"\n :aria-label=\"t.colorPicker.clear\"\n :title=\"t.colorPicker.clear\"\n class=\"tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]\"\n @click=\"clear\"\n >\n <X :size=\"14\" :stroke-width=\"1.5\" />\n </button>\n </div>\n </div>\n </Transition>\n </Teleport>\n </div>\n</template>\n\n<style>\nhex-color-picker {\n --hcp-width: 200px;\n}\n\nhex-color-picker::part(hue) {\n border-radius: var(--tpl-radius-sm, 7px);\n}\n\nhex-color-picker::part(saturation) {\n border-radius: var(--tpl-radius-sm, 7px) var(--tpl-radius-sm, 7px) 0 0;\n}\n\n/* Unset swatch: paper with a single thin diagonal slash = \"no color set\".\n A neutral non-color signal — never Signal Amber (intent) or Danger. */\n.tpl-color-swatch-empty {\n background-color: var(--tpl-bg);\n background-image: linear-gradient(\n to top right,\n transparent calc(50% - 0.75px),\n var(--tpl-text-dim) calc(50% - 0.75px),\n var(--tpl-text-dim) calc(50% + 0.75px),\n transparent calc(50% + 0.75px)\n );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AA,GAAA,EAQE,oBAAA;;MANC,OAAO,EAAA;MACP,cAAY,EAAA,CAAA,CAAC,CAAC,YAAY;MAC1B,gBAAe;MACf,eAAa;MACb,aAAW;MACX,WAAO,AAAA,EAAA,OAAA,GAAA,MAAS,EAAA,QAAI,IAAA,CAAA,QAAA,CAAA;;KASZ,EAAA,cAAc,EAAA,SAAzB,EAAA,GAAA,EAwBM,OAxBN,IAwBM,CAvBJ,EAYE,SAAA;MAXA,MAAK;MACJ,OAAK,EAAA,CAAG,EAAA,CAAA,GAAc,YAAA,CAAA;MACtB,OAAK,EAAE,EAAA,QAAS,EAAA,cAAA,UAAA,IAAiC,KAAA,CAAS;MAC1D,OAAO,EAAA;MACP,aAAa,EAAA,eAAe,EAAA,CAAA,CAAC,CAAC,YAAY;MAC1C,UAAU,EAAA;MACV,cAAY,EAAA,CAAA,CAAC,CAAC,YAAY;MAC1B,UAAQ;MACR,WAAO,AAAA,EAAA,OAAA,EAAA,IAAA,MAAkC,EAAO,OAA4B,KAAI,GAAA,CAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;KAK3E,GAAA,MAAA,IAAA,EAAA,GAAA,EAAA,SADR,EAAA,GAAA,EASS,UAAA;;MAPP,MAAK;MACJ,cAAY,EAAA,CAAA,CAAC,CAAC,YAAY;MAC1B,OAAO,EAAA,CAAA,CAAC,CAAC,YAAY;MACtB,OAAM;MACL,SAAO;KAER,GAAA,CAAA,EAAoC,EAAA,CAAA,GAAA;MAAhC,MAAM;MAAK,gBAAc"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { N as e, S as t, at as n, h as r, m as i, x as a } from "./draggable-BfpsXFg7.js";
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region src/components/CommentsPanel.vue
|
|
4
|
+
var o = /* @__PURE__ */ t({
|
|
5
|
+
__name: "CommentsPanel",
|
|
6
|
+
props: { feature: {} },
|
|
7
|
+
setup(t) {
|
|
8
|
+
let o = a(() => import("./CommentsSidebar-Dxke-vUP.js"));
|
|
9
|
+
return (a, s) => t.feature.isOpen.value ? (e(), i(n(o), {
|
|
10
|
+
key: 0,
|
|
11
|
+
visible: t.feature.isOpen.value,
|
|
12
|
+
feature: t.feature,
|
|
13
|
+
onClose: s[0] ||= (e) => t.feature.close()
|
|
14
|
+
}, null, 8, ["visible", "feature"])) : r("", !0);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { o as default };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=CommentsPanel-jzZ2X0P4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommentsPanel-jzZ2X0P4.js","names":[],"sources":["../../../src/components/CommentsPanel.vue","../../../src/components/CommentsPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Mount point for the comments sidebar, shared by both entry points.\n *\n * The sidebar is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens the panel. `Editor.vue` in\n * turn lazy-loads *this* wrapper and renders it only when a `CommentsProvider` and\n * a `user` are configured, so a consumer with neither downloads none of it —\n * the `TestEmailPanel` / `SavedBlocksPanels` shape.\n *\n * Never static-import `CommentsSidebar` into `Editor.vue`: that collapses the\n * whole panel into the main entry for every consumer. Guarded by\n * `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseCommentsFeatureReturn } from \"../composables/useCommentsFeature\";\n\ndefineProps<{\n feature: UseCommentsFeatureReturn;\n}>();\n\nconst CommentsSidebar = defineAsyncComponent(\n () => import(\"./CommentsSidebar.vue\"),\n);\n</script>\n\n<template>\n <CommentsSidebar\n v-if=\"feature.isOpen.value\"\n :visible=\"feature.isOpen.value\"\n :feature=\"feature\"\n @close=\"feature.close()\"\n />\n</template>\n","<script setup lang=\"ts\">\n/**\n * Mount point for the comments sidebar, shared by both entry points.\n *\n * The sidebar is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens the panel. `Editor.vue` in\n * turn lazy-loads *this* wrapper and renders it only when a `CommentsProvider` and\n * a `user` are configured, so a consumer with neither downloads none of it —\n * the `TestEmailPanel` / `SavedBlocksPanels` shape.\n *\n * Never static-import `CommentsSidebar` into `Editor.vue`: that collapses the\n * whole panel into the main entry for every consumer. Guarded by\n * `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseCommentsFeatureReturn } from \"../composables/useCommentsFeature\";\n\ndefineProps<{\n feature: UseCommentsFeatureReturn;\n}>();\n\nconst CommentsSidebar = defineAsyncComponent(\n () => import(\"./CommentsSidebar.vue\"),\n);\n</script>\n\n<template>\n <CommentsSidebar\n v-if=\"feature.isOpen.value\"\n :visible=\"feature.isOpen.value\"\n :feature=\"feature\"\n @close=\"feature.close()\"\n />\n</template>\n"],"mappings":";;;;;;;EAqBA,IAAM,IAAkB,QAChB,OAAO,gCACf;mBAKU,EAAA,QAAQ,OAAO,SADvB,EAAA,GAAA,EAKE,EAAA,CAAA,GAAA;;GAHC,SAAS,EAAA,QAAQ,OAAO;GACxB,SAAS,EAAA;GACT,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,QAAQ,MAAK"}
|