@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,299 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600&family=JetBrains+Mono:wght@400;500&display=swap");
|
|
2
|
+
|
|
3
|
+
/* Light 4: warm paper, compact Inter with small 14px section heads, amber selection and frosted faint chrome, from the Gemini Argon bake-off seat. */
|
|
4
|
+
|
|
5
|
+
@import url("./content.css");
|
|
6
|
+
|
|
7
|
+
:where(article[data-blockeditor], .blockeditor-shell) {
|
|
8
|
+
--chart-1: #8A6A2E;
|
|
9
|
+
--chart-2: #6d4e0b;
|
|
10
|
+
--chart-3: #6E6A62;
|
|
11
|
+
--chart-4: #2B2926;
|
|
12
|
+
--chart-5: #9B968C;
|
|
13
|
+
--chart-6: #3B3833;
|
|
14
|
+
--chart-text: #2B2926;
|
|
15
|
+
--blockeditor-bg: #FAF8F4;
|
|
16
|
+
--blockeditor-ink: #2B2926;
|
|
17
|
+
--blockeditor-ink-strong: #1E1D1A;
|
|
18
|
+
--blockeditor-ink-soft: #6E6A62;
|
|
19
|
+
--blockeditor-ink-faint: #9B968C;
|
|
20
|
+
--blockeditor-rule: rgba(31, 30, 27, 0.08);
|
|
21
|
+
--blockeditor-accent: #8A6A2E;
|
|
22
|
+
--blockeditor-link: #6d4e0b;
|
|
23
|
+
--blockeditor-caret: #2B2926;
|
|
24
|
+
--blockeditor-selection: rgba(196, 152, 74, 0.22);
|
|
25
|
+
|
|
26
|
+
--blockeditor-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
27
|
+
--blockeditor-font-display: var(--blockeditor-font);
|
|
28
|
+
--blockeditor-font-heading: var(--blockeditor-font);
|
|
29
|
+
--blockeditor-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
30
|
+
--blockeditor-font-size: 16px;
|
|
31
|
+
--blockeditor-line-height: 1.68;
|
|
32
|
+
--blockeditor-measure: 586px;
|
|
33
|
+
--blockeditor-pad-top: 84px;
|
|
34
|
+
--blockeditor-h1-size: 27px;
|
|
35
|
+
--blockeditor-h1-weight: 600;
|
|
36
|
+
--blockeditor-h1-tracking: -0.022em;
|
|
37
|
+
--blockeditor-h1-line: 1.24;
|
|
38
|
+
--blockeditor-h2-size: 14px;
|
|
39
|
+
--blockeditor-h2-weight: 600;
|
|
40
|
+
--blockeditor-h3-size: 14px;
|
|
41
|
+
--blockeditor-h3-weight: 500;
|
|
42
|
+
--blockeditor-block-gap: 0.32em;
|
|
43
|
+
--blockeditor-indent: 1.375em;
|
|
44
|
+
|
|
45
|
+
--blockeditor-marker: #9B968C;
|
|
46
|
+
--blockeditor-check-size: 16px;
|
|
47
|
+
--blockeditor-check-radius: 4px;
|
|
48
|
+
--blockeditor-check-border: rgba(31, 30, 27, 0.28);
|
|
49
|
+
--blockeditor-check-fill: #3B3833;
|
|
50
|
+
--blockeditor-check-ink: #FAF8F4;
|
|
51
|
+
--blockeditor-done-ink: #6E6A62;
|
|
52
|
+
--blockeditor-toggle-ink: #6E6A62;
|
|
53
|
+
--blockeditor-callout-bg: rgba(31, 30, 27, 0.026);
|
|
54
|
+
--blockeditor-callout-line: rgba(31, 30, 27, 0.07);
|
|
55
|
+
--blockeditor-code-bg: rgba(31, 30, 27, 0.055);
|
|
56
|
+
--blockeditor-code-ink: #35322D;
|
|
57
|
+
|
|
58
|
+
--blockeditor-chrome-ink-rest: rgba(31, 30, 27, 0.66);
|
|
59
|
+
--blockeditor-chrome-ink-moved: rgba(31, 30, 27, 0.80);
|
|
60
|
+
--blockeditor-chrome-bg-rest: rgba(250, 248, 244, 0.78);
|
|
61
|
+
--blockeditor-chrome-bg-moved: rgba(250, 248, 244, 0.92);
|
|
62
|
+
--blockeditor-chrome-line-rest: rgba(31, 30, 27, 0.065);
|
|
63
|
+
--blockeditor-chrome-line-moved: rgba(31, 30, 27, 0.13);
|
|
64
|
+
--blockeditor-chrome-shadow-rest: 0 1px 2px rgba(31, 30, 27, 0.025);
|
|
65
|
+
--blockeditor-chrome-shadow-moved: 0 2px 6px rgba(31, 30, 27, 0.05);
|
|
66
|
+
--blockeditor-chrome-radius: 8px;
|
|
67
|
+
--blockeditor-plus-size: 24px;
|
|
68
|
+
--blockeditor-fade: 180ms;
|
|
69
|
+
|
|
70
|
+
--blockeditor-pop-bg: #F6F3EC;
|
|
71
|
+
--blockeditor-pop-ink: #262421;
|
|
72
|
+
--blockeditor-pop-muted: #78736A;
|
|
73
|
+
--blockeditor-pop-line: rgba(31, 30, 27, 0.12);
|
|
74
|
+
--blockeditor-pop-shadow: 0 10px 28px rgba(31, 30, 27, 0.09), 0 2px 6px rgba(31, 30, 27, 0.05);
|
|
75
|
+
--blockeditor-pop-hover: rgba(31, 30, 27, 0.065);
|
|
76
|
+
--blockeditor-pop-radius: 10px;
|
|
77
|
+
--blockeditor-bar-bg: #F6F3EC;
|
|
78
|
+
--blockeditor-bar-ink: #262421;
|
|
79
|
+
--blockeditor-scrim: rgba(24, 23, 20, 0.14);
|
|
80
|
+
|
|
81
|
+
-webkit-font-smoothing: antialiased;
|
|
82
|
+
-moz-osx-font-smoothing: grayscale;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
article[data-blockeditor] figure[data-type="chart"] { --chart-1: #8A6A2E; --chart-2: #6d4e0b; --chart-3: #6E6A62; --chart-4: #2B2926; --chart-5: #9B968C; --chart-6: #3B3833; --chart-text: #2B2926; max-width: 100%; }
|
|
86
|
+
article[data-blockeditor] figure[data-type="chart"] > svg { display: block; width: 100%; height: auto; color: var(--chart-text); font: 12px Inter, sans-serif; }
|
|
87
|
+
|
|
88
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) {
|
|
89
|
+
letter-spacing: -0.006em;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) > p {
|
|
93
|
+
margin-block-end: 0.62em;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) > h2,
|
|
97
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) > h3 {
|
|
98
|
+
margin-block: 1.55em 0.4em;
|
|
99
|
+
line-height: 1.4;
|
|
100
|
+
letter-spacing: -0.008em;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) > h1:first-child {
|
|
104
|
+
margin-block-end: 0.67em;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) :not(pre) > code {
|
|
108
|
+
font-size: 0.86em;
|
|
109
|
+
padding: 1.5px 5px;
|
|
110
|
+
border-radius: 4px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) .blockeditor-li[data-kind="check"][data-checked="true"] {
|
|
114
|
+
text-decoration-color: var(--blockeditor-ink-faint);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) .blockeditor-li[data-kind="check"]::before {
|
|
118
|
+
border-width: 1.25px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) .blockeditor-toggle {
|
|
122
|
+
padding-block: 7px;
|
|
123
|
+
padding-inline-end: 10px;
|
|
124
|
+
border: 1px solid rgba(31, 30, 27, 0.07);
|
|
125
|
+
border-radius: 7px;
|
|
126
|
+
background: rgba(31, 30, 27, 0.026);
|
|
127
|
+
font-size: 15px;
|
|
128
|
+
line-height: 1.45;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) .blockeditor-toggle-button::before {
|
|
132
|
+
content: "";
|
|
133
|
+
display: inline-block;
|
|
134
|
+
width: 14px;
|
|
135
|
+
height: 14px;
|
|
136
|
+
background: var(--blockeditor-toggle-ink);
|
|
137
|
+
clip-path: polygon(30% 20%, 80% 50%, 30% 80%);
|
|
138
|
+
transform-origin: 50% 50%;
|
|
139
|
+
vertical-align: -0.05em;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) .blockeditor-toggle[data-expanded="true"] > .blockeditor-toggle-button::before {
|
|
143
|
+
transform: rotate(90deg);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:is(article[data-blockeditor], .blockeditor-shell .blockeditor-editor) aside.blockeditor-callout {
|
|
147
|
+
border-radius: 7px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.blockeditor-shell .blockeditor-dock {
|
|
151
|
+
gap: 2px;
|
|
152
|
+
padding: 3px 6px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.blockeditor-shell .blockeditor-dock .blockeditor-tool {
|
|
156
|
+
height: 24px;
|
|
157
|
+
padding: 0 6px;
|
|
158
|
+
border-radius: 5px;
|
|
159
|
+
font-size: 12px;
|
|
160
|
+
font-weight: 450;
|
|
161
|
+
letter-spacing: -0.005em;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.blockeditor-shell .blockeditor-tool svg {
|
|
165
|
+
width: 14px;
|
|
166
|
+
height: 14px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.blockeditor-shell .blockeditor-tool-sep {
|
|
170
|
+
width: 1px;
|
|
171
|
+
height: 13px;
|
|
172
|
+
margin: 0 2px;
|
|
173
|
+
background: rgba(31, 30, 27, 0.055);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.blockeditor-shell.is-moved .blockeditor-tool-sep {
|
|
177
|
+
background: rgba(31, 30, 27, 0.10);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.blockeditor-shell .blockeditor-plus {
|
|
181
|
+
border-radius: 6px;
|
|
182
|
+
background: rgba(31, 30, 27, 0.022);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.blockeditor-shell.is-moved .blockeditor-plus {
|
|
186
|
+
background: rgba(31, 30, 27, 0.048);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.blockeditor-shell .blockeditor-plus svg {
|
|
190
|
+
width: 13px;
|
|
191
|
+
height: 13px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.blockeditor-shell .blockeditor-bubble {
|
|
195
|
+
gap: 2px;
|
|
196
|
+
padding: 4px 5px;
|
|
197
|
+
border-radius: 8px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.blockeditor-shell .blockeditor-bubble .blockeditor-tool {
|
|
201
|
+
height: 26px;
|
|
202
|
+
min-width: 26px;
|
|
203
|
+
padding: 0 6px;
|
|
204
|
+
border-radius: 5px;
|
|
205
|
+
font-size: 12.5px;
|
|
206
|
+
font-weight: 500;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.blockeditor-shell .blockeditor-menu {
|
|
210
|
+
width: 264px;
|
|
211
|
+
padding: 6px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.blockeditor-shell .blockeditor-menu-title {
|
|
215
|
+
padding: 4px 8px 5px;
|
|
216
|
+
font-size: 11px;
|
|
217
|
+
font-weight: 500;
|
|
218
|
+
letter-spacing: 0.03em;
|
|
219
|
+
text-transform: uppercase;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.blockeditor-shell .blockeditor-menu-item {
|
|
223
|
+
gap: 10px;
|
|
224
|
+
min-height: 33px;
|
|
225
|
+
padding: 4px 8px;
|
|
226
|
+
border-radius: 6px;
|
|
227
|
+
font-size: 13.5px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.blockeditor-shell .blockeditor-menu-icon {
|
|
231
|
+
width: 22px;
|
|
232
|
+
height: 22px;
|
|
233
|
+
border-radius: 5px;
|
|
234
|
+
background: rgba(31, 30, 27, 0.045);
|
|
235
|
+
border: 1px solid rgba(31, 30, 27, 0.075);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.blockeditor-shell .blockeditor-menu-label {
|
|
239
|
+
font-weight: 450;
|
|
240
|
+
line-height: 1.25;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.blockeditor-shell .blockeditor-menu-hint {
|
|
244
|
+
font-family: var(--blockeditor-font-mono);
|
|
245
|
+
font-size: 11px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@media (max-width: 560px) {
|
|
249
|
+
:where(article[data-blockeditor], .blockeditor-shell) {
|
|
250
|
+
--blockeditor-font-size: 15.5px;
|
|
251
|
+
--blockeditor-line-height: 1.62;
|
|
252
|
+
--blockeditor-h1-size: 23px;
|
|
253
|
+
--blockeditor-pad-top: 68px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.blockeditor-shell .blockeditor-bubble {
|
|
257
|
+
padding: 0 16px;
|
|
258
|
+
border-radius: 0;
|
|
259
|
+
box-shadow: 0 -4px 16px rgba(31, 30, 27, 0.06);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.blockeditor-shell .blockeditor-bubble .blockeditor-tool {
|
|
263
|
+
height: 34px;
|
|
264
|
+
min-width: 36px;
|
|
265
|
+
font-size: 13px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.blockeditor-shell .blockeditor-menu {
|
|
269
|
+
width: auto;
|
|
270
|
+
padding: 8px 12px 12px;
|
|
271
|
+
border-radius: 16px 16px 0 0;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.blockeditor-shell .blockeditor-menu::before {
|
|
275
|
+
content: "";
|
|
276
|
+
display: block;
|
|
277
|
+
width: 36px;
|
|
278
|
+
height: 4px;
|
|
279
|
+
margin: 2px auto 8px;
|
|
280
|
+
border-radius: 2px;
|
|
281
|
+
background: var(--blockeditor-pop-line);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.blockeditor-shell .blockeditor-menu-item {
|
|
285
|
+
min-height: 45px;
|
|
286
|
+
padding: 6px 10px;
|
|
287
|
+
font-size: 14.5px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.blockeditor-shell .blockeditor-menu-icon {
|
|
291
|
+
width: 26px;
|
|
292
|
+
height: 26px;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.blockeditor-shell .blockeditor-plus {
|
|
296
|
+
width: 28px;
|
|
297
|
+
height: 28px;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import onDomReady from "../lib/dom-ready.js";
|
|
2
|
+
import { hostMeta } from "./host-meta.js";
|
|
2
3
|
import { isEditMode } from "./is-edit-mode.js";
|
|
3
4
|
import { isSaveConflicted } from "./save.js";
|
|
4
5
|
import { storage } from "../lib/doc-storage.js";
|
|
@@ -104,6 +105,30 @@ function unresolved() {
|
|
|
104
105
|
return isSaveConflicted() ? ["save"] : [];
|
|
105
106
|
}
|
|
106
107
|
|
|
108
|
+
let guard = null;
|
|
109
|
+
let guardAsk = 0;
|
|
110
|
+
|
|
111
|
+
function startDataGuard() {
|
|
112
|
+
const ask = ++guardAsk;
|
|
113
|
+
hostMeta().then((meta) => {
|
|
114
|
+
const href = meta.extensions.includes("data-guard-v1") ? meta.document?.dataGuard?.href : null;
|
|
115
|
+
if (ask !== guardAsk || typeof href !== "string" || !href) return null;
|
|
116
|
+
return import("../sync/data-guard-notice.js").then((module) => {
|
|
117
|
+
if (ask !== guardAsk) return;
|
|
118
|
+
guard = module;
|
|
119
|
+
module.start({ href });
|
|
120
|
+
});
|
|
121
|
+
}).catch((error) => {
|
|
122
|
+
console.error("clayjs: the data-loss notice could not start; it will try again on the next open", error);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function stopDataGuard() {
|
|
127
|
+
guardAsk++;
|
|
128
|
+
guard?.stop();
|
|
129
|
+
guard = null;
|
|
130
|
+
}
|
|
131
|
+
|
|
107
132
|
/**
|
|
108
133
|
* The lazy notice as a mode lease.
|
|
109
134
|
*
|
|
@@ -124,6 +149,7 @@ export function conflictNoticeParticipant() {
|
|
|
124
149
|
enable() {
|
|
125
150
|
if (context.initial === true) return;
|
|
126
151
|
if (!notice && !loading) arm();
|
|
152
|
+
startDataGuard();
|
|
127
153
|
},
|
|
128
154
|
quiesce() {
|
|
129
155
|
const pending = unresolved();
|
|
@@ -139,6 +165,7 @@ export function conflictNoticeParticipant() {
|
|
|
139
165
|
loading = false;
|
|
140
166
|
notice?.stop?.();
|
|
141
167
|
notice = null;
|
|
168
|
+
stopDataGuard();
|
|
142
169
|
},
|
|
143
170
|
};
|
|
144
171
|
},
|
|
@@ -153,6 +180,7 @@ onDomReady(() => {
|
|
|
153
180
|
arm();
|
|
154
181
|
keptFromEarlier();
|
|
155
182
|
}
|
|
183
|
+
startDataGuard();
|
|
156
184
|
});
|
|
157
185
|
|
|
158
186
|
export { conflictNoticeParticipant as modeParticipant };
|
package/src/core/draft-mode.js
CHANGED
|
@@ -55,3 +55,9 @@ export function flushDraft() {
|
|
|
55
55
|
}
|
|
56
56
|
export function setDraftStoreFailed(value) { storeFailed = Boolean(value); }
|
|
57
57
|
export function draftStoreFailed() { return storeFailed; }
|
|
58
|
+
// True while an operation of this tab is neither stored nor in its journal slot.
|
|
59
|
+
let unconfirmed = null;
|
|
60
|
+
export function setDraftUnconfirmed(fn) { unconfirmed = fn; }
|
|
61
|
+
export function draftUnconfirmed() {
|
|
62
|
+
try { return Boolean(unconfirmed?.()); } catch { return true; }
|
|
63
|
+
}
|
package/src/core/host-meta.js
CHANGED
|
@@ -134,7 +134,7 @@ export async function hostSupports(name) {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
* The page format this host enforces: 1 when it announced `
|
|
137
|
+
* The page format this host enforces: 1 when it announced `blockeditor-format-v1`,
|
|
138
138
|
* otherwise 0.
|
|
139
139
|
*
|
|
140
140
|
* A host announces that extension only once its floor enforcement and tolerant
|
|
@@ -146,14 +146,14 @@ export async function hostSupports(name) {
|
|
|
146
146
|
*/
|
|
147
147
|
export async function hostPageFormat() {
|
|
148
148
|
const meta = await hostMeta();
|
|
149
|
-
return meta.extensions.includes("
|
|
149
|
+
return meta.extensions.includes("blockeditor-format-v1") ? 1 : 0;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* Where this host serves the page state of one accepted version, or null.
|
|
154
154
|
*
|
|
155
|
-
* Two things have to be true: the host announced `
|
|
156
|
-
* document block named the resource as `
|
|
155
|
+
* Two things have to be true: the host announced `blockeditor-recovery-v1` by name, and its
|
|
156
|
+
* document block named the resource as `blockeditorState.href`. A host that has the resource
|
|
157
157
|
* but has not announced the extension is still launching it, and a client that inferred
|
|
158
158
|
* either one from the other would retire journaled work against a pair nobody promised.
|
|
159
159
|
* Absent, empty or not a string is null, which means no conditional read and no proof
|
|
@@ -163,8 +163,8 @@ export async function hostPageFormat() {
|
|
|
163
163
|
*/
|
|
164
164
|
export async function hostPageStateHref() {
|
|
165
165
|
const meta = await hostMeta();
|
|
166
|
-
if (!meta.extensions.includes("
|
|
167
|
-
return meta.document?.
|
|
166
|
+
if (!meta.extensions.includes("blockeditor-recovery-v1")) return null;
|
|
167
|
+
return meta.document?.blockeditorState?.href || null;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/**
|
package/src/core/is-edit-mode.js
CHANGED
|
@@ -54,10 +54,14 @@ const isViewOnlyDocument =
|
|
|
54
54
|
const draftCandidate = typeof document !== "undefined" && draftEligible();
|
|
55
55
|
const ownerCookie = Boolean(cookie.get("isAdminOfCurrentResource"));
|
|
56
56
|
|
|
57
|
+
// A workspace shell's frame: the shell grants edit, the document picks how it opens. Unlike
|
|
58
|
+
// ?editmode=true nobody at the keyboard asked, so viewonly and a stale host still refuse.
|
|
59
|
+
const documentChooses = query.editmode === "document";
|
|
60
|
+
|
|
57
61
|
const isDraftMode =
|
|
58
62
|
draftCandidate &&
|
|
59
63
|
query.editmode !== "false" &&
|
|
60
|
-
!(query.editmode === "true" && ownerCookie) &&
|
|
64
|
+
!((query.editmode === "true" || documentChooses) && ownerCookie) &&
|
|
61
65
|
!isViewOnlyDocument &&
|
|
62
66
|
!servedStaleToken() &&
|
|
63
67
|
forcedEditMode == null &&
|
|
@@ -68,7 +72,9 @@ const opensInEdit =
|
|
|
68
72
|
typeof document !== "undefined" && document.documentElement.getAttribute("opens-in") === "edit";
|
|
69
73
|
|
|
70
74
|
// May this person edit here? The old rule, read as permission.
|
|
71
|
-
const hostCanEdit =
|
|
75
|
+
const hostCanEdit = documentChooses
|
|
76
|
+
? !isViewOnlyDocument && !servedStaleToken() && forcedEditMode !== false
|
|
77
|
+
: query.editmode
|
|
72
78
|
? query.editmode === "true" || (!isViewOnlyDocument && !servedStaleToken() && (forcedEditMode ?? (hasSaveToken() || ownerCookie)))
|
|
73
79
|
: isViewOnlyDocument || servedStaleToken()
|
|
74
80
|
? false
|
|
@@ -112,7 +118,7 @@ export function learnedHostWritable() {
|
|
|
112
118
|
// the person made leaves an internal receipt, and that one is kept.
|
|
113
119
|
const startsEditing = receipt
|
|
114
120
|
? receipt.mode === "edit" || (opensInEdit && !receipt.internal)
|
|
115
|
-
: query.editmode
|
|
121
|
+
: query.editmode && !documentChooses
|
|
116
122
|
? query.editmode === "true"
|
|
117
123
|
: forcedEditMode === true || opensInEdit;
|
|
118
124
|
|
package/src/core/mode-support.js
CHANGED
|
@@ -37,6 +37,9 @@ export const MODULE_SUPPORT = {
|
|
|
37
37
|
"core/persist.js": "neutral",
|
|
38
38
|
"attrs/add-from.js": "neutral",
|
|
39
39
|
"core/etag.js": "neutral",
|
|
40
|
+
// Shared site values: one page-lifetime baseline, a header computed from the bytes of
|
|
41
|
+
// each save and a hook on an accepted save. All three act only when a save happens.
|
|
42
|
+
"core/site-edits.js": "neutral",
|
|
40
43
|
// The modules that keep a session and hand the controller a lease.
|
|
41
44
|
"core/save.js": "export",
|
|
42
45
|
"core/conflict-notice.js": "export",
|
package/src/core/mode-switch.js
CHANGED
|
@@ -114,7 +114,7 @@ const syncLane = (mod) => (mod && (mod.liveSync ?? mod.default ?? mod)) || null;
|
|
|
114
114
|
* it represents, the queue it is holding, and the calls that apply, give back and retire
|
|
115
115
|
* them.
|
|
116
116
|
*
|
|
117
|
-
* The
|
|
117
|
+
* The blockeditor-view reader answers first, because a Document's reader owns the article; a
|
|
118
118
|
* generic-sync document's saved lane answers next. A document with neither has no reader
|
|
119
119
|
* and needs no handoff. A reader that represents no file throws `not-acquired`, which is
|
|
120
120
|
* the reload: nothing has been prepared yet, so the page can still be replaced.
|
|
@@ -143,10 +143,10 @@ export async function prepareReader(handle, context = {}) {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* Start the reader a view holds, from the file the session left: the
|
|
146
|
+
* Start the reader a view holds, from the file the session left: the blockeditor-view reader
|
|
147
147
|
* paints that receipt at once and asks the host for nothing, and the saved lane starts
|
|
148
148
|
* with it, so a second entry has a file without waiting for a frame. Every reader the page
|
|
149
|
-
* ran before the entry starts again, so a
|
|
149
|
+
* ran before the entry starts again, so a blockeditor-view reader that follows generic sync's
|
|
150
150
|
* saved lane gets that lane back too. `accepted` null starts the reader as a view boot does.
|
|
151
151
|
*
|
|
152
152
|
* @param {object} handle - the loader's handle
|
|
@@ -163,7 +163,7 @@ export function startReader(handle, accepted = null) {
|
|
|
163
163
|
const start = pageView.restart ?? pageView.start;
|
|
164
164
|
start({ sync, represented: accepted });
|
|
165
165
|
// Every reader the page ran before the entry comes back, not the first one found:
|
|
166
|
-
// with `plugins=
|
|
166
|
+
// with `plugins=blockeditor,sync` the blockeditor-view reader follows generic sync's saved lane,
|
|
167
167
|
// so that lane is restarted too and the article keeps following other tabs.
|
|
168
168
|
if (!sync) return undefined;
|
|
169
169
|
}
|
|
@@ -102,7 +102,9 @@ export async function runSaveBarrier({ generation = saveGeneration(), keepalive
|
|
|
102
102
|
if (err?.state === "conflict") return refusal("conflict");
|
|
103
103
|
if (err?.state === "blocked") return refusal("pending-input", { pending: pendingIds() });
|
|
104
104
|
if (saveFateIsUnknown()) return refusal("save-unknown");
|
|
105
|
-
|
|
105
|
+
// The flush's own timer is this deadline. Node can fire it a few milliseconds
|
|
106
|
+
// before the wall clock reaches `deadline`, so the timer's word counts.
|
|
107
|
+
if (err?.timedOut || Date.now() >= deadline) return refusal("timeout");
|
|
106
108
|
return refusal("save-failed");
|
|
107
109
|
}
|
|
108
110
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// The page format this runtime writes, and the header every page write declares it
|
|
2
2
|
// in. No imports, so the server bundle and any reader can carry it.
|
|
3
3
|
export const PAGE_FORMAT = 1;
|
|
4
|
-
export const PAGE_FORMAT_HEADER = "X-Clay-
|
|
4
|
+
export const PAGE_FORMAT_HEADER = "X-Clay-Blockeditor-Format";
|
package/src/core/page-format.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// The document format floor as the save wire carries it: the canonical
|
|
2
|
-
// <meta name="clay-
|
|
3
|
-
// marker (absence is floor 0, a floor only rises) and the `X-Clay-
|
|
2
|
+
// <meta name="clay-blockeditor-format" content="1">
|
|
3
|
+
// marker (absence is floor 0, a floor only rises) and the `X-Clay-Blockeditor-Format`
|
|
4
4
|
// capability header every page write declares. Core code because every save sends
|
|
5
5
|
// the header; what content needs which floor lives in `page/format-level.js`.
|
|
6
6
|
|
|
7
7
|
import { PAGE_FORMAT } from "./page-format-wire.js";
|
|
8
8
|
export { PAGE_FORMAT, PAGE_FORMAT_HEADER } from "./page-format-wire.js";
|
|
9
|
-
export const PAGE_FORMAT_META = "clay-
|
|
10
|
-
export const PAGE_FORMAT_EXTENSION = "
|
|
11
|
-
export const PAGE_FORMAT_UPGRADE = "
|
|
9
|
+
export const PAGE_FORMAT_META = "clay-blockeditor-format";
|
|
10
|
+
export const PAGE_FORMAT_EXTENSION = "blockeditor-format-v1";
|
|
11
|
+
export const PAGE_FORMAT_UPGRADE = "blockeditor-format-upgrade-required";
|
|
12
12
|
|
|
13
13
|
// Every helper here is a plain function with no top-level work, so a client that
|
|
14
14
|
// imports one of them carries only that one.
|
|
15
15
|
const level = (value) => (Number.isSafeInteger(value) && value > 0 ? value : 0);
|
|
16
16
|
|
|
17
|
-
const metaTag = (html) => /<meta\b[^>]*\bname\s*=\s*["']?clay-
|
|
17
|
+
const metaTag = (html) => /<meta\b[^>]*\bname\s*=\s*["']?clay-blockeditor-format["']?[^>]*>/i.exec(html);
|
|
18
18
|
|
|
19
19
|
// A capability as a request declares it: a missing or unreadable header is no
|
|
20
20
|
// capability at all, so it can never authorize a write.
|
|
@@ -25,7 +25,7 @@ export function formatCapability(value) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// The floor a document carries. Absent or unreadable metadata is floor 0.
|
|
28
|
-
export function
|
|
28
|
+
export function blockeditorFormatFloor(html) {
|
|
29
29
|
if (typeof html !== "string") return 0;
|
|
30
30
|
const tag = metaTag(html);
|
|
31
31
|
if (!tag) return 0;
|
|
@@ -40,7 +40,7 @@ export function withPageFormatFloor(html, floor) {
|
|
|
40
40
|
const want = level(floor);
|
|
41
41
|
if (typeof html !== "string" || !want) return html;
|
|
42
42
|
const tag = metaTag(html);
|
|
43
|
-
if (tag &&
|
|
43
|
+
if (tag && blockeditorFormatFloor(tag[0]) === want) return html;
|
|
44
44
|
const marker = `<meta name="${PAGE_FORMAT_META}" content="${want}">`;
|
|
45
45
|
if (tag) return html.slice(0, tag.index) + marker + html.slice(tag.index + tag[0].length);
|
|
46
46
|
const at = /<\/head\s*>/i.exec(html) || /<body\b/i.exec(html);
|
|
@@ -15,15 +15,14 @@ export function onSaveAccepted(callback) {
|
|
|
15
15
|
saveAcceptedHooks.push(callback);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export function notifySaveAccepted(html, captureId, artifact = null) {
|
|
18
|
+
export function notifySaveAccepted(html, captureId, artifact = null, siteData = null) {
|
|
19
19
|
for (const hook of saveAcceptedHooks) {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
: { captureId: captureId ?? null };
|
|
21
|
+
const accepted = {
|
|
22
|
+
captureId: captureId ?? null,
|
|
23
|
+
...(artifact ? { artifact } : {}),
|
|
24
|
+
...(siteData ? { siteData } : {}),
|
|
25
|
+
};
|
|
27
26
|
hook(html, accepted);
|
|
28
27
|
} catch (err) {
|
|
29
28
|
console.error('clayjs: onSaveAccepted hook failed:', err);
|