@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Y from "../../vendor/yjs.vendor.js";
|
|
2
2
|
|
|
3
|
-
export const ORIGINS_ORIGIN = "
|
|
4
|
-
export const UNDO_OVERLAP_ORIGIN = "
|
|
3
|
+
export const ORIGINS_ORIGIN = "blockeditor-origins";
|
|
4
|
+
export const UNDO_OVERLAP_ORIGIN = "blockeditor-undo-overlap-repair";
|
|
5
5
|
|
|
6
6
|
export const spanKey = (client, clock) => JSON.stringify(["span", client, clock]);
|
|
7
7
|
export const aliasKey = (client, clock) => JSON.stringify(["alias", client, clock]);
|
|
@@ -15,7 +15,7 @@ export const PART = 12 * 1024;
|
|
|
15
15
|
|
|
16
16
|
// The origin a replayed journal is applied through. It is offered to the room like any
|
|
17
17
|
// other local work and is never journaled again: a recovery is not this tab's typing.
|
|
18
|
-
export const RECOVERY_ORIGIN = "
|
|
18
|
+
export const RECOVERY_ORIGIN = "blockeditor-recovery";
|
|
19
19
|
const baseOf = (k) => PART_KEY.exec(k)?.[1] ?? k;
|
|
20
20
|
|
|
21
21
|
export function yValueOf(ydoc) {
|
|
@@ -430,7 +430,7 @@ export function createYProvider({ store, ydoc, compact: limits = {}, setTimer =
|
|
|
430
430
|
const offDelivery = store.onDelivery((event) => {
|
|
431
431
|
if (event.phase !== "refused") return;
|
|
432
432
|
if (mode === "host") {
|
|
433
|
-
if (event.code === "
|
|
433
|
+
if (event.code === "blockeditor-full" || event.code === "compaction-failed") { stop(event.code); return; }
|
|
434
434
|
refusedGap = true;
|
|
435
435
|
schedule(true, false);
|
|
436
436
|
return;
|
|
@@ -124,7 +124,7 @@ const sameGeneration = (a, b) => Boolean(a && b) && typeof a.generation === "str
|
|
|
124
124
|
* @param {{authority: Object, lineage: Object}} options.accepted - the identity and generation it was saved under
|
|
125
125
|
* @param {string} options.article - the final outgoing canonical article
|
|
126
126
|
* @param {Object} options.state - the accepted page state
|
|
127
|
-
* @param {{file: string,
|
|
127
|
+
* @param {{file: string, blockeditorState: string}} options.receipt - the persisted pair
|
|
128
128
|
* @param {boolean} [options.saved]
|
|
129
129
|
* @returns {Promise<Object>}
|
|
130
130
|
*/
|
|
@@ -159,8 +159,8 @@ async function checkProof(proof) {
|
|
|
159
159
|
if (proof.saved !== true) fail("not-saved", "Only a save that succeeded under admission makes a proof");
|
|
160
160
|
if (typeof proof.capture !== "string" || !proof.capture) fail("missing-capture", "A proof belongs to the capture it saved");
|
|
161
161
|
const receipt = proof.receipt;
|
|
162
|
-
if (!receipt || typeof receipt.file !== "string" || !receipt.file || typeof receipt.
|
|
163
|
-
fail("missing-receipt", "A proof names the persisted file and
|
|
162
|
+
if (!receipt || typeof receipt.file !== "string" || !receipt.file || typeof receipt.blockeditorState !== "string" || !receipt.blockeditorState) {
|
|
163
|
+
fail("missing-receipt", "A proof names the persisted file and blockeditor-state pair");
|
|
164
164
|
}
|
|
165
165
|
const accepted = proof.accepted;
|
|
166
166
|
if (!accepted || !accepted.authority || !accepted.lineage || typeof accepted.lineage.generation !== "string" || !accepted.lineage.generation) {
|
|
@@ -584,8 +584,8 @@ export function openPageJournal({ meta = null, service = null, base = null, onCh
|
|
|
584
584
|
if (!authority) return null;
|
|
585
585
|
const channel = pageChannel(service);
|
|
586
586
|
if (!channel) return null;
|
|
587
|
-
const generation = meta?.document?.
|
|
588
|
-
const formatFloor = Array.isArray(meta?.extensions) && meta.extensions.includes("
|
|
587
|
+
const generation = meta?.document?.blockeditorState?.generation ?? null;
|
|
588
|
+
const formatFloor = Array.isArray(meta?.extensions) && meta.extensions.includes("blockeditor-format-v1") ? 1 : 0;
|
|
589
589
|
return createPageJournal({
|
|
590
590
|
channel,
|
|
591
591
|
key: [authority.host, authority.documentId].join(":"),
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
// The area picker: the overlay that turns a page into a choice of blocks. Hover
|
|
2
|
+
// outlines one block, a click picks it, a drag or a Shift-click extends across blocks,
|
|
3
|
+
// and "Whole page" stays one press away. Behaviour only: the composer, the request and
|
|
4
|
+
// the save are ai-edit's, and the target it hands over is whatever the surface names.
|
|
5
|
+
import { set } from "../../lib/hostile-css.js";
|
|
6
|
+
import { STRIP_FROM_SAVE } from "../../lib/region-policy.js";
|
|
7
|
+
import { bevelBox, bevelButton, bevelSurface, bevelText, pageScheme, paintLook, setShown } from "../../ui/bevel-controls.js";
|
|
8
|
+
import { TOKENS, FONT_SANS, FONT_MONO, SHADOW } from "../../ui/bevel.js";
|
|
9
|
+
|
|
10
|
+
// The same block rules ai-edit.js picks a selection's target with, so a person sees
|
|
11
|
+
// exactly what will be rewritten.
|
|
12
|
+
const BLOCK_SELECTOR = "p,h1,h2,h3,h4,h5,h6,li,dt,dd,blockquote,pre,figcaption,td,th";
|
|
13
|
+
const CONTAINER_SELECTOR = "section,article,aside,header,footer,nav,main,div,ul,ol,dl,table,figure,form";
|
|
14
|
+
const DRAG_SLOP = 4;
|
|
15
|
+
|
|
16
|
+
const isCoarse = () => typeof matchMedia === "function" && !!matchMedia("(pointer: coarse)").matches;
|
|
17
|
+
|
|
18
|
+
function marked(el, name, value) {
|
|
19
|
+
el.setAttribute(name, value);
|
|
20
|
+
return el;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// The hit-testing half for a page that is not a Block document. The overlay sits on
|
|
24
|
+
// top of everything, so the first element under the pointer is ClayJS chrome: it is
|
|
25
|
+
// skipped along with every other piece of AI chrome and everything the save strips.
|
|
26
|
+
export function genericSurface(doc = document) {
|
|
27
|
+
const usable = (node) =>
|
|
28
|
+
node instanceof doc.defaultView.Element && node !== doc.body && node !== doc.documentElement &&
|
|
29
|
+
!node.closest("[data-clay-ai-edit]") && !node.closest(STRIP_FROM_SAVE);
|
|
30
|
+
|
|
31
|
+
const targetFor = (node) => {
|
|
32
|
+
if (!node || !usable(node)) return null;
|
|
33
|
+
const target = node.closest(BLOCK_SELECTOR) || node.closest(CONTAINER_SELECTOR);
|
|
34
|
+
return target && target !== doc.body ? target : null;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
targetAt(x, y) {
|
|
39
|
+
const under = typeof doc.elementsFromPoint === "function" ? doc.elementsFromPoint(x, y) : [];
|
|
40
|
+
for (const node of under || []) {
|
|
41
|
+
const target = targetFor(node);
|
|
42
|
+
if (target) return target;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
},
|
|
46
|
+
// The smallest common ancestor, then the same block and container rules upward, so
|
|
47
|
+
// a drag across two paragraphs inside one section names the section.
|
|
48
|
+
between(a, b) {
|
|
49
|
+
if (!a) return b || null;
|
|
50
|
+
if (!b || a === b) return a;
|
|
51
|
+
const first = a.compareDocumentPosition(b) & 4 ? a : b;
|
|
52
|
+
const last = first === a ? b : a;
|
|
53
|
+
let common = first;
|
|
54
|
+
while (common && !common.contains(last)) common = common.parentElement;
|
|
55
|
+
if (!common) return null;
|
|
56
|
+
if (common === doc.body) return common;
|
|
57
|
+
if (common.matches(BLOCK_SELECTOR) || common.matches(CONTAINER_SELECTOR)) return common;
|
|
58
|
+
return targetFor(common) || common;
|
|
59
|
+
},
|
|
60
|
+
rectOf(target) {
|
|
61
|
+
return target.getBoundingClientRect();
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function defaultChrome({ coarse }) {
|
|
67
|
+
const scheme = `color-scheme:${pageScheme()}`;
|
|
68
|
+
const part = (el, name) => marked(el, "data-clay-ai-edit-part", name);
|
|
69
|
+
|
|
70
|
+
const overlay = marked(bevelBox("div", [
|
|
71
|
+
"position:fixed", "inset:0", "z-index:99997", "background:transparent",
|
|
72
|
+
"touch-action:pan-y", "cursor:crosshair", scheme,
|
|
73
|
+
]), "data-clay-ai-edit", "picker");
|
|
74
|
+
|
|
75
|
+
// The ring is the hover outline and the drag outline both: one piece of chrome that
|
|
76
|
+
// says which blocks a click would rewrite.
|
|
77
|
+
const ring = marked(bevelBox("div", [
|
|
78
|
+
"box-sizing:content-box", "position:fixed", "z-index:99998", "pointer-events:none",
|
|
79
|
+
`border:2px solid ${TOKENS.brass}`, "border-radius:0", scheme,
|
|
80
|
+
]), "data-clay-ai-edit", "picker-ring");
|
|
81
|
+
setShown(ring, false);
|
|
82
|
+
|
|
83
|
+
const bar = marked(bevelSurface("div", [
|
|
84
|
+
"position:fixed", "left:50%", "bottom:16px", "transform:translateX(-50%)",
|
|
85
|
+
"z-index:99999", "width:min(35rem, calc(100vw - 32px))",
|
|
86
|
+
"padding:8px 10px", "border-radius:12px", "gap:8px", "align-items:center",
|
|
87
|
+
`box-shadow:${SHADOW}`, `font:13px/1.5 ${FONT_SANS}`, scheme,
|
|
88
|
+
]), "data-clay-ai-edit", "picker-bar");
|
|
89
|
+
setShown(bar, false, "flex");
|
|
90
|
+
|
|
91
|
+
const hint = part(bevelText("div", [
|
|
92
|
+
"display:block", "flex:1", "min-width:0", "overflow:hidden", "text-overflow:ellipsis",
|
|
93
|
+
"white-space:nowrap", `color:${TOKENS.muted}`, `font:12.5px/1.5 ${FONT_MONO}`,
|
|
94
|
+
]), "picker-hint");
|
|
95
|
+
hint.textContent = "Click or drag blocks";
|
|
96
|
+
|
|
97
|
+
const whole = part(bevelButton("Whole page", { extra: ["flex:none"] }), "picker-whole");
|
|
98
|
+
const cancel = part(bevelButton("Cancel", { variant: "quiet", extra: ["flex:none"] }), "picker-cancel");
|
|
99
|
+
// A tap cannot say both "this one" and "and also that one", so the touch bar keeps a
|
|
100
|
+
// Continue that opens the composer once the blocks are chosen.
|
|
101
|
+
const more = coarse ? part(bevelButton("Continue", { variant: "primary", extra: ["flex:none"] }), "picker-continue") : null;
|
|
102
|
+
if (more) setShown(more, false, "inline-flex");
|
|
103
|
+
bar.append(hint, whole, ...(more ? [more] : []), cancel);
|
|
104
|
+
|
|
105
|
+
document.body.append(overlay, ring, bar);
|
|
106
|
+
for (const el of [overlay, ring, bar]) paintLook(el);
|
|
107
|
+
return { overlay, ring, bar, hint, whole, more, cancel };
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function createPicker({ surface, onPicked, onWholePage, onCancel, build } = {}) {
|
|
111
|
+
const doc = document;
|
|
112
|
+
const hits = surface || genericSurface(doc);
|
|
113
|
+
let chrome = null;
|
|
114
|
+
let listeners = null;
|
|
115
|
+
let picking = false;
|
|
116
|
+
let chosen = null;
|
|
117
|
+
let down = null;
|
|
118
|
+
|
|
119
|
+
const rectOf = (target) => {
|
|
120
|
+
if (!target) return null;
|
|
121
|
+
const rect = typeof hits.rectOf === "function" ? hits.rectOf(target) : target.getBoundingClientRect();
|
|
122
|
+
return rect || null;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// What a click at this point would rewrite. A drag asks the surface for the span
|
|
126
|
+
// between where it started and where the pointer is.
|
|
127
|
+
const pointOf = (event) => hits.targetAt(event.clientX, event.clientY) || null;
|
|
128
|
+
|
|
129
|
+
function outline(target) {
|
|
130
|
+
if (!chrome) return;
|
|
131
|
+
const rect = rectOf(target);
|
|
132
|
+
if (!rect) { setShown(chrome.ring, false); return; }
|
|
133
|
+
set(chrome.ring, "left", rect.left - 5 + "px");
|
|
134
|
+
set(chrome.ring, "top", rect.top - 5 + "px");
|
|
135
|
+
set(chrome.ring, "width", rect.width + 6 + "px");
|
|
136
|
+
set(chrome.ring, "height", rect.height + 6 + "px");
|
|
137
|
+
setShown(chrome.ring, true);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function choose(target, extend) {
|
|
141
|
+
if (!target) return;
|
|
142
|
+
// Shift extends from the block already chosen; on a coarse pointer every later tap
|
|
143
|
+
// extends, because there is no key to hold.
|
|
144
|
+
const next = chosen && (extend || isCoarse()) ? hits.between(chosen, target) || target : target;
|
|
145
|
+
chosen = next;
|
|
146
|
+
outline(next);
|
|
147
|
+
if (chrome.more) setShown(chrome.more, true, "inline-flex");
|
|
148
|
+
// A tap only selects: the composer would swallow the next tap that extends.
|
|
149
|
+
if (isCoarse()) return;
|
|
150
|
+
onPicked?.(next);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function onPointerDown(event) {
|
|
154
|
+
if (!picking || event.button > 0) return;
|
|
155
|
+
event.preventDefault();
|
|
156
|
+
down = { x: event.clientX, y: event.clientY, from: pointOf(event), moved: false, shift: !!event.shiftKey };
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function onPointerMove(event) {
|
|
160
|
+
if (!picking) return;
|
|
161
|
+
const at = pointOf(event);
|
|
162
|
+
if (down) {
|
|
163
|
+
const dx = event.clientX - down.x;
|
|
164
|
+
const dy = event.clientY - down.y;
|
|
165
|
+
if (!down.moved && dx * dx + dy * dy > DRAG_SLOP * DRAG_SLOP) down.moved = true;
|
|
166
|
+
if (down.moved) { outline(down.from && at ? hits.between(down.from, at) || at : at || down.from); return; }
|
|
167
|
+
}
|
|
168
|
+
outline(at);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function onPointerUp(event) {
|
|
172
|
+
if (!picking || !down) return;
|
|
173
|
+
const start = down;
|
|
174
|
+
down = null;
|
|
175
|
+
const dx = event.clientX - start.x;
|
|
176
|
+
const dy = event.clientY - start.y;
|
|
177
|
+
const moved = start.moved || dx * dx + dy * dy > DRAG_SLOP * DRAG_SLOP;
|
|
178
|
+
const at = pointOf(event);
|
|
179
|
+
const target = moved
|
|
180
|
+
? (start.from && at ? hits.between(start.from, at) || at : at || start.from)
|
|
181
|
+
: (at || start.from);
|
|
182
|
+
if (!target) return;
|
|
183
|
+
choose(target, !!(start.shift || event.shiftKey));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function onKey(event) {
|
|
187
|
+
if (!picking || event.key !== "Escape") return;
|
|
188
|
+
close();
|
|
189
|
+
onCancel?.();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function open() {
|
|
193
|
+
if (picking) return;
|
|
194
|
+
picking = true;
|
|
195
|
+
chosen = null;
|
|
196
|
+
down = null;
|
|
197
|
+
chrome = (build || defaultChrome)({ coarse: isCoarse() });
|
|
198
|
+
listeners = new AbortController();
|
|
199
|
+
const { signal } = listeners;
|
|
200
|
+
const { overlay } = chrome;
|
|
201
|
+
overlay.addEventListener("pointerdown", onPointerDown, { signal });
|
|
202
|
+
overlay.addEventListener("pointermove", onPointerMove, { signal });
|
|
203
|
+
overlay.addEventListener("pointerup", onPointerUp, { signal });
|
|
204
|
+
overlay.addEventListener("pointercancel", () => { down = null; }, { signal });
|
|
205
|
+
chrome.whole.addEventListener("click", () => { if (picking) onWholePage?.(); }, { signal });
|
|
206
|
+
chrome.more?.addEventListener("click", () => { if (picking && chosen) onPicked?.(chosen); }, { signal });
|
|
207
|
+
chrome.cancel.addEventListener("click", () => { close(); onCancel?.(); }, { signal });
|
|
208
|
+
doc.addEventListener("keydown", onKey, { signal });
|
|
209
|
+
setShown(chrome.bar, true, "flex");
|
|
210
|
+
chrome.whole.focus({ preventScroll: true });
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function close() {
|
|
214
|
+
if (!picking && !chrome) return;
|
|
215
|
+
picking = false;
|
|
216
|
+
chosen = null;
|
|
217
|
+
down = null;
|
|
218
|
+
listeners?.abort();
|
|
219
|
+
listeners = null;
|
|
220
|
+
if (chrome) for (const node of [chrome.overlay, chrome.ring, chrome.bar]) node.remove();
|
|
221
|
+
chrome = null;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function contains(node) {
|
|
225
|
+
if (!chrome || !node) return false;
|
|
226
|
+
return chrome.overlay.contains(node) || chrome.bar.contains(node);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return {
|
|
230
|
+
open,
|
|
231
|
+
close,
|
|
232
|
+
contains,
|
|
233
|
+
get picking() { return picking; },
|
|
234
|
+
};
|
|
235
|
+
}
|