@panphora/clayjs 1.23.0 → 1.24.1
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/all.js +1 -1
- package/dist/blockeditor/themes/light-1.css +431 -0
- package/dist/clay-dom.js +1 -1
- package/dist/clay-events.js +1 -1
- package/dist/clay-internals.js +1 -1
- package/dist/clay-options.js +1 -1
- package/dist/clay-router.js +1 -1
- package/dist/clay-ui.js +1 -1
- package/dist/clay-utils.js +1 -1
- package/dist/clay.js +1 -1
- package/dist/clay.standalone.js +30285 -26613
- package/dist/m/c-277QP5ET.js +1 -0
- package/dist/m/c-2BLVA6IN.js +5 -0
- package/dist/m/c-2OJMOUPC.js +1 -0
- package/dist/m/c-2PVGJFI5.js +1 -0
- package/dist/m/{c-AYVGD6A6.js → c-3UW5EJ77.js} +1 -1
- package/dist/m/{c-T5NK2TVY.js → c-42ZNV7LI.js} +1 -1
- package/dist/m/{c-3TLG3OLG.js → c-46LJAZZJ.js} +1 -1
- package/dist/m/c-47IBJGPQ.js +1 -0
- package/dist/m/c-5FXEKU4Y.js +1 -0
- package/dist/m/c-5KXDKC5G.js +1 -0
- package/dist/m/{c-EUGJVHDD.js → c-5RZNFTWD.js} +1 -1
- package/dist/m/c-65LJU2H2.js +72 -0
- package/dist/m/{c-NQJRVJ56.js → c-6IJEVE6B.js} +1 -1
- package/dist/m/{c-NW54NHKE.js → c-6LEYVQJK.js} +1 -1
- package/dist/m/{c-GSRLXYWL.js → c-6Q6RGFBF.js} +1 -1
- package/dist/m/c-6RGEQNVV.js +1 -0
- package/dist/m/c-7CM4GMTS.js +6 -0
- package/dist/m/c-7NCWENHV.js +1 -0
- package/dist/m/c-7V6MGMX2.js +1 -0
- package/dist/m/{c-LKSL4AUJ.js → c-7WZSUTYP.js} +1 -1
- package/dist/m/c-A4L7APIU.js +1 -0
- package/dist/m/c-APGHGDZM.js +1 -0
- package/dist/m/c-AT7GLQGV.js +34 -0
- package/dist/m/{c-ZRXJD4G6.js → c-B7GOFGQR.js} +1 -1
- package/dist/m/{c-KDXIJEEF.js → c-BGN7RCTJ.js} +1 -1
- package/dist/m/c-BKM46LUJ.js +1 -0
- package/dist/m/c-BOMQIQ3V.js +1 -0
- package/dist/m/{c-62HZW5DH.js → c-C5AKJVRH.js} +1 -1
- package/dist/m/{c-BXYSDKAN.js → c-CJ7QYEWI.js} +1 -1
- package/dist/m/c-CTGRDT6E.js +1 -0
- package/dist/m/c-CV4T65JE.js +6 -0
- package/dist/m/c-CVSWLX3X.js +1 -0
- package/dist/m/c-CZHTXGJS.js +1 -0
- package/dist/m/c-D7NT5S4F.js +1 -0
- package/dist/m/c-DD26VXAP.js +1 -0
- package/dist/m/{c-ANNFZFLN.js → c-DDS23EY6.js} +1 -1
- package/dist/m/{c-ALDVFPWL.js → c-DFKBGSN2.js} +1 -1
- package/dist/m/c-DIKR7H57.js +147 -0
- package/dist/m/c-DXPOFLEJ.js +1 -0
- package/dist/m/c-EDE45NM7.js +1 -0
- package/dist/m/c-EILLN2H2.js +1 -0
- package/dist/m/c-EODTTNVA.js +1 -0
- package/dist/m/{c-G6COVIZB.js → c-ESK4S67I.js} +1 -1
- package/dist/m/c-FDWR3FL7.js +1 -0
- package/dist/m/{c-WQZTI5P2.js → c-FEC6LGFF.js} +1 -1
- package/dist/m/c-FLEIU6CG.js +1 -0
- package/dist/m/c-FQAQRXGK.js +1 -0
- package/dist/m/{c-W4JCVLAB.js → c-FSQXFG5T.js} +1 -1
- package/dist/m/c-FVPNX2GO.js +135 -0
- package/dist/m/c-FYDKYW6E.js +1 -0
- package/dist/m/c-GNI7WHKF.js +32 -0
- package/dist/m/c-GO635CRU.js +3 -0
- package/dist/m/c-H3FNLBHN.js +2 -0
- package/dist/m/c-HDVH3MVC.js +72 -0
- package/dist/m/c-HIX5H5L7.js +1 -0
- package/dist/m/c-HKSLOVU4.js +1 -0
- package/dist/m/{c-SGRIYOAJ.js → c-HL6BLJNA.js} +1 -1
- package/dist/m/c-HTLYXCUH.js +1 -0
- package/dist/m/{c-QIR5CAKM.js → c-IUL7PU4P.js} +1 -1
- package/dist/m/c-IXO7EI2Q.js +1 -0
- package/dist/m/{c-W5E5P2TZ.js → c-JQF2EUCG.js} +1 -1
- package/dist/m/{c-NEL7HQW3.js → c-JWDCQL6J.js} +1 -1
- package/dist/m/c-KQKKIVLW.js +20 -0
- package/dist/m/c-LATNQ6Q5.js +1 -0
- package/dist/m/c-LD6UVV5R.js +1 -0
- package/dist/m/c-LS7IVQVW.js +1 -0
- package/dist/m/{c-JCOQVZYS.js → c-LSVN3OLG.js} +1 -1
- package/dist/m/{c-JDZDF2QM.js → c-LTSPHVAK.js} +1 -1
- package/dist/m/c-MFOSMAVM.js +3 -0
- package/dist/m/c-MJ7GVE46.js +1 -0
- package/dist/m/c-MP6S4AZU.js +6 -0
- package/dist/m/c-MQKSKQHG.js +2 -0
- package/dist/m/{c-UHUNXWKN.js → c-MQYEDF3Q.js} +1 -1
- package/dist/m/{c-IHUWUKIU.js → c-MR75YPRT.js} +1 -1
- package/dist/m/c-ND3Q2G2I.js +1 -0
- package/dist/m/c-NEQRFC4O.js +1 -0
- package/dist/m/{c-5FKRZNJV.js → c-NFQFV7OP.js} +1 -1
- package/dist/m/c-NHXOBD6A.js +1 -0
- package/dist/m/{c-QIKT6SKM.js → c-NICICT4P.js} +1 -1
- package/dist/m/c-NQAPWM7O.js +1 -0
- package/dist/m/{c-QUGCKMWF.js → c-NVU3DORS.js} +1 -1
- package/dist/m/{c-LWIDDWAR.js → c-OCYG4NBQ.js} +22 -22
- package/dist/m/c-OH2FPYSY.js +19 -0
- package/dist/m/c-OYHI67B6.js +1 -0
- package/dist/m/{c-R2XUODVY.js → c-OYW5MFPZ.js} +1 -1
- package/dist/m/{c-5B4YBZXC.js → c-P2HKMJAW.js} +1 -1
- package/dist/m/{c-TSBVMWAH.js → c-PCNJETUA.js} +1 -1
- package/dist/m/c-PDBNCJCT.js +1 -0
- package/dist/m/c-PGSBXHUE.js +1 -0
- package/dist/m/{c-5TIZ2I64.js → c-PYG2NGWU.js} +1 -1
- package/dist/m/c-Q26XHBLQ.js +1 -0
- package/dist/m/c-Q6BG3ZLO.js +1 -0
- package/dist/m/c-QENKN7QI.js +1 -0
- package/dist/m/c-QQFHEODI.js +1 -0
- package/dist/m/c-QTEUO2K6.js +1 -0
- package/dist/m/c-R23UHMXG.js +1 -0
- package/dist/m/c-RETTCOWO.js +10 -0
- package/dist/m/c-SE3SIY7Y.js +7 -0
- package/dist/m/{c-XX75FFNL.js → c-SGGGCIVD.js} +1 -1
- package/dist/m/c-SGH3UTF3.js +1 -0
- package/dist/m/c-SIM7Z3U7.js +1 -0
- package/dist/m/{c-X5LNHET5.js → c-SKMIR5HQ.js} +1 -1
- package/dist/m/{c-R27DWQKX.js → c-STRI73GQ.js} +1 -1
- package/dist/m/c-SUXHUL7U.js +1 -0
- package/dist/m/c-SXGEWPFC.js +10 -0
- package/dist/m/c-SXNSSHPP.js +1 -0
- package/dist/m/c-T3P3AXEW.js +1 -0
- package/dist/m/{c-PXLTUYZC.js → c-TFLRT5JX.js} +1 -1
- package/dist/m/{c-YCLU4UNT.js → c-TGIMBAWE.js} +1 -1
- package/dist/m/c-TGSHHFO6.js +1 -0
- package/dist/m/c-U4NTUVDZ.js +1 -0
- package/dist/m/c-UOOIF2AL.js +1 -0
- package/dist/m/{c-6TYGD5AB.js → c-UOUUI265.js} +1 -1
- package/dist/m/c-V2U3F4QX.js +1 -0
- package/dist/m/c-V2V5FKXX.js +1 -0
- package/dist/m/c-VBXRXTVS.js +26 -0
- package/dist/m/c-VHSMPITY.js +1 -0
- package/dist/m/c-VPXCXBDT.js +1 -0
- package/dist/m/c-WCG6AKA7.js +1 -0
- package/dist/m/c-WNOLMHI2.js +1 -0
- package/dist/m/{c-CRPIDGXC.js → c-X6MOYATI.js} +1 -1
- package/dist/m/{c-FQGHR32O.js → c-X75G43SZ.js} +1 -1
- package/dist/m/c-XB6EAIAR.js +13 -0
- package/dist/m/c-XMIDHEKF.js +1 -0
- package/dist/m/c-XUZMRQ7O.js +4 -0
- package/dist/m/{c-2Z22FCFK.js → c-XW5TIYYB.js} +1 -1
- package/dist/m/c-YDW4VCHP.js +1 -0
- package/dist/m/{c-QGAPG7OM.js → c-YLHTD3KX.js} +1 -1
- package/dist/m/c-YNIEIPBS.js +1 -0
- package/dist/m/c-Z4G2UK6T.js +4 -0
- package/dist/m/c-Z6MROEQ4.js +1 -0
- package/dist/m/c-ZFO5RW6G.js +2 -0
- package/dist/m/c-ZGCO4J3H.js +8 -0
- package/dist/m/c-ZKKAF4UT.js +3 -0
- package/dist/m/c-ZRGEN6QQ.js +4 -0
- package/dist/m/core/{admin-attrs-U7IJNYBG.js → admin-attrs-ONRWVXPK.js} +1 -1
- package/dist/m/core/{autosave-F5YQCKVL.js → autosave-TBKAAAFB.js} +1 -1
- package/dist/m/core/conflict-notice-FOEE6I7E.js +1 -0
- package/dist/m/core/draft-mode-4MCL3LYI.js +1 -0
- package/dist/m/core/{host-permission-6EVJGNPL.js → host-permission-X4BENZEU.js} +1 -1
- package/dist/m/core/{is-edit-mode-GCX6767E.js → is-edit-mode-FFHCQ5DR.js} +1 -1
- package/dist/m/core/{persist-CJXIL7D4.js → persist-6ILUR34S.js} +1 -1
- package/dist/m/core/{recovery-DRFZRJED.js → recovery-APWADU4K.js} +1 -1
- package/dist/m/core/save-6HT2LABE.js +1 -0
- package/dist/m/core/save-core-EVMNZQ4V.js +1 -0
- package/dist/m/core/site-edits-G4BOZMV4.js +1 -0
- package/dist/m/core/{unsaved-warning-HNQVTA2D.js → unsaved-warning-ITZDIZ2I.js} +1 -1
- package/dist/m/internals/{index-NRPNDTSA.js → index-HS3CQDFW.js} +1 -1
- package/dist/m/loader-GLLVDUZA.js +1 -0
- package/dist/m/manifest-50FF1C45.js +1 -0
- package/dist/m/manifest-edit-BE1A621D.js +1 -0
- package/dist/m/manifest.json +2072 -1811
- package/dist/m/page/editor-KAZDJNND.js +307 -0
- package/dist/m/plugins/ai-edit-LABECCSN.js +6 -0
- package/dist/m/plugins/{cms-H7DTMUQX.js → cms-T2HLI7JG.js} +16 -16
- package/dist/m/plugins/{demo-42BSYQ7T.js → demo-T7B4RIKL.js} +1 -1
- package/dist/m/plugins/{derive-QVI3LI3A.js → derive-6LPJOCAV.js} +1 -1
- package/dist/m/plugins/indicator-J4ABFARX.js +1 -0
- package/dist/m/plugins/{live-DCUBKXY4.js → live-PGBIEMGB.js} +1 -1
- package/dist/m/plugins/menu-YZL3X2AJ.js +1 -0
- package/dist/m/plugins/page-WOCNX2IN.js +2 -0
- package/dist/m/plugins/page-view-SJODOOGE.js +1 -0
- package/dist/m/plugins/{people-5XRNRP5U.js → people-C4TCWFOQ.js} +1 -1
- package/dist/m/plugins/{quickcrop-WWF5I422.js → quickcrop-X5MRIBAP.js} +2 -2
- package/dist/m/plugins/richclay-Y2NV44NA.js +549 -0
- package/dist/m/plugins/sortable-XCHQG65Z.js +1 -0
- package/dist/m/plugins/{source-6BKMK4PO.js → source-YK7MO23W.js} +1 -1
- package/dist/m/plugins/{undo-3JEYK5QY.js → undo-VLRBQNPN.js} +1 -1
- package/dist/m/plugins/upgrade-NNTJBSK2.js +1 -0
- package/dist/m/plugins/{upload-TTCQRIM5.js → upload-ZKKJV76X.js} +1 -1
- package/dist/m/plugins/visitor-drafts-RTZNONHT.js +20 -0
- package/dist/m/plugins/{visitor-drafts-owner-Z5B2OQBR.js → visitor-drafts-owner-LHUHFU3L.js} +1 -1
- package/dist/m/plugins/{visitor-menu-4LQMKLPP.js → visitor-menu-FY4KM2SW.js} +1 -1
- package/dist/m/plugins/wire-M2NR354P.js +1 -0
- package/dist/m/{reader-core-POFQCKRV.js → reader-core-T2S3JC4E.js} +2 -2
- package/dist/m/sync/live-sync-Z64YREWQ.js +1 -0
- package/dist/m/ui/index-MGTWOW2C.js +1 -0
- package/dist/m/vendor/{sap-core.vendor-OA5SKL7Q.js → sap-core.vendor-QAEPMETX.js} +1 -1
- package/dist/offline-manifest.json +1250 -1082
- package/dist/server/core.cjs +132 -109
- package/dist/server/page-compaction-worker.cjs +5 -5
- package/dist/server/rooms.mjs +3 -1
- package/docs/guide.md +89 -44
- package/entries/clay-data.js +1 -1
- package/entries/sap.js +1 -1
- package/package.json +5 -3
- package/src/blockeditor/themes/content.css +70 -0
- package/src/blockeditor/themes/light-1.css +431 -0
- package/src/blockeditor/themes/light-1.source.css +270 -0
- package/src/blockeditor/themes/light-2.css +211 -0
- package/src/blockeditor/themes/light-3.css +130 -0
- package/src/blockeditor/themes/light-4.css +299 -0
- package/src/core/conflict-notice.js +28 -0
- package/src/core/draft-mode.js +6 -0
- package/src/core/host-meta.js +6 -6
- package/src/core/is-edit-mode.js +9 -3
- package/src/core/mode-support.js +3 -0
- package/src/core/mode-switch.js +4 -4
- package/src/core/mode-transition.js +3 -1
- package/src/core/page-format-wire.js +1 -1
- package/src/core/page-format.js +8 -8
- package/src/core/save-accepted.js +6 -7
- package/src/core/save-core.js +52 -23
- package/src/core/save-failure-notice.js +37 -0
- package/src/core/save-feedback.js +6 -0
- package/src/core/save-replace.js +1 -1
- package/src/core/save-size.js +2 -2
- package/src/core/save.js +78 -15
- package/src/core/site-edits.js +166 -0
- package/src/core/unsaved-warning.js +2 -2
- package/src/core/upgrade-run.js +4 -4
- package/src/lib/ai-comment.js +23 -0
- package/src/lib/effect.js +8 -0
- package/src/lib/idb-error-code.js +20 -0
- package/src/live/fast-lane.js +10 -10
- package/src/live/local-lane.js +10 -10
- package/src/live/page-compaction.js +8 -8
- package/src/live/server-lane.js +1 -1
- package/src/loader-logic.js +48 -18
- package/src/loader.js +11 -6
- package/src/page/adopt-boot.js +1 -1
- package/src/page/adopt.js +2 -2
- package/src/page/ai-area.js +182 -0
- package/src/page/ai-preview.js +80 -0
- package/src/page/ai-surface.js +257 -0
- package/src/page/ai-tool.js +308 -145
- package/src/page/announce.js +2 -2
- package/src/page/awareness.js +18 -18
- package/src/page/blocks.js +35 -34
- package/src/page/blocksel.js +2 -2
- package/src/page/board-drag.js +11 -11
- package/src/page/board-face.js +1 -1
- package/src/page/board-panel.js +26 -26
- package/src/page/board-style.js +127 -127
- package/src/page/board-view.js +48 -48
- package/src/page/chart.js +29 -29
- package/src/page/checkpoint-proof.js +19 -19
- package/src/page/chrome.js +74 -65
- package/src/page/clipboard-shape.js +1 -1
- package/src/page/csv-import.js +4 -4
- package/src/page/drag.js +5 -5
- package/src/page/editor.js +301 -296
- package/src/page/export-html.js +8 -8
- package/src/page/features/checklist.js +36 -36
- package/src/page/features/export-html.js +19 -19
- package/src/page/features/export-markdown.js +10 -10
- package/src/page/features/import-markdown.js +13 -13
- package/src/page/features/media.js +50 -50
- package/src/page/features/table.js +17 -17
- package/src/page/features/title-cover.js +17 -17
- package/src/page/features/title-icon.js +7 -7
- package/src/page/features/toc.js +1 -1
- package/src/page/features/tool.js +42 -18
- package/src/page/format-command.js +4 -4
- package/src/page/format-gate.js +6 -6
- package/src/page/format-host.js +6 -6
- package/src/page/format-level.js +3 -3
- package/src/page/format-native-commands.js +2 -2
- package/src/page/highlight-slot.js +1 -1
- package/src/page/highlight.js +4 -4
- package/src/page/history-intent.js +2 -2
- package/src/page/image-actions.js +4 -4
- package/src/page/link.js +10 -10
- package/src/page/media.js +3 -3
- package/src/page/mention-picker.js +7 -7
- package/src/page/merge.js +1 -1
- package/src/page/placeholder.js +3 -3
- package/src/page/projection.js +11 -11
- package/src/page/reader-patch.js +2 -2
- package/src/page/recover.js +26 -26
- package/src/page/recovery-ui.js +28 -28
- package/src/page/rich/chart.js +1 -1
- package/src/page/rich/page-tool.js +21 -6
- package/src/page/rich/tool-runtime.js +3 -2
- package/src/page/save-projection.js +2 -2
- package/src/page/save-states.js +9 -9
- package/src/page/schema.js +9 -9
- package/src/page/table-style.js +21 -21
- package/src/page/toc-link.js +1 -1
- package/src/page/tool-capability.js +8 -3
- package/src/page/tool-transport.js +52 -0
- package/src/page/tool-views.js +4 -0
- package/src/page/tools.js +6 -1
- package/src/page/view.js +6 -6
- package/src/page/ybind/binding.js +1 -1
- package/src/page/ybind/conversion.js +1 -1
- package/src/page/ybind/layout.js +4 -4
- package/src/page/ybind/migrate.js +1 -1
- package/src/page/ybind/origins.js +2 -2
- package/src/page/ybind/provider.js +2 -2
- package/src/page/ybind/recovery-proof.js +3 -3
- package/src/page/ybind/recovery-replay.js +2 -2
- package/src/plugins/ai-edit/picker.js +235 -0
- package/src/plugins/ai-edit.js +220 -34
- package/src/plugins/indicator-chip.js +39 -34
- package/src/plugins/indicator.js +13 -4
- package/src/plugins/live.js +21 -13
- package/src/plugins/menu/actions.js +89 -17
- package/src/plugins/menu/seo.js +32 -6
- package/src/plugins/menu/shell-style.js +26 -7
- package/src/plugins/menu/shell.js +12 -7
- package/src/plugins/menu/variants.js +6 -10
- package/src/plugins/menu/visitor.js +44 -34
- package/src/plugins/menu.js +3 -2
- package/src/plugins/page-view.js +2 -2
- package/src/plugins/page.js +257 -98
- package/src/plugins/sortable.js +7 -0
- package/src/plugins/upgrade.js +2 -1
- package/src/plugins/visitor-drafts/commit.js +303 -0
- package/src/plugins/visitor-drafts/idb.js +221 -0
- package/src/plugins/visitor-drafts/intro-style.js +1 -1
- package/src/plugins/visitor-drafts/intro.js +8 -25
- package/src/plugins/visitor-drafts/prompt.js +30 -4
- package/src/plugins/visitor-drafts/session.js +345 -0
- package/src/plugins/visitor-drafts/store.js +351 -32
- package/src/plugins/visitor-drafts.js +158 -27
- package/src/server/checkpoint/index.js +8 -8
- package/src/server/rooms/index.js +2 -2
- package/src/server/rooms/live-data-rooms.js +35 -35
- package/src/server/rooms/live-page-history.js +2 -2
- package/src/server/rooms/page-admission.js +34 -6
- package/src/server/rooms/page-conversion.js +1 -1
- package/src/server/rooms/page-lineage.js +4 -4
- package/src/server/rooms/page-rebase.js +4 -4
- package/src/server/rooms/page-room-conformance.js +14 -14
- package/src/server/rooms/page-state.js +2 -2
- package/src/server/rooms/page-write-admission.js +7 -7
- package/src/server/rooms/page-write-guard.js +3 -3
- package/src/sync/data-guard-notice.js +265 -0
- package/src/sync/live-sync.js +54 -11
- package/src/sync/page-relay.js +4 -4
- package/src/sync/presence-store.js +1 -1
- package/src/sync/presence-target.js +3 -3
- package/src/sync/presence.js +1 -1
- package/src/sync/stream.js +54 -13
- package/src/sync/wire-profile.js +8 -3
- package/src/ui/bevel.js +1 -1
- package/src/ui/index.js +9 -10
- package/src/ui/skins/cms.js +1 -1
- package/src/ui/skins/quickcrop.js +1 -1
- package/src/ui/skins/richclay.js +2 -2
- package/src/ui/toast-lazy.js +12 -3
- package/src/ui/toast.js +9 -3
- package/src/vendor/hyper-html-api-data.vendor.js +1 -1
- package/src/vendor/hyper-html-api-upgrade.vendor.js +2 -2
- package/src/vendor/hypercms.vendor.js +16 -16
- package/src/vendor/richclay.vendor.js +48 -20
- package/src/vendor/sap-core.vendor.js +1 -1
- package/tool-generation/context.md +44 -0
- package/tool-generation/system.md +23 -0
- package/dist/m/c-24PMUJIV.js +0 -2
- package/dist/m/c-2AYVYEI4.js +0 -1
- package/dist/m/c-2AZDZWCK.js +0 -1
- package/dist/m/c-2L6O5PDS.js +0 -6
- package/dist/m/c-2RYOGUQM.js +0 -2
- package/dist/m/c-2ZVOEU4M.js +0 -1
- package/dist/m/c-37NAONZA.js +0 -1
- package/dist/m/c-3GJ4SDE2.js +0 -1
- package/dist/m/c-3O7OBDCM.js +0 -1
- package/dist/m/c-5OJ7YF2N.js +0 -1
- package/dist/m/c-5WMXEKFH.js +0 -135
- package/dist/m/c-6RDOKLN7.js +0 -1
- package/dist/m/c-A4IP6MBC.js +0 -1
- package/dist/m/c-A6L3FMUS.js +0 -1
- package/dist/m/c-ATKAOH23.js +0 -1
- package/dist/m/c-B6O7AJYG.js +0 -32
- package/dist/m/c-BCGWJYXW.js +0 -1
- package/dist/m/c-BGKAT2FL.js +0 -7
- package/dist/m/c-BYTKL6UX.js +0 -1
- package/dist/m/c-DHBRA6DL.js +0 -1
- package/dist/m/c-DTMZ3ZHI.js +0 -1
- package/dist/m/c-E3ZXARWA.js +0 -1
- package/dist/m/c-EK63G3CG.js +0 -1
- package/dist/m/c-ELYIIYRS.js +0 -1
- package/dist/m/c-EXKHPOVC.js +0 -3
- package/dist/m/c-FCSZ3DC5.js +0 -20
- package/dist/m/c-FTWGYI5E.js +0 -1
- package/dist/m/c-G4PWUDD5.js +0 -1
- package/dist/m/c-GBKB5WDL.js +0 -2
- package/dist/m/c-GBTVCJXC.js +0 -1
- package/dist/m/c-GC2HICFJ.js +0 -1
- package/dist/m/c-GRWMD6O5.js +0 -1
- package/dist/m/c-HCNWJE4A.js +0 -4
- package/dist/m/c-HG2C77BM.js +0 -4
- package/dist/m/c-JGHEACGK.js +0 -1
- package/dist/m/c-JGLX6TBK.js +0 -1
- package/dist/m/c-JNRKHYWO.js +0 -1
- package/dist/m/c-KBS3UV6B.js +0 -1
- package/dist/m/c-KQ7E3PYY.js +0 -1
- package/dist/m/c-L3F5ZLIV.js +0 -1
- package/dist/m/c-L4KMT7FO.js +0 -6
- package/dist/m/c-L5VFATT6.js +0 -1
- package/dist/m/c-LCYPMULG.js +0 -1
- package/dist/m/c-LIGQYZ7M.js +0 -6
- package/dist/m/c-LKIWEPAV.js +0 -1
- package/dist/m/c-MPSKIU2I.js +0 -1
- package/dist/m/c-N7JPUPGC.js +0 -1
- package/dist/m/c-NK33MMYF.js +0 -1
- package/dist/m/c-NQLWOHLH.js +0 -10
- package/dist/m/c-NTHUTABN.js +0 -1
- package/dist/m/c-NWX3MFT4.js +0 -1
- package/dist/m/c-OKXI52N7.js +0 -1
- package/dist/m/c-OPONJ2UK.js +0 -128
- package/dist/m/c-OWQWOGYI.js +0 -1
- package/dist/m/c-P6Q2ZTFQ.js +0 -1
- package/dist/m/c-QEN6HZCA.js +0 -1
- package/dist/m/c-QIXT3Q7C.js +0 -28
- package/dist/m/c-QM5LXRDT.js +0 -9
- package/dist/m/c-QYYUVLVG.js +0 -1
- package/dist/m/c-RQRMPZXD.js +0 -1
- package/dist/m/c-SBCBXKOZ.js +0 -26
- package/dist/m/c-SKF5HL4I.js +0 -4
- package/dist/m/c-SRPC3VBE.js +0 -1
- package/dist/m/c-TANBH7FI.js +0 -1
- package/dist/m/c-THGQQDYY.js +0 -1
- package/dist/m/c-UD5JZTDL.js +0 -1
- package/dist/m/c-UDGEFWNU.js +0 -1
- package/dist/m/c-UGNV5MFB.js +0 -1
- package/dist/m/c-VIRFF5HG.js +0 -8
- package/dist/m/c-VJYEVRYK.js +0 -1
- package/dist/m/c-VQCEOGKH.js +0 -13
- package/dist/m/c-VYJ7O4RI.js +0 -34
- package/dist/m/c-W7IPVCAA.js +0 -1
- package/dist/m/c-WBGWGOM7.js +0 -1
- package/dist/m/c-WJ5DRBHT.js +0 -72
- package/dist/m/c-X5WC4PX5.js +0 -1
- package/dist/m/c-XCFQEWW6.js +0 -3
- package/dist/m/c-XGH4GS2T.js +0 -1
- package/dist/m/c-XLQ3BDMM.js +0 -1
- package/dist/m/c-ZQXNHZZT.js +0 -72
- package/dist/m/core/conflict-notice-42H4ASLA.js +0 -1
- package/dist/m/core/draft-mode-WSQAT67S.js +0 -1
- package/dist/m/core/save-ESPSQPLV.js +0 -1
- package/dist/m/core/save-core-6SQHOR6W.js +0 -1
- package/dist/m/loader-FBDE2UAB.js +0 -1
- package/dist/m/manifest-1D2F5CA5.js +0 -1
- package/dist/m/manifest-edit-F7CC5CFD.js +0 -1
- package/dist/m/page/editor-OSKOW6RS.js +0 -304
- package/dist/m/plugins/ai-edit-VV4QTINH.js +0 -6
- package/dist/m/plugins/indicator-WVPGMOZ7.js +0 -1
- package/dist/m/plugins/menu-Q4MFFQ6E.js +0 -1
- package/dist/m/plugins/page-OAWUJQEL.js +0 -2
- package/dist/m/plugins/page-view-DZ26ZDDQ.js +0 -1
- package/dist/m/plugins/richclay-PGOOJ4OK.js +0 -517
- package/dist/m/plugins/sortable-266HY6TR.js +0 -1
- package/dist/m/plugins/upgrade-BNZVFHMZ.js +0 -1
- package/dist/m/plugins/visitor-drafts-2AUYKAIJ.js +0 -20
- package/dist/m/plugins/wire-W2EV36KZ.js +0 -1
- package/dist/m/sync/live-sync-XGUPHI3I.js +0 -1
- package/dist/m/ui/index-VGYAKAKI.js +0 -1
- package/dist/page/themes/light-1.css +0 -431
- package/src/page/themes/content.css +0 -70
- package/src/page/themes/light-1.css +0 -431
- package/src/page/themes/light-1.source.css +0 -270
- package/src/page/themes/light-2.css +0 -211
- package/src/page/themes/light-3.css +0 -130
- package/src/page/themes/light-4.css +0 -299
- /package/dist/m/{c-FILLTJA7.js → c-QTTJYJMA.js} +0 -0
- /package/dist/m/plugins/{quickcrop-WWF5I422.js.LEGAL.txt → quickcrop-X5MRIBAP.js.LEGAL.txt} +0 -0
- /package/dist/m/plugins/{richclay-PGOOJ4OK.js.LEGAL.txt → richclay-Y2NV44NA.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import{a as ho,c as R}from"../c-LTSPHVAK.js";import"../c-IW6GGOU2.js";import"../c-HAWFNBYG.js";import{b as go}from"../c-7NCWENHV.js";import{P as So,Q as Do,f as lo,j as bo,k as po,l as ko,m as so,o as uo,r as xo,t as vo,y as wo}from"../c-CV4T65JE.js";import"../c-GO635CRU.js";import"../c-V2V5FKXX.js";import{n as io}from"../c-DD26VXAP.js";import"../c-CTGRDT6E.js";import"../c-7K4SCQB7.js";import"../c-WMRJKQ2V.js";import{A as Ao,B as Po,C as Co,I as Bo,b as ro,c as to,f as q,k as yo,p as zo,x as Eo}from"../c-ZRGEN6QQ.js";import{A as Q,E as Z,G as oo,J as eo,d as g,n as Y,x as J}from"../c-OH2FPYSY.js";import{a as V,c as Mo,d as T}from"../c-6RGEQNVV.js";import{a as fo}from"../c-Z6MROEQ4.js";import{a as mo}from"../c-Q26XHBLQ.js";import{a as co,b as ao,d as no}from"../c-FSQXFG5T.js";import{a as U,b as h,d as m,e as S,f as D,g as y,h as X,i as G}from"../c-RETTCOWO.js";import"../c-WCG6AKA7.js";import"../c-57XDY6HC.js";import{b as L}from"../c-RS77ODLY.js";import"../c-7SWMYKAI.js";import"../c-UGHH4MB3.js";import"../c-LA2BW7UY.js";import"../c-IJUK2GPW.js";import"../c-VG5XIN4T.js";import"../c-2YYDMLNZ.js";import"../c-HA6INT6J.js";import"../c-ICMAOOGK.js";import"../c-WRBKEJD4.js";import"../c-VHNSBD2M.js";var{Decoration:$,DecorationSet:Ho}=m,_o="Type / for blocks",No="Untitled",Wo="To do";function Uo(o){let e=!1,r=null;return o.forEach((t,i)=>{e||t.type!==g.nodes.heading||t.attrs.level!==1||(t.attrs.parent??null)!==null||(e=!0,t.content.size||(r=$.node(i,i+t.nodeSize,{class:"blockeditor-title-placeholder","data-placeholder":No})))}),r}function Xo(o){let e=[];return o.forEach((r,t)=>{r.type!==g.nodes.list_item||r.attrs.kind!=="check"||r.content.size||r.attrs.checked||e.push($.node(t,t+r.nodeSize,{class:"blockeditor-check-placeholder","data-placeholder":Wo}))}),e}function Fo(o=_o){return new h.Plugin({props:{decorations(e){let r=Xo(e.doc),t=Uo(e.doc);t&&r.push(t);let{selection:i}=e;if(i.empty){let d=i.$from;if(d.depth===1){let c=d.parent;if(c.type===g.nodes.paragraph&&!c.content.size){let n=d.before(1);r.push($.node(n,n+c.nodeSize,{class:"blockeditor-placeholder","data-placeholder":o}))}}}return r.length?Ho.create(e.doc,r):null}}})}var To=new h.Plugin({props:{handleKeyDown(o,e){if(!(e.metaKey||e.ctrlKey)||!e.shiftKey||e.altKey)return!1;let r=e.key.toLowerCase()==="o"?"owner":e.key.toLowerCase()==="d"?"date":null;if(!r||o.dom.getAttribute(r==="owner"?"data-assignees":"data-dates")==="false")return!1;for(let t of co.get(o)??[])if(t.focusControl?.(o,r))return!0;return!1}}});var Oo="blockeditor-editor-style",Go=[1,2,3,4,5,6,7,8],Yo=`
|
|
2
|
+
--blockeditor-bg: #F7F6F2; --blockeditor-ink: #23221F; --blockeditor-ink-soft: #6B6862; --blockeditor-ink-faint: #9B968C;
|
|
3
|
+
--blockeditor-rule: rgba(35, 34, 31, 0.10); --blockeditor-accent: #2F5E9E; --blockeditor-link: #164583; --blockeditor-selection: rgba(88, 120, 170, 0.20);
|
|
4
|
+
--blockeditor-check-border: rgba(35, 34, 31, 0.35); --blockeditor-check-fill: #23221F; --blockeditor-check-ink: #F7F6F2;
|
|
5
|
+
--blockeditor-callout-bg: rgba(35, 34, 31, 0.04); --blockeditor-code-bg: rgba(35, 34, 31, 0.05);
|
|
6
|
+
--blockeditor-color-gray: #5B5953; --blockeditor-color-brown: #8A5A1E; --blockeditor-color-orange: #B4531A; --blockeditor-color-yellow: #7A6210; --blockeditor-color-green: #3E6A28;
|
|
7
|
+
--blockeditor-color-blue: #1F5A8A; --blockeditor-color-purple: #5E4596; --blockeditor-color-pink: #A23E6E; --blockeditor-color-red: #9E3B2F;
|
|
8
|
+
--blockeditor-mark-bg-gray: rgba(35, 34, 31, 0.12); --blockeditor-mark-bg-brown: rgba(138, 90, 30, 0.20); --blockeditor-mark-bg-orange: rgba(180, 83, 26, 0.20);
|
|
9
|
+
--blockeditor-mark-bg-yellow: rgba(122, 98, 16, 0.22); --blockeditor-mark-bg-green: rgba(62, 106, 40, 0.20); --blockeditor-mark-bg-blue: rgba(31, 90, 138, 0.18);
|
|
10
|
+
--blockeditor-mark-bg-purple: rgba(94, 69, 150, 0.18); --blockeditor-mark-bg-pink: rgba(162, 62, 110, 0.18); --blockeditor-mark-bg-red: rgba(158, 59, 47, 0.18);
|
|
11
|
+
--blockeditor-code-token-keyword: #8A3B6E; --blockeditor-code-token-constant: #1F5A8A; --blockeditor-code-token-string: #3E6A28; --blockeditor-code-token-string-expression: #3E6A28; --blockeditor-code-token-comment: #8B877E; --blockeditor-code-token-function: #5E4596; --blockeditor-code-token-parameter: #8A5A1E; --blockeditor-code-token-punctuation: var(--blockeditor-ink-soft); --blockeditor-code-token-link: var(--blockeditor-link);
|
|
12
|
+
--blockeditor-chrome-ink-rest: rgba(35, 34, 31, 0.66); --blockeditor-chrome-ink-moved: rgba(35, 34, 31, 0.80);
|
|
13
|
+
--blockeditor-chrome-bg-rest: rgba(35, 34, 31, 0.02); --blockeditor-chrome-bg-moved: rgba(35, 34, 31, 0.04);
|
|
14
|
+
--blockeditor-chrome-line-rest: rgba(35, 34, 31, 0.06); --blockeditor-chrome-line-moved: rgba(35, 34, 31, 0.11);
|
|
15
|
+
--blockeditor-pop-bg: #FBFAF7; --blockeditor-pop-ink: #23221F; --blockeditor-pop-muted: #6B6862; --blockeditor-pop-line: rgba(35, 34, 31, 0.10);
|
|
16
|
+
--blockeditor-pop-shadow: 0 1px 2px rgba(35, 34, 31, 0.05), 0 8px 24px rgba(35, 34, 31, 0.08); --blockeditor-pop-hover: rgba(35, 34, 31, 0.06);
|
|
17
|
+
--blockeditor-scrim: rgba(35, 34, 31, 0.12);
|
|
18
|
+
--blockeditor-danger: #9E3B2F; --blockeditor-block-selected: rgba(88, 120, 170, 0.12);`,jo=`
|
|
19
|
+
--blockeditor-bg: #1A1A18; --blockeditor-ink: #E7E4DC; --blockeditor-ink-soft: #A3A098; --blockeditor-ink-faint: #75726B;
|
|
20
|
+
--blockeditor-rule: rgba(231, 228, 220, 0.10); --blockeditor-accent: #8DB0E6; --blockeditor-link: #8DB0E6; --blockeditor-selection: rgba(120, 155, 210, 0.28);
|
|
21
|
+
--blockeditor-check-border: rgba(231, 228, 220, 0.35); --blockeditor-check-fill: #E7E4DC; --blockeditor-check-ink: #1A1A18;
|
|
22
|
+
--blockeditor-callout-bg: rgba(231, 228, 220, 0.05); --blockeditor-code-bg: rgba(231, 228, 220, 0.06);
|
|
23
|
+
--blockeditor-color-gray: #A3A098; --blockeditor-color-brown: #E0B47A; --blockeditor-color-orange: #E8A177; --blockeditor-color-yellow: #DEC97A; --blockeditor-color-green: #A9C98B;
|
|
24
|
+
--blockeditor-color-blue: #8DB0E6; --blockeditor-color-purple: #BBA6E6; --blockeditor-color-pink: #E3A3C4; --blockeditor-color-red: #E08A7A;
|
|
25
|
+
--blockeditor-mark-bg-gray: rgba(231, 228, 220, 0.14); --blockeditor-mark-bg-brown: rgba(224, 180, 122, 0.22); --blockeditor-mark-bg-orange: rgba(232, 161, 119, 0.22);
|
|
26
|
+
--blockeditor-mark-bg-yellow: rgba(222, 201, 122, 0.24); --blockeditor-mark-bg-green: rgba(169, 201, 139, 0.22); --blockeditor-mark-bg-blue: rgba(141, 176, 230, 0.22);
|
|
27
|
+
--blockeditor-mark-bg-purple: rgba(187, 166, 230, 0.22); --blockeditor-mark-bg-pink: rgba(227, 163, 196, 0.22); --blockeditor-mark-bg-red: rgba(224, 138, 122, 0.22);
|
|
28
|
+
--blockeditor-code-token-keyword: #D9A0C8; --blockeditor-code-token-constant: #8DB0E6; --blockeditor-code-token-string: #A9C98B; --blockeditor-code-token-string-expression: #A9C98B; --blockeditor-code-token-comment: #75726B; --blockeditor-code-token-function: #BBA6E6; --blockeditor-code-token-parameter: #E0B47A; --blockeditor-code-token-punctuation: var(--blockeditor-ink-soft); --blockeditor-code-token-link: var(--blockeditor-link);
|
|
29
|
+
--blockeditor-chrome-ink-rest: rgba(231, 228, 220, 0.58); --blockeditor-chrome-ink-moved: rgba(231, 228, 220, 0.72);
|
|
30
|
+
--blockeditor-chrome-bg-rest: rgba(231, 228, 220, 0.02); --blockeditor-chrome-bg-moved: rgba(231, 228, 220, 0.04);
|
|
31
|
+
--blockeditor-chrome-line-rest: rgba(231, 228, 220, 0.06); --blockeditor-chrome-line-moved: rgba(231, 228, 220, 0.11);
|
|
32
|
+
--blockeditor-pop-bg: #222220; --blockeditor-pop-ink: #E7E4DC; --blockeditor-pop-muted: #A3A098; --blockeditor-pop-line: rgba(231, 228, 220, 0.10);
|
|
33
|
+
--blockeditor-pop-shadow: 0 1px 2px rgba(10, 10, 9, 0.3), 0 10px 28px rgba(10, 10, 9, 0.35); --blockeditor-pop-hover: rgba(231, 228, 220, 0.07);
|
|
34
|
+
--blockeditor-scrim: rgba(10, 10, 9, 0.35);
|
|
35
|
+
--blockeditor-danger: #E08A7A; --blockeditor-block-selected: rgba(120, 155, 210, 0.18);
|
|
36
|
+
--chart-1: #8DB0E6; --chart-2: #D9A0C8; --chart-3: #A9C98B; --chart-4: #BBA6E6; --chart-5: #E0B47A; --chart-6: #A3A098;`,Jo=`
|
|
37
|
+
@layer blockeditor {
|
|
38
|
+
:where(article[data-blockeditor], .blockeditor-shell) {${Yo}
|
|
39
|
+
--chart-1: #2F5E9E; --chart-2: #164583; --chart-3: #5B5953; --chart-4: #8A3B6E; --chart-5: #3E6A28; --chart-6: #8A5A1E;
|
|
40
|
+
--blockeditor-ink-strong: var(--blockeditor-ink); --blockeditor-caret: var(--blockeditor-accent);
|
|
41
|
+
--blockeditor-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --blockeditor-font-display: var(--blockeditor-font); --blockeditor-font-heading: var(--blockeditor-font);
|
|
42
|
+
--blockeditor-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
|
43
|
+
--blockeditor-font-size: 17px; --blockeditor-line-height: 1.65; --blockeditor-measure: 680px; --blockeditor-pad-top: 72px;
|
|
44
|
+
--blockeditor-h1-size: 34px; --blockeditor-h1-weight: 600; --blockeditor-h1-tracking: -0.01em; --blockeditor-h1-line: 1.2;
|
|
45
|
+
--blockeditor-h2-size: 21px; --blockeditor-h2-weight: 600; --blockeditor-h3-size: 17px; --blockeditor-h3-weight: 600;
|
|
46
|
+
--blockeditor-block-gap: 0.35em; --blockeditor-indent: 1.6em;
|
|
47
|
+
--blockeditor-marker: var(--blockeditor-ink-soft); --blockeditor-bullet-size: 0.36em; --blockeditor-check-size: 16px; --blockeditor-check-radius: 4px; --blockeditor-done-ink: var(--blockeditor-ink-faint);
|
|
48
|
+
--blockeditor-toggle-ink: var(--blockeditor-ink-soft); --blockeditor-callout-line: transparent; --blockeditor-code-ink: var(--blockeditor-ink);
|
|
49
|
+
--blockeditor-chrome-shadow-rest: none; --blockeditor-chrome-shadow-moved: none; --blockeditor-chrome-radius: 7px; --blockeditor-plus-size: 24px; --blockeditor-fade: 240ms;
|
|
50
|
+
--blockeditor-pop-radius: 10px; --blockeditor-bar-bg: var(--blockeditor-pop-bg); --blockeditor-bar-ink: var(--blockeditor-pop-ink);
|
|
51
|
+
}
|
|
52
|
+
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"]) :is(article[data-blockeditor], .blockeditor-shell)) {${jo} } }
|
|
53
|
+
:where(:root[data-theme="dark"] :is(article[data-blockeditor], .blockeditor-shell)) {${jo} }
|
|
54
|
+
|
|
55
|
+
.blockeditor-shell { position: relative; background: var(--blockeditor-bg); color: var(--blockeditor-ink); font-family: var(--blockeditor-font); font-size: var(--blockeditor-font-size); line-height: var(--blockeditor-line-height); padding: 0 16px; }
|
|
56
|
+
.blockeditor-editor { max-width: var(--blockeditor-measure); margin: 0 auto; padding: var(--blockeditor-pad-top) 0 30vh; outline: none; white-space: pre-wrap; overflow-wrap: break-word; caret-color: var(--blockeditor-caret); }
|
|
57
|
+
:where(article[data-blockeditor], .blockeditor-editor) ::selection { background: var(--blockeditor-selection); }
|
|
58
|
+
:where(article[data-blockeditor], .blockeditor-editor) > * { margin: var(--blockeditor-block-gap) 0; margin-inline-start: calc(var(--blockeditor-depth, 0) * var(--blockeditor-indent)); }
|
|
59
|
+
:where(article[data-blockeditor], .blockeditor-editor) > h1 { font-family: var(--blockeditor-font-display); font-size: var(--blockeditor-h1-size); font-weight: var(--blockeditor-h1-weight); letter-spacing: var(--blockeditor-h1-tracking); line-height: var(--blockeditor-h1-line); color: var(--blockeditor-ink-strong); margin-block: 0 0.6em; }
|
|
60
|
+
:where(article[data-blockeditor], .blockeditor-editor) > h2 { font-family: var(--blockeditor-font-heading); font-size: var(--blockeditor-h2-size); font-weight: var(--blockeditor-h2-weight); color: var(--blockeditor-ink-strong); line-height: 1.35; margin-block-start: 1.4em; }
|
|
61
|
+
:where(article[data-blockeditor], .blockeditor-editor) > h3 { font-family: var(--blockeditor-font-heading); font-size: var(--blockeditor-h3-size); font-weight: var(--blockeditor-h3-weight); color: var(--blockeditor-ink-strong); margin-block-start: 1.2em; }
|
|
62
|
+
:where(article[data-blockeditor], .blockeditor-editor) a { color: var(--blockeditor-link, var(--blockeditor-accent)); }
|
|
63
|
+
:where(article[data-blockeditor], .blockeditor-editor) code { font-family: var(--blockeditor-font-mono); font-size: 0.88em; background: var(--blockeditor-code-bg); color: var(--blockeditor-code-ink); border-radius: 4px; padding: 0.1em 0.3em; }
|
|
64
|
+
:where(article[data-blockeditor], .blockeditor-editor) pre { font-family: var(--blockeditor-font-mono); font-size: 0.88em; background: var(--blockeditor-code-bg); color: var(--blockeditor-code-ink); border-radius: 8px; padding: 12px 14px; }
|
|
65
|
+
:where(article[data-blockeditor], .blockeditor-editor) pre code { background: none; padding: 0; font-size: inherit; }
|
|
66
|
+
:where(article[data-blockeditor], .blockeditor-editor) pre { position: relative; padding-top: 32px; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
67
|
+
:where(article[data-blockeditor], .blockeditor-editor) pre[data-lang] { white-space: pre; overflow-wrap: normal; }
|
|
68
|
+
:where(article[data-blockeditor], .blockeditor-editor) pre[data-lang] > code { display: block; overflow-x: auto; }
|
|
69
|
+
.blockeditor-code-lang { position: absolute; top: 5px; inset-inline-end: 6px; max-width: 120px; height: 24px; padding: 0 4px; border: 0; border-radius: 5px; background: none; color: var(--blockeditor-ink-faint); font: 12px/1 var(--blockeditor-font); opacity: 0; cursor: pointer; transition: opacity var(--blockeditor-fade); }
|
|
70
|
+
.blockeditor-editor pre:hover .blockeditor-code-lang, .blockeditor-editor pre:focus-within .blockeditor-code-lang, .blockeditor-code-lang:focus-visible, .blockeditor-editor pre[data-lang] .blockeditor-code-lang { opacity: 1; }
|
|
71
|
+
.blockeditor-code-lang:hover, .blockeditor-code-lang:focus-visible { background: var(--blockeditor-pop-hover); color: var(--blockeditor-ink-soft); }
|
|
72
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-callout { background: var(--blockeditor-callout-bg); border: 1px solid var(--blockeditor-callout-line); border-radius: 8px; padding: 10px 14px; }
|
|
73
|
+
/* The four floor-1 formats. A quote is set apart by its own inset and ink, with
|
|
74
|
+
no left-border accent; the palette's keys are fixed tokens, in both themes. */
|
|
75
|
+
:where(article[data-blockeditor], .blockeditor-editor) blockquote { padding-inline-start: var(--blockeditor-indent); color: var(--blockeditor-ink-soft); }
|
|
76
|
+
:where(article[data-blockeditor], .blockeditor-editor) hr { border: 0; border-top: 1px solid var(--blockeditor-rule); margin-block: 1.2em; }
|
|
77
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-hidden { display: none; }
|
|
78
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li { position: relative; --li-indent: 0; padding-inline-start: calc((var(--li-indent) + 1) * var(--blockeditor-indent)); }
|
|
79
|
+
${Go.map(o=>`:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li[data-indent="${o}"] { --li-indent: ${o}; }`).join(`
|
|
80
|
+
`)}
|
|
81
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li::before { position: absolute; inset-inline-start: calc(var(--li-indent) * var(--blockeditor-indent)); width: var(--blockeditor-indent); text-align: center; color: var(--blockeditor-marker); content: "\\2022"; }
|
|
82
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li[data-kind="bullet"]::before { content: ""; box-sizing: border-box; width: var(--blockeditor-bullet-size); height: var(--blockeditor-bullet-size); top: calc((1em * var(--blockeditor-line-height) - var(--blockeditor-bullet-size)) / 2); inset-inline-start: calc(var(--li-indent) * var(--blockeditor-indent) + (var(--blockeditor-indent) - var(--blockeditor-bullet-size)) / 2); border-radius: 50%; background: currentColor; }
|
|
83
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li[data-kind="ordered"]::before { content: attr(data-marker); font-variant-numeric: tabular-nums; }
|
|
84
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li[data-kind="check"]::before { content: ""; box-sizing: border-box; width: var(--blockeditor-check-size); height: var(--blockeditor-check-size); top: calc((1em * var(--blockeditor-line-height) - var(--blockeditor-check-size)) / 2); inset-inline-start: calc(var(--li-indent) * var(--blockeditor-indent) + (var(--blockeditor-indent) - var(--blockeditor-check-size)) / 2); border: 1px solid var(--blockeditor-check-border); border-radius: var(--blockeditor-check-radius); cursor: pointer; }
|
|
85
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li[data-kind="check"][data-checked="true"]::before { background: var(--blockeditor-check-fill); border-color: var(--blockeditor-check-fill); }
|
|
86
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li[data-kind="check"][data-checked="true"]::after { content: ""; position: absolute; width: var(--blockeditor-check-size); height: var(--blockeditor-check-size); top: calc((1em * var(--blockeditor-line-height) - var(--blockeditor-check-size)) / 2); inset-inline-start: calc(var(--li-indent) * var(--blockeditor-indent) + (var(--blockeditor-indent) - var(--blockeditor-check-size)) / 2); background: var(--blockeditor-check-ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.8 8.4l2.9 2.9 5.5-6.4' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.8 8.4l2.9 2.9 5.5-6.4' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat; pointer-events: none; }
|
|
87
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-li[data-kind="check"][data-checked="true"] { color: var(--blockeditor-done-ink); text-decoration: line-through; }
|
|
88
|
+
:where(article[data-blockeditor], .blockeditor-editor) .blockeditor-toggle { position: relative; padding-inline-start: var(--blockeditor-indent); }
|
|
89
|
+
.blockeditor-editor .blockeditor-toggle-button { position: absolute; inset-inline-start: 0; top: 0; width: var(--blockeditor-indent); height: calc(1em * var(--blockeditor-line-height)); display: grid; place-items: center; border: 0; padding: 0; background: none; color: var(--blockeditor-toggle-ink); font: inherit; line-height: 1; cursor: pointer; transition: transform var(--blockeditor-fade); }
|
|
90
|
+
.blockeditor-editor .blockeditor-toggle-button::before { content: "\\25B8"; font-size: 1.4em; }
|
|
91
|
+
.blockeditor-editor .blockeditor-toggle[data-expanded="true"] > .blockeditor-toggle-button { transform: rotate(90deg); }
|
|
92
|
+
|
|
93
|
+
.blockeditor-dock, .blockeditor-plus { color: var(--blockeditor-chrome-ink-rest); background: var(--blockeditor-chrome-bg-rest); border: 1px solid var(--blockeditor-chrome-line-rest); box-shadow: var(--blockeditor-chrome-shadow-rest); border-radius: var(--blockeditor-chrome-radius); transition: color var(--blockeditor-fade), background-color var(--blockeditor-fade), border-color var(--blockeditor-fade), box-shadow var(--blockeditor-fade); }
|
|
94
|
+
.blockeditor-shell.is-moved .blockeditor-dock, .blockeditor-shell.is-moved .blockeditor-plus { color: var(--blockeditor-chrome-ink-moved); background: var(--blockeditor-chrome-bg-moved); border-color: var(--blockeditor-chrome-line-moved); box-shadow: var(--blockeditor-chrome-shadow-moved); }
|
|
95
|
+
.blockeditor-dock { position: sticky; top: 12px; z-index: 3; display: flex; align-items: center; gap: 2px; width: max-content; margin: 12px auto 0; padding: 3px; }
|
|
96
|
+
/* One formatting bar at a time: the selection bar covers what the fixed bar offers. Hidden, not removed, so the page does not shift under the selection. */
|
|
97
|
+
.blockeditor-shell:has(.blockeditor-bubble:not([hidden])) .blockeditor-dock { visibility: hidden; }
|
|
98
|
+
.blockeditor-dock, .blockeditor-shell.is-moved .blockeditor-dock { background: var(--blockeditor-pop-bg); }
|
|
99
|
+
.blockeditor-dock + .blockeditor-editor { padding-top: max(16px, calc(var(--blockeditor-pad-top) - 48px)); }
|
|
100
|
+
.blockeditor-tool { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: 5px; background: none; color: inherit; font: 500 13px/1 var(--blockeditor-font); cursor: pointer; }
|
|
101
|
+
.blockeditor-tool:hover, .blockeditor-tool[aria-pressed="true"] { background: var(--blockeditor-pop-hover); }
|
|
102
|
+
.blockeditor-tool-turn { gap: 4px; padding: 0 8px; }
|
|
103
|
+
/* The phone's fourth control folds away everything the narrow bar hides; on a desktop it
|
|
104
|
+
holds what has no button of its own (colors, icon and cover, the exports). */
|
|
105
|
+
.blockeditor-tool-sep { width: 1px; height: 16px; margin: 0 3px; background: currentColor; opacity: 0.5; }
|
|
106
|
+
.blockeditor-safe-probe { position: fixed; left: 0; bottom: 0; width: 0; height: 0; padding-bottom: env(safe-area-inset-bottom); visibility: hidden; pointer-events: none; }
|
|
107
|
+
.blockeditor-plus { position: absolute; z-index: 2; top: calc(var(--blockeditor-plus-top, 0px) - var(--blockeditor-plus-size) / 2); left: calc(var(--blockeditor-plus-left, 0px) - var(--blockeditor-plus-size) - 12px); width: var(--blockeditor-plus-size); height: var(--blockeditor-plus-size); display: grid; place-items: center; padding: 0; cursor: pointer; }
|
|
108
|
+
.blockeditor-plus[aria-expanded="true"] { color: var(--blockeditor-chrome-ink-moved); background: var(--blockeditor-chrome-bg-moved); }
|
|
109
|
+
.blockeditor-grip { position: absolute; z-index: 2; top: calc(var(--blockeditor-plus-top, 0px) - var(--blockeditor-grip-size, var(--blockeditor-plus-size)) / 2); left: calc(var(--blockeditor-plus-left, 0px) - var(--blockeditor-plus-size) - 12px - var(--blockeditor-grip-size, var(--blockeditor-plus-size)) - 2px); width: var(--blockeditor-grip-size, var(--blockeditor-plus-size)); height: var(--blockeditor-grip-size, var(--blockeditor-plus-size)); display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--blockeditor-chrome-radius); background: none; color: var(--blockeditor-chrome-ink-moved); opacity: 0; cursor: grab; touch-action: none; transition: opacity var(--blockeditor-fade); }
|
|
110
|
+
.blockeditor-shell.is-moved .blockeditor-grip, .blockeditor-grip.is-on, .blockeditor-grip:focus-visible, .blockeditor-grip[aria-expanded="true"] { opacity: 1; }
|
|
111
|
+
.blockeditor-bubble, .blockeditor-menu { position: absolute; z-index: 4; background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); border: 1px solid var(--blockeditor-pop-line); box-shadow: var(--blockeditor-pop-shadow); border-radius: var(--blockeditor-pop-radius); }
|
|
112
|
+
.blockeditor-bubble { display: flex; gap: 1px; padding: 3px; left: var(--blockeditor-pop-x, 0px); top: var(--blockeditor-pop-y, 0px); transform: translate(-50%, calc(-100% - 8px)); }
|
|
113
|
+
.blockeditor-menu { left: var(--blockeditor-pop-x, 0px); top: var(--blockeditor-pop-y, 0px); width: 260px; max-height: 340px; overflow-y: auto; padding: 6px; font-size: 14px; }
|
|
114
|
+
.blockeditor-settings { position: absolute; z-index: 4; box-sizing: border-box; left: var(--blockeditor-pop-x, 0px); top: var(--blockeditor-pop-y, 0px); width: min(264px, calc(100vw - 28px)); padding: 9px 11px; background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-pop-radius); box-shadow: var(--blockeditor-pop-shadow); font-size: 13px; }
|
|
115
|
+
.blockeditor-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--blockeditor-pop-line); }
|
|
116
|
+
.blockeditor-settings-title { font-size: 12.5px; font-weight: 600; color: var(--blockeditor-pop-ink); }
|
|
117
|
+
.blockeditor-settings-close { display: inline-grid; place-content: center; width: 20px; height: 20px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--blockeditor-pop-muted); cursor: pointer; }
|
|
118
|
+
.blockeditor-settings-close:hover { background: var(--blockeditor-pop-hover); color: var(--blockeditor-pop-ink); }
|
|
119
|
+
.blockeditor-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
|
|
120
|
+
.blockeditor-settings-name { min-width: 0; font-weight: 500; line-height: 1.3; }
|
|
121
|
+
.blockeditor-settings-switch { position: relative; flex: 0 0 30px; box-sizing: border-box; width: 30px; height: 18px; padding: 0; border: 0; border-radius: 9px; background: var(--blockeditor-chrome-line-moved); cursor: pointer; transition: background-color var(--blockeditor-fade); }
|
|
122
|
+
.blockeditor-settings-switch[aria-checked="true"] { background: var(--blockeditor-accent); }
|
|
123
|
+
.blockeditor-settings-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--blockeditor-pop-bg); transition: transform var(--blockeditor-fade); }
|
|
124
|
+
.blockeditor-settings-switch[aria-checked="true"] .blockeditor-settings-knob { transform: translateX(12px); }
|
|
125
|
+
.blockeditor-settings-note { margin: 4px 0 2px; color: var(--blockeditor-pop-muted); font-size: 11px; line-height: 1.4; }
|
|
126
|
+
.blockeditor-menu-title { padding: 4px 10px 6px; color: var(--blockeditor-pop-muted); font-size: 12px; }
|
|
127
|
+
.blockeditor-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 4px 10px; border: 0; border-radius: 7px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
|
|
128
|
+
.blockeditor-menu-item[aria-selected="true"], .blockeditor-menu-item.is-active, .blockeditor-menu-item:hover { background: var(--blockeditor-pop-hover); }
|
|
129
|
+
.blockeditor-menu-icon { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--blockeditor-pop-line); border-radius: 6px; color: var(--blockeditor-pop-muted); font-size: 12px; flex: none; }
|
|
130
|
+
.blockeditor-menu-icon svg { display: block; }
|
|
131
|
+
.blockeditor-menu-hint { margin-inline-start: auto; color: var(--blockeditor-pop-muted); font-size: 12px; }
|
|
132
|
+
.blockeditor-menu-text { display: flex; flex-direction: column; min-width: 0; }
|
|
133
|
+
.blockeditor-menu-desc { color: var(--blockeditor-pop-muted); font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
134
|
+
.blockeditor-menu-empty { padding: 8px 10px; color: var(--blockeditor-pop-muted); font-size: 13px; }
|
|
135
|
+
.blockeditor-menu-note { padding: 8px 10px; color: var(--blockeditor-pop-muted); font-size: 13px; }
|
|
136
|
+
.blockeditor-shell.is-dragging, .blockeditor-shell.is-dragging .blockeditor-grip { cursor: grabbing; }
|
|
137
|
+
.blockeditor-shell[data-drop="none"] { cursor: no-drop; }
|
|
138
|
+
.blockeditor-drop { position: absolute; z-index: 3; left: var(--blockeditor-drop-x, 0px); top: var(--blockeditor-drop-y, 0px); width: var(--blockeditor-drop-w, 0px); height: 2px; margin-top: -1px; border-radius: 1px; background: var(--blockeditor-drop, var(--blockeditor-accent)); pointer-events: none; }
|
|
139
|
+
.blockeditor-shell.is-dragging .blockeditor-block-selected { opacity: 0.45; }
|
|
140
|
+
.blockeditor-editor.ProseMirror-hideselection { caret-color: transparent; }
|
|
141
|
+
.blockeditor-editor.ProseMirror-hideselection *::selection { background: transparent; }
|
|
142
|
+
.blockeditor-editor .blockeditor-block-selected { background: var(--blockeditor-block-selected, rgba(88, 120, 170, 0.12)); box-shadow: -6px 0 0 var(--blockeditor-block-selected, rgba(88, 120, 170, 0.12)), 6px 0 0 var(--blockeditor-block-selected, rgba(88, 120, 170, 0.12)); border-radius: 4px; }
|
|
143
|
+
.blockeditor-ai-hidden { display: none; }
|
|
144
|
+
.blockeditor-ai-preview { margin: var(--blockeditor-block-gap) 0; padding: 2px 8px; border-radius: 4px; background: var(--blockeditor-block-selected, rgba(88, 120, 170, 0.12)); }
|
|
145
|
+
.blockeditor-editor .blockeditor-link-pending { background: var(--blockeditor-selection); }
|
|
146
|
+
.blockeditor-link { position: absolute; z-index: 4; left: var(--blockeditor-pop-x, 0px); top: var(--blockeditor-pop-y, 0px); display: flex; align-items: center; gap: 2px; padding: 4px; max-width: min(420px, calc(100% - 32px)); background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); border: 1px solid var(--blockeditor-pop-line); box-shadow: var(--blockeditor-pop-shadow); border-radius: var(--blockeditor-pop-radius); font-size: 14px; }
|
|
147
|
+
.blockeditor-link-input { flex: 1; min-width: 220px; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--blockeditor-pop-hover); color: inherit; font: inherit; outline: none; }
|
|
148
|
+
.blockeditor-link-input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--blockeditor-danger, #9E3B2F); }
|
|
149
|
+
.blockeditor-link-url { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px; color: var(--blockeditor-pop-muted); text-decoration: none; }
|
|
150
|
+
.blockeditor-link-btn { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; }
|
|
151
|
+
.blockeditor-link-btn:hover { background: var(--blockeditor-pop-hover); }
|
|
152
|
+
.blockeditor-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
153
|
+
.ProseMirror-focused .blockeditor-placeholder::before { content: attr(data-placeholder); float: left; height: 0; color: var(--blockeditor-ink-faint); pointer-events: none; }
|
|
154
|
+
.blockeditor-editor .blockeditor-title-placeholder::before { content: attr(data-placeholder); float: left; height: 0; color: var(--blockeditor-ink-faint); pointer-events: none; }
|
|
155
|
+
.blockeditor-csv-error { margin: 8px 0; color: var(--blockeditor-danger); font-size: 14px; }
|
|
156
|
+
.blockeditor-editor .blockeditor-table { max-width: 100%; min-width: 0; border: 1px solid var(--blockeditor-rule); border-radius: 8px; }
|
|
157
|
+
.blockeditor-editor .blockeditor-chart { position: relative; max-width: 100%; min-width: 0; margin-inline: 0; border: 1px solid var(--blockeditor-rule); border-radius: var(--blockeditor-chrome-radius); color: var(--blockeditor-ink); }
|
|
158
|
+
.blockeditor-chart-plot svg { display: block; width: 100%; height: auto; color: var(--chart-text, var(--blockeditor-ink-soft)); font: 12px var(--blockeditor-font); }
|
|
159
|
+
.blockeditor-chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--blockeditor-rule); }
|
|
160
|
+
.blockeditor-chart-title { min-width: 0; margin-inline-end: auto; font-size: 14px; font-weight: 600; line-height: 1.3; }
|
|
161
|
+
.blockeditor-chart-title.is-empty { color: var(--blockeditor-ink-faint); font-weight: 500; }
|
|
162
|
+
.blockeditor-chart-source { display: inline-flex; align-items: center; gap: 5px; box-sizing: border-box; height: 22px; padding: 0 7px; border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-chrome-radius); background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-muted); font: inherit; font-size: 11.5px; cursor: pointer; }
|
|
163
|
+
.blockeditor-chart-source:hover { color: var(--blockeditor-ink); border-color: var(--blockeditor-chrome-line-moved); }
|
|
164
|
+
.blockeditor-chart-source svg, .blockeditor-chart-edit svg, .blockeditor-chart-remove svg { flex: none; }
|
|
165
|
+
.blockeditor-chart-edit { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; height: 28px; padding: 0 10px; border: 1px solid var(--blockeditor-rule); border-radius: var(--blockeditor-chrome-radius); background: none; color: var(--blockeditor-ink); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
|
|
166
|
+
.blockeditor-chart-edit:hover, .blockeditor-chart-edit[aria-expanded="true"] { background: var(--blockeditor-pop-hover); }
|
|
167
|
+
.blockeditor-chart-panel { position: absolute; z-index: 5; top: 46px; inset-inline-end: 10px; box-sizing: border-box; width: 304px; padding: 12px; border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-pop-radius); background: var(--blockeditor-pop-bg); box-shadow: var(--blockeditor-pop-shadow); color: var(--blockeditor-pop-ink); font-family: var(--blockeditor-font); font-size: 13px; text-align: start; }
|
|
168
|
+
.blockeditor-chart-panel:focus { outline: none; }
|
|
169
|
+
.blockeditor-chart-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
|
|
170
|
+
.blockeditor-chart-row:last-child { margin-bottom: 0; }
|
|
171
|
+
.blockeditor-chart-label { color: var(--blockeditor-pop-muted); font-size: 12px; font-weight: 500; }
|
|
172
|
+
.blockeditor-chart-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
|
|
173
|
+
.blockeditor-chart-type, .blockeditor-chart-remove, .blockeditor-chart-done { display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; height: 28px; padding: 0 10px; border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-chrome-radius); background: none; color: var(--blockeditor-pop-ink); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
|
|
174
|
+
.blockeditor-chart-type:hover, .blockeditor-chart-remove:hover, .blockeditor-chart-done:hover { background: var(--blockeditor-pop-hover); }
|
|
175
|
+
.blockeditor-chart-type[aria-pressed="true"] { border-color: var(--blockeditor-chrome-line-moved); background: var(--blockeditor-pop-hover); font-weight: 600; }
|
|
176
|
+
.blockeditor-chart-select, .blockeditor-chart-title-input { box-sizing: border-box; width: 100%; height: 28px; padding: 0 8px; border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-chrome-radius); background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); font: inherit; font-size: 12.5px; }
|
|
177
|
+
.blockeditor-chart-values { display: flex; flex-direction: column; gap: 1px; padding: 5px 6px; border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-chrome-radius); }
|
|
178
|
+
.blockeditor-chart-value { display: flex; align-items: center; gap: 7px; padding: 2px 4px; font-size: 12.5px; cursor: pointer; }
|
|
179
|
+
.blockeditor-chart-value:hover { background: var(--blockeditor-pop-hover); }
|
|
180
|
+
.blockeditor-chart-value input { margin: 0; accent-color: var(--blockeditor-accent); }
|
|
181
|
+
.blockeditor-chart-swatch { flex: none; width: 10px; height: 10px; border-radius: 2px; }
|
|
182
|
+
.blockeditor-chart-hint { color: var(--blockeditor-pop-muted); font-size: 11px; line-height: 1.4; }
|
|
183
|
+
.blockeditor-chart-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--blockeditor-pop-line); }
|
|
184
|
+
.blockeditor-chart-remove { color: var(--blockeditor-danger); }
|
|
185
|
+
.blockeditor-chart-broken { box-sizing: border-box; padding: 16px; border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-chrome-radius); background: var(--blockeditor-pop-hover); font-family: var(--blockeditor-font); text-align: start; }
|
|
186
|
+
.blockeditor-chart-broken[hidden] { display: none; }
|
|
187
|
+
.blockeditor-chart-plot[hidden] { display: none; }
|
|
188
|
+
.blockeditor-chart-broken-head { margin-bottom: 4px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
|
|
189
|
+
.blockeditor-chart-broken-text { margin: 0 0 12px; color: var(--blockeditor-pop-muted); font-size: 12.5px; line-height: 1.45; }
|
|
190
|
+
.blockeditor-chart-broken-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
191
|
+
.blockeditor-chart-use, .blockeditor-chart-delete { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 28px; padding: 0 10px; border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-chrome-radius); background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
|
|
192
|
+
.blockeditor-chart-use:hover, .blockeditor-chart-delete:hover { background: var(--blockeditor-pop-bg); border-color: var(--blockeditor-chrome-line-moved); }
|
|
193
|
+
.blockeditor-chart-delete { color: var(--blockeditor-danger); }
|
|
194
|
+
.blockeditor-chart-broken-actions .blockeditor-chart-select { width: auto; min-width: 0; flex: 1 1 140px; }
|
|
195
|
+
@media (max-width: 560px) {
|
|
196
|
+
.blockeditor-chart-panel { position: static; inset-inline-end: auto; width: auto; border: 0; border-top: 1px solid var(--blockeditor-pop-line); border-radius: 0; box-shadow: none; }
|
|
197
|
+
.blockeditor-chart-use, .blockeditor-chart-delete, .blockeditor-chart-broken-actions .blockeditor-chart-select { height: 44px; }
|
|
198
|
+
}
|
|
199
|
+
.blockeditor-table-scroll { max-width: 100%; overflow-x: auto; }
|
|
200
|
+
.blockeditor-table table { border-collapse: collapse; min-width: max-content; width: 100%; table-layout: auto; }
|
|
201
|
+
.blockeditor-table th, .blockeditor-table td { min-width: 120px; padding: 6px 10px; border-inline-end: 1px solid var(--blockeditor-rule); border-block-end: 1px solid var(--blockeditor-rule); text-align: start; white-space: pre-wrap; }
|
|
202
|
+
.blockeditor-table th { background: var(--blockeditor-code-bg); color: var(--blockeditor-ink-soft); font-weight: 600; }
|
|
203
|
+
.blockeditor-table th[data-kind="number"], .blockeditor-table td[data-kind="number"] { text-align: end; }
|
|
204
|
+
.blockeditor-table th[aria-sort="ascending"] button::after { content: " \u2191"; }
|
|
205
|
+
.blockeditor-table th[aria-sort="descending"] button::after { content: " \u2193"; }
|
|
206
|
+
.blockeditor-table th button, .blockeditor-table-row-menu { border: 0; border-radius: 5px; background: none; color: inherit; font: inherit; cursor: pointer; }
|
|
207
|
+
.blockeditor-table th button:hover, .blockeditor-table-row-menu:hover { background: var(--blockeditor-pop-hover); }
|
|
208
|
+
.blockeditor-editor td > span { display: block; }
|
|
209
|
+
.blockeditor-table-row-menu { float: inline-end; margin-inline-start: 4px; opacity: 0; font-size: 12px; color: var(--blockeditor-ink-soft); display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; }
|
|
210
|
+
.blockeditor-table tr:hover .blockeditor-table-row-menu, .blockeditor-table tr:focus-within .blockeditor-table-row-menu, .blockeditor-table-row-menu:focus-visible { opacity: 1; }
|
|
211
|
+
/* The tags float to the end of the item's first line, so long text wraps beside and
|
|
212
|
+
below them without the text's own marks being pulled apart. The item's whole line
|
|
213
|
+
stays the click target for an empty item, which has no text of its own. */
|
|
214
|
+
.blockeditor-li.blockeditor-check-placeholder::after { content: attr(data-placeholder); position: absolute; inset-inline-start: calc((var(--li-indent) + 1) * var(--blockeditor-indent)); color: var(--blockeditor-ink-faint); pointer-events: none; }
|
|
215
|
+
.blockeditor-check-controls { display: inline-flex; float: inline-end; flex-wrap: wrap; align-items: center; gap: 5px; margin-inline-start: 10px; text-decoration: none; }
|
|
216
|
+
.blockeditor-check-chip { display: inline-flex; align-items: center; gap: 4px; box-sizing: border-box; height: 23px; padding: 0 7px; border: 1px solid var(--blockeditor-rule); border-radius: var(--blockeditor-check-radius); background: transparent; color: var(--blockeditor-ink-soft); font: 400 12px/1 var(--blockeditor-font); white-space: nowrap; cursor: pointer; }
|
|
217
|
+
.blockeditor-check-chip svg { flex: none; }
|
|
218
|
+
.blockeditor-check-chip:hover { background: var(--blockeditor-pop-hover); }
|
|
219
|
+
.blockeditor-check-chip[data-filled="true"] { border-color: transparent; background: var(--blockeditor-chrome-bg-moved); color: var(--blockeditor-ink); font-weight: 500; }
|
|
220
|
+
.blockeditor-check-chip[data-overdue="true"] { border-color: var(--blockeditor-danger); color: var(--blockeditor-danger); }
|
|
221
|
+
.blockeditor-li[data-checked="true"] .blockeditor-check-controls { opacity: 0.62; }
|
|
222
|
+
[data-assignees="false"] .blockeditor-check-chip[data-check="owner"], [data-dates="false"] .blockeditor-check-chip[data-check="date"] { display: none; }
|
|
223
|
+
[data-assignees="false"][data-dates="false"] .blockeditor-check-controls { display: none; }
|
|
224
|
+
.blockeditor-check-popup { display: inline-flex; gap: 4px; padding: 4px; background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-pop-radius); box-shadow: var(--blockeditor-pop-shadow); }
|
|
225
|
+
.blockeditor-check-popup input { font: inherit; color: inherit; background: var(--blockeditor-pop-bg); border: 1px solid var(--blockeditor-pop-line); }
|
|
226
|
+
.blockeditor-check-popup.blockeditor-check-owner, .blockeditor-check-popup.blockeditor-check-date { position: absolute; z-index: 5; display: block; box-sizing: border-box; width: min(264px, calc(100vw - 28px)); padding: 8px; background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-pop-radius); box-shadow: var(--blockeditor-pop-shadow); font-family: var(--blockeditor-font); }
|
|
227
|
+
.blockeditor-check-search { box-sizing: border-box; width: 100%; height: 28px; padding: 0 8px; border: 1px solid var(--blockeditor-pop-line); border-radius: 7px; background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); font: inherit; font-size: 12.5px; }
|
|
228
|
+
.blockeditor-check-search::placeholder { color: var(--blockeditor-ink-faint); }
|
|
229
|
+
.blockeditor-check-subhead { padding: 7px 4px 4px; color: var(--blockeditor-pop-muted); font-size: 11.5px; font-weight: 500; }
|
|
230
|
+
.blockeditor-check-people { display: flex; flex-direction: column; gap: 1px; }
|
|
231
|
+
.blockeditor-check-person { display: flex; align-items: center; gap: 7px; width: 100%; padding: 5px 6px; border: 0; background: none; color: var(--blockeditor-pop-ink); font: inherit; font-size: 12.5px; text-align: start; cursor: pointer; }
|
|
232
|
+
.blockeditor-check-person:hover { background: var(--blockeditor-pop-hover); }
|
|
233
|
+
.blockeditor-check-person[aria-pressed="true"] { font-weight: 500; }
|
|
234
|
+
.blockeditor-check-person .blockeditor-board-face { flex: 0 0 18px; width: 18px; height: 18px; }
|
|
235
|
+
.blockeditor-check-person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
236
|
+
.blockeditor-check-person-meta { margin-inline-start: auto; color: var(--blockeditor-pop-muted); font-size: 11px; }
|
|
237
|
+
.blockeditor-check-person svg { flex: none; }
|
|
238
|
+
.blockeditor-check-divider { height: 1px; margin: 6px 0; background: var(--blockeditor-pop-line); }
|
|
239
|
+
.blockeditor-check-danger { color: var(--blockeditor-danger); }
|
|
240
|
+
.blockeditor-check-danger:hover { background: var(--blockeditor-pop-hover); }
|
|
241
|
+
.blockeditor-check-danger[disabled] { opacity: 0.45; background: none; cursor: default; }
|
|
242
|
+
.blockeditor-check-quick { display: flex; flex-direction: column; gap: 1px; }
|
|
243
|
+
.blockeditor-check-quick-row { display: flex; align-items: center; gap: 7px; width: 100%; padding: 5px 6px; border: 0; background: none; color: var(--blockeditor-pop-ink); font: inherit; font-size: 12.5px; text-align: start; cursor: pointer; }
|
|
244
|
+
.blockeditor-check-quick-row:hover { background: var(--blockeditor-pop-hover); }
|
|
245
|
+
.blockeditor-check-quick-row svg { flex: none; }
|
|
246
|
+
.blockeditor-check-quick-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
247
|
+
.blockeditor-check-quick-meta { margin-inline-start: auto; color: var(--blockeditor-pop-muted); font-family: var(--blockeditor-font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
|
|
248
|
+
.blockeditor-check-cal { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--blockeditor-pop-line); }
|
|
249
|
+
.blockeditor-check-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; padding: 0 2px; }
|
|
250
|
+
.blockeditor-check-cal-month { color: var(--blockeditor-pop-ink); font-size: 12px; font-weight: 600; }
|
|
251
|
+
.blockeditor-check-cal-year { font-family: var(--blockeditor-font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
|
|
252
|
+
.blockeditor-check-cal-nav { display: inline-flex; gap: 3px; }
|
|
253
|
+
.blockeditor-check-cal-btn { display: inline-grid; place-content: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--blockeditor-pop-line); border-radius: var(--blockeditor-check-radius); background: none; color: var(--blockeditor-pop-ink); cursor: pointer; }
|
|
254
|
+
.blockeditor-check-cal-btn:hover { background: var(--blockeditor-pop-hover); }
|
|
255
|
+
.blockeditor-check-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
|
|
256
|
+
.blockeditor-check-cal-dow { padding: 2px 0; color: var(--blockeditor-pop-muted); font-size: 10.5px; font-weight: 500; }
|
|
257
|
+
.blockeditor-check-cal-day { height: 28px; padding: 0; border: 1px solid transparent; border-radius: var(--blockeditor-check-radius); background: transparent; color: var(--blockeditor-pop-ink); font-family: var(--blockeditor-font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; cursor: pointer; }
|
|
258
|
+
.blockeditor-check-cal-day:hover { background: var(--blockeditor-pop-hover); }
|
|
259
|
+
.blockeditor-check-cal-day[data-outside="true"] { opacity: 0.5; }
|
|
260
|
+
.blockeditor-check-cal-day[data-today="true"] { border-color: var(--blockeditor-accent); font-weight: 500; }
|
|
261
|
+
.blockeditor-check-cal-day[aria-pressed="true"] { background: var(--blockeditor-chrome-bg-moved); font-weight: 500; }
|
|
262
|
+
.blockeditor-board-owners { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-inline: 8px; }
|
|
263
|
+
.blockeditor-board-people { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
264
|
+
.blockeditor-board-person { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 4px; border: 1px solid var(--blockeditor-rule); border-radius: 14px; background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); font: inherit; font-size: 13px; cursor: pointer; transition: background-color var(--blockeditor-fade), border-color var(--blockeditor-fade); }
|
|
265
|
+
.blockeditor-board-person.is-none { padding-inline-start: 10px; color: var(--blockeditor-pop-muted); }
|
|
266
|
+
.blockeditor-board-person:hover { background: var(--blockeditor-pop-hover); }
|
|
267
|
+
.blockeditor-board-person[aria-pressed="true"] { border-color: var(--blockeditor-accent); background: var(--blockeditor-selection); color: var(--blockeditor-pop-ink); }
|
|
268
|
+
.blockeditor-board-owner-input { width: 100%; height: 32px; box-sizing: border-box; padding: 0 8px; border: 1px solid var(--blockeditor-pop-line); border-radius: 7px; background: var(--blockeditor-pop-bg); color: var(--blockeditor-pop-ink); font: inherit; font-size: 14px; }
|
|
269
|
+
.blockeditor-board-owner-input::placeholder { color: var(--blockeditor-ink-faint); }
|
|
270
|
+
.blockeditor-board-face { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blockeditor-code-bg); box-shadow: inset 0 0 0 1px var(--blockeditor-rule); color: var(--blockeditor-ink-soft); font-size: 10.5px; font-weight: 600; line-height: 1; }
|
|
271
|
+
.blockeditor-scrim { display: none; }
|
|
272
|
+
.blockeditor-shell [hidden] { display: none !important; }
|
|
273
|
+
@media (max-width: 560px) {
|
|
274
|
+
/* One fixed bar over the visual viewport, with the four controls a phone keeps.
|
|
275
|
+
The bubble and the desktop-only tools stand down so nothing is doubled. */
|
|
276
|
+
.blockeditor-dock { display: flex; position: fixed; left: 0; top: 8px; width: 204px; min-width: 204px; box-sizing: border-box; align-items: center; justify-content: center; gap: 4px; margin: 0; padding: 8px; z-index: 3; }
|
|
277
|
+
.blockeditor-tool-desk { display: none; }
|
|
278
|
+
.blockeditor-dock .blockeditor-tool-more { display: inline-flex; }
|
|
279
|
+
.blockeditor-dock .blockeditor-tool { min-width: 44px; height: 44px; }
|
|
280
|
+
.blockeditor-shell:has(.blockeditor-bubble:not([hidden])) .blockeditor-dock { visibility: visible; }
|
|
281
|
+
.blockeditor-dock + .blockeditor-editor { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
|
|
282
|
+
.blockeditor-plus { position: fixed; top: auto; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 44px; height: 44px; border-radius: 22px; }
|
|
283
|
+
.blockeditor-grip { position: fixed; top: auto; left: 68px; bottom: calc(16px + var(--blockeditor-grip-lift, 0px) + env(safe-area-inset-bottom)); width: 44px; height: 44px; border-radius: 22px; opacity: 1; color: var(--blockeditor-chrome-ink-rest); background: var(--blockeditor-chrome-bg-rest); border: 1px solid var(--blockeditor-chrome-line-rest); }
|
|
284
|
+
.blockeditor-bubble { display: none; }
|
|
285
|
+
.blockeditor-scrim { display: block; position: fixed; inset: 0; z-index: 4; background: var(--blockeditor-scrim); }
|
|
286
|
+
.blockeditor-menu { position: fixed; left: 0; top: 0; width: var(--blockeditor-pop-width, min(280px, calc(100vw - 16px))); max-height: min(70vh, var(--blockeditor-pop-max, 70vh)); overflow-y: auto; transform: translate(var(--blockeditor-pop-x, 0px), var(--blockeditor-pop-y, 0px)); z-index: 5; }
|
|
287
|
+
.blockeditor-settings { position: fixed; left: 0; top: 0; transform: translate(var(--blockeditor-pop-x, 0px), var(--blockeditor-pop-y, 0px)); z-index: 5; }
|
|
288
|
+
.blockeditor-menu-item { min-height: 48px; font-size: 16px; }
|
|
289
|
+
.blockeditor-link { position: fixed; left: 0; right: 0; top: auto; bottom: 0; max-width: none; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-radius: 0; border-width: 1px 0 0; }
|
|
290
|
+
.blockeditor-link-input { min-width: 0; height: 44px; font-size: 16px; }
|
|
291
|
+
.blockeditor-link-btn, .blockeditor-upload-btn { min-width: 44px; height: 44px; }
|
|
292
|
+
.blockeditor-image-frame { width: 100% !important; }
|
|
293
|
+
.blockeditor-image-handle { display: none; }
|
|
294
|
+
.blockeditor-table th button, .blockeditor-table-row-menu, .blockeditor-check-chip, .blockeditor-check-popup button, .blockeditor-menu-item { min-height: 44px; }
|
|
295
|
+
.blockeditor-check-person { min-height: 44px; }
|
|
296
|
+
.blockeditor-check-popup .blockeditor-check-quick-row { min-height: 44px; }
|
|
297
|
+
.blockeditor-check-popup .blockeditor-check-cal-day { height: 40px; min-height: 40px; }
|
|
298
|
+
.blockeditor-board-owner-input { font-size: 16px; height: 44px; }
|
|
299
|
+
.blockeditor-check-search { font-size: 16px; height: 44px; }
|
|
300
|
+
.blockeditor-check-popup .blockeditor-check-cal-btn { width: 44px; height: 44px; }
|
|
301
|
+
.blockeditor-board-person { height: 44px; border-radius: 22px; }
|
|
302
|
+
}
|
|
303
|
+
@media (prefers-reduced-motion: reduce) {
|
|
304
|
+
.blockeditor-dock, .blockeditor-plus, .blockeditor-grip, .blockeditor-toggle-button, .blockeditor-image-handle, .blockeditor-upload-bar > span, .blockeditor-board-person { transition: none; }
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
`,Qo=(o,e)=>(e&&e(o.tr.replaceSelectionWith(g.nodes.hard_break.create()).scrollIntoView()),!0),Zo=(o,e,r)=>!e||!r?.editable||!Y(o,g.marks.underline)?!1:(import("../c-ZFO5RW6G.js").then(({formatMark:t,refuse:i})=>t(r,"underline").then(d=>{d?.status!=="applied"&&i(r,d?.message??"That format isn\u2019t available here.")}),()=>null),!0),oe=({history:o=!0,undo:e,redo:r}={})=>({"Mod-z":o?S.undo:()=>(e?.(),!0),"Shift-Mod-z":o?S.redo:()=>(r?.(),!0),"Mod-y":o?S.redo:()=>(r?.(),!0),"Shift-Enter":Qo,"Mod-b":y.toggleMark(g.marks.strong),"Mod-i":y.toggleMark(g.marks.em),"Mod-u":Zo}),ee=(o,e,r)=>bo(null,r)?!1:X.undoInputRule(o,e&&(t=>e(Co(t)))),re={Backspace:y.chainCommands(ee,so),"Mod-e":y.toggleMark(g.marks.code),"Mod-Shift-s":y.toggleMark(g.marks.strike)},te=(o,e)=>globalThis.clay?.upload?.(o,e)??Promise.resolve({ok:!1,code:"unavailable",msg:"File uploads are not available in this editor"}),Ko=new WeakMap,O=new h.PluginKey("lazyViews"),H=class{constructor(e,r){this.node=e,this.type=e.type,this.registry=r;let{dom:t,contentDOM:i}=U.DOMSerializer.renderSpec(document,e.type.spec.toDOM(e));this.dom=t,this.contentDOM=i??null}update(e){return e.type===this.type&&!this.registry.has(e.type.name)}};function ie(){return new h.Plugin({key:O,state:{init:()=>m.DecorationSet.empty,apply(o){let e=o.getMeta(O);if(!e)return m.DecorationSet.empty;let r=[];return o.doc.forEach((t,i)=>{e.types.includes(t.type.name)&&r.push(m.Decoration.node(i,i+t.nodeSize,{},{lazyView:r.length+1}))}),m.DecorationSet.create(o.doc,r)}},props:{decorations:o=>O.getState(o)}})}function de({view:o,upload:e,toolHost:r,board:t=null,undo:i=null,redo:d=null,revise:c=null,highlight:n},s,u){let x=u.createFeature({view:o,upload:e,toolHost:r,board:t,undo:i,redo:d,revise:c,highlight:n}),z=Ko.get(o),E=()=>{if(x.css&&L(`blockeditor-feature-${s}`,x.css,`blockeditor-feature-${s}`,["editor-ui"]),!x.nodeViews)return;let P=Object.keys(x.nodeViews);for(let v of P)z.set(v,x.nodeViews[v]);o.dispatch(o.state.tr.setMeta(O,{types:P}).setMeta("addToHistory",!1))},A=()=>{o.isDestroyed||(o.composing?setTimeout(A,25):E())};return o.composing?o.dom.addEventListener("compositionend",()=>setTimeout(A,25),{once:!0}):E(),x}function le(o){return new h.Plugin({view(e){let r=new Set,t=()=>{for(let d of r)o.has(d)&&r.delete(d);e.state.doc.forEach(d=>{let c=Mo(d);!c||o.has(c)||r.has(c)||o.ensure(c).catch(()=>{r.add(c)})})},i=e.state.doc;return t(),{update(){e.state.doc!==i&&(i=e.state.doc,t())}}}})}function ce({load:o=()=>Promise.reject(new Error("page: this editor has no command module")),context:e=()=>({}),reportError:r}={}){let t=new Map,i=new Set,d=null,c=null,n=!0,s=!1,u=0,x=a=>{let b=t.get(a);return b||(b=Promise.resolve(o(a)),t.set(a,b),b.catch(()=>{t.get(a)===b&&t.delete(a)})),b},z=()=>(c??=R({load:x,install:(a,b)=>b.createFeature(e(d)),reportError:r??((a,b)=>console.error(`clayjs: the ${b} command failed to load`,a))}),c),E=()=>{let a=u,b=d.state.selection;return{revision:a,selection:b,valid:()=>n&&!s&&!d.isDestroyed&&u===a&&d.state.selection.eq(b)}};function A(a,b){a.doc!==b.doc&&(u+=1);for(let p of i)p.lease.valid()||(i.delete(p),p.controller.abort({ok:!1,code:"stale-target"}))}async function P(a,b){if(!n||s||!d||d.isDestroyed)return{ok:!1,code:"not-editing"};let p={lease:E(),controller:new AbortController};i.add(p);try{let w=await z().ensure(a,{signal:p.controller.signal});return w?p.lease.valid()?await w.run(b):{ok:!1,code:"stale-target"}:{ok:!1,code:"not-editing"}}catch(w){return p.controller.signal.aborted?p.controller.signal.reason:{ok:!1,code:"unavailable",error:w}}finally{i.delete(p)}}function v(){if(n){n=!1;for(let a of i)a.controller.abort({ok:!1,code:"not-editing"});i.clear()}}function M(){v(),c?.dispose(),c=null}return{attach(a){d=a},observe:A,run:P,enter(){s||(n=!0)},quiesce:v,leave:M,dispose(){M(),s=!0,n=!1,t.clear()}}}var _=new WeakMap;function ae(o){return new h.Plugin({view:()=>({update:(e,r)=>o.observe(e.state,r)}),props:{handleTextInput(e,r,t,i){return i!=="@"||e.composing||!Object.hasOwn(T,"mentions")?!1:(e.dispatch(e.state.tr.insertText("@",r,t)),o.run("mentions",{from:r,to:r+1}),!0)}}})}function _e(o,e,r){let t=o?_.get(o):null;return t?Object.hasOwn(T,e)?t.run(e,r):Promise.resolve({ok:!1,code:"unknown-command"}):Promise.resolve({ok:!1,code:"not-editing"})}function ne(o){return new h.Plugin({view(e){let r=o?()=>o.tablesChanged():()=>mo.get(e)?.tablesChanged?.(),t=e.state.doc;return{update(i){i.state.doc!==t&&(t=i.state.doc,r())}}}})}function be({upload:o=te,highlight:e,history:r=!0,undo:t,redo:i,onAiTool:d=null,mediaNote:c=null,toolHost:n=null,features:s=null,commandHost:u=null}={}){return[to(),wo({onAiTool:d,mediaNote:c}),u?ae(u):null,vo(),ne(n),ro(),uo(),Bo(),po(),ko(),Fo(),ho(),D.keymap(re),So,To,D.keymap(Po),D.keymap(oe({history:r,undo:t,redo:i})),D.keymap(y.baseKeymap),yo(),eo(),Do(),no(),lo({upload:o}),Eo(),io({upload:o,features:s}),go(),Ao(),fo(),xo(),r?S.history():null,G.gapCursor(),ie(),s?le(s):null].filter(Boolean)}function pe(o,e={}){let r=o&&Object.keys(o).length?o:{[Q()]:{t:"paragraph",pos:J(),c:""}},t=e.doc??oo(g,r);return h.EditorState.create({doc:t,plugins:be(e)})}function Ne(o){!o||o.isDestroyed||o.updateState(o.state)}function We(o,e,{quiesce:r=!1}={}){if(!o||o.isDestroyed)return!1;let t=e===!0;o.setProps({editable:()=>t});let i=_.get(o);return t?i?.enter():r?i?.quiesce():i?.leave(),t}function ke(o,e){let r=e.target.closest?.('.blockeditor-li[data-kind="check"]');if(!r||!o.dom.contains(r))return!1;let t=r.getBoundingClientRect(),i=parseFloat(getComputedStyle(r).paddingInlineStart)||0,d=getComputedStyle(r).direction==="rtl"?t.right-e.clientX:e.clientX-t.left;if(d<0||d>i)return!1;let c=o.posAtDOM(r,0)-1,n=o.state.doc.nodeAt(c);return n?(e.preventDefault(),o.dispatch(o.state.tr.setNodeMarkup(c,null,{...n.attrs,checked:!n.attrs.checked})),!0):!1}function Ue(o,{blocks:e=null,onChange:r=null,upload:t,highlight:i,doc:d,dispatch:c,history:n=!0,undo:s,redo:u,editable:x=!0,toolHost:z=null,onAiTool:E=null,mediaNote:A=null,reviseTool:P=null,board:v=null,features:M=null,formatGate:a=null}={}){let b=o.ownerDocument;L(Oo,Jo,Oo,["editor-ui"]);let p=b.createElement("div");p.className="blockeditor-shell",p.setAttribute("clay","editor-ui"),p.setAttribute("sap-ignore",""),o.appendChild(p);let w=!1,k=null,j=M??R({load:l=>V[l].load(),install:(l,f)=>de({view:k,upload:t,toolHost:z,board:v,undo:s,redo:u,revise:P,highlight:i},l,f)}),F=ce({load:l=>T[l].load(),context:l=>({view:l,upload:t})}),K=new Map,N={};for(let l of Object.values(V))for(let f of l.views??l.types)N[f]=(B,Ro,qo,Vo,$o)=>{let W=K.get(B.type.name);return W?W(B,Ro,qo,Vo,$o):new H(B,K)};k=new m.EditorView(p,{state:pe(e,{upload:t,highlight:i,doc:d,history:n,undo:s,redo:u,onAiTool:E,mediaNote:A,toolHost:z,features:j,commandHost:F}),attributes:{class:"blockeditor-editor"},scrollMargin:{top:16,bottom:96,left:5,right:5},scrollThreshold:{top:16,bottom:96,left:0,right:0},editable:()=>x,nodeViews:N,handleDOMEvents:{mousedown:ke,dragstart(l,f){let B=l.state.selection;return B instanceof h.NodeSelection||B instanceof zo?(f.preventDefault(),!0):!1}},dispatchTransaction(l){if(c){c(l);return}w&&l.docChanged&&!l.getMeta(q)&&S.closeHistory(l),l.docChanged&&(w=!!l.getMeta(q));let f=k.state.doc;k.updateState(k.state.apply(l)),r&&k.state.doc!==f&&r(Z(k.state.doc))}}),Ko.set(k,K),ao.set(k,j),F.attach(k),_.set(k,F);let Io=k.destroy.bind(k),C=null,I=!1,Lo=()=>(C||(C=Promise.resolve().then(()=>a()).catch(l=>{throw C=null,l})),C);return k.runFormatCommand=async l=>{if(I)return{status:"disposed",retry:!1};if(!a)return{status:"unsupported-host",code:"blockeditor-format-unsupported",retry:!1};let f=await Lo();return I?(f.dispose?.(),{status:"disposed",retry:!1}):f.run({apply:l})},k.destroy=()=>{I=!0,C&&C.then(l=>l?.dispose?.(),()=>{}),F.dispose(),j.dispose(),Io()},k}export{Jo as PAGE_EDITOR_CSS,pe as blockeditorState,Ue as createPageEditor,de as installPageFeature,O as lazyViewsKey,ie as lazyViewsPlugin,be as pagePlugins,Ne as refreshMountedView,_e as runPageCommand,We as setEditorActive};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as Le}from"../c-AQYCG7QW.js";import{c as Ae}from"../c-DFKBGSN2.js";import{e as Ke,g as F,h as ze,j as le,l as Te,n as Ce,p as Ge,q as d}from"../c-MR75YPRT.js";import{a as qe}from"../c-4JZDZFF6.js";import{b as G,c as Se,d as se,e as x,f as We}from"../c-5RZNFTWD.js";import{b as O}from"../c-PKCCHJ5X.js";import{b as Ue}from"../c-JQF2EUCG.js";import{a as de,b as Ve}from"../c-QTTJYJMA.js";import{b as h}from"../c-NUHP2XDB.js";import"../c-TWCXBWS3.js";import{a as $e}from"../c-VKEDWYDF.js";import{n as je,o as ce}from"../c-HTLYXCUH.js";import"../c-4ASQPRQL.js";import"../c-GQ6F6IDK.js";import"../c-I2SCCUEW.js";import"../c-5VYOWDTI.js";import"../c-6Q6RGFBF.js";import"../c-SKMIR5HQ.js";import"../c-WYFDLITL.js";import"../c-UGHH4MB3.js";import{a as Ee}from"../c-LA2BW7UY.js";import"../c-MFOSMAVM.js";import"../c-LD6UVV5R.js";import"../c-PGSBXHUE.js";import"../c-6IJEVE6B.js";import"../c-QQFHEODI.js";import"../c-IJUK2GPW.js";import{k as Be}from"../c-EDE45NM7.js";import"../c-BPF2NSPV.js";import"../c-P7KNDG34.js";import"../c-CYWLPPUS.js";import"../c-U4NTUVDZ.js";import"../c-PWJSJEJU.js";import"../c-XQXZAO7N.js";import"../c-S7LK4KUE.js";import"../c-VG5XIN4T.js";import"../c-2YYDMLNZ.js";import"../c-HA6INT6J.js";import{h as ee,o as _e}from"../c-ICMAOOGK.js";import"../c-WRBKEJD4.js";import"../c-VHNSBD2M.js";var tt="ai-edit",xt="h1,h2,h3,h4,h5,h6,p,figure",vt="p,h1,h2,h3,h4,h5,h6,li,dt,dd,blockquote,pre,figcaption,td,th",Et="section,article,aside,header,footer,nav,main,div,ul,ol,dl,table,figure,form",nt="script,style,template,textarea,input,select,button,iframe,svg,math",St="This section is too large for AI editing. Select a smaller part.",Oe="The save did not finish; the edit is still on the page.",Tt=0,o=null,a,w,u,T,A,m,b,v,R,_,$,W,D,B={},p=null,C=null,N=null,ue=!1,re=new WeakMap,He=new Set,f=null,Z=null,S=null,z,q,pe=null,k=null,Y=null,L=null,te=null,he=[],V=null,H=null,Re=0;function we(e){re.delete(e),He.delete(e)}function be(e,t){if(!t){we(e);return}re.set(e,t),He.add(e)}var it="clay-ai-edit",Ye="AI editing is turned off. Turn it on from the app\u2019s menu.";async function rt(){let t=(await Ae.helpers()).find(n=>n.name===tt);return t&&(t.state==="ready"||t.state==="unavailable")?t.state:null}var K=()=>window.clay?.blockeditor?.ai||null,Ct=()=>!!window.clay?.editPlugins?.includes("blockeditor")&&!!document.querySelector("article[data-blockeditor]"),ye=()=>Ct()&&!K()?.active();function Lt(){Ee.pause()}function Ie(){Ee.resume()}function fe(e){if(!(e instanceof Element))return null;let t=e.closest("[data-edit-id]");if(!t)return null;let n=e.closest(xt);return n&&t.contains(n)?n:t}function At(e){if(e===document.body)return"document";let t=e.getAttribute("data-edit-id");if(t)return t;let n=e.closest("[data-edit-id]");return n?n.getAttribute("data-edit-id")+" \u203A "+e.tagName.toLowerCase():e.id?"#"+e.id:e.tagName.toLowerCase()}function xe(){let e=window.getSelection();return!e||e.rangeCount===0||e.isCollapsed?null:e.getRangeAt(0)}function ot(e){if(K()||ye())return null;let t=e.commonAncestorContainer;if(t.nodeType!==1&&(t=t.parentElement),!t||!document.body.contains(t))return null;if(t===document.body)return document.body;if(t.closest("[data-clay-ai-edit]")||t.closest(ee)||t.closest(nt))return null;if(t.closest("[data-edit-id]"))return fe(t);let n=t.closest(vt)||t.closest(Et);return n&&n!==document.body?n:null}function at(e,t){if(!e||!t||!t.contains(e.commonAncestorContainer))return;let n=e.toString();if(!n.trim())return;let i=document.createRange();i.selectNodeContents(t),i.setEnd(e.startContainer,e.startOffset);let r=i.toString().length;return{text:n,start:r,end:r+n.length}}function me(e){let t=xe();if(t){if(e===document.body){let n=t.toString();return n.trim()?{text:n,start:void 0,end:void 0}:void 0}return at(t,e)}}function st(){let e=document.body.cloneNode(!0);return e.querySelectorAll(ee).forEach(t=>t.remove()),e.outerHTML}function Mt(e,t,n){let{HyperMorph:i}=de();return i.morph(e,t,{morphStyle:"outerHTML",restoreFocus:!0,scripts:n})}function ge(e,t,{rewind:n=!1}={}){let{HyperMorph:i,mergeTagRecognizers:r}=de(),s=n?{merge:!1,handle:!1}:{mergeBase:e.snapshot,mergeTags:r,handle:!1};e.docMode?(typeof t=="string"&&(t=new DOMParser().parseFromString(t,"text/html").body),i.morph(document.body,t,{morphStyle:"outerHTML",restoreFocus:document.activeElement?.localName!=="clay-editor-ui",scripts:s,callbacks:{beforeNodeRemoved:l=>!(l.nodeType===1&&l.matches(ee))}})):Mt(e.el,t,s),Ue()}function kt(e,t){let n=e.search(new RegExp("<"+t+"(\\s|>)","i"));if(n===-1)return null;let i=e.slice(n).replace(/\s*`{1,3}\s*$/,"");if(t.toLowerCase()==="body")return new DOMParser().parseFromString(i,"text/html").body;let r=document.createElement("template");r.innerHTML=i;let s=r.content.firstElementChild;return!s||s.tagName.toLowerCase()!==t.toLowerCase()?null:s}function Ot(e,t,n,{contextRefsOf:i,wantsPage:r}){let s=e===document.body,l=s?st():e.outerHTML,c={id:"req-"+Date.now().toString(36)+"-"+ ++Tt,editId:At(e),tag:e.tagName.toLowerCase(),elementHTML:l,comment:t,contextRefs:i(t)};return n&&(c.quote=n.text,Number.isInteger(n.start)&&(c.selection={start:n.start,end:n.end})),!s&&r(t)&&(c.page=!0),{id:c.id,el:e,docMode:s,tag:c.tag,reassertId:s?null:e.getAttribute("data-edit-id"),snapshot:l,payload:c,state:"requesting",paused:!1,handle:null,finalCandidate:null}}async function Rt(e,t,n){if(e.aiTarget)return Ht(e,t,n);let{MAX_PAYLOAD_BYTES:i,contextRefsOf:r,wantsPage:s}=await import("../c-TGSHHFO6.js");if(o=Ot(e,t,n,{contextRefsOf:r,wantsPage:s}),new Blob([JSON.stringify(o.payload)]).size>i){o=null,ie(St,"warn");return}if(be(e,t),mt(),o.paused=!0,Lt(),C={},P("working"),y("Sending\u2026"),o.payload.page&&await window.clay.save(),!o)return;let l=Ae.send(o.payload,{helper:tt,onStatus:({text:g})=>{o?.handle===l&&y(g)}});o.handle=l;let c=await l.done;!o||o.handle!==l||(await Ve(),!(!o||o.handle!==l)&&(c.state==="done"?_t(c.result||{}):c.state==="cancelled"?M("HTML Clay stopped this edit."):M(c.error||"the helper reported an error")))}async function Ht(e,t,n){let i={id:null,el:e,target:e,docMode:!1,state:"requesting",paused:!1,held:!1,handle:null,finalCandidate:null};o=i;let r;try{r=await e.start(t,n)}catch(g){M(g?.message||"the helper reported an error");return}if(o!==i)return;if(r.status!=="ok"){o=null,ie(r.message,"warn");return}i.id=r.id,be(e,t),mt(),C={},P("working"),y("Sending\u2026");let s=r.send({onStatus:({text:g})=>{o===i&&y(g)}});i.handle=s;let l=await s.done;if(o!==i)return;if(l.state!=="done"){l.state==="cancelled"?M("HTML Clay stopped this edit."):M(l.error||"the helper reported an error");return}i.state="deciding";let c;try{c=await e.propose(l.result||{})}catch(g){M(g?.message||"the reply could not be applied");return}if(o===i){if(c.status!=="ready"){M(c.message);return}we(e),P("ready"),y(lt(c.warnings||[],(l.result||{}).model),c.warnings?.length?"warn":"")}}var It=/^(on|hx-on|x-|@|:|v-on:|v-bind:|data-on[-:])/,Pt=new Set(["iframe","frame","object","embed","base","link"]);function Dt(e){let t=e.replace(/[\t\n\r]/g,"").replace(/^[\u0000- ]+/,"").toLowerCase();return t.startsWith("javascript:")||t.startsWith("vbscript:")}function Nt(e){let t=(e.getAttribute("type")||"").trim().toLowerCase();return!t||/javascript|ecmascript/.test(t)||["module","importmap","speculationrules"].includes(t)}function Me(e){return[...e.attributes].map(t=>t.name.toLowerCase()+"="+t.value).sort().join(" ")}function Je(e){let t=new Map,n=i=>t.set(i,(t.get(i)||0)+1);for(let i of[e,...e.querySelectorAll("*")]){let r=i.tagName.toLowerCase();r==="script"?Nt(i)&&n("script "+Me(i)+"|"+i.textContent.trim()):(Pt.has(r)||r==="meta"&&i.hasAttribute("http-equiv")||(r==="animate"||r==="set")&&/href/i.test(i.getAttribute("attributeName")||""))&&n(r+" "+Me(i));for(let s of i.attributes){let l=s.name.toLowerCase();It.test(l)?n(r+" "+l+"="+s.value.trim()):l==="srcdoc"?n(r+" srcdoc="+s.value):Dt(s.value)&&n(r+" "+l+"="+s.value)}}return t}function Ft(e,t,n){let i=n?new DOMParser().parseFromString(t,"text/html").body:(()=>{let s=document.createElement("template");return s.innerHTML=t,s.content.firstElementChild})(),r=i?Je(i):new Map;for(let[s,l]of Je(e))if(l>(r.get(s)||0))return!0;return!1}var Bt="The reply adds a script or event handler, so it was not applied. AI editing changes content, not code.";function _t(e){if(!o||o.state!=="requesting")return;o.state="deciding";let t=[],n=kt(e.html||"",o.tag);if(!n){M(`reply is not a single <${o.tag}> element`);return}if(!o.docMode){let i=document.createElement("template");i.innerHTML=e.html||"",i.content.children.length>1&&t.push("reply had extra root elements \u2014 kept the first")}if(o.reassertId&&n.setAttribute("data-edit-id",o.reassertId),Ft(n,o.snapshot,o.docMode)){M(Bt);return}je(),o.held=!0,o.finalCandidate=n;try{ge(o,n)}catch(i){M("the reply could not be applied: "+(i?.message||i));return}E(),we(o.el),P("ready"),y(lt(t,e.model),t.length?"warn":"")}function lt(e,t){let n=["Edit ready.",...e.map(i=>"\u26A0 "+i)];return t&&n.push(`(${t})`),n.join(" ")}function M(e){o&&(oe(),P("error"),y(e,"warn"))}function oe(){let e=o;if(o=null,!!e){if(e.target){e.target.discard(),E();return}try{(e.state==="requesting"||e.state==="deciding")&&de()&&ge(e,e.snapshot,{rewind:!0})}finally{e.paused&&Ie(),e.held&&ce(),E()}}}async function ct(){let e=o;if(!e)return;if(o=null,e.target)return $t(e.target);let t=e.docMode?st():e.el.outerHTML;try{ge(e,e.snapshot,{rewind:!0})}finally{e.paused&&Ie(),e.held&&ce({replay:!1})}ge(e,t),E(),P("saving"),y("Saving\u2026");let n=C,i=await window.clay.save();if(n===C){if(i&&i.ok===!1){P("error"),y(i.msg||Oe,"warn");return}y(i&&i.msg||"Saved",i&&i.msgType==="error"?"warn":""),pt()}}async function $t(e){E(),P("saving"),y("Saving\u2026");let t=C,n;try{n=await e.keep()}catch(i){n={status:"failed",message:i?.message||Oe}}if(t===C){if(!n||n.status!=="kept"){P("error"),y(n&&n.message||Oe,"warn");return}y(n.message||"Saved"),pt()}}function dt(){o?.handle?.cancel(),oe(),Q()}var Xe=["z-index:99999","padding:0","display:inline-grid","place-items:center","line-height:1",`box-shadow:${se}`];function j(e,t,n){return e.setAttribute(t,n),e}function Wt(){let{signal:e}=te;V=document.createElement("style"),V.setAttribute("clay",Ke),V.textContent=`
|
|
2
|
+
[editmode\\:contenteditable][contenteditable]:focus {
|
|
3
|
+
outline: 1px solid #4a4a6a; outline-offset: 4px; border-radius: 2px;
|
|
4
|
+
}
|
|
5
|
+
::highlight(clay-ai-edit) { background-color: ${x["brass-soft"]} !important; }
|
|
6
|
+
`,document.head.appendChild(V);let t=`color-scheme:${qe()}`;w=j(le("div",["box-sizing:content-box","position:fixed","z-index:99998","pointer-events:none",`border:2px solid ${x.brass}`,"border-radius:0",t]),"data-clay-ai-edit","ring"),d(w,!1),a=j(Te("div",["position:fixed","z-index:99999","width:min(28rem, calc(100vw - 32px))","padding:12px","border-radius:12px",`box-shadow:${se}`,`font:13px/1.5 ${G}`,t]),"data-clay-ai-edit","panel"),d(a,!1),a.setAttribute("role","dialog"),a.setAttribute("aria-label","AI edit");let n=(c,g)=>j(c,"data-clay-ai-edit-part",g);A=n(le("div",["position:absolute","width:12px","height:12px","pointer-events:none",`background:${x.surface}`,`border-left:1px solid ${x["line-2"]}`,`border-top:1px solid ${x["line-2"]}`]),"pointer"),d(A,!1),u=n(Ge("textarea",{rules:["flex:1","min-width:0","min-height:40px","max-height:9.5em","resize:none","overflow-y:auto","padding:8px 12px",`font:15px/1.45 ${G}`]}),"input"),u.rows=1,u.placeholder="Describe the change",u.setAttribute("aria-label","Describe the change"),u.title="Enter sends \xB7 Shift+Enter adds a line \xB7 @fable or @codex picks another agent \xB7 @file.ext adds context",T=n(Ce("div",["display:block","margin-top:0",`color:${x.muted}`,`font:12.5px/1.5 ${Se}`]),"status"),T.setAttribute("role","status"),T.setAttribute("aria-live","polite"),B.send=n(F("Send",{variant:"primary",extra:["min-height:40px","flex:none"]}),"send"),d(B.send,!0,"inline-flex");let i=le("div",["display:flex","align-items:flex-start","gap:8px"]);i.append(u,B.send),a.append(A,i,T),v=j(Te("div",["position:fixed","left:50%","bottom:16px","transform:translateX(-50%)","z-index:99999","width:min(35rem, calc(100vw - 32px))","padding:8px 10px","border-radius:12px","gap:8px","align-items:center",`box-shadow:${se}`,`font:13px/1.5 ${G}`,t]),"data-clay-ai-edit","status-bar"),d(v,!1,"flex"),R=n(Ce("div",["display:block","flex:1","min-width:0","overflow:hidden","text-overflow:ellipsis","white-space:nowrap",`color:${x.muted}`,`font:12.5px/1.5 ${Se}`]),"bar-status"),R.setAttribute("role","status"),R.setAttribute("aria-live","polite"),_=n(F("Stop",{extra:["flex:none"]}),"bar-stop"),$=n(F("Keep",{variant:"primary",extra:["flex:none"]}),"bar-keep"),W=n(F("Discard",{variant:"quiet",extra:["flex:none"]}),"bar-revert"),D=n(ze(We.toastClose,{label:"Dismiss error"}),"bar-close"),D.pin({flex:"none"});for(let c of[_,$,W,D])d(c,!1,"inline-flex");v.append(R,_,$,W,D),m=j(F("AI",{small:!0,extra:["position:fixed","width:26px","height:26px",`font:600 11px/1 ${G}`,...Xe,t]}),"data-clay-ai-edit","chip"),m.title="Comment on this (\u2318J)",d(m,!1,"inline-grid"),b=j(F("AI",{extra:["position:fixed","width:40px","height:40px",`font:600 14px/1 ${G}`,...Xe,t]}),"data-clay-ai-edit","bubble"),b.title="Comment on the whole page",ke(),document.body.append(w,a,v,m,b),J(),B.send.addEventListener("click",Ze),_.addEventListener("click",dt),$.addEventListener("click",ct),W.addEventListener("click",()=>{oe(),Q()}),D.addEventListener("click",()=>{p==="error"&&Q()}),u.addEventListener("keydown",c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),B.send.hidden||Ze())}),u.addEventListener("input",ne),m.addEventListener("mousedown",c=>c.preventDefault()),m.addEventListener("click",()=>{let c=Z,g=q;X(),c&&!o&&!p&&I(c,g||me(c))}),b.addEventListener("click",()=>{if(!(o||p)){if(!a.hidden&&f===document.body){u.value.trim()?u.focus():U();return}I(document.body,me(document.body))}}),window.addEventListener("scroll",()=>{E(),X()},{passive:!0,signal:e}),window.addEventListener("resize",()=>{ke(),a&&!a.hidden&&ne(),E()},{passive:!0,signal:e});let r=()=>{ke(),E()};document.addEventListener("hcms:open",()=>{r(),setTimeout(r,350)},{signal:e}),document.addEventListener("hcms:close",()=>{r(),setTimeout(r,350)},{signal:e});let s=new MutationObserver(()=>J());s.observe(document.body,{childList:!0}),he.push(s);let l=new MutationObserver(()=>{f&&!f.isConnected&>()});l.observe(document.body,{childList:!0,subtree:!0}),he.push(l)}function ut(){f?.isConnected&&E()}function ne(){h(u,"height","auto"),u.value&&h(u,"height",u.scrollHeight+2+"px"),ut()}function J(){let e=b?.ownerDocument;if(!e)return;let t=!p&&L==="ready"&&!!e.querySelector("[data-edit-id]");d(b,t,"inline-grid"),t&&O(b)}function qt(e){!e||typeof window.Highlight!="function"||!window.CSS?.highlights||window.CSS.highlights.set(it,new window.Highlight(e))}function ve(){window.CSS?.highlights?.delete(it)}function ft(){let e=L==="ready";u.disabled=!e,e?T.textContent===Ye&&ie(""):ie(Ye,"warn"),d(B.send,e,"inline-flex"),J()}function Kt(){rt().then(e=>{a&&(L=e||"unavailable",!a.hidden&&!o?ft():J())}).catch(()=>{})}function ke(){b&&(b.pin({right:"16px",bottom:"16px"}),O(b))}function zt(e){clearTimeout(S),S=null,Z=e,q=void 0;let t=e.getBoundingClientRect();m.pin({left:Math.min(t.right+8,window.innerWidth-34)+"px",top:Math.max(8,t.top)+"px"}),d(m,!0,"inline-grid"),O(m)}function X(){clearTimeout(S),S=null,d(m,!1,"inline-grid"),Z=null,q=void 0}function Qe(){m.hidden||S||(S=setTimeout(X,400))}function Gt(){if(o||p||!a.hidden||L!=="ready"||wt())return;let e=xe(),t=e&&ot(e),n=t&&at(e,t);if(!n){q&&X();return}let i=typeof e.getClientRects=="function"?e.getClientRects():[],r=i.length?i[i.length-1]:t.getBoundingClientRect();clearTimeout(S),S=null,Z=t,q=n,m.pin({left:Math.min(r.right+6,window.innerWidth-34)+"px",top:Math.max(8,r.top+r.height/2-13)+"px"}),d(m,!0,"inline-grid"),O(m)}function ie(e,t){h(T,"margin-top",e?"8px":"0"),T.textContent=e||"",t==="warn"?T.setAttribute("data-tone","warn"):T.removeAttribute("data-tone"),h(T,"color",t==="warn"?x.ox:x.muted),ut()}function y(e,t){R.textContent=e||"",t==="warn"?R.setAttribute("data-tone","warn"):R.removeAttribute("data-tone"),h(R,"color",t==="warn"?x.ox:x.muted)}function P(e){clearTimeout(N),N=null;let t=!!p,n=document.activeElement;p=e;let i={working:[_],ready:[$,W],error:[D],saving:[]}[e]||[],r=[_,$,W,D];for(let l of r)d(l,i.includes(l),"inline-flex");X(),d(v,!0,"flex"),J(),E(),O(v);let s=i[0];s&&(!t||r.includes(n)&&!i.includes(n))&&s.focus({preventScroll:!0})}function pt(){clearTimeout(N);let e=C;N=setTimeout(()=>{e&&e===C&&Q()},1500)}function Q(e){e!==void 0&&e!==C||(clearTimeout(N),N=null,C=null,a.hidden||ht(),p=null,d(v,!1,"flex"),y(""),f=null,k=null,Y=null,z=void 0,ve(),d(a,!1),u.value="",d(w,!1),d(A,!1),J())}function E(){let e=window.matchMedia?.("(pointer: coarse)")?.matches;if(h(v,"bottom",K()?.active()&&e?"112px":"16px"),!f)return;if(!f.isConnected){gt();return}if(f===document.body){if(d(w,!1),d(A,!1),a.hidden)return;let Ne=b.getBoundingClientRect(),Fe=a.offsetWidth||480;h(a,"left",Math.max(16,Math.min((Ne.right||window.innerWidth-16)-Fe,window.innerWidth-Fe-16))+"px"),h(a,"top",Math.max(16,(Ne.top||window.innerHeight-56)-(a.offsetHeight||120)-12)+"px");return}let t=f.getBoundingClientRect();if(d(w,!!p||!z||!!o),h(w,"left",t.left-5+"px"),h(w,"top",t.top-5+"px"),h(w,"width",t.width+6+"px"),h(w,"height",t.height+6+"px"),a.hidden)return;let n=k&&k.startContainer.isConnected&&typeof k.getBoundingClientRect=="function"?k.getBoundingClientRect():null,i=n&&(n.width||n.height)?n:t,r=a.offsetWidth||480,s=Math.max(16,Math.min(i.left,window.innerWidth-r-16)),l=i.bottom+10,c=a.offsetHeight||120;l+c>window.innerHeight-16&&(l=Math.max(16,i.top-c-10)),h(a,"left",s+"px"),h(a,"top",l+"px");let g=l>=i.bottom,yt=Math.max(14,Math.min(i.left+10-s,r-28));d(A,!0),h(A,"left",yt+"px"),h(A,"top",g?"-7px":c-6+"px"),h(A,"transform",g?"rotate(45deg)":"rotate(225deg)")}function I(e,t){let n=!a.hidden,i=n&&f===e,r=n&&!!f&&f!==e,s=r?u.value:null;r&&we(f);let l=t?xe():null,c=document.activeElement;Y=c&&c!==document.body&&!a.contains(c)?c:null,f=e,k=l?l.cloneRange():null,X(),d(a,!0),z=t;let g=t?t.text.trim().length>400?t.text.trim().slice(0,400)+"\u2026":t.text.trim():e.aiTarget?e.label:"";a.dataset.quote=g,ie(""),i||(u.value=s||re.get(e)||""),qt(k),ft(),E(),ne(),O(a),O(w),u.focus(),Kt()}function ht(){f&&be(f,u.value)}function U(){o&&(o.handle?.cancel(),oe());let e=Y,t=a.contains(document.activeElement);ht(),f=null,k=null,Y=null,z=void 0,ve(),H?.close(),d(a,!1),d(w,!1),u.value="",ne(),t&&e&&e.isConnected&&e.focus({preventScroll:!0})}function mt(){H?.close(),k=null,Y=null,z=void 0,ve(),d(a,!1),u.value="",ne(),E(),O(w)}function gt(){let e=o;e&&(e.handle?.cancel(),oe()),Q()}function Ze(){let e=u.value.trim();!e||!f||o||L!=="ready"||Rt(f,e,z)}var jt=/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent||"");function Vt(e){return!(jt?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)||e.shiftKey||e.altKey||e.repeat||e.isComposing?!1:e.code==="KeyJ"||(e.key||"").toLowerCase()==="j"}function wt(){let e=Le();return!e||e===document.body?!1:a&&a.contains(e)?!a.hidden:e.matches("input,textarea,select")}var Ut='[data-clay-modal], dialog[open], [aria-modal="true"]',Yt='input,textarea,select,[contenteditable=""],[contenteditable="true"]';function Jt(e){if(e.defaultPrevented||document.querySelector(Ut))return!1;let t=Le();return!t||t===document.body||a.contains(t)||v.contains(t)?!0:t.isContentEditable===!0?!1:!t.matches(Yt)}function Xt(){let{signal:e}=te;document.addEventListener("pointerdown",n=>{ue=a.contains(n.target)},{capture:!0,signal:e}),document.addEventListener("click",n=>{let i=ue;if(ue=!1,i||a.contains(n.target)||v.contains(n.target)||m.contains(n.target)||b.contains(n.target)||H?.contains(n.target)||o||p)return;let r=n.target.closest?.("[data-edit-id]"),s=r?fe(n.target):null;if(r&&s===r){let l=!a.hidden&&r===f;a.hidden||U(),l||I(r,me(r))}else a.hidden||U()},{signal:e});let t=0;document.addEventListener("mousemove",n=>{let i=Date.now();if(i-t<80)return;if(t=i,o||p||!a.hidden){Qe();return}if(L!=="ready"||q)return;if(m.contains(n.target)){clearTimeout(S),S=null;return}let r=fe(n.target);r?zt(r):Qe()},{signal:e}),document.addEventListener("keydown",n=>{if(Vt(n)){if(p||o||wt())return;let i=K();if(i?.active()){let l=i.targetFromSelection();if(!l)return;n.preventDefault(),I(l,l.quote);return}if(ye())return;f&&!f.isConnected&&U();let r=xe(),s=r?ot(r):null;if(!s){let l=window.getSelection(),c=l&&l.anchorNode;c&&c.nodeType!==1&&(c=c.parentElement),s=c&&fe(c)||Z}if(!s)return;n.preventDefault(),I(s,me(s));return}if(n.key==="Escape"&&Jt(n)){if(p==="working"){dt();return}if(p==="ready"){ct();return}if(p==="error"){Q();return}p||a.hidden||U()}},{signal:e}),document.addEventListener("selectionchange",()=>{clearTimeout(pe),pe=setTimeout(Gt,150)},{signal:e})}async function Pe(){let e=++Re;return L=await rt(),e===Re}function bt(){!L||a||(te=new AbortController,Wt(),Xt())}async function Qt(){return await(De||Pe()),L==="ready"||L==="unavailable"}async function ae(){!Be()||a||await Pe()&&bt()}function et(e){return e instanceof Element&&e.ownerDocument===document&&document.body.contains(e)&&!e.closest("[data-clay-ai-edit]")&&!e.closest(ee)&&!e.closest(_e)&&!e.closest(nt)}async function Zt(e,{prompt:t}={}){if(ye()||K()?.active()&&e!==document.body||!et(e)||(await ae(),await new Promise(r=>setTimeout(r,0)),!a||o||p))return!1;let n=K(),i=n?.active()?n.wholePage():e;return(i===e?!et(e):!i.isConnected)?!1:!a.hidden&&f===i?(u.focus(),!0):(typeof t=="string"&&!re.has(i)&&be(i,t),I(i,null),!0)}async function en(e){return!e||e.aiTarget!==!0||(await ae(),await new Promise(t=>setTimeout(t,0)),!a||o||p)||!e.isConnected?!1:!a.hidden&&f===e?(u.focus(),!0):(I(e,e.quote??null),!0)}async function tn(){if(await ae(),ye()||(await new Promise(n=>setTimeout(n,0)),!a||o||p))return!1;if(H?.picking)return!0;let e=K(),t=await import("../c-FDWR3FL7.js").catch(()=>null);return t?(H=t.createPicker({surface:e?.active()?e:null,onPicked:n=>I(n,n.quote),onWholePage:()=>I(e?.active()?e.wholePage():document.body),onCancel:()=>{a.hidden||U()}}),H.open(),!0):!1}function nn(){Re++;let e=o;o=null;try{e?.handle?.cancel(),e&&(e.paused&&Ie(),e.held&&ce())}catch{}clearTimeout(pe),pe=null,clearTimeout(S),S=null,clearTimeout(N),N=null,ve(),te?.abort(),te=null;for(let t of he)t.disconnect();he=[],H?.close(),H=null;for(let t of[V,w,a,v,m,b])t?.remove();V=w=a=u=T=A=v=R=null,_=$=W=D=m=b=null,B={},p=null,C=null,f=null,k=null,Y=null,z=void 0,Z=null,q=void 0,ue=!1,L=null,re=new WeakMap,He.clear()}function gn(){return{id:"clay:ai-edit",order:950,prepare(e={}){let t=e.initial===!0;return{ready:t?De:Pe(),enable(){t||bt()},quiesce(){let n=a&&!a.hidden&&u.value.trim()!=="",i=[];if(o&&i.push(o.id),H?.picking&&i.push("picker"),p==="saving"&&i.push("save"),n&&i.push("prompt"),!!i.length)throw Object.assign(new Error("clay.aiEdit: an edit here is still unresolved"),{code:"pending-input",pending:i})},resume(){},dispose(){nn()}}}}}var De=null;$e(()=>{De=ae().then(()=>{},()=>{})});var wn={init:ae,open:Zt,openTarget:en,pick:tn,available:Qt};export{wn as aiEdit,gn as aiEditParticipant,gn as modeParticipant};
|