@mx-space/cli 0.15.0 → 0.15.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/README.md +1 -1
- package/dist/{Lexical.dev-Cck4n26y.mjs → Lexical.dev-BSvx45_E.mjs} +127 -94
- package/dist/{Lexical.node-D6wf2D5M.mjs → Lexical.node-kAh5GM2n.mjs} +1 -1
- package/dist/{Lexical.prod-DCwS1oTq.mjs → Lexical.prod-Bqwgb3ez.mjs} +4 -2
- package/dist/{LexicalClipboard.dev-CMkPHV7O.mjs → LexicalClipboard.dev-BWU3KXIa.mjs} +18 -14
- package/dist/{LexicalClipboard.node-m4nZ7IYw.mjs → LexicalClipboard.node-BygAdNdF.mjs} +1 -1
- package/dist/{LexicalClipboard.prod-B_rN1vE1.mjs → LexicalClipboard.prod-BtMuKNyT.mjs} +10 -10
- package/dist/{LexicalCodeCore.dev-DyJw3i8V.mjs → LexicalCodeCore.dev-CD2xgvDs.mjs} +43 -25
- package/dist/{LexicalCodeCore.prod-DPXLHQLF.mjs → LexicalCodeCore.prod-Bl6FFMc7.mjs} +6 -6
- package/dist/{LexicalDragon.dev-ZkNfMwrE.mjs → LexicalDragon.dev-BwdYhm4K.mjs} +2 -2
- package/dist/{LexicalDragon.node-Ds9oLUFh.mjs → LexicalDragon.node-CpJhkCVV.mjs} +1 -1
- package/dist/{LexicalDragon.prod-B58ic2av.mjs → LexicalDragon.prod-CvXmWwo1.mjs} +2 -2
- package/dist/{LexicalExtension.dev-DvwHs1Xv.mjs → LexicalExtension.dev-LcRLXI5Z.mjs} +25 -13
- package/dist/{LexicalExtension.node-5OymZQfy.mjs → LexicalExtension.node-BwJt2LXV.mjs} +1 -1
- package/dist/{LexicalExtension.prod-Ce0T5smQ.mjs → LexicalExtension.prod-lg8_33-H.mjs} +16 -13
- package/dist/{LexicalHeadless.dev-DA0WldSR.mjs → LexicalHeadless.dev-BeUbKBes.mjs} +1 -1
- package/dist/{LexicalHeadless.prod-1kQgKB6c.mjs → LexicalHeadless.prod-4gbIA8HM.mjs} +1 -1
- package/dist/{LexicalHtml.dev-BDB7CUrx.mjs → LexicalHtml.dev-BLdZWTCJ.mjs} +20 -14
- package/dist/{LexicalHtml.node-DpVNt7It.mjs → LexicalHtml.node-BeuJMvvt.mjs} +1 -1
- package/dist/{LexicalHtml.prod-HkxM5scw.mjs → LexicalHtml.prod-CHUyCocN.mjs} +4 -4
- package/dist/{LexicalLink.dev-C5zNJlrm.mjs → LexicalLink.dev-DgsFRqw0.mjs} +28 -21
- package/dist/{LexicalLink.prod-Bkt9hQAt.mjs → LexicalLink.prod-CkXkeKY2.mjs} +6 -5
- package/dist/{LexicalList.dev-B7VgME-m.mjs → LexicalList.dev-OOms3kQi.mjs} +4 -4
- package/dist/{LexicalList.prod-B8c7TDjH.mjs → LexicalList.prod-DzMBeqHn.mjs} +4 -4
- package/dist/{LexicalMarkdown.dev-B5z9kLbV.mjs → LexicalMarkdown.dev-DJLKbZtD.mjs} +40 -29
- package/dist/{LexicalMarkdown.prod-wKzw7FFH.mjs → LexicalMarkdown.prod-Cp21kDCU.mjs} +10 -7
- package/dist/{LexicalRichText.dev-CUd6Li5F.mjs → LexicalRichText.dev-0rkAGjUf.mjs} +15 -11
- package/dist/{LexicalRichText.node-BKfaQ-CH.mjs → LexicalRichText.node-Cd-BySPE.mjs} +4 -4
- package/dist/{LexicalRichText.prod-SBewjJHx.mjs → LexicalRichText.prod-DTQiEr8C.mjs} +17 -11
- package/dist/{LexicalSelection.dev-D27JOCqj.mjs → LexicalSelection.dev-Bi0VlUEv.mjs} +28 -24
- package/dist/{LexicalSelection.node-DBEwPjBu.mjs → LexicalSelection.node-t2U46EF_.mjs} +1 -1
- package/dist/{LexicalSelection.prod-OaYhXHOL.mjs → LexicalSelection.prod-CrFG111g.mjs} +2 -2
- package/dist/{LexicalTable.dev-6IFFOAE0.mjs → LexicalTable.dev-D-sFhO-o.mjs} +33 -28
- package/dist/{LexicalTable.prod-2CaLZ7fH.mjs → LexicalTable.prod-DwYaa_dN.mjs} +10 -9
- package/dist/{LexicalUtils.dev-DJA7J_7v.mjs → LexicalUtils.dev-Q2q3-UDM.mjs} +8 -5
- package/dist/{LexicalUtils.node-Df9oPTlA.mjs → LexicalUtils.node-Dl7OvqJV.mjs} +1 -1
- package/dist/{LexicalUtils.prod-Bb7V4Ewg.mjs → LexicalUtils.prod-CBnq_iEV.mjs} +7 -6
- package/dist/bin/mxs.mjs +1 -1
- package/dist/esm-CNZ7kdTg.mjs +2 -0
- package/dist/{esm-DLzrv7gD.mjs → esm-ZXjJmLEC.mjs} +257 -260
- package/dist/index.mjs +1 -1
- package/dist/{mxs-BIRW5Axj.mjs → mxs-DC9zR3f2.mjs} +759 -539
- package/dist/{rolldown-runtime-JspESFgx.mjs → rolldown-runtime-B4iAMlE-.mjs} +1 -1
- package/dist/src/bin/mxs.d.ts +2 -0
- package/dist/src/bin/mxs.js +310 -0
- package/dist/src/cli/ai/_poll.d.ts +12 -0
- package/dist/src/cli/ai/_poll.js +38 -0
- package/dist/src/cli/ai/_resolve.d.ts +8 -0
- package/dist/src/cli/ai/_resolve.js +27 -0
- package/dist/src/cli/ai/index.d.ts +127 -0
- package/dist/src/cli/ai/index.js +46 -0
- package/dist/src/cli/ai/insights/by-article.d.ts +10 -0
- package/dist/src/cli/ai/insights/by-article.js +21 -0
- package/dist/src/cli/ai/insights/delete.d.ts +7 -0
- package/dist/src/cli/ai/insights/delete.js +18 -0
- package/dist/src/cli/ai/insights/edit.d.ts +8 -0
- package/dist/src/cli/ai/insights/edit.js +54 -0
- package/dist/src/cli/ai/insights/get.d.ts +6 -0
- package/dist/src/cli/ai/insights/get.js +11 -0
- package/dist/src/cli/ai/insights/index.d.ts +30 -0
- package/dist/src/cli/ai/insights/index.js +17 -0
- package/dist/src/cli/ai/insights/list.d.ts +10 -0
- package/dist/src/cli/ai/insights/list.js +20 -0
- package/dist/src/cli/ai/insights/refresh.d.ts +10 -0
- package/dist/src/cli/ai/insights/refresh.js +25 -0
- package/dist/src/cli/ai/insights/translate.d.ts +10 -0
- package/dist/src/cli/ai/insights/translate.js +25 -0
- package/dist/src/cli/ai/overview/by-article.d.ts +7 -0
- package/dist/src/cli/ai/overview/by-article.js +15 -0
- package/dist/src/cli/ai/overview/index.d.ts +11 -0
- package/dist/src/cli/ai/overview/index.js +4 -0
- package/dist/src/cli/ai/overview/list.d.ts +10 -0
- package/dist/src/cli/ai/overview/list.js +20 -0
- package/dist/src/cli/ai/summary/by-article.d.ts +10 -0
- package/dist/src/cli/ai/summary/by-article.js +21 -0
- package/dist/src/cli/ai/summary/delete.d.ts +7 -0
- package/dist/src/cli/ai/summary/delete.js +18 -0
- package/dist/src/cli/ai/summary/edit.d.ts +8 -0
- package/dist/src/cli/ai/summary/edit.js +54 -0
- package/dist/src/cli/ai/summary/get.d.ts +6 -0
- package/dist/src/cli/ai/summary/get.js +11 -0
- package/dist/src/cli/ai/summary/index.d.ts +30 -0
- package/dist/src/cli/ai/summary/index.js +9 -0
- package/dist/src/cli/ai/summary/list.d.ts +10 -0
- package/dist/src/cli/ai/summary/list.js +20 -0
- package/dist/src/cli/ai/summary/regen.d.ts +10 -0
- package/dist/src/cli/ai/summary/regen.js +25 -0
- package/dist/src/cli/ai/summary/translate.d.ts +10 -0
- package/dist/src/cli/ai/summary/translate.js +25 -0
- package/dist/src/cli/ai/translate/by-article.d.ts +9 -0
- package/dist/src/cli/ai/translate/by-article.js +19 -0
- package/dist/src/cli/ai/translate/delete.d.ts +7 -0
- package/dist/src/cli/ai/translate/delete.js +18 -0
- package/dist/src/cli/ai/translate/edit.d.ts +8 -0
- package/dist/src/cli/ai/translate/edit.js +97 -0
- package/dist/src/cli/ai/translate/entries/delete.d.ts +7 -0
- package/dist/src/cli/ai/translate/entries/delete.js +18 -0
- package/dist/src/cli/ai/translate/entries/edit.d.ts +8 -0
- package/dist/src/cli/ai/translate/entries/edit.js +73 -0
- package/dist/src/cli/ai/translate/entries/generate.d.ts +7 -0
- package/dist/src/cli/ai/translate/entries/generate.js +15 -0
- package/dist/src/cli/ai/translate/entries/index.d.ts +17 -0
- package/dist/src/cli/ai/translate/entries/index.js +6 -0
- package/dist/src/cli/ai/translate/entries/list.d.ts +10 -0
- package/dist/src/cli/ai/translate/entries/list.js +20 -0
- package/dist/src/cli/ai/translate/get.d.ts +6 -0
- package/dist/src/cli/ai/translate/get.js +11 -0
- package/dist/src/cli/ai/translate/index.d.ts +40 -0
- package/dist/src/cli/ai/translate/index.js +19 -0
- package/dist/src/cli/ai/translate/languages.d.ts +7 -0
- package/dist/src/cli/ai/translate/languages.js +15 -0
- package/dist/src/cli/ai/translate/list.d.ts +9 -0
- package/dist/src/cli/ai/translate/list.js +19 -0
- package/dist/src/cli/ai/translate/run.d.ts +10 -0
- package/dist/src/cli/ai/translate/run.js +31 -0
- package/dist/src/cli/ai/tts/by-article.d.ts +7 -0
- package/dist/src/cli/ai/tts/by-article.js +15 -0
- package/dist/src/cli/ai/tts/delete.d.ts +7 -0
- package/dist/src/cli/ai/tts/delete.js +18 -0
- package/dist/src/cli/ai/tts/index.d.ts +22 -0
- package/dist/src/cli/ai/tts/index.js +7 -0
- package/dist/src/cli/ai/tts/list.d.ts +10 -0
- package/dist/src/cli/ai/tts/list.js +20 -0
- package/dist/src/cli/ai/tts/run.d.ts +10 -0
- package/dist/src/cli/ai/tts/run.js +25 -0
- package/dist/src/cli/ai/tts/voices.d.ts +7 -0
- package/dist/src/cli/ai/tts/voices.js +12 -0
- package/dist/src/cli/ai/views.d.ts +3 -0
- package/dist/src/cli/ai/views.js +45 -0
- package/dist/src/cli/auth/index.d.ts +6 -0
- package/dist/src/cli/auth/index.js +22 -0
- package/dist/src/cli/auth/login.d.ts +11 -0
- package/dist/src/cli/auth/login.js +168 -0
- package/dist/src/cli/auth/logout.d.ts +6 -0
- package/dist/src/cli/auth/logout.js +21 -0
- package/dist/src/cli/auth/status.d.ts +4 -0
- package/dist/src/cli/auth/status.js +31 -0
- package/dist/src/cli/auth/view.d.ts +25 -0
- package/dist/src/cli/auth/view.js +46 -0
- package/dist/src/cli/auth/whoami.d.ts +7 -0
- package/dist/src/cli/auth/whoami.js +44 -0
- package/dist/src/cli/category/create.d.ts +10 -0
- package/dist/src/cli/category/create.js +24 -0
- package/dist/src/cli/category/delete.d.ts +8 -0
- package/dist/src/cli/category/delete.js +21 -0
- package/dist/src/cli/category/get.d.ts +6 -0
- package/dist/src/cli/category/get.js +11 -0
- package/dist/src/cli/category/index.d.ts +20 -0
- package/dist/src/cli/category/index.js +41 -0
- package/dist/src/cli/category/list.d.ts +4 -0
- package/dist/src/cli/category/list.js +10 -0
- package/dist/src/cli/category/update.d.ts +12 -0
- package/dist/src/cli/category/update.js +34 -0
- package/dist/src/cli/comment/_flags.d.ts +28 -0
- package/dist/src/cli/comment/_flags.js +48 -0
- package/dist/src/cli/comment/approve.d.ts +9 -0
- package/dist/src/cli/comment/approve.js +23 -0
- package/dist/src/cli/comment/delete.d.ts +9 -0
- package/dist/src/cli/comment/delete.js +24 -0
- package/dist/src/cli/comment/get.d.ts +6 -0
- package/dist/src/cli/comment/get.js +12 -0
- package/dist/src/cli/comment/index.d.ts +34 -0
- package/dist/src/cli/comment/index.js +53 -0
- package/dist/src/cli/comment/list.d.ts +9 -0
- package/dist/src/cli/comment/list.js +20 -0
- package/dist/src/cli/comment/reject.d.ts +9 -0
- package/dist/src/cli/comment/reject.js +23 -0
- package/dist/src/cli/comment/reply.d.ts +9 -0
- package/dist/src/cli/comment/reply.js +31 -0
- package/dist/src/cli/comment/unread.d.ts +7 -0
- package/dist/src/cli/comment/unread.js +21 -0
- package/dist/src/cli/comment/view.d.ts +3 -0
- package/dist/src/cli/comment/view.js +197 -0
- package/dist/src/cli/config/edit.d.ts +5 -0
- package/dist/src/cli/config/edit.js +36 -0
- package/dist/src/cli/config/get.d.ts +6 -0
- package/dist/src/cli/config/get.js +11 -0
- package/dist/src/cli/config/index.d.ts +10 -0
- package/dist/src/cli/config/index.js +22 -0
- package/dist/src/cli/config/list.d.ts +4 -0
- package/dist/src/cli/config/list.js +10 -0
- package/dist/src/cli/config/set.d.ts +9 -0
- package/dist/src/cli/config/set.js +48 -0
- package/dist/src/cli/draft/_shared.d.ts +27 -0
- package/dist/src/cli/draft/_shared.js +85 -0
- package/dist/src/cli/draft/create.d.ts +21 -0
- package/dist/src/cli/draft/create.js +34 -0
- package/dist/src/cli/draft/delete.d.ts +7 -0
- package/dist/src/cli/draft/delete.js +20 -0
- package/dist/src/cli/draft/get.d.ts +6 -0
- package/dist/src/cli/draft/get.js +11 -0
- package/dist/src/cli/draft/index.d.ts +54 -0
- package/dist/src/cli/draft/index.js +42 -0
- package/dist/src/cli/draft/list.d.ts +11 -0
- package/dist/src/cli/draft/list.js +23 -0
- package/dist/src/cli/draft/publish.d.ts +8 -0
- package/dist/src/cli/draft/publish.js +64 -0
- package/dist/src/cli/draft/update.d.ts +22 -0
- package/dist/src/cli/draft/update.js +29 -0
- package/dist/src/cli/file/_shared.d.ts +6 -0
- package/dist/src/cli/file/_shared.js +5 -0
- package/dist/src/cli/file/delete.d.ts +8 -0
- package/dist/src/cli/file/delete.js +21 -0
- package/dist/src/cli/file/index.d.ts +19 -0
- package/dist/src/cli/file/index.js +33 -0
- package/dist/src/cli/file/list.d.ts +6 -0
- package/dist/src/cli/file/list.js +11 -0
- package/dist/src/cli/file/rename.d.ts +8 -0
- package/dist/src/cli/file/rename.js +16 -0
- package/dist/src/cli/file/upload.d.ts +9 -0
- package/dist/src/cli/file/upload.js +32 -0
- package/dist/src/cli/help/index.d.ts +62 -0
- package/dist/src/cli/help/index.js +276 -0
- package/dist/src/cli/help/registry.d.ts +28 -0
- package/dist/src/cli/help/registry.js +29 -0
- package/dist/src/cli/note/_flags.d.ts +66 -0
- package/dist/src/cli/note/_flags.js +73 -0
- package/dist/src/cli/note/create.d.ts +23 -0
- package/dist/src/cli/note/create.js +25 -0
- package/dist/src/cli/note/delete.d.ts +8 -0
- package/dist/src/cli/note/delete.js +21 -0
- package/dist/src/cli/note/edit.d.ts +28 -0
- package/dist/src/cli/note/edit.js +114 -0
- package/dist/src/cli/note/get.d.ts +6 -0
- package/dist/src/cli/note/get.js +29 -0
- package/dist/src/cli/note/index.d.ts +77 -0
- package/dist/src/cli/note/index.js +63 -0
- package/dist/src/cli/note/list.d.ts +10 -0
- package/dist/src/cli/note/list.js +22 -0
- package/dist/src/cli/note/publish.d.ts +7 -0
- package/dist/src/cli/note/publish.js +17 -0
- package/dist/src/cli/note/unpublish.d.ts +7 -0
- package/dist/src/cli/note/unpublish.js +17 -0
- package/dist/src/cli/note/update.d.ts +25 -0
- package/dist/src/cli/note/update.js +36 -0
- package/dist/src/cli/note/view.d.ts +3 -0
- package/dist/src/cli/note/view.js +162 -0
- package/dist/src/cli/page/create.d.ts +41 -0
- package/dist/src/cli/page/create.js +56 -0
- package/dist/src/cli/page/delete.d.ts +7 -0
- package/dist/src/cli/page/delete.js +37 -0
- package/dist/src/cli/page/edit.d.ts +19 -0
- package/dist/src/cli/page/edit.js +117 -0
- package/dist/src/cli/page/get.d.ts +6 -0
- package/dist/src/cli/page/get.js +16 -0
- package/dist/src/cli/page/index.d.ts +44 -0
- package/dist/src/cli/page/index.js +38 -0
- package/dist/src/cli/page/list.d.ts +4 -0
- package/dist/src/cli/page/list.js +10 -0
- package/dist/src/cli/page/update.d.ts +16 -0
- package/dist/src/cli/page/update.js +48 -0
- package/dist/src/cli/page/view.d.ts +2 -0
- package/dist/src/cli/page/view.js +79 -0
- package/dist/src/cli/post/_flags.d.ts +66 -0
- package/dist/src/cli/post/_flags.js +96 -0
- package/dist/src/cli/post/apply.d.ts +7 -0
- package/dist/src/cli/post/apply.js +70 -0
- package/dist/src/cli/post/create.d.ts +21 -0
- package/dist/src/cli/post/create.js +24 -0
- package/dist/src/cli/post/delete.d.ts +8 -0
- package/dist/src/cli/post/delete.js +21 -0
- package/dist/src/cli/post/edit.d.ts +26 -0
- package/dist/src/cli/post/edit.js +115 -0
- package/dist/src/cli/post/get.d.ts +7 -0
- package/dist/src/cli/post/get.js +15 -0
- package/dist/src/cli/post/index.d.ts +91 -0
- package/dist/src/cli/post/index.js +73 -0
- package/dist/src/cli/post/list.d.ts +10 -0
- package/dist/src/cli/post/list.js +23 -0
- package/dist/src/cli/post/publish.d.ts +7 -0
- package/dist/src/cli/post/publish.js +17 -0
- package/dist/src/cli/post/stage.d.ts +23 -0
- package/dist/src/cli/post/stage.js +55 -0
- package/dist/src/cli/post/unpublish.d.ts +7 -0
- package/dist/src/cli/post/unpublish.js +17 -0
- package/dist/src/cli/post/update.d.ts +23 -0
- package/dist/src/cli/post/update.js +38 -0
- package/dist/src/cli/post/view.d.ts +3 -0
- package/dist/src/cli/post/view.js +150 -0
- package/dist/src/cli/preview/index.d.ts +13 -0
- package/dist/src/cli/preview/index.js +226 -0
- package/dist/src/cli/profile/index.d.ts +14 -0
- package/dist/src/cli/profile/index.js +36 -0
- package/dist/src/cli/profile/ls.d.ts +5 -0
- package/dist/src/cli/profile/ls.js +26 -0
- package/dist/src/cli/profile/mark.d.ts +9 -0
- package/dist/src/cli/profile/mark.js +23 -0
- package/dist/src/cli/profile/rm.d.ts +12 -0
- package/dist/src/cli/profile/rm.js +50 -0
- package/dist/src/cli/profile/show.d.ts +9 -0
- package/dist/src/cli/profile/show.js +40 -0
- package/dist/src/cli/profile/use.d.ts +6 -0
- package/dist/src/cli/profile/use.js +11 -0
- package/dist/src/cli/profile/view.d.ts +8 -0
- package/dist/src/cli/profile/view.js +21 -0
- package/dist/src/cli/project/_flags.d.ts +56 -0
- package/dist/src/cli/project/_flags.js +130 -0
- package/dist/src/cli/project/create.d.ts +17 -0
- package/dist/src/cli/project/create.js +25 -0
- package/dist/src/cli/project/delete.d.ts +8 -0
- package/dist/src/cli/project/delete.js +22 -0
- package/dist/src/cli/project/edit.d.ts +11 -0
- package/dist/src/cli/project/edit.js +61 -0
- package/dist/src/cli/project/get.d.ts +7 -0
- package/dist/src/cli/project/get.js +14 -0
- package/dist/src/cli/project/index.d.ts +43 -0
- package/dist/src/cli/project/index.js +52 -0
- package/dist/src/cli/project/list.d.ts +8 -0
- package/dist/src/cli/project/list.js +19 -0
- package/dist/src/cli/project/update.d.ts +18 -0
- package/dist/src/cli/project/update.js +24 -0
- package/dist/src/cli/project/view-cmd.d.ts +7 -0
- package/dist/src/cli/project/view-cmd.js +15 -0
- package/dist/src/cli/project/view.d.ts +3 -0
- package/dist/src/cli/project/view.js +102 -0
- package/dist/src/cli/render/codehighlight.d.ts +8 -0
- package/dist/src/cli/render/codehighlight.js +264 -0
- package/dist/src/cli/render/envelope.d.ts +7 -0
- package/dist/src/cli/render/envelope.js +23 -0
- package/dist/src/cli/render/frontmatter.d.ts +8 -0
- package/dist/src/cli/render/frontmatter.js +50 -0
- package/dist/src/cli/render/helpers.d.ts +2 -0
- package/dist/src/cli/render/helpers.js +11 -0
- package/dist/src/cli/render/index.d.ts +7 -0
- package/dist/src/cli/render/index.js +10 -0
- package/dist/src/cli/render/lexical/blocks.d.ts +19 -0
- package/dist/src/cli/render/lexical/blocks.js +208 -0
- package/dist/src/cli/render/lexical/code.d.ts +2 -0
- package/dist/src/cli/render/lexical/code.js +22 -0
- package/dist/src/cli/render/lexical/embeds.d.ts +6 -0
- package/dist/src/cli/render/lexical/embeds.js +51 -0
- package/dist/src/cli/render/lexical/index.d.ts +9 -0
- package/dist/src/cli/render/lexical/index.js +25 -0
- package/dist/src/cli/render/lexical/inlines.d.ts +17 -0
- package/dist/src/cli/render/lexical/inlines.js +76 -0
- package/dist/src/cli/render/lexical/parser.d.ts +10 -0
- package/dist/src/cli/render/lexical/parser.js +64 -0
- package/dist/src/cli/render/lexical/walker.d.ts +21 -0
- package/dist/src/cli/render/lexical/walker.js +51 -0
- package/dist/src/cli/render/markdown.d.ts +18 -0
- package/dist/src/cli/render/markdown.js +196 -0
- package/dist/src/cli/render/metadata-block.d.ts +14 -0
- package/dist/src/cli/render/metadata-block.js +50 -0
- package/dist/src/cli/skill/all.d.ts +4 -0
- package/dist/src/cli/skill/all.js +11 -0
- package/dist/src/cli/skill/get.d.ts +6 -0
- package/dist/src/cli/skill/get.js +12 -0
- package/dist/src/cli/skill/index.d.ts +10 -0
- package/dist/src/cli/skill/index.js +34 -0
- package/dist/src/cli/skill/list.d.ts +4 -0
- package/dist/src/cli/skill/list.js +11 -0
- package/dist/src/cli/skill/search.d.ts +6 -0
- package/dist/src/cli/skill/search.js +12 -0
- package/dist/src/cli/skill/views.d.ts +6 -0
- package/dist/src/cli/skill/views.js +90 -0
- package/dist/src/cli/snippet/_flags.d.ts +57 -0
- package/dist/src/cli/snippet/_flags.js +123 -0
- package/dist/src/cli/snippet/_resolve.d.ts +4 -0
- package/dist/src/cli/snippet/_resolve.js +32 -0
- package/dist/src/cli/snippet/_sync.d.ts +5 -0
- package/dist/src/cli/snippet/_sync.js +54 -0
- package/dist/src/cli/snippet/create.d.ts +19 -0
- package/dist/src/cli/snippet/create.js +35 -0
- package/dist/src/cli/snippet/delete.d.ts +8 -0
- package/dist/src/cli/snippet/delete.js +28 -0
- package/dist/src/cli/snippet/edit.d.ts +7 -0
- package/dist/src/cli/snippet/edit.js +29 -0
- package/dist/src/cli/snippet/get.d.ts +6 -0
- package/dist/src/cli/snippet/get.js +12 -0
- package/dist/src/cli/snippet/index.d.ts +43 -0
- package/dist/src/cli/snippet/index.js +58 -0
- package/dist/src/cli/snippet/list.d.ts +9 -0
- package/dist/src/cli/snippet/list.js +20 -0
- package/dist/src/cli/snippet/pull.d.ts +8 -0
- package/dist/src/cli/snippet/pull.js +33 -0
- package/dist/src/cli/snippet/push.d.ts +10 -0
- package/dist/src/cli/snippet/push.js +31 -0
- package/dist/src/cli/snippet/update.d.ts +8 -0
- package/dist/src/cli/snippet/update.js +16 -0
- package/dist/src/cli/topic/create.d.ts +10 -0
- package/dist/src/cli/topic/create.js +24 -0
- package/dist/src/cli/topic/delete.d.ts +7 -0
- package/dist/src/cli/topic/delete.js +37 -0
- package/dist/src/cli/topic/get.d.ts +6 -0
- package/dist/src/cli/topic/get.js +15 -0
- package/dist/src/cli/topic/index.d.ts +20 -0
- package/dist/src/cli/topic/index.js +32 -0
- package/dist/src/cli/topic/list.d.ts +4 -0
- package/dist/src/cli/topic/list.js +10 -0
- package/dist/src/cli/topic/update.d.ts +11 -0
- package/dist/src/cli/topic/update.js +51 -0
- package/dist/src/cli/ui/index.d.ts +24 -0
- package/dist/src/cli/ui/index.js +83 -0
- package/dist/src/cli/update/index.d.ts +10 -0
- package/dist/src/cli/update/index.js +142 -0
- package/dist/src/domain/admin-link.d.ts +12 -0
- package/dist/src/domain/admin-link.js +45 -0
- package/dist/src/domain/content-spec.d.ts +20 -0
- package/dist/src/domain/content-spec.js +78 -0
- package/dist/src/domain/envelope-compat.d.ts +68 -0
- package/dist/src/domain/envelope-compat.js +121 -0
- package/dist/src/domain/envelope.d.ts +34 -0
- package/dist/src/domain/envelope.js +355 -0
- package/dist/src/domain/errors.d.ts +336 -0
- package/dist/src/domain/errors.js +239 -0
- package/dist/src/domain/gate.d.ts +14 -0
- package/dist/src/domain/gate.js +18 -0
- package/dist/src/domain/payload.d.ts +64 -0
- package/dist/src/domain/payload.js +237 -0
- package/dist/src/domain/preflight-guards.d.ts +54 -0
- package/dist/src/domain/preflight-guards.js +130 -0
- package/dist/src/domain/runtime-flags.d.ts +33 -0
- package/dist/src/domain/runtime-flags.js +166 -0
- package/dist/src/domain/schema/api-envelope.d.ts +67 -0
- package/dist/src/domain/schema/api-envelope.js +65 -0
- package/dist/src/domain/schema/category.d.ts +23 -0
- package/dist/src/domain/schema/category.js +19 -0
- package/dist/src/domain/schema/config.d.ts +13 -0
- package/dist/src/domain/schema/config.js +18 -0
- package/dist/src/domain/schema/note.d.ts +76 -0
- package/dist/src/domain/schema/note.js +35 -0
- package/dist/src/domain/schema/page.d.ts +40 -0
- package/dist/src/domain/schema/page.js +22 -0
- package/dist/src/domain/schema/post.d.ts +68 -0
- package/dist/src/domain/schema/post.js +35 -0
- package/dist/src/domain/schema/profile.d.ts +14 -0
- package/dist/src/domain/schema/profile.js +22 -0
- package/dist/src/domain/schema/topic.d.ts +24 -0
- package/dist/src/domain/schema/topic.js +16 -0
- package/dist/src/domain/version.d.ts +15 -0
- package/dist/src/domain/version.js +43 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +8 -0
- package/dist/src/layers/App.d.ts +30 -0
- package/dist/src/layers/App.js +39 -0
- package/dist/src/services/Ai/index.d.ts +13 -0
- package/dist/src/services/Ai/index.js +127 -0
- package/dist/src/services/Ai/overview.d.ts +7 -0
- package/dist/src/services/Ai/overview.js +11 -0
- package/dist/src/services/Ai/resources.d.ts +7 -0
- package/dist/src/services/Ai/resources.js +59 -0
- package/dist/src/services/Ai/shared.d.ts +2 -0
- package/dist/src/services/Ai/shared.js +11 -0
- package/dist/src/services/Ai/tasks.d.ts +8 -0
- package/dist/src/services/Ai/tasks.js +144 -0
- package/dist/src/services/Ai/types.d.ts +130 -0
- package/dist/src/services/Ai/types.js +1 -0
- package/dist/src/services/Api.d.ts +67 -0
- package/dist/src/services/Api.js +348 -0
- package/dist/src/services/Auth.d.ts +101 -0
- package/dist/src/services/Auth.js +402 -0
- package/dist/src/services/Backup.d.ts +8 -0
- package/dist/src/services/Backup.js +4 -0
- package/dist/src/services/Cache.d.ts +8 -0
- package/dist/src/services/Cache.js +4 -0
- package/dist/src/services/Comment.d.ts +48 -0
- package/dist/src/services/Comment.js +102 -0
- package/dist/src/services/Config.d.ts +95 -0
- package/dist/src/services/Config.js +359 -0
- package/dist/src/services/Editor.d.ts +28 -0
- package/dist/src/services/Editor.js +95 -0
- package/dist/src/services/Lexical.d.ts +27 -0
- package/dist/src/services/Lexical.js +56 -0
- package/dist/src/services/Migration.d.ts +31 -0
- package/dist/src/services/Migration.js +177 -0
- package/dist/src/services/Profile.d.ts +29 -0
- package/dist/src/services/Profile.js +115 -0
- package/dist/src/services/Renderer/content.d.ts +16 -0
- package/dist/src/services/Renderer/content.js +110 -0
- package/dist/src/services/Renderer/datetime.d.ts +38 -0
- package/dist/src/services/Renderer/datetime.js +147 -0
- package/dist/src/services/Renderer/errors.d.ts +3 -0
- package/dist/src/services/Renderer/errors.js +59 -0
- package/dist/src/services/Renderer/index.d.ts +13 -0
- package/dist/src/services/Renderer/index.js +11 -0
- package/dist/src/services/Renderer/lists.d.ts +1 -0
- package/dist/src/services/Renderer/lists.js +101 -0
- package/dist/src/services/Renderer/options.d.ts +10 -0
- package/dist/src/services/Renderer/options.js +13 -0
- package/dist/src/services/Renderer/primitives.d.ts +4 -0
- package/dist/src/services/Renderer/primitives.js +12 -0
- package/dist/src/services/Renderer/service.d.ts +35 -0
- package/dist/src/services/Renderer/service.js +123 -0
- package/dist/src/services/Renderer/view.d.ts +16 -0
- package/dist/src/services/Renderer/view.js +1 -0
- package/dist/src/services/Resolver.d.ts +47 -0
- package/dist/src/services/Resolver.js +269 -0
- package/dist/src/services/Skill.d.ts +29 -0
- package/dist/src/services/Skill.js +421 -0
- package/dist/src/services/UpdateNotifier.d.ts +162 -0
- package/dist/src/services/UpdateNotifier.js +572 -0
- package/dist/test/cli/ai/ai.test.d.ts +1 -0
- package/dist/test/cli/ai/ai.test.js +507 -0
- package/dist/test/cli/ai/verbs.test.d.ts +1 -0
- package/dist/test/cli/ai/verbs.test.js +235 -0
- package/dist/test/cli/auth/login.test.d.ts +1 -0
- package/dist/test/cli/auth/login.test.js +236 -0
- package/dist/test/cli/auth/logout-whoami.test.d.ts +1 -0
- package/dist/test/cli/auth/logout-whoami.test.js +124 -0
- package/dist/test/cli/auth/status.test.d.ts +1 -0
- package/dist/test/cli/auth/status.test.js +90 -0
- package/dist/test/cli/category/category.test.d.ts +1 -0
- package/dist/test/cli/category/category.test.js +175 -0
- package/dist/test/cli/comment/comment.test.d.ts +1 -0
- package/dist/test/cli/comment/comment.test.js +445 -0
- package/dist/test/cli/config/config.test.d.ts +1 -0
- package/dist/test/cli/config/config.test.js +281 -0
- package/dist/test/cli/edit-roundtrip.test.d.ts +1 -0
- package/dist/test/cli/edit-roundtrip.test.js +259 -0
- package/dist/test/cli/file/file.test.d.ts +1 -0
- package/dist/test/cli/file/file.test.js +185 -0
- package/dist/test/cli/help.test.d.ts +1 -0
- package/dist/test/cli/help.test.js +289 -0
- package/dist/test/cli/note/create.test.d.ts +1 -0
- package/dist/test/cli/note/create.test.js +155 -0
- package/dist/test/cli/note/list.test.d.ts +1 -0
- package/dist/test/cli/note/list.test.js +115 -0
- package/dist/test/cli/note/publish.test.d.ts +1 -0
- package/dist/test/cli/note/publish.test.js +123 -0
- package/dist/test/cli/page/page.test.d.ts +1 -0
- package/dist/test/cli/page/page.test.js +185 -0
- package/dist/test/cli/post/create.test.d.ts +1 -0
- package/dist/test/cli/post/create.test.js +172 -0
- package/dist/test/cli/post/list.test.d.ts +1 -0
- package/dist/test/cli/post/list.test.js +133 -0
- package/dist/test/cli/post/publish.test.d.ts +1 -0
- package/dist/test/cli/post/publish.test.js +139 -0
- package/dist/test/cli/post/stage-apply.test.d.ts +1 -0
- package/dist/test/cli/post/stage-apply.test.js +215 -0
- package/dist/test/cli/post/update.test.d.ts +1 -0
- package/dist/test/cli/post/update.test.js +160 -0
- package/dist/test/cli/post-note-crud.test.d.ts +1 -0
- package/dist/test/cli/post-note-crud.test.js +362 -0
- package/dist/test/cli/profile/ls.test.d.ts +1 -0
- package/dist/test/cli/profile/ls.test.js +93 -0
- package/dist/test/cli/profile/mark-use.test.d.ts +1 -0
- package/dist/test/cli/profile/mark-use.test.js +216 -0
- package/dist/test/cli/project-crud.test.d.ts +1 -0
- package/dist/test/cli/project-crud.test.js +315 -0
- package/dist/test/cli/render/lexical.test.d.ts +1 -0
- package/dist/test/cli/render/lexical.test.js +216 -0
- package/dist/test/cli/render/markdown.test.d.ts +1 -0
- package/dist/test/cli/render/markdown.test.js +39 -0
- package/dist/test/cli/snippet-crud.test.d.ts +1 -0
- package/dist/test/cli/snippet-crud.test.js +293 -0
- package/dist/test/cli/topic/topic.test.d.ts +1 -0
- package/dist/test/cli/topic/topic.test.js +181 -0
- package/dist/test/cli/update.test.d.ts +1 -0
- package/dist/test/cli/update.test.js +395 -0
- package/dist/test/domain/content-spec.test.d.ts +1 -0
- package/dist/test/domain/content-spec.test.js +126 -0
- package/dist/test/domain/envelope-compat.test.d.ts +1 -0
- package/dist/test/domain/envelope-compat.test.js +126 -0
- package/dist/test/domain/envelope.test.d.ts +1 -0
- package/dist/test/domain/envelope.test.js +149 -0
- package/dist/test/domain/errors.test.d.ts +1 -0
- package/dist/test/domain/errors.test.js +127 -0
- package/dist/test/domain/gate.test.d.ts +1 -0
- package/dist/test/domain/gate.test.js +128 -0
- package/dist/test/domain/payload.test.d.ts +1 -0
- package/dist/test/domain/payload.test.js +259 -0
- package/dist/test/helper/test-fs.d.ts +24 -0
- package/dist/test/helper/test-fs.js +161 -0
- package/dist/test/helper/test-http.d.ts +31 -0
- package/dist/test/helper/test-http.js +66 -0
- package/dist/test/integration/_helpers.d.ts +5 -0
- package/dist/test/integration/_helpers.js +24 -0
- package/dist/test/integration/cli-error-envelope.test.d.ts +1 -0
- package/dist/test/integration/cli-error-envelope.test.js +137 -0
- package/dist/test/integration/cli-help-render.test.d.ts +1 -0
- package/dist/test/integration/cli-help-render.test.js +149 -0
- package/dist/test/integration/cli-help.test.d.ts +1 -0
- package/dist/test/integration/cli-help.test.js +67 -0
- package/dist/test/integration/cli-post-list.test.d.ts +1 -0
- package/dist/test/integration/cli-post-list.test.js +140 -0
- package/dist/test/integration/cli-skill.test.d.ts +1 -0
- package/dist/test/integration/cli-skill.test.js +74 -0
- package/dist/test/integration/cli-version.test.d.ts +1 -0
- package/dist/test/integration/cli-version.test.js +37 -0
- package/dist/test/services/Api.test.d.ts +1 -0
- package/dist/test/services/Api.test.js +553 -0
- package/dist/test/services/Auth.test.d.ts +1 -0
- package/dist/test/services/Auth.test.js +650 -0
- package/dist/test/services/Config.test.d.ts +1 -0
- package/dist/test/services/Config.test.js +510 -0
- package/dist/test/services/Datetime.test.d.ts +1 -0
- package/dist/test/services/Datetime.test.js +113 -0
- package/dist/test/services/Editor.test.d.ts +1 -0
- package/dist/test/services/Editor.test.js +205 -0
- package/dist/test/services/Lexical.errors.test.d.ts +1 -0
- package/dist/test/services/Lexical.errors.test.js +60 -0
- package/dist/test/services/Lexical.test.d.ts +1 -0
- package/dist/test/services/Lexical.test.js +68 -0
- package/dist/test/services/Migration.test.d.ts +1 -0
- package/dist/test/services/Migration.test.js +376 -0
- package/dist/test/services/Profile.test.d.ts +1 -0
- package/dist/test/services/Profile.test.js +277 -0
- package/dist/test/services/Renderer.test.d.ts +1 -0
- package/dist/test/services/Renderer.test.js +538 -0
- package/dist/test/services/Resolver.test.d.ts +1 -0
- package/dist/test/services/Resolver.test.js +320 -0
- package/dist/test/services/Skill.test.d.ts +1 -0
- package/dist/test/services/Skill.test.js +261 -0
- package/dist/test/services/UpdateNotifier.spawn.test.d.ts +1 -0
- package/dist/test/services/UpdateNotifier.spawn.test.js +73 -0
- package/dist/test/services/UpdateNotifier.test.d.ts +1 -0
- package/dist/test/services/UpdateNotifier.test.js +912 -0
- package/dist/vendor/litexml/cli.mjs +19 -4
- package/dist/vendor/litexml/litexml-html-preview-client.css +98 -13
- package/dist/vendor/litexml/litexml-html-preview-client.js +5794 -4976
- package/dist/vendor/litexml/style.css +5 -5
- package/package.json +29 -26
- package/skills/safety.md +1 -1
- package/LICENSE +0 -33
- package/dist/esm-CDcJmHkG.mjs +0 -2
package/README.md
CHANGED
|
@@ -694,7 +694,7 @@ The variant (`article` / `note`) is auto-detected from the envelope root. Overri
|
|
|
694
694
|
|
|
695
695
|
## Skill bundle
|
|
696
696
|
|
|
697
|
-
`mxs skill` exposes the bundled AI-agent documentation directly from the CLI binary. Chapters are shipped inside the published `@mx-space/cli` package; liteXML chapters are pulled live from `@haklex/rich-litexml` at runtime (requires `@haklex/rich-litexml@>=0.
|
|
697
|
+
`mxs skill` exposes the bundled AI-agent documentation directly from the CLI binary. Chapters are shipped inside the published `@mx-space/cli` package; liteXML chapters are pulled live from `@haklex/rich-litexml` at runtime (requires `@haklex/rich-litexml@>=0.36.1`).
|
|
698
698
|
|
|
699
699
|
| Command | Behaviour |
|
|
700
700
|
| -------------------------------- | ---------------------------------------------------------- |
|
|
@@ -75,8 +75,10 @@ const NON_BREAKING_SPACE = "\xA0";
|
|
|
75
75
|
const COMPOSITION_SUFFIX = IS_SAFARI || IS_IOS || IS_APPLE_WEBKIT ? NON_BREAKING_SPACE : "";
|
|
76
76
|
const DOUBLE_LINE_BREAK = "\n\n";
|
|
77
77
|
const COMPOSITION_START_CHAR = IS_FIREFOX ? NON_BREAKING_SPACE : COMPOSITION_SUFFIX;
|
|
78
|
-
const
|
|
79
|
-
const
|
|
78
|
+
const RTL = "֑-߿יִ-﷽ﹰ-ﻼ";
|
|
79
|
+
const LTR = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--";
|
|
80
|
+
const RTL_REGEX = new RegExp("^[^" + LTR + "]*[" + RTL + "]");
|
|
81
|
+
const LTR_REGEX = new RegExp("^[^" + RTL + "]*[" + LTR + "]");
|
|
80
82
|
const TEXT_TYPE_TO_FORMAT = {
|
|
81
83
|
bold: 1,
|
|
82
84
|
capitalize: IS_CAPITALIZE,
|
|
@@ -3289,9 +3291,7 @@ function $handleBeforeInput(event) {
|
|
|
3289
3291
|
case "historyUndo":
|
|
3290
3292
|
dispatchCommand(editor, UNDO_COMMAND);
|
|
3291
3293
|
break;
|
|
3292
|
-
case "historyRedo":
|
|
3293
|
-
dispatchCommand(editor, REDO_COMMAND);
|
|
3294
|
-
break;
|
|
3294
|
+
case "historyRedo": dispatchCommand(editor, REDO_COMMAND);
|
|
3295
3295
|
}
|
|
3296
3296
|
return true;
|
|
3297
3297
|
}
|
|
@@ -3495,19 +3495,21 @@ function $handleKeyDown(event) {
|
|
|
3495
3495
|
} else if (isParagraph(event)) {
|
|
3496
3496
|
inputState.isInsertLineBreak = false;
|
|
3497
3497
|
dispatchCommand(editor, KEY_ENTER_COMMAND, event);
|
|
3498
|
-
} else if (isDeleteBackward(event))
|
|
3499
|
-
if (
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
else if (
|
|
3506
|
-
else {
|
|
3507
|
-
event
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3498
|
+
} else if (isDeleteBackward(event)) {
|
|
3499
|
+
if (isBackspace(event)) {
|
|
3500
|
+
if (dispatchCommand(editor, KEY_BACKSPACE_COMMAND, event)) markHandledSelectionCommandInsertText(inputState);
|
|
3501
|
+
} else {
|
|
3502
|
+
event.preventDefault();
|
|
3503
|
+
dispatchCommand(editor, DELETE_CHARACTER_COMMAND, true);
|
|
3504
|
+
}
|
|
3505
|
+
} else if (isEscape(event)) dispatchCommand(editor, KEY_ESCAPE_COMMAND, event);
|
|
3506
|
+
else if (isDeleteForward(event)) {
|
|
3507
|
+
if (isDelete(event)) dispatchCommand(editor, KEY_DELETE_COMMAND, event);
|
|
3508
|
+
else {
|
|
3509
|
+
event.preventDefault();
|
|
3510
|
+
dispatchCommand(editor, DELETE_CHARACTER_COMMAND, false);
|
|
3511
|
+
}
|
|
3512
|
+
} else if (isDeleteWordBackward(event)) {
|
|
3511
3513
|
event.preventDefault();
|
|
3512
3514
|
dispatchCommand(editor, DELETE_WORD_COMMAND, true);
|
|
3513
3515
|
} else if (isDeleteWordForward(event)) {
|
|
@@ -4693,10 +4695,14 @@ var LexicalNode = class {
|
|
|
4693
4695
|
$setSelection(selection);
|
|
4694
4696
|
const anchor = selection.anchor;
|
|
4695
4697
|
const focus = selection.focus;
|
|
4696
|
-
if (anchor.key === toReplaceKey)
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4698
|
+
if (anchor.key === toReplaceKey) {
|
|
4699
|
+
if (includeChildren && anchor.type === "element") anchor.set(writableReplaceWith.__key, prevSizeBeforeChildrenTransfer + anchor.offset, "element");
|
|
4700
|
+
else $moveSelectionPointToEnd(anchor, writableReplaceWith);
|
|
4701
|
+
}
|
|
4702
|
+
if (focus.key === toReplaceKey) {
|
|
4703
|
+
if (includeChildren && focus.type === "element") focus.set(writableReplaceWith.__key, prevSizeBeforeChildrenTransfer + focus.offset, "element");
|
|
4704
|
+
else $moveSelectionPointToEnd(focus, writableReplaceWith);
|
|
4705
|
+
}
|
|
4700
4706
|
}
|
|
4701
4707
|
if ($getCompositionKey() === toReplaceKey) $setCompositionKey(key);
|
|
4702
4708
|
return writableReplaceWith;
|
|
@@ -5064,8 +5070,10 @@ function getStyleObjectFromCSS(css) {
|
|
|
5064
5070
|
}
|
|
5065
5071
|
if (chunkStart === -1) chunkStart = i;
|
|
5066
5072
|
}
|
|
5067
|
-
if (chunkStart !== -1)
|
|
5068
|
-
|
|
5073
|
+
if (chunkStart !== -1) {
|
|
5074
|
+
if (isParsingValue) currentValue += css.slice(chunkStart, length);
|
|
5075
|
+
else currentProperty += css.slice(chunkStart, length);
|
|
5076
|
+
}
|
|
5069
5077
|
const property = currentProperty.trim();
|
|
5070
5078
|
const value = currentValue.trim();
|
|
5071
5079
|
if (property !== "" && value !== "") styles[property] = value;
|
|
@@ -6097,11 +6105,13 @@ function $insertTextAtPoint(selection, text, format, style) {
|
|
|
6097
6105
|
textNode.setFormat(format);
|
|
6098
6106
|
textNode.setStyle(style);
|
|
6099
6107
|
const parent = anchorNode.getParentOrThrow();
|
|
6100
|
-
if (offset === 0)
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
else anchorNode.
|
|
6104
|
-
|
|
6108
|
+
if (offset === 0) {
|
|
6109
|
+
if (parent.isInline() && !anchorNode.__prev) parent.insertBefore(textNode);
|
|
6110
|
+
else anchorNode.insertBefore(textNode, false);
|
|
6111
|
+
} else if (offset === anchorNode.getTextContentSize()) {
|
|
6112
|
+
if (parent.isInline() && !anchorNode.__next) parent.insertAfter(textNode);
|
|
6113
|
+
else anchorNode.insertAfter(textNode, false);
|
|
6114
|
+
} else {
|
|
6105
6115
|
const [before] = anchorNode.splitText(offset);
|
|
6106
6116
|
before.insertAfter(textNode, false);
|
|
6107
6117
|
}
|
|
@@ -6334,10 +6344,11 @@ var RangeSelection = class RangeSelection {
|
|
|
6334
6344
|
prevWasElement = false;
|
|
6335
6345
|
if ($isTextNode(node)) {
|
|
6336
6346
|
let text = node.getTextContent();
|
|
6337
|
-
if (node === firstNode)
|
|
6338
|
-
if (
|
|
6339
|
-
|
|
6340
|
-
|
|
6347
|
+
if (node === firstNode) {
|
|
6348
|
+
if (node === lastNode) {
|
|
6349
|
+
if (anchor.type !== "element" || focus.type !== "element" || focus.offset === anchor.offset) text = anchorOffset < focusOffset ? text.slice(anchorOffset, focusOffset) : text.slice(focusOffset, anchorOffset);
|
|
6350
|
+
} else text = isBefore ? text.slice(anchorOffset) : text.slice(focusOffset);
|
|
6351
|
+
} else if (node === lastNode) text = isBefore ? text.slice(0, focusOffset) : text.slice(0, anchorOffset);
|
|
6341
6352
|
textContent += text;
|
|
6342
6353
|
} else if (($isDecoratorNode(node) || $isLineBreakNode(node)) && (node !== lastNode || !this.isCollapsed())) textContent += node.getTextContent();
|
|
6343
6354
|
}
|
|
@@ -6500,12 +6511,14 @@ var RangeSelection = class RangeSelection {
|
|
|
6500
6511
|
const atStartOfInline = anchorParent.isInline() && offset === 0 && !anchorNode.__prev;
|
|
6501
6512
|
const atEndOfInline = anchorParent.isInline() && offset === anchorSize && !anchorNode.__next;
|
|
6502
6513
|
const formatDiffers = anchorNode.getFormat() !== format || anchorNode.getStyle() !== style;
|
|
6503
|
-
if (atStartOfInline || atEndOfInline || formatDiffers)
|
|
6504
|
-
anchorNode.
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6514
|
+
if (atStartOfInline || atEndOfInline || formatDiffers) {
|
|
6515
|
+
if (anchorNode.getTextContent() === "" && !atStartOfInline && !atEndOfInline) {
|
|
6516
|
+
anchorNode.setFormat(format);
|
|
6517
|
+
anchorNode.setStyle(style);
|
|
6518
|
+
} else {
|
|
6519
|
+
$insertTextAtPoint(this, text, format, style);
|
|
6520
|
+
return;
|
|
6521
|
+
}
|
|
6509
6522
|
}
|
|
6510
6523
|
anchorNode.spliceText(offset, 0, text, true);
|
|
6511
6524
|
if (anchorNode.isComposing() && this.anchor.type === "text") this.anchor.set(this.anchor.key, this.anchor.offset - text.length, this.anchor.type);
|
|
@@ -6759,19 +6772,21 @@ var RangeSelection = class RangeSelection {
|
|
|
6759
6772
|
if (granularity === "character" && $isTextNode(focusNode) && focusNode.isUnmergeable()) {
|
|
6760
6773
|
if (isBackward ? this.focus.offset === 0 : this.focus.offset === focusNode.getTextContentSize()) {
|
|
6761
6774
|
const sibling = $getSiblingCaret(focusNode, isBackward ? "previous" : "next").getNodeAtCaret();
|
|
6762
|
-
if ($isTextNode(sibling))
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6775
|
+
if ($isTextNode(sibling)) {
|
|
6776
|
+
if (collapse) {
|
|
6777
|
+
const sibKeyedDOM = editor.getElementByKey(sibling.getKey());
|
|
6778
|
+
const sibDOM = sibKeyedDOM ? $getDOMTextNode(sibling, sibKeyedDOM, editor) : null;
|
|
6779
|
+
if (sibDOM) {
|
|
6780
|
+
const sibOffset = isBackward ? sibDOM.length : 0;
|
|
6781
|
+
setDOMSelectionBaseAndExtent(domSelection, sibDOM, sibOffset, sibDOM, sibOffset);
|
|
6782
|
+
}
|
|
6783
|
+
} else {
|
|
6784
|
+
const sibLen = sibling.getTextContentSize();
|
|
6785
|
+
if (isBackward) this.focus.set(sibling.__key, sibLen - 1, "text");
|
|
6786
|
+
else this.focus.set(sibling.__key, 1, "text");
|
|
6787
|
+
this.dirty = true;
|
|
6788
|
+
return;
|
|
6768
6789
|
}
|
|
6769
|
-
} else {
|
|
6770
|
-
const sibLen = sibling.getTextContentSize();
|
|
6771
|
-
if (isBackward) this.focus.set(sibling.__key, sibLen - 1, "text");
|
|
6772
|
-
else this.focus.set(sibling.__key, 1, "text");
|
|
6773
|
-
this.dirty = true;
|
|
6774
|
-
return;
|
|
6775
6790
|
}
|
|
6776
6791
|
}
|
|
6777
6792
|
}
|
|
@@ -7313,8 +7328,10 @@ function $updateCaretSelectionForUnicodeCharacter(selection, isBackward) {
|
|
|
7313
7328
|
const endOffset = isBefore ? focusOffset : anchorOffset;
|
|
7314
7329
|
const characterOffset = endOffset - 1;
|
|
7315
7330
|
if (startOffset !== characterOffset) {
|
|
7316
|
-
if (shouldDeleteExactlyOneCodeUnit(anchorNode.getTextContent().slice(startOffset, endOffset)))
|
|
7317
|
-
|
|
7331
|
+
if (shouldDeleteExactlyOneCodeUnit(anchorNode.getTextContent().slice(startOffset, endOffset))) {
|
|
7332
|
+
if (isBackward) focus.set(focus.key, characterOffset, focus.type);
|
|
7333
|
+
else anchor.set(anchor.key, characterOffset, anchor.type);
|
|
7334
|
+
}
|
|
7318
7335
|
}
|
|
7319
7336
|
}
|
|
7320
7337
|
}
|
|
@@ -8008,10 +8025,12 @@ function $getNodesFromCaretRangeCompat(range) {
|
|
|
8008
8025
|
}
|
|
8009
8026
|
while (nodes.length > 1) {
|
|
8010
8027
|
const lastIncludedNode = nodes[nodes.length - 1];
|
|
8011
|
-
if ($isElementNode(lastIncludedNode))
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8028
|
+
if ($isElementNode(lastIncludedNode)) {
|
|
8029
|
+
if (seenElements.has(lastIncludedNode) || lastIncludedNode.isEmpty() || seenAncestors.has(lastIncludedNode));
|
|
8030
|
+
else {
|
|
8031
|
+
nodes.pop();
|
|
8032
|
+
continue;
|
|
8033
|
+
}
|
|
8015
8034
|
}
|
|
8016
8035
|
break;
|
|
8017
8036
|
}
|
|
@@ -8605,9 +8624,11 @@ function $beginUpdate(editor, updateFn, options) {
|
|
|
8605
8624
|
const headless = editor._headless || editor.getRootElement() === null;
|
|
8606
8625
|
setPendingNodeToClone(null);
|
|
8607
8626
|
try {
|
|
8608
|
-
if (editorStateWasCloned)
|
|
8609
|
-
if (
|
|
8610
|
-
|
|
8627
|
+
if (editorStateWasCloned) {
|
|
8628
|
+
if (headless) {
|
|
8629
|
+
if (currentEditorState._selection !== null) pendingEditorState._selection = currentEditorState._selection.clone();
|
|
8630
|
+
} else pendingEditorState._selection = $internalCreateSelection(editor, options && options.event || null);
|
|
8631
|
+
}
|
|
8611
8632
|
const startingCompositionKey = editor._compositionKey;
|
|
8612
8633
|
updateFn();
|
|
8613
8634
|
skipTransforms = $processNestedUpdates(editor, skipTransforms);
|
|
@@ -8667,11 +8688,12 @@ function $beginUpdate(editor, updateFn, options) {
|
|
|
8667
8688
|
* within an update
|
|
8668
8689
|
*/
|
|
8669
8690
|
function updateEditorSync(editor, updateFn, options) {
|
|
8670
|
-
if (activeEditor === editor && options === void 0)
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8691
|
+
if (activeEditor === editor && options === void 0) {
|
|
8692
|
+
if (isCurrentlyReadOnlyMode()) {
|
|
8693
|
+
console.warn("updateEditorSync: an editor update (e.g. a command listener that mutates the editor) ran while a read-only context was on the stack. This most commonly happens when a command is dispatched from inside editor.read(). The update has been deferred to a fresh writable update so it still applies, but dispatching mutations from a read-only context is an anti-pattern — dispatch after editor.read() returns, or via queueMicrotask.");
|
|
8694
|
+
$beginUpdate(editor, updateFn, options);
|
|
8695
|
+
} else updateFn();
|
|
8696
|
+
} else $beginUpdate(editor, updateFn, options);
|
|
8675
8697
|
}
|
|
8676
8698
|
function updateEditor(editor, updateFn, options) {
|
|
8677
8699
|
if (editor._updating) editor._updates.push([updateFn, options]);
|
|
@@ -9114,10 +9136,12 @@ var ElementNode = class extends LexicalNode {
|
|
|
9114
9136
|
const nodeAfterRange = this.getChildAtIndex(start + deleteCount);
|
|
9115
9137
|
let nodeBeforeRange = null;
|
|
9116
9138
|
let newSize = oldSize - deleteCount + nodesToInsert.length;
|
|
9117
|
-
if (start !== 0)
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9139
|
+
if (start !== 0) {
|
|
9140
|
+
if (start === oldSize) nodeBeforeRange = this.getLastChild();
|
|
9141
|
+
else {
|
|
9142
|
+
const node = this.getChildAtIndex(start);
|
|
9143
|
+
if (node !== null) nodeBeforeRange = node.getPreviousSibling();
|
|
9144
|
+
}
|
|
9121
9145
|
}
|
|
9122
9146
|
if (deleteCount > 0) {
|
|
9123
9147
|
let nodeToDelete = nodeBeforeRange === null ? this.getFirstChild() : nodeBeforeRange.getNextSibling();
|
|
@@ -10561,8 +10585,10 @@ var LexicalEditor = class {
|
|
|
10561
10585
|
const root = $getRoot();
|
|
10562
10586
|
if (selection !== null) {
|
|
10563
10587
|
if (!selection.dirty) $setSelection(selection.clone());
|
|
10564
|
-
} else if (root.getChildrenSize() !== 0)
|
|
10565
|
-
|
|
10588
|
+
} else if (root.getChildrenSize() !== 0) {
|
|
10589
|
+
if (options.defaultSelection === "rootStart") root.selectStart();
|
|
10590
|
+
else root.selectEnd();
|
|
10591
|
+
}
|
|
10566
10592
|
$addUpdateTag(FOCUS_TAG);
|
|
10567
10593
|
$onUpdate(() => {
|
|
10568
10594
|
rootElement.removeAttribute("autocapitalize");
|
|
@@ -10778,8 +10804,10 @@ function errorOnNodeKeyConstructorMismatch(node, existingKey, pendingNode) {
|
|
|
10778
10804
|
if (pendingNode) {
|
|
10779
10805
|
if (!(existingKey === pendingNode.__key)) formatDevErrorMessage(`Lexical node with constructor ${node.constructor.name} (type ${node.getType()}) has an incorrect clone implementation, got ${String(existingKey)} for nodeKey when expecting ${pendingNode.__key}`);
|
|
10780
10806
|
}
|
|
10781
|
-
if (existingNode && existingNode.constructor !== node.constructor)
|
|
10782
|
-
|
|
10807
|
+
if (existingNode && existingNode.constructor !== node.constructor) {
|
|
10808
|
+
if (node.constructor.name !== existingNode.constructor.name) formatDevErrorMessage(`Lexical node with constructor ${node.constructor.name} attempted to re-use key from node in active editor state with constructor ${existingNode.constructor.name}. Keys must not be re-used when the type is changed.`);
|
|
10809
|
+
else formatDevErrorMessage(`Lexical node with constructor ${node.constructor.name} attempted to re-use key from node in active editor state with different constructor with the same name (possibly due to invalid Hot Module Replacement). Keys must not be re-used when the type is changed.`);
|
|
10810
|
+
}
|
|
10783
10811
|
}
|
|
10784
10812
|
function internalMarkParentElementsAsDirty(parentKey, nodeMap, dirtyElements) {
|
|
10785
10813
|
let nextParentKey = parentKey;
|
|
@@ -11428,13 +11456,15 @@ function scrollIntoViewIfNeeded(editor, selectionRect, rootElement) {
|
|
|
11428
11456
|
let diff = 0;
|
|
11429
11457
|
if (currentTop < targetTop) diff = -(targetTop - currentTop);
|
|
11430
11458
|
else if (currentBottom > targetBottom) diff = currentBottom - targetBottom;
|
|
11431
|
-
if (diff !== 0)
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11459
|
+
if (diff !== 0) {
|
|
11460
|
+
if (isBodyElement) defaultView.scrollBy(0, diff);
|
|
11461
|
+
else {
|
|
11462
|
+
const scrollTop = element.scrollTop;
|
|
11463
|
+
element.scrollTop += diff;
|
|
11464
|
+
const yOffset = element.scrollTop - scrollTop;
|
|
11465
|
+
currentTop -= yOffset;
|
|
11466
|
+
currentBottom -= yOffset;
|
|
11467
|
+
}
|
|
11438
11468
|
}
|
|
11439
11469
|
if (isBodyElement) break;
|
|
11440
11470
|
element = getParentElement(element);
|
|
@@ -12441,17 +12471,19 @@ function getStaticNodeConfig(klass) {
|
|
|
12441
12471
|
const nodeType = ownGetType && !(SYNTHESIZED_GET_TYPE in ownGetType) ? ownGetType.call(klass) : void 0;
|
|
12442
12472
|
let ownNodeConfig;
|
|
12443
12473
|
let ownNodeType = nodeType;
|
|
12444
|
-
if (nodeConfigRecord)
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
const
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12474
|
+
if (nodeConfigRecord) {
|
|
12475
|
+
if (nodeType) ownNodeConfig = nodeConfigRecord[nodeType];
|
|
12476
|
+
else {
|
|
12477
|
+
for (const [k, v] of Object.entries(nodeConfigRecord)) {
|
|
12478
|
+
ownNodeType = k;
|
|
12479
|
+
ownNodeConfig = v;
|
|
12480
|
+
}
|
|
12481
|
+
if (!ownNodeConfig) for (const symbolKey of Object.getOwnPropertySymbols(nodeConfigRecord)) {
|
|
12482
|
+
const symbolConfig = nodeConfigRecord[symbolKey];
|
|
12483
|
+
if (symbolConfig) {
|
|
12484
|
+
ownNodeConfig = symbolConfig;
|
|
12485
|
+
break;
|
|
12486
|
+
}
|
|
12455
12487
|
}
|
|
12456
12488
|
}
|
|
12457
12489
|
}
|
|
@@ -13696,9 +13728,10 @@ function $setPointFromCaret(point, caret) {
|
|
|
13696
13728
|
const { origin, direction } = caret;
|
|
13697
13729
|
const isNext = direction === "next";
|
|
13698
13730
|
if ($isTextPointCaret(caret)) point.set(origin.getKey(), caret.offset, "text");
|
|
13699
|
-
else if ($isSiblingCaret(caret))
|
|
13700
|
-
|
|
13701
|
-
|
|
13731
|
+
else if ($isSiblingCaret(caret)) {
|
|
13732
|
+
if ($isTextNode(origin)) point.set(origin.getKey(), $getTextNodeOffset(origin, direction), "text");
|
|
13733
|
+
else point.set(origin.getParentOrThrow().getKey(), origin.getIndexWithinParent() + (isNext ? 1 : 0), "element");
|
|
13734
|
+
} else {
|
|
13702
13735
|
if (!($isChildCaret(caret) && $isElementNode(origin))) formatDevErrorMessage(`$setPointFromCaret: exhaustiveness check`);
|
|
13703
13736
|
point.set(origin.getKey(), isNext ? 0 : origin.getChildrenSize(), "element");
|
|
13704
13737
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
const mod = await (process.env.NODE_ENV !== "production" ? import("./Lexical.dev-
|
|
9
|
+
const mod = await (process.env.NODE_ENV !== "production" ? import("./Lexical.dev-BSvx45_E.mjs") : import("./Lexical.prod-Bqwgb3ez.mjs"));
|
|
10
10
|
const $addUpdateTag = mod.$addUpdateTag;
|
|
11
11
|
const $applyNodeReplacement = mod.$applyNodeReplacement;
|
|
12
12
|
const $assumeActiveEditor = mod.$assumeActiveEditor;
|
|
@@ -50,8 +50,10 @@ const M = 6;
|
|
|
50
50
|
const A = a || l || d ? "\xA0" : "";
|
|
51
51
|
const D = "\n\n";
|
|
52
52
|
const F = i ? "\xA0" : A;
|
|
53
|
-
const
|
|
54
|
-
const
|
|
53
|
+
const P = "֑-߿יִ-﷽ﹰ-ﻼ";
|
|
54
|
+
const I = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--";
|
|
55
|
+
const L = new RegExp("^[^" + I + "]*[" + P + "]");
|
|
56
|
+
const K = new RegExp("^[^" + P + "]*[" + I + "]");
|
|
55
57
|
const z = {
|
|
56
58
|
bold: 1,
|
|
57
59
|
capitalize: 1024,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as configExtension, d as getPeerDependencyFromEditor, r as $getPeerDependency } from "./LexicalExtension.node-
|
|
2
|
-
import { $r as isHTMLElement, A as $getChildCaret, Br as getRootOwnerDocument, Ct as $isTextPointCaret, D as $getCaretRange, Er as findAllLexicalElementsDeep, G as $getSelection, Ir as getEditorPropertyFromDOMNode, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jr as isDOMShadowRoot, L as $getEditor, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, Ot as $parseSerializedNode, Pr as getDOMShadowRoots, Q as $getTextPointCaret, Rr as getParentElement, St as $isTextNode, Tr as defineExtension, W as $getRoot, X as $getSlotNames, Xt as COMMAND_PRIORITY_CRITICAL, _ as $createTabNode, _i as shallowMergeConfig, a as $caretRangeFromSelection, ai as isSelectionWithinEditor, bi as tokenizeRawText, c as $comparePointCaretNext, ft as $isNodeSelection, i as $caretFromPoint, in as COPY_COMMAND, j as $getChildCaretAtIndex, jr as getDOMSelection, lr as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, mt as $isRangeSelection, ot as $isElementNode, pi as safeCast, q as $getSlot, ri as isLexicalEditor, z as $getNearestNodeFromDOMNode, zt as $splitAtPointCaretNext } from "./Lexical.node-
|
|
3
|
-
import { c as CoreImportExtension, d as ImportSource, f as ImportSourceDataTransfer, h as contextValue, i as $generateNodesFromDOMViaExtension, n as $generateHtmlFromNodes, r as $generateNodesFromDOM } from "./LexicalHtml.node-
|
|
4
|
-
import { a as $sliceSelectedTextNodeContent } from "./LexicalSelection.node-
|
|
5
|
-
import { m as objectKlassEquals } from "./LexicalUtils.node-
|
|
1
|
+
import { c as configExtension, d as getPeerDependencyFromEditor, r as $getPeerDependency } from "./LexicalExtension.node-BwJt2LXV.mjs";
|
|
2
|
+
import { $r as isHTMLElement, A as $getChildCaret, Br as getRootOwnerDocument, Ct as $isTextPointCaret, D as $getCaretRange, Er as findAllLexicalElementsDeep, G as $getSelection, Ir as getEditorPropertyFromDOMNode, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jr as isDOMShadowRoot, L as $getEditor, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, Ot as $parseSerializedNode, Pr as getDOMShadowRoots, Q as $getTextPointCaret, Rr as getParentElement, St as $isTextNode, Tr as defineExtension, W as $getRoot, X as $getSlotNames, Xt as COMMAND_PRIORITY_CRITICAL, _ as $createTabNode, _i as shallowMergeConfig, a as $caretRangeFromSelection, ai as isSelectionWithinEditor, bi as tokenizeRawText, c as $comparePointCaretNext, ft as $isNodeSelection, i as $caretFromPoint, in as COPY_COMMAND, j as $getChildCaretAtIndex, jr as getDOMSelection, lr as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, mt as $isRangeSelection, ot as $isElementNode, pi as safeCast, q as $getSlot, ri as isLexicalEditor, z as $getNearestNodeFromDOMNode, zt as $splitAtPointCaretNext } from "./Lexical.node-kAh5GM2n.mjs";
|
|
3
|
+
import { c as CoreImportExtension, d as ImportSource, f as ImportSourceDataTransfer, h as contextValue, i as $generateNodesFromDOMViaExtension, n as $generateHtmlFromNodes, r as $generateNodesFromDOM } from "./LexicalHtml.node-BeuJMvvt.mjs";
|
|
4
|
+
import { a as $sliceSelectedTextNodeContent } from "./LexicalSelection.node-t2U46EF_.mjs";
|
|
5
|
+
import { m as objectKlassEquals } from "./LexicalUtils.node-Dl7OvqJV.mjs";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@lexical+clipboard@0.49.0_typescript@6.0.3/node_modules/@lexical/clipboard/dist/LexicalClipboard.dev.mjs
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -240,7 +240,8 @@ const $defaultLexicalEditorImporter = (data, selection, $next) => {
|
|
|
240
240
|
const $defaultHtmlImporter = (data, selection, $next) => {
|
|
241
241
|
try {
|
|
242
242
|
const editor = $getEditor();
|
|
243
|
-
|
|
243
|
+
const dom = new DOMParser().parseFromString(trustHTML(data), "text/html");
|
|
244
|
+
$insertGeneratedNodes(editor, $generateNodesFromDOM(editor, dom), selection);
|
|
244
245
|
return true;
|
|
245
246
|
} catch (error) {
|
|
246
247
|
console.error(error);
|
|
@@ -459,7 +460,8 @@ const ClipboardImportExtension = /* @__PURE__ */ defineExtension({
|
|
|
459
460
|
*/
|
|
460
461
|
const ClipboardDOMImportExtension = /* @__PURE__ */ defineExtension({
|
|
461
462
|
dependencies: [CoreImportExtension, /* @__PURE__ */ configExtension(ClipboardImportExtension, { $importMimeType: { "text/html": [(html, selection, _$next, dataTransfer) => {
|
|
462
|
-
const
|
|
463
|
+
const dom = new DOMParser().parseFromString(trustHTML(html), "text/html");
|
|
464
|
+
const nodes = $generateNodesFromDOMViaExtension(dom, { context: [contextValue(ImportSource, "paste"), contextValue(ImportSourceDataTransfer, dataTransfer)] });
|
|
463
465
|
$insertGeneratedNodes($getEditor(), nodes, selection);
|
|
464
466
|
return true;
|
|
465
467
|
}] } })],
|
|
@@ -657,13 +659,15 @@ function $updateSelectionOnInsert(selection) {
|
|
|
657
659
|
const anchor = selection.anchor;
|
|
658
660
|
let nodeToInspect = null;
|
|
659
661
|
const anchorCaret = $caretFromPoint(anchor, "previous");
|
|
660
|
-
if (anchorCaret)
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
662
|
+
if (anchorCaret) {
|
|
663
|
+
if ($isTextPointCaret(anchorCaret)) nodeToInspect = anchorCaret.origin;
|
|
664
|
+
else {
|
|
665
|
+
const range = $getCaretRange(anchorCaret, $getChildCaret($getRoot(), "next").getFlipped());
|
|
666
|
+
for (const caret of range) if ($isTextNode(caret.origin)) {
|
|
667
|
+
nodeToInspect = caret.origin;
|
|
668
|
+
break;
|
|
669
|
+
} else if ($isElementNode(caret.origin) && !caret.origin.isInline()) break;
|
|
670
|
+
}
|
|
667
671
|
}
|
|
668
672
|
if (nodeToInspect && $isTextNode(nodeToInspect)) {
|
|
669
673
|
const newFormat = nodeToInspect.getFormat();
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalClipboard.dev-
|
|
9
|
+
const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalClipboard.dev-BWU3KXIa.mjs") : import("./LexicalClipboard.prod-BtMuKNyT.mjs"));
|
|
10
10
|
mod.$exportMimeTypeFromSelection;
|
|
11
11
|
mod.$generateJSONFromSelectedNodes;
|
|
12
12
|
mod.$generateNodesFromSerializedNodes;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as configExtension, d as getPeerDependencyFromEditor, r as $getPeerDependency } from "./LexicalExtension.node-
|
|
2
|
-
import { $r as isHTMLElement, A as $getChildCaret, Br as getRootOwnerDocument, Ct as $isTextPointCaret, D as $getCaretRange, Er as findAllLexicalElementsDeep, G as $getSelection, Ir as getEditorPropertyFromDOMNode, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jr as isDOMShadowRoot, L as $getEditor, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, Ot as $parseSerializedNode, Pr as getDOMShadowRoots, Q as $getTextPointCaret, Rr as getParentElement, St as $isTextNode, Tr as defineExtension, W as $getRoot, X as $getSlotNames, Xt as COMMAND_PRIORITY_CRITICAL, _ as $createTabNode, _i as shallowMergeConfig, a as $caretRangeFromSelection, ai as isSelectionWithinEditor, bi as tokenizeRawText, c as $comparePointCaretNext, ft as $isNodeSelection, i as $caretFromPoint, in as COPY_COMMAND, j as $getChildCaretAtIndex, jr as getDOMSelection, lr as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, mt as $isRangeSelection, ot as $isElementNode, pi as safeCast, q as $getSlot, ri as isLexicalEditor, z as $getNearestNodeFromDOMNode, zt as $splitAtPointCaretNext } from "./Lexical.node-
|
|
3
|
-
import { c as CoreImportExtension, d as ImportSource, f as ImportSourceDataTransfer, h as contextValue, i as $generateNodesFromDOMViaExtension, n as $generateHtmlFromNodes, r as $generateNodesFromDOM } from "./LexicalHtml.node-
|
|
4
|
-
import { a as $sliceSelectedTextNodeContent } from "./LexicalSelection.node-
|
|
5
|
-
import { m as objectKlassEquals } from "./LexicalUtils.node-
|
|
1
|
+
import { c as configExtension, d as getPeerDependencyFromEditor, r as $getPeerDependency } from "./LexicalExtension.node-BwJt2LXV.mjs";
|
|
2
|
+
import { $r as isHTMLElement, A as $getChildCaret, Br as getRootOwnerDocument, Ct as $isTextPointCaret, D as $getCaretRange, Er as findAllLexicalElementsDeep, G as $getSelection, Ir as getEditorPropertyFromDOMNode, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jr as isDOMShadowRoot, L as $getEditor, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, Ot as $parseSerializedNode, Pr as getDOMShadowRoots, Q as $getTextPointCaret, Rr as getParentElement, St as $isTextNode, Tr as defineExtension, W as $getRoot, X as $getSlotNames, Xt as COMMAND_PRIORITY_CRITICAL, _ as $createTabNode, _i as shallowMergeConfig, a as $caretRangeFromSelection, ai as isSelectionWithinEditor, bi as tokenizeRawText, c as $comparePointCaretNext, ft as $isNodeSelection, i as $caretFromPoint, in as COPY_COMMAND, j as $getChildCaretAtIndex, jr as getDOMSelection, lr as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, mt as $isRangeSelection, ot as $isElementNode, pi as safeCast, q as $getSlot, ri as isLexicalEditor, z as $getNearestNodeFromDOMNode, zt as $splitAtPointCaretNext } from "./Lexical.node-kAh5GM2n.mjs";
|
|
3
|
+
import { c as CoreImportExtension, d as ImportSource, f as ImportSourceDataTransfer, h as contextValue, i as $generateNodesFromDOMViaExtension, n as $generateHtmlFromNodes, r as $generateNodesFromDOM } from "./LexicalHtml.node-BeuJMvvt.mjs";
|
|
4
|
+
import { a as $sliceSelectedTextNodeContent } from "./LexicalSelection.node-t2U46EF_.mjs";
|
|
5
|
+
import { m as objectKlassEquals } from "./LexicalUtils.node-Dl7OvqJV.mjs";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@lexical+clipboard@0.49.0_typescript@6.0.3/node_modules/@lexical/clipboard/dist/LexicalClipboard.prod.mjs
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -33,7 +33,7 @@ function et(r, i, l = null) {
|
|
|
33
33
|
if (null !== e && l.contains(e)) {
|
|
34
34
|
const t = function(t, e, n, o) {
|
|
35
35
|
const r = o.createRange(), i = (t) => e < t.top ? t.top - e : e > t.bottom ? e - t.bottom : 0, l = (e) => t < e.left ? e.left - t : t > e.right ? t - e.right : 0, c = o.createTreeWalker(n, NodeFilter.SHOW_TEXT);
|
|
36
|
-
let s = null, u =
|
|
36
|
+
let s = null, u = 1 / 0, a = 1 / 0;
|
|
37
37
|
for (let t = c.nextNode(); t; t = c.nextNode()) {
|
|
38
38
|
r.selectNodeContents(t);
|
|
39
39
|
for (const e of r.getClientRects()) {
|
|
@@ -42,7 +42,7 @@ function et(r, i, l = null) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
if (null === s) return null;
|
|
45
|
-
let f = 0, p =
|
|
45
|
+
let f = 0, p = 1 / 0, d = 1 / 0;
|
|
46
46
|
for (let e = 0; e <= s.length; e++) {
|
|
47
47
|
r.setStart(s, e), r.collapse(!0);
|
|
48
48
|
const n = r.getBoundingClientRect(), o = i(n), l = Math.abs(t - n.left);
|
|
@@ -113,8 +113,8 @@ const lt = {
|
|
|
113
113
|
}],
|
|
114
114
|
"text/html": [(t, e, n) => {
|
|
115
115
|
try {
|
|
116
|
-
const n = $getEditor();
|
|
117
|
-
return Mt(n, $generateNodesFromDOM(n,
|
|
116
|
+
const n = $getEditor(), o = new DOMParser().parseFromString(rt(t), "text/html");
|
|
117
|
+
return Mt(n, $generateNodesFromDOM(n, o), e), !0;
|
|
118
118
|
} catch (t) {
|
|
119
119
|
return console.error(t), n();
|
|
120
120
|
}
|
|
@@ -177,7 +177,7 @@ const at = /* @__PURE__ */ defineExtension({
|
|
|
177
177
|
});
|
|
178
178
|
const ft = /* @__PURE__ */ defineExtension({
|
|
179
179
|
dependencies: [CoreImportExtension, /* @__PURE__ */ configExtension(at, { $importMimeType: { "text/html": [(t, e, n, o) => {
|
|
180
|
-
const
|
|
180
|
+
const r = new DOMParser().parseFromString(rt(t), "text/html"), l = $generateNodesFromDOMViaExtension(r, { context: [contextValue(ImportSource, "paste"), contextValue(ImportSourceDataTransfer, o)] });
|
|
181
181
|
return Mt($getEditor(), l, e), !0;
|
|
182
182
|
}] } })],
|
|
183
183
|
name: "@lexical/clipboard/DOMImport"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as getPeerDependencyFromEditor, f as namedSignals, l as effect } from "./LexicalExtension.node-
|
|
2
|
-
import { $r as isHTMLElement, $t as COMMAND_PRIORITY_LOW, C as $generateNodesFromRawText, D as $getCaretRange, Et as $normalizeCaret, G as $getSelection, Gn as KEY_ARROW_RIGHT_COMMAND, I as $getDocument, It as $setSelectionFromCaretRange, K as $getSiblingCaret, Kn as KEY_ARROW_UP_COMMAND, Kr as isDOMDocumentNode, L as $getEditor, O as $getCaretRangeInDirection, Q as $getTextPointCaret, Qn as KEY_TAB_COMMAND, Sn as INDENT_CONTENT_COMMAND, St as $isTextNode, Tn as INSERT_TAB_COMMAND, Tr as defineExtension, Un as KEY_ARROW_DOWN_COMMAND, Ur as getTextDirection, Wn as KEY_ARROW_LEFT_COMMAND, Yn as KEY_ENTER_COMMAND, Yr as isDOMTextNode, _ as $createTabNode, _r as TextNode, bi as tokenizeRawText, br as configExtension, ci as mergeRegister, d as $createLineBreakNode, dt as $isLineBreakNode, er as MOVE_TO_END, fi as removeClassNamesFromElement, gr as TabNode, hn as ElementNode, m as $createPoint, mi as setDOMStyleFromCSS, mt as $isRangeSelection, n as $applyNodeReplacement, nr as OUTDENT_CONTENT_COMMAND, ot as $isElementNode, p as $createParagraphNode, pi as safeCast, tr as MOVE_TO_START, tt as $insertNodes, u as $create, vr as addClassNamesToElement, xt as $isTabNode } from "./Lexical.node-
|
|
3
|
-
import { _ as defineOverlayRules, c as CoreImportExtension, g as defineImportRule, l as DOMImportExtension, u as ImportOverlays, y as sel } from "./LexicalHtml.node-
|
|
4
|
-
import { l as $onEscapeDown, u as $onEscapeUp } from "./LexicalUtils.node-
|
|
1
|
+
import { d as getPeerDependencyFromEditor, f as namedSignals, l as effect } from "./LexicalExtension.node-BwJt2LXV.mjs";
|
|
2
|
+
import { $r as isHTMLElement, $t as COMMAND_PRIORITY_LOW, C as $generateNodesFromRawText, D as $getCaretRange, Et as $normalizeCaret, G as $getSelection, Gn as KEY_ARROW_RIGHT_COMMAND, I as $getDocument, It as $setSelectionFromCaretRange, K as $getSiblingCaret, Kn as KEY_ARROW_UP_COMMAND, Kr as isDOMDocumentNode, L as $getEditor, O as $getCaretRangeInDirection, Q as $getTextPointCaret, Qn as KEY_TAB_COMMAND, Sn as INDENT_CONTENT_COMMAND, St as $isTextNode, Tn as INSERT_TAB_COMMAND, Tr as defineExtension, Un as KEY_ARROW_DOWN_COMMAND, Ur as getTextDirection, Wn as KEY_ARROW_LEFT_COMMAND, Yn as KEY_ENTER_COMMAND, Yr as isDOMTextNode, _ as $createTabNode, _r as TextNode, bi as tokenizeRawText, br as configExtension, ci as mergeRegister, d as $createLineBreakNode, dt as $isLineBreakNode, er as MOVE_TO_END, fi as removeClassNamesFromElement, gr as TabNode, hn as ElementNode, m as $createPoint, mi as setDOMStyleFromCSS, mt as $isRangeSelection, n as $applyNodeReplacement, nr as OUTDENT_CONTENT_COMMAND, ot as $isElementNode, p as $createParagraphNode, pi as safeCast, tr as MOVE_TO_START, tt as $insertNodes, u as $create, vr as addClassNamesToElement, xt as $isTabNode } from "./Lexical.node-kAh5GM2n.mjs";
|
|
3
|
+
import { _ as defineOverlayRules, c as CoreImportExtension, g as defineImportRule, l as DOMImportExtension, u as ImportOverlays, y as sel } from "./LexicalHtml.node-BeuJMvvt.mjs";
|
|
4
|
+
import { l as $onEscapeDown, u as $onEscapeUp } from "./LexicalUtils.node-Dl7OvqJV.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@lexical+code-core@0.49.0_typescript@6.0.3/node_modules/@lexical/code-core/dist/LexicalCodeCore.dev.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -302,10 +302,11 @@ var CodeNode = class extends ElementNode {
|
|
|
302
302
|
if (language !== prevLanguage) dom.setAttribute(LANGUAGE_DATA_ATTRIBUTE$1, language);
|
|
303
303
|
} else if (prevLanguage) dom.removeAttribute(LANGUAGE_DATA_ATTRIBUTE$1);
|
|
304
304
|
const isSyntaxHighlightSupported = this.__isSyntaxHighlightSupported;
|
|
305
|
-
if (prevNode.__isSyntaxHighlightSupported && prevLanguage)
|
|
306
|
-
if (
|
|
307
|
-
|
|
308
|
-
|
|
305
|
+
if (prevNode.__isSyntaxHighlightSupported && prevLanguage) {
|
|
306
|
+
if (isSyntaxHighlightSupported && language) {
|
|
307
|
+
if (language !== prevLanguage) dom.setAttribute(HIGHLIGHT_LANGUAGE_DATA_ATTRIBUTE, language);
|
|
308
|
+
} else dom.removeAttribute(HIGHLIGHT_LANGUAGE_DATA_ATTRIBUTE);
|
|
309
|
+
} else if (isSyntaxHighlightSupported && language) dom.setAttribute(HIGHLIGHT_LANGUAGE_DATA_ATTRIBUTE, language);
|
|
309
310
|
const theme = this.__theme;
|
|
310
311
|
const prevTheme = prevNode.__theme;
|
|
311
312
|
if (theme) {
|
|
@@ -508,7 +509,8 @@ var CodeHighlightNode = class extends TextNode {
|
|
|
508
509
|
}
|
|
509
510
|
createDOM(config) {
|
|
510
511
|
const element = super.createDOM(config);
|
|
511
|
-
|
|
512
|
+
const className = getHighlightThemeClass(config.theme, this.__highlightType);
|
|
513
|
+
addClassNamesToElement(element, className);
|
|
512
514
|
return element;
|
|
513
515
|
}
|
|
514
516
|
updateDOM(prevNode, dom, config) {
|
|
@@ -642,19 +644,20 @@ function splitMonospaceWrapperLines(el) {
|
|
|
642
644
|
hasAcc = false;
|
|
643
645
|
}
|
|
644
646
|
};
|
|
645
|
-
for (const child of Array.from(el.childNodes)) if (isHTMLElement(child))
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
647
|
+
for (const child of Array.from(el.childNodes)) if (isHTMLElement(child)) {
|
|
648
|
+
if (child.tagName === "DIV") {
|
|
649
|
+
flush();
|
|
650
|
+
lines.push(child.textContent || "");
|
|
651
|
+
hasBlockChild = true;
|
|
652
|
+
} else if (child.tagName === "BR") {
|
|
653
|
+
flush();
|
|
654
|
+
lines.push("");
|
|
655
|
+
hasBlockChild = true;
|
|
656
|
+
} else {
|
|
657
|
+
acc += child.textContent || "";
|
|
658
|
+
hasAcc = true;
|
|
659
|
+
}
|
|
660
|
+
} else if (isDOMTextNode(child)) {
|
|
658
661
|
const t = child.textContent || "";
|
|
659
662
|
if (t.length > 0) {
|
|
660
663
|
acc += t;
|
|
@@ -688,7 +691,13 @@ function looksLikeVscodePaste(root) {
|
|
|
688
691
|
}
|
|
689
692
|
return false;
|
|
690
693
|
}
|
|
691
|
-
|
|
694
|
+
/**
|
|
695
|
+
* Match a monospace+pre `<div>` whose direct children include block
|
|
696
|
+
* (`<div>` / `<br>`) elements — the Chrome shape, one outer wrapper
|
|
697
|
+
* around per-line `<div>`s and `<br>`s. Emits a single CodeNode whose
|
|
698
|
+
* text is the wrapper's lines joined by `\n`.
|
|
699
|
+
*/
|
|
700
|
+
const VscodeWrapperRule = /* @__PURE__ */ defineImportRule({
|
|
692
701
|
$import: (_ctx, el, $next) => {
|
|
693
702
|
if (!isMonospacePreElement(el) || isMonospaceDescendant(el)) return $next();
|
|
694
703
|
const lines = splitMonospaceWrapperLines(el);
|
|
@@ -697,7 +706,15 @@ const VscodeCodePasteOverlay = /* @__PURE__ */ defineOverlayRules([/* @__PURE__
|
|
|
697
706
|
},
|
|
698
707
|
match: sel.tag("div"),
|
|
699
708
|
name: "@lexical/code/vscode-wrapper"
|
|
700
|
-
})
|
|
709
|
+
});
|
|
710
|
+
/**
|
|
711
|
+
* Match the first of a run of consecutive monospace+pre `<div>` /
|
|
712
|
+
* `<br>` siblings (the Safari shape) and emit one CodeNode for the
|
|
713
|
+
* whole run. When the framework's per-child dispatch lands on a
|
|
714
|
+
* subsequent sibling in the same run, the prev-sibling check below
|
|
715
|
+
* returns `[]` so the run is only emitted once.
|
|
716
|
+
*/
|
|
717
|
+
const VscodeLineRunRule = /* @__PURE__ */ defineImportRule({
|
|
701
718
|
$import: (_ctx, el, $next) => {
|
|
702
719
|
if (!isMonospacePreElement(el) || isMonospaceDescendant(el)) return $next();
|
|
703
720
|
const prev = el.previousElementSibling;
|
|
@@ -713,7 +730,8 @@ const VscodeCodePasteOverlay = /* @__PURE__ */ defineOverlayRules([/* @__PURE__
|
|
|
713
730
|
},
|
|
714
731
|
match: sel.tag("div", "br"),
|
|
715
732
|
name: "@lexical/code/vscode-line-run"
|
|
716
|
-
})
|
|
733
|
+
});
|
|
734
|
+
const VscodeCodePasteOverlay = /* @__PURE__ */ defineOverlayRules([VscodeWrapperRule, VscodeLineRunRule]);
|
|
717
735
|
/**
|
|
718
736
|
* VS Code → browser code-block pastes ship the block as either:
|
|
719
737
|
*
|