@linloir/limr 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.en.md +123 -0
- package/README.md +122 -2
- package/benchmarks/results/browser.json +237 -0
- package/benchmarks/results/node.json +75 -0
- package/benchmarks/results/selection.json +172 -0
- package/dist/THIRD_PARTY_LICENSES.txt +117 -0
- package/dist/base.css +454 -0
- package/dist/chunk-3ILUZKDB.js +3130 -0
- package/dist/chunk-3ILUZKDB.js.map +1 -0
- package/dist/chunk-6N6TFHEN.js +83 -0
- package/dist/chunk-6N6TFHEN.js.map +1 -0
- package/dist/chunk-N77VD2YR.js +1238 -0
- package/dist/chunk-N77VD2YR.js.map +1 -0
- package/dist/chunk-TTISGBST.js +478 -0
- package/dist/chunk-TTISGBST.js.map +1 -0
- package/dist/chunk-V2OG4Y3F.js +1 -0
- package/dist/chunk-V2OG4Y3F.js.map +1 -0
- package/dist/core/index.d.ts +57 -0
- package/dist/core/index.js +39 -0
- package/dist/core/index.js.map +1 -0
- package/dist/engine-43u8B4yt.d.ts +172 -0
- package/dist/extensions/index.d.ts +130 -0
- package/dist/extensions/index.js +50 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/fonts/LICENSE.txt +93 -0
- package/dist/fonts/manifest.json +2204 -0
- package/dist/fonts/maple-7.9-bold-005-5530d8c1d6.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-00f-1179d800a7.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-010-9974a942b1.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-011-9b9230baf2.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-012-c2545292b1.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-013-877b19fe05.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-014-6acf4a4e92.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-015-c889146da3.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-018-419ad5f31f.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-027-dd414483da.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-028-263744fbc7.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-029-ae3a163d8b.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-02a-515f0a82c2.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-02b-0823c5133d.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-02c-296fd5db38.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-02d-0bb4734363.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-02e-25415fed50.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-02f-19ed79a84e.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-030-21962a0327.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-031-d216fc0d68.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-032-d90ba34901.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-033-55ea37ea00.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-034-bc8649f808.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-035-03604fe40b.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-036-44fc7f77b2.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-037-8a1440f155.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-038-c65a618d5c.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-039-be05db966d.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-03a-ca3a10002d.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-03b-067b32e10b.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-03c-4da4f84530.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-03d-f0fe6a68c8.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-03e-0e97f89433.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-03f-3289a5e3bc.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-040-232dcd0d7b.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-041-e25e9a9c41.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-042-d64a2b1824.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-043-2d01cf5e52.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-044-0ab808b5f1.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-045-e41dc814b4.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-046-d5fe26344d.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-047-f322ded671.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-048-0cdcf7257f.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-049-aa280ca08a.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-04a-f51ad4d92c.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-04b-4e8c6fa3ee.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-04c-9bfdf4d743.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-04d-83ac1f5bb3.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-04e-bcec89804a.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-04f-d31e83b6ce.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-070-8a3b0fdf98.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-071-5bee0a62c4.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-072-97d891eee4.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-073-4d4c36aca0.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-074-6d3cc01e90.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-075-eab42ad657.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-076-2b1f5c4a42.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-077-1db0d50873.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-078-bc6994a28f.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-079-ad6c1757ce.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-07a-d08ed2b87d.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-07f-2f4af46cc6.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-0fc-42ed90884c.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-780-261fac1b24.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-781-377319a91b.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-782-3106f0be62.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-783-74fbfa8648.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-784-8570270664.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-785-cee8de1ded.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-786-5ab5ff7149.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-787-844b4c4373.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-788-01731198ab.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-789-f4c75fa806.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-78a-4370321ec6.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-78b-5cd412b56f.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-78c-f88e331085.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-78d-1b9b77f6e8.woff2 +0 -0
- package/dist/fonts/maple-7.9-bold-latin-3b4b2831f3.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-005-d59fef8639.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-00f-1bbda7af69.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-010-5cdd4b46a7.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-011-0d1f1ae687.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-012-4ceb000b2e.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-013-ad0a4f4313.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-014-94d54b71b3.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-015-7aede280da.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-018-f21221b1c2.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-027-d23d0e80a4.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-028-23bd6f24df.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-029-c481c0ad50.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-02a-1c134be68e.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-02b-3feb29ecfd.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-02c-de8cc5a063.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-02d-ea25c21fad.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-02e-e68d6bd335.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-02f-c88d1e92dc.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-030-f26fefe87e.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-031-f2aa1b8e22.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-032-c4fafc4aa6.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-033-288a1639ca.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-034-7c982125bc.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-035-fd1575dea2.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-036-f6bf406353.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-037-8ac1466916.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-038-e9f7fed6a6.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-039-6f90d42310.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-03a-30c9409a7e.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-03b-4f1741e9e9.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-03c-6551c74e78.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-03d-c8e2b07106.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-03e-c3e98613d4.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-03f-f1c580bad4.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-040-32e8260076.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-041-39805a0ed7.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-042-13b4d84cd3.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-043-d85780d0bd.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-044-1b5eb624d7.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-045-ad0b4f8762.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-046-9966021b3a.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-047-100d4f6f4e.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-048-a0a1e8b29c.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-049-0806f9b3cc.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-04a-28fdef78b3.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-04b-6e93ef0086.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-04c-50b8da6282.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-04d-f93277723d.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-04e-72e2644690.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-04f-4f234f1802.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-070-a3658a8a23.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-071-4987e49732.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-072-e587fa72cd.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-073-2aca01fdf6.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-074-ae89f99a60.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-075-5a77191665.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-076-4c54a87277.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-077-e47dce25ee.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-078-b0b720dab6.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-079-316ee96f6a.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-07a-b10ccb8107.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-07d-5667cb3be1.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-07f-2ac6735ff8.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-0fc-52171ca01e.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-780-3c090c5f89.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-781-ca4077b4fa.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-782-42c3d52206.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-783-d72840dd37.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-784-b9ca097e50.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-785-b81dec6af9.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-786-76c266f6f5.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-787-403bd73766.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-788-71a4b8c2c5.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-789-94527f3fa4.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-78a-81918568b8.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-78b-d0302b4bfe.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-78c-e864792049.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-78d-105ff69bf4.woff2 +0 -0
- package/dist/fonts/maple-7.9-bolditalic-latin-96412d165b.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-005-23b09473f8.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-00f-e9bf4dd93c.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-010-22933d6d77.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-011-71b0157ddc.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-012-b751ab3752.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-013-530b1d3f8b.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-014-0e842f6749.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-015-642211b03a.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-018-0c5b0001c6.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-027-9a09afbbb1.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-028-93fea67326.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-029-7d7627d4cc.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-02a-88e76d051b.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-02b-7d9219748b.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-02c-049df19d84.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-02d-663fc73c6e.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-02e-a98ed33998.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-02f-8ef9d93d09.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-030-74885d994d.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-031-4cf66c5d65.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-032-a608b7aed4.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-033-2978f66e55.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-034-38f7a0bf87.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-035-5cc45cd3b7.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-036-ca92d327e5.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-037-f887681c7d.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-038-06150b88f8.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-039-761da333b7.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-03a-1408ddaf2c.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-03b-1542b3b67c.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-03c-479f2f5011.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-03d-0f10590b11.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-03e-8b93e0ee0e.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-03f-2bd8815e3e.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-040-b85023679a.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-041-eb881b7b92.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-042-01490a139e.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-043-ffb21b6c4c.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-044-05cd1a1b14.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-045-1270935363.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-046-857077eab1.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-047-ca57774cc3.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-048-20969d6307.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-049-4066aa1a18.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-04a-1ed360d580.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-04b-2eba62d76b.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-04c-2f4effc460.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-04d-d858c0a9c1.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-04e-a19eb0289f.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-04f-8addde15f2.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-070-f0bd641f1c.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-071-e6ac564431.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-072-e6fea65bca.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-073-71621c00dc.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-074-4bd488962a.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-075-2838d95bd6.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-076-94e02ecc03.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-077-32c536ab6b.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-078-18256447bd.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-079-7a735e61cf.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-07a-2b57a6a905.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-07d-8ba1bbfb50.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-07f-0240d80c69.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-0fc-e5b20a692e.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-780-093cc90a9b.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-781-f6ec357f6d.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-782-5ca2ef4ddd.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-783-7450baabee.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-784-14a93cc4bd.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-785-d62fb8b4d7.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-786-1d2959dc83.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-787-70ae947136.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-788-cf1f156ebf.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-789-f0b79f9680.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-78a-5a53fd7870.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-78b-40be093bfd.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-78c-3b11646f8e.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-78d-b13ed8c48b.woff2 +0 -0
- package/dist/fonts/maple-7.9-italic-latin-befeb2b610.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-005-90bff107ac.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-00f-001e503e53.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-010-374da1ebb4.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-011-8f91fcc9e7.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-012-e4ec3016ef.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-013-e779e13a12.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-014-6b833ad501.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-015-4e058c4c42.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-018-6f776bc19b.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-027-92c0be3439.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-028-154c8c3039.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-029-9d88470aca.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-02a-7a94cb26f2.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-02b-1725b841c2.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-02c-e080c435d6.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-02d-a6461c4708.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-02e-2e55d9b957.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-02f-858a76fa1f.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-030-bbbe80f8ad.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-031-cafc1258ad.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-032-0ca83ecceb.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-033-6cb995f2e7.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-034-5877222be6.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-035-988d8f2d26.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-036-e91853e3ca.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-037-3eed60f359.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-038-5681f42a4a.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-039-07036fe444.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-03a-5495eead93.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-03b-d07b1d6c1e.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-03c-6291400ee0.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-03d-3787a51772.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-03e-ce4d945844.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-03f-95e98b329c.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-040-693b769fe8.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-041-7b436d2c09.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-042-9ad884cd73.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-043-372231e8e2.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-044-9922b540b1.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-045-8a88a91c22.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-046-82859ede10.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-047-6532babd62.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-048-abfdc5d7ce.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-049-adb7fa9ed3.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-04a-f3f794b1cb.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-04b-715211b8dd.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-04c-c6f978d10d.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-04d-61019a1c8f.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-04e-806d6efe85.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-04f-99d19aa8db.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-070-e94ba9445d.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-071-057314b533.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-072-a7699beb84.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-073-ebe1bd9ef4.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-074-722db38100.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-075-150ff7187b.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-076-c14595e715.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-077-6c88302a32.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-078-549b294c78.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-079-5131c42759.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-07a-c0dad221b5.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-07f-5cf5ebe065.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-0fc-b644c0c6d9.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-780-c6000d472a.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-781-86409ab7f7.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-782-9cd950637c.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-783-105c4d02df.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-784-00c042af97.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-785-022568d0b8.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-786-90b6f3aef5.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-787-e2888596c9.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-788-3416e1fda3.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-789-9ffc917b0b.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-78a-4a921d07f6.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-78b-9d71c5327b.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-78c-9ec048314b.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-78d-46a2ebd113.woff2 +0 -0
- package/dist/fonts/maple-7.9-regular-latin-59c752ba1d.woff2 +0 -0
- package/dist/fonts/maple.css +315 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +136 -0
- package/dist/index.js.map +1 -0
- package/dist/math-renderer-L6DOH4RX.js +21 -0
- package/dist/math-renderer-L6DOH4RX.js.map +1 -0
- package/dist/math.css +1 -0
- package/dist/react/index.d.ts +113 -0
- package/dist/react/index.js +59 -0
- package/dist/react/index.js.map +1 -0
- package/dist/styles.css +454 -0
- package/dist/translations-DHnYMg4h.d.ts +318 -0
- package/docs/README.md +13 -0
- package/docs/api.md +8 -0
- package/docs/assets/rendered.svg +9 -0
- package/docs/assets/source.svg +9 -0
- package/docs/en/README.md +26 -0
- package/docs/en/ai-skills.md +57 -0
- package/docs/en/annotations.md +84 -0
- package/docs/en/api.md +107 -0
- package/docs/en/architecture.md +33 -0
- package/docs/en/extensions.md +159 -0
- package/docs/en/getting-started.md +67 -0
- package/docs/en/integration.md +130 -0
- package/docs/en/modules.md +80 -0
- package/docs/en/performance.md +53 -0
- package/docs/en/plugin-packages.md +68 -0
- package/docs/en/styles.md +80 -0
- package/docs/en/syntax.md +352 -0
- package/docs/extensions.md +8 -0
- package/docs/implementation.md +8 -0
- package/docs/performance.md +8 -0
- package/docs/screenshots/blocks.png +0 -0
- package/docs/screenshots/dark.png +0 -0
- package/docs/screenshots/desktop.png +0 -0
- package/docs/screenshots/plugin-mobile.png +0 -0
- package/docs/styles.md +8 -0
- package/docs/visual-upgrade.md +8 -0
- package/docs/zh-CN/README.md +26 -0
- package/docs/zh-CN/ai-skills.md +57 -0
- package/docs/zh-CN/annotations.md +84 -0
- package/docs/zh-CN/api.md +107 -0
- package/docs/zh-CN/architecture.md +33 -0
- package/docs/zh-CN/extensions.md +159 -0
- package/docs/zh-CN/getting-started.md +67 -0
- package/docs/zh-CN/integration.md +130 -0
- package/docs/zh-CN/modules.md +80 -0
- package/docs/zh-CN/performance.md +53 -0
- package/docs/zh-CN/plugin-packages.md +68 -0
- package/docs/zh-CN/styles.md +80 -0
- package/docs/zh-CN/syntax.md +352 -0
- package/examples/assistant.tsx +52 -0
- package/examples/notes.tsx +80 -0
- package/examples/packages/paper-theme/index.css +25 -0
- package/examples/packages/paper-theme/package.json +7 -0
- package/examples/packages/reading-tools/index.d.ts +2 -0
- package/examples/packages/reading-tools/index.js +25 -0
- package/examples/packages/reading-tools/package.json +16 -0
- package/package.json +114 -3
- package/skills/limr-plugin-development/SKILL.md +22 -0
- package/skills/limr-plugin-development/agents/openai.yaml +4 -0
- package/skills/limr-plugin-development/assets/plugin-template/README.md +30 -0
- package/skills/limr-plugin-development/assets/plugin-template/package.json +36 -0
- package/skills/limr-plugin-development/assets/plugin-template/src/index.tsx +50 -0
- package/skills/limr-plugin-development/assets/plugin-template/src/styles.css +9 -0
- package/skills/limr-plugin-development/assets/plugin-template/tsconfig.json +20 -0
- package/skills/limr-plugin-development/assets/plugin-template/tsup.config.ts +8 -0
- package/skills/limr-plugin-development/references/contract.md +45 -0
- package/skills/limr-use/SKILL.md +23 -0
- package/skills/limr-use/agents/openai.yaml +4 -0
- package/skills/limr-use/references/integration.md +41 -0
- package/skills/limr-use/references/syntax.md +17 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Styles and fonts
|
|
2
|
+
|
|
3
|
+
> Reading note: this page uses LiMR syntax and interactive examples. Some content cannot be fully displayed by ordinary Markdown viewers such as GitHub; visit the [GitHub Pages documentation](https://linloir.github.io/LiMR/#/docs/en/styles) for the best reading experience.
|
|
4
|
+
|
|
5
|
+
[Documentation](README.md) · [简体中文](../zh-CN/styles.md)
|
|
6
|
+
|
|
7
|
+
## Base styles and themes
|
|
8
|
+
|
|
9
|
+
Default rules live in @layer limr, so ordinary host CSS can override them. Choose styles.css (with Maple) or styles/base.css (without loading Maple), and add math.css for formulas.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { Reader } from '@linloir/limr';
|
|
13
|
+
import '@linloir/limr/styles/base.css';
|
|
14
|
+
import './paper.css';
|
|
15
|
+
|
|
16
|
+
export function Paper({ source }: { source: string }) {
|
|
17
|
+
return <Reader source={source} appearance="paper" theme="auto" />;
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Example paper.css:
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
[data-limr-appearance='paper'] {
|
|
25
|
+
--limr-font-text: Georgia, 'Noto Serif SC', serif;
|
|
26
|
+
--limr-content-width: 820px;
|
|
27
|
+
--limr-accent: #8b6548;
|
|
28
|
+
}
|
|
29
|
+
[data-limr-appearance='paper'][data-limr-theme='dark'] {
|
|
30
|
+
--limr-accent: #d1ab84;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
appearance propagates to portalled controls. Do not rely only on .limr-reader ancestry. theme: auto selects built-in colors with the system preference; custom dark overrides for auto also need a prefers-color-scheme media rule. See the standalone [paper-theme](../../examples/packages/paper-theme/index.css) example.
|
|
35
|
+
|
|
36
|
+
## Common variables
|
|
37
|
+
|
|
38
|
+
| Variable | Purpose |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| --limr-font-text / --limr-font-code | Body / code fonts |
|
|
41
|
+
| --limr-font-size / --limr-line-height | Base typography |
|
|
42
|
+
| --limr-font-features | Defaults to 'palt' 1 for proportional punctuation where supported |
|
|
43
|
+
| --limr-emphasis-spacing / --limr-list-item-gap | Trailing emphasis / list spacing |
|
|
44
|
+
| --limr-text / --limr-heading / --limr-secondary / --limr-muted | Text hierarchy |
|
|
45
|
+
| --limr-background / --limr-surface / --limr-border | Backgrounds and borders |
|
|
46
|
+
| --limr-link / --limr-accent / --limr-selection | Links, active state, selection |
|
|
47
|
+
| --limr-content-width / --limr-reader-width | Body / overall width; default 900px / 1800px |
|
|
48
|
+
| --limr-toc-width / --limr-sidebar-width / --limr-column-gap | Side column widths and gaps |
|
|
49
|
+
| --limr-sticky-top | Sticky offset |
|
|
50
|
+
| --limr-reader-bottom-space / --limr-reader-min-height | Short-document height and bottom space |
|
|
51
|
+
| --limr-sidebar-padding-inline / --limr-sidebar-reference-gap | Shared padding (10px) and reference separation (1px) |
|
|
52
|
+
| --limr-overlay-duration / --limr-overlay-morph-duration | Enter/exit (560ms), preview/expanded morph (480ms) |
|
|
53
|
+
| --limr-overlay-z / --limr-toolbar-z | Floating control stacking |
|
|
54
|
+
| --limr-overflow-fade-size | Overflow fade, default 24px; 0px disables |
|
|
55
|
+
| --limr-toolbar-panel-max-height | Maximum toolbar panel height |
|
|
56
|
+
| --limr-tool-icon-size / --limr-mark-size | Toolbar icons / inline markers |
|
|
57
|
+
|
|
58
|
+
--limr-toolbar-available-height, --limr-toolbar-panel-height, and --limr-toc-available-height are runtime measurements, not theme inputs. AnnotationType.sidebar usually supplies local card colors; see [extensions](extensions.md).
|
|
59
|
+
|
|
60
|
+
## Fonts and package size
|
|
61
|
+
|
|
62
|
+
Local WOFF2 subsets of Maple Mono NF CN v7.9 ship in the package under the derivative name LiMR Maple Mono NF CN, with the OFL license. unicode-range and font-display: swap limit runtime requests, but the complete font assets still occupy about 31MB. base.css avoids browser loading, not npm installation size.
|
|
63
|
+
|
|
64
|
+
Body text does not automatically load Chinese fonts. Use system fallbacks, self-hosted fonts, or a host-chosen service. The Playground's Noto Serif SC belongs to the demo. No font should be assumed to cover every script.
|
|
65
|
+
|
|
66
|
+
Default font/math styles do not require a third-party CDN. Hosts can apply long-lived immutable caching to hashed font URLs; the library cannot set server HTTP headers. Remote image/video/plugin requests depend on content and host configuration.
|
|
67
|
+
|
|
68
|
+
## Layout and interaction conventions
|
|
69
|
+
|
|
70
|
+
The reading region determines synchronized sidebar height; do not size the page to all cards combined. Modules own content while the shared layout owns references, summaries, and card shells. Avoid duplicate padding or empty-paragraph compensation. Expanded cards animate from preview geometry; reduced-motion preferences disable motion.
|
|
71
|
+
|
|
72
|
+
Dense footer references borrow spare space above them at rest. Hovered or active items take alignment priority, allowing neighboring items to clip at the edges. Marker hover can compress the optional summary to leave room for the reference and heading. Expanded content is bounded by the visible reading region and scrolls within its card. Packed sidebar items still align the prose on hover. Deactivation smoothly restores the resting layout using current card heights, `--limr-motion-slow`, and `--limr-ease`, preserving gaps and page height.
|
|
73
|
+
|
|
74
|
+
Selection retains native browser ranges and keyboard behavior. Paint layers calculate visible fragments only. Code allows partial highlights, math is atomic, and image highlights use borders. Printing hides paint layers while keeping document content. Mobile automation does not certify native iOS/Android handles or physical-device behavior.
|
|
75
|
+
|
|
76
|
+
## CSS-only themes
|
|
77
|
+
|
|
78
|
+
Export CSS, include it in files, and mark sideEffects as ["**/*.css"]. A theme does not need React or parser runtime dependencies. Scope rules to an appearance name and check light, dark, auto, portals, and two differently themed readers on the same page.
|
|
79
|
+
|
|
80
|
+
Expanded toolbar panels use the full available toolbar width. The action row and available viewport determine its width; expanded content does not contribute intrinsic width or enlarge the toolbar. Highlight options use intrinsic text widths and wrap as whole items, aligned to the start. Multiline underlines need an inner inline span rather than a direct flex child.
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# Default syntax
|
|
2
|
+
|
|
3
|
+
> Reading note: this page uses LiMR syntax and interactive examples. Some content cannot be fully displayed by ordinary Markdown viewers such as GitHub; visit the [GitHub Pages documentation](https://linloir.github.io/LiMR/#/docs/en/syntax) for the best reading experience.
|
|
4
|
+
|
|
5
|
+
[Documentation](README.md) · [简体中文](../zh-CN/syntax.md)
|
|
6
|
+
|
|
7
|
+
**Modules** are configuration objects that add capabilities such as formulas, videos, or citations. A factory is called in application code to return an object; the module name is its `name` property, used for replacement and removal; tags and directives are the syntax written in Markdown. See [built-in modules](modules.md) for concepts and configuration.
|
|
8
|
+
|
|
9
|
+
The ten modules below ship with `@linloir/limr`. `Reader`, standalone `Markdown`, and `DocumentProvider` enable all of them through `standard()` by default; core-only `createDocument()` starts with CommonMark. The following sections include source and rendered examples, using LiMR itself.
|
|
10
|
+
|
|
11
|
+
## Module catalog
|
|
12
|
+
|
|
13
|
+
| Factory (application code) | Module name (name) | Capability | Registered tags / directives |
|
|
14
|
+
| --- | --- | --- | --- |
|
|
15
|
+
| `gfm()` | `gfm` | Tables, strikethrough, tasks, autolinks, standard footnotes | None |
|
|
16
|
+
| `math()` | `math` | Inline and display math | `$…$`, `$$…$$` |
|
|
17
|
+
| `codeHighlight()` | `code-highlight` | Shiki fenced-code highlighting | Standard code fences |
|
|
18
|
+
| `definition()` | `definition` | Definitions | Tags: definition, title, content; directive: definition |
|
|
19
|
+
| `question()` | `question` | Exercises and answers | question and child tags below; directive: question |
|
|
20
|
+
| `extras()` | `extras` | Further reading | Tags: extras, extra; directive: extras |
|
|
21
|
+
| `video()` | `video` | Native video, YouTube, Bilibili | Tags: video, md-video; directive: video |
|
|
22
|
+
| `figures()` | `figures` | Figure groups and captions | Tags: figures, figure, figcaption, caption, img; directives: figures, figure, figcaption |
|
|
23
|
+
| `citation()` | `citation` | Reference definitions and markers | Tags: citation, ref; no directives |
|
|
24
|
+
| `translations()` | `translations` | Original, translated, and parallel text | Tags and directives: translations, origin, translation |
|
|
25
|
+
|
|
26
|
+
These are registered static tags in Markdown, not an arbitrary MDX/HTML execution environment. Use string attributes such as `multi="true"` and `answer="[0,2]"`. Do not use `answer={[0,2]}`, event functions, or spread attributes. Unregistered HTML is displayed as text; expressions are not executed and may produce diagnostics. Keep blank lines between block tags and their Markdown content.
|
|
27
|
+
|
|
28
|
+
## CommonMark and GFM
|
|
29
|
+
|
|
30
|
+
````markdown
|
|
31
|
+
# Heading
|
|
32
|
+
|
|
33
|
+
**Bold**, *italic*, ~~deleted~~, [link](https://example.com), `inline code`.
|
|
34
|
+
|
|
35
|
+
> A blockquote, labelled Note by the default renderer.
|
|
36
|
+
|
|
37
|
+
- A list item
|
|
38
|
+
- [x] Complete
|
|
39
|
+
- [ ] Pending
|
|
40
|
+
|
|
41
|
+
| Name | Description |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| LiMR | Markdown renderer |
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
const value = 42;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
A standard footnote[^note].
|
|
50
|
+
|
|
51
|
+
[^note]: Content at the end of the document.
|
|
52
|
+
````
|
|
53
|
+
|
|
54
|
+
Rendered result (interactive where applicable):
|
|
55
|
+
|
|
56
|
+
#### Example heading
|
|
57
|
+
|
|
58
|
+
**Bold**, *italic*, ~~deleted~~, [link](https://example.com), `inline code`.
|
|
59
|
+
|
|
60
|
+
> A blockquote, labelled Note by the default renderer.
|
|
61
|
+
|
|
62
|
+
- A list item
|
|
63
|
+
- [x] Complete
|
|
64
|
+
- [ ] Pending
|
|
65
|
+
|
|
66
|
+
| Name | Description |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| LiMR | Markdown renderer |
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
const value = 42;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
A standard footnote[^syntax-note].
|
|
75
|
+
|
|
76
|
+
[^syntax-note]: Content at the end of the document.
|
|
77
|
+
|
|
78
|
+
Standard `[^note]` footnotes appear at the end; `<ref>` opens an annotation card. Ordinary Markdown supports ``. Raw HTML is not passed through to the DOM. Register an extension or override `components` to customize rendering.
|
|
79
|
+
|
|
80
|
+
## Math and code
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
Inline: $E = mc^2$.
|
|
84
|
+
|
|
85
|
+
$$
|
|
86
|
+
\int_0^1 x^2\,dx = \frac{1}{3}
|
|
87
|
+
$$
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Rendered result (interactive where applicable):
|
|
91
|
+
|
|
92
|
+
Inline: $E = mc^2$.
|
|
93
|
+
|
|
94
|
+
$$
|
|
95
|
+
\int_0^1 x^2\,dx = \frac{1}{3}
|
|
96
|
+
$$
|
|
97
|
+
|
|
98
|
+
Import `@linloir/limr/math.css`. Configure formulas with `math({ macros, strict })`. Fenced language names select Shiki highlighting. Highlighting loads near the viewport; streaming code waits for a 180ms pause. Code over the default 100,000-character limit, unsupported languages, and languages outside the configured list retain readable source. Configure `codeHighlight({ languages, lightTheme, darkTheme, eager, maxLength })`.
|
|
99
|
+
|
|
100
|
+
## Definitions
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
<definition title="Entropy">
|
|
104
|
+
|
|
105
|
+
A measure of uncertainty: $H(X)$.
|
|
106
|
+
|
|
107
|
+
</definition>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Rendered result (interactive where applicable):
|
|
111
|
+
|
|
112
|
+
<definition title="Entropy">
|
|
113
|
+
|
|
114
|
+
A measure of uncertainty: $H(X)$.
|
|
115
|
+
|
|
116
|
+
</definition>
|
|
117
|
+
|
|
118
|
+
Use child tags for rich titles and an explicit body:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
<definition>
|
|
122
|
+
|
|
123
|
+
<title>**Entropy** / 熵</title>
|
|
124
|
+
|
|
125
|
+
<content>
|
|
126
|
+
|
|
127
|
+
The body supports Markdown.
|
|
128
|
+
|
|
129
|
+
</content>
|
|
130
|
+
|
|
131
|
+
</definition>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The `title` attribute is text. Child tags support rich content. The directive form is `:::definition{title="Entropy"}`, closed by `:::`.
|
|
135
|
+
|
|
136
|
+
## Exercises
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
<question title="Which numbers are even?">
|
|
140
|
+
|
|
141
|
+
<question-content>Select all correct options.</question-content>
|
|
142
|
+
|
|
143
|
+
<question-sel-grp multi="true" answer="[0,2]">
|
|
144
|
+
|
|
145
|
+
<question-sel>2</question-sel>
|
|
146
|
+
|
|
147
|
+
<question-sel>3</question-sel>
|
|
148
|
+
|
|
149
|
+
<question-sel>4</question-sel>
|
|
150
|
+
|
|
151
|
+
</question-sel-grp>
|
|
152
|
+
|
|
153
|
+
<question-hint>Consider divisibility by 2.</question-hint>
|
|
154
|
+
|
|
155
|
+
<question-answer>2 and 4 are even.</question-answer>
|
|
156
|
+
|
|
157
|
+
</question>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Rendered result (interactive where applicable):
|
|
161
|
+
|
|
162
|
+
<question title="Which numbers are even?">
|
|
163
|
+
|
|
164
|
+
<question-content>Select all correct options.</question-content>
|
|
165
|
+
|
|
166
|
+
<question-sel-grp multi="true" answer="[0,2]">
|
|
167
|
+
|
|
168
|
+
<question-sel>2</question-sel>
|
|
169
|
+
|
|
170
|
+
<question-sel>3</question-sel>
|
|
171
|
+
|
|
172
|
+
<question-sel>4</question-sel>
|
|
173
|
+
|
|
174
|
+
</question-sel-grp>
|
|
175
|
+
|
|
176
|
+
<question-hint>Consider divisibility by 2.</question-hint>
|
|
177
|
+
|
|
178
|
+
<question-answer>2 and 4 are even.</question-answer>
|
|
179
|
+
|
|
180
|
+
</question>
|
|
181
|
+
|
|
182
|
+
Answer indices are **zero-based**. `multi` is off by default. `answer` is a string containing a JSON array or a single index. Attributes on the selection group take precedence over question attributes. Hints and answers expand independently; configured answers enable submission, scoring, and retry. This module neither connects to AI nor creates question annotations.
|
|
183
|
+
|
|
184
|
+
## Further reading
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
<extras>
|
|
188
|
+
|
|
189
|
+
<extra title="Read more" url="https://example.com/article" desc="Background material." />
|
|
190
|
+
|
|
191
|
+
</extras>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Rendered result (interactive where applicable):
|
|
195
|
+
|
|
196
|
+
<extras>
|
|
197
|
+
|
|
198
|
+
<extra title="Built-in modules" url="https://linloir.github.io/LiMR/#/docs/en/modules" desc="Background material." />
|
|
199
|
+
|
|
200
|
+
</extras>
|
|
201
|
+
|
|
202
|
+
`extra` uses `title`, `url`, and `desc`. Links pass through the built-in URL filter.
|
|
203
|
+
|
|
204
|
+
## Citation cards
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
One source<ref id="a" />, or several<ref ids='["a","b"]' />.
|
|
208
|
+
|
|
209
|
+
<ref id="a">Referenced **text**</ref>
|
|
210
|
+
|
|
211
|
+
<citation id="a" title="Source A" url="https://example.com/a" description="Full **Markdown** description." summary="Short collapsed summary." />
|
|
212
|
+
|
|
213
|
+
<citation cite-id="b" title="Source B" url="https://example.com/b" desc="Legacy attribute name." />
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Rendered result (interactive where applicable):
|
|
217
|
+
|
|
218
|
+
One source<ref id="a" />, or several<ref ids='["a","b"]' />.
|
|
219
|
+
|
|
220
|
+
<ref id="a">Referenced **text**</ref>
|
|
221
|
+
|
|
222
|
+
<citation id="a" title="Source A" url="https://example.com/a" description="Full **Markdown** description." summary="Short collapsed summary." />
|
|
223
|
+
|
|
224
|
+
<citation cite-id="b" title="Source B" url="https://example.com/b" desc="Legacy attribute name." />
|
|
225
|
+
|
|
226
|
+
Citation IDs use `cite-id`, then `id`. Descriptions use `desc`, then `description`. References use `cite-from-ids`, `ids`, then `id`, accepting JSON arrays or comma-separated strings. Definitions do not occupy body space, and multiple markers can reference one definition.
|
|
227
|
+
|
|
228
|
+
Citations do not expand into large cards by default; clicking pins the preview. Collapsed summaries fall back through `summary → description → safe URL → title`, with Markdown stripped. Card content uses description, then summary. Hovering or activating a reference temporarily highlights its nearest text block (paragraph, heading, list item, or table cell), without saving a highlight. External range annotations use their bound range. See [annotations and selection](annotations.md).
|
|
229
|
+
|
|
230
|
+
## Images, figures, and captions
|
|
231
|
+
|
|
232
|
+
```markdown
|
|
233
|
+
<figures columns="2" min-width="220" max-width="560" max-height="480">
|
|
234
|
+
|
|
235
|
+
<figure src="/figures/a.png" alt="Experiment A" caption="(a) Experiment A" />
|
|
236
|
+
|
|
237
|
+
<figure id="experiment-b">
|
|
238
|
+
|
|
239
|
+

|
|
240
|
+
|
|
241
|
+
<figcaption>**(b)** A Markdown caption.</figcaption>
|
|
242
|
+
|
|
243
|
+
</figure>
|
|
244
|
+
|
|
245
|
+
<figcaption>Figure 1 · Two experiments.</figcaption>
|
|
246
|
+
|
|
247
|
+
</figures>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Rendered result (interactive where applicable):
|
|
251
|
+
|
|
252
|
+
<figures columns="2" min-width="220" max-width="560" max-height="480">
|
|
253
|
+
|
|
254
|
+
<figure src="../assets/source.svg" alt="Experiment A" caption="(a) Experiment A" />
|
|
255
|
+
|
|
256
|
+
<figure id="experiment-b">
|
|
257
|
+
|
|
258
|
+

|
|
259
|
+
|
|
260
|
+
<figcaption>**(b)** A Markdown caption.</figcaption>
|
|
261
|
+
|
|
262
|
+
</figure>
|
|
263
|
+
|
|
264
|
+
<figcaption>Figure 1 · Two experiments.</figcaption>
|
|
265
|
+
|
|
266
|
+
</figures>
|
|
267
|
+
|
|
268
|
+
A figure can stand alone. Supply an image through `src` / `url`, nested Markdown, or `<img src="…" alt="…" />`. Use one image per figure and figures for groups. Captions can use an attribute or figcaption / caption child tags; use children for rich text. `id` provides an in-page link target.
|
|
269
|
+
|
|
270
|
+
| Attribute | Default | Meaning |
|
|
271
|
+
| --- | --- | --- |
|
|
272
|
+
| `min-width` / `min-height` | 220 / 120 | Determines when another column fits; narrow containers take priority |
|
|
273
|
+
| `max-width` / `max-height` | 560 / 480 | Image bounds preserving aspect ratio; none / false removes a bound |
|
|
274
|
+
| `columns` / `cols` | Automatic | Requested columns, capped at 24 |
|
|
275
|
+
| `rows` | Automatic | Derives columns from image count when columns are omitted |
|
|
276
|
+
| `responsive` | true | Reduces explicit columns when space is insufficient; false keeps them |
|
|
277
|
+
| `gap` | 16 | Group gap in pixels |
|
|
278
|
+
|
|
279
|
+
Dimensions accept nonnegative numbers or px. Figures inherit group limits and can override them. Factory options use camelCase, such as `figures({ maxHeight: 360, maxWidth: false })`. Images retain their aspect ratio, and captions are not cropped. A single figure copies the image URL; a group copies Markdown source. Neither copies image bytes.
|
|
280
|
+
|
|
281
|
+
Directive example:
|
|
282
|
+
|
|
283
|
+
```markdown
|
|
284
|
+
:::figures{columns="2"}
|
|
285
|
+
::figure{src="/a.png" caption="A"}
|
|
286
|
+
::figure{src="/b.png" caption="B"}
|
|
287
|
+
:::
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Video
|
|
291
|
+
|
|
292
|
+
```markdown
|
|
293
|
+
<video src="/demo.mp4" provider="native" title="Demo" />
|
|
294
|
+
|
|
295
|
+
<md-video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" loading="click" />
|
|
296
|
+
|
|
297
|
+
<video url="https://www.bilibili.com/video/BV1xx411c7mD/?p=2" />
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
`url` takes precedence over `src`. `provider` defaults to auto and also accepts native, youtube, and bilibili. YouTube supports watch, short, embed, shorts, and live URLs with start times. Bilibili supports BV/av IDs and parts. Other attributes are title and loading.
|
|
301
|
+
|
|
302
|
+
**The default is `loading="visible"`**: the player mounts within 200px of the viewport without autoplay. click waits for a click; eager mounts immediately. Set a module default with `video({ loading: 'click' })`. Actual playback depends on the platform, network, and embedding permissions; local iframe tests do not guarantee remote playback. Use `video({ resolveUrl })` for a custom provider.
|
|
303
|
+
|
|
304
|
+
Click-to-load example (no player is created before clicking):
|
|
305
|
+
|
|
306
|
+
<video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" loading="click" title="Video example" />
|
|
307
|
+
|
|
308
|
+
## Translations
|
|
309
|
+
|
|
310
|
+
```markdown
|
|
311
|
+
<translations default="both">
|
|
312
|
+
|
|
313
|
+
<origin>
|
|
314
|
+
|
|
315
|
+
Original **Markdown**.
|
|
316
|
+
|
|
317
|
+
</origin>
|
|
318
|
+
|
|
319
|
+
<translation>
|
|
320
|
+
|
|
321
|
+
翻译后的 **Markdown**。
|
|
322
|
+
|
|
323
|
+
</translation>
|
|
324
|
+
|
|
325
|
+
</translations>
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Rendered result (interactive where applicable):
|
|
329
|
+
|
|
330
|
+
<translations default="both">
|
|
331
|
+
|
|
332
|
+
<origin>
|
|
333
|
+
|
|
334
|
+
Original **Markdown**.
|
|
335
|
+
|
|
336
|
+
</origin>
|
|
337
|
+
|
|
338
|
+
<translation>
|
|
339
|
+
|
|
340
|
+
翻译后的 **Markdown**。
|
|
341
|
+
|
|
342
|
+
</translation>
|
|
343
|
+
|
|
344
|
+
</translations>
|
|
345
|
+
|
|
346
|
+
`default` accepts origin, translation, or both, defaulting to origin unless overridden by the factory's defaultMode. The marker cycles through these modes. Parallel mode shows the translation first. During streaming, an available side is shown while the other is missing. This module does not translate content automatically.
|
|
347
|
+
|
|
348
|
+
Global `parameters.translationMode` overrides individual blocks. Pass onTranslationModeChange to accept marker requests; without a callback, a global mode is locked. Setting it to undefined restores local choices. See [application integration](integration.md).
|
|
349
|
+
|
|
350
|
+
## Selection and replacement
|
|
351
|
+
|
|
352
|
+
Persistent highlights are annotations; there is no built-in `==highlight==` syntax. Register plugins for custom tags. Not every child tag has a corresponding directive. See [extension development](extensions.md) to select or replace default modules.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/styles.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 中文文档
|
|
2
|
+
|
|
3
|
+
> 阅读提示:本文包含 LiMR 扩展语法和交互示例。部分内容在 GitHub 等普通 Markdown 阅读器中无法完整展示;前往 [GitHub Pages 文档](https://linloir.github.io/LiMR/#/docs/zh-CN/README) 可获得最佳阅读体验。
|
|
4
|
+
|
|
5
|
+
[文档目录](README.md) · [English](../en/README.md)
|
|
6
|
+
|
|
7
|
+
这套文档对应当前 LiMR 1.0.0 的公开实现。默认入口为中文,英文页面与本目录一一对应。
|
|
8
|
+
|
|
9
|
+
| 你要做什么 | 阅读文档 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| 安装并显示第一篇文档 | [快速开始](getting-started.md) |
|
|
12
|
+
| 了解模块、默认包含的能力与配置方式 | [内置模块](modules.md) |
|
|
13
|
+
| 编写 Markdown、练习题、引用、图组与译文 | [默认语法](syntax.md) |
|
|
14
|
+
| 集成到 React、接收流式输出、自定义布局或 SSR | [项目集成](integration.md) |
|
|
15
|
+
| 保存选区、高亮、引用和自定义标注 | [标注与选区](annotations.md) |
|
|
16
|
+
| 新增语法、卡片、选区动作和模块参数 | [扩展开发](extensions.md) |
|
|
17
|
+
| 开发独立 npm 插件并在应用中引入 | [插件模块包](plugin-packages.md) |
|
|
18
|
+
| 调整主题、字体、布局与 portal 样式 | [样式与字体](styles.md) |
|
|
19
|
+
| 查询组件 props、hooks 和核心 API | [API 参考](api.md) |
|
|
20
|
+
| 理解解析、状态和资源边界 | [架构与行为](architecture.md) |
|
|
21
|
+
| 了解性能数据和验证范围 | [性能与限制](performance.md) |
|
|
22
|
+
| 让 AI 使用 LiMR 或开发插件 | [AI Skills](ai-skills.md) |
|
|
23
|
+
|
|
24
|
+
先接入 `Reader`,需要定制布局时再拆分组件;需要应用功能时优先添加插件。Playground 中的本地保存、导入导出和模拟问答是演示应用功能,不是 Reader 自带的服务。
|
|
25
|
+
|
|
26
|
+
[返回 README](../../README.md) · [在线 Playground](https://linloir.github.io/LiMR/)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# AI Skills:下载、导入与使用
|
|
2
|
+
|
|
3
|
+
> 阅读提示:本文包含 LiMR 扩展语法和交互示例。部分内容在 GitHub 等普通 Markdown 阅读器中无法完整展示;前往 [GitHub Pages 文档](https://linloir.github.io/LiMR/#/docs/zh-CN/ai-skills) 可获得最佳阅读体验。
|
|
4
|
+
|
|
5
|
+
[文档目录](README.md) · [English](../en/ai-skills.md)
|
|
6
|
+
|
|
7
|
+
Skills 是指导 AI 工作的文件包,不是运行在 Reader 中的 RendererExtension,也不是模型服务。安装 Skill 不会自动修改项目、安装插件或连接 AI API。
|
|
8
|
+
|
|
9
|
+
| Skill | 适用任务 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [limr-use](../../skills/limr-use/SKILL.md) | 接入 LiMR、选择组件、编写语法、配置标注/流式/主题、引入已有插件 |
|
|
12
|
+
| [limr-plugin-development](../../skills/limr-plugin-development/SKILL.md) | 开发新插件模块包,扩展卡片/语法/动作/参数,构建并验证消费者 |
|
|
13
|
+
|
|
14
|
+
两份 Skill 的指令使用英文以便复用,支持中文任务输入;给使用者的说明同时提供中英文。插件 Skill 包含独立模板,两个 Skill 都包含本地 references,无需把整个 LiMR 仓库放进 AI 上下文。
|
|
15
|
+
|
|
16
|
+
## 从 npm 包导入
|
|
17
|
+
|
|
18
|
+
先安装包含 Skills 的 LiMR 版本,在**你的应用项目**中运行:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install @linloir/limr
|
|
22
|
+
mkdir -p .agents/skills
|
|
23
|
+
cp -R node_modules/@linloir/limr/skills/limr-use .agents/skills/
|
|
24
|
+
cp -R node_modules/@linloir/limr/skills/limr-plugin-development .agents/skills/
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
以上为新安装示例;已有同名目录时先检查本地定制,再更新整个目录,避免旧模板残留。导入是快照,npm 升级不会自动同步副本。升级 LiMR 后应同时检查 Skill 版本适配。
|
|
28
|
+
|
|
29
|
+
## 从仓库或 ZIP 导入
|
|
30
|
+
|
|
31
|
+
可以从仓库的 skills 目录复制,也可以在本地生成 ZIP(需要 Python 3):
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pnpm pack:skills
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
输出在 artifacts/skills,并同步到 Playground 的 public/downloads 供 Docs 页面下载。每个 ZIP 的根目录是完整 skill 文件夹,不只包含 SKILL.md;另有包含两份 Skill 的版本化总包。构建 Docs 站点时自动生成下载文件。
|
|
38
|
+
|
|
39
|
+
对应版本网站部署后可直接下载:[limr-use.zip](https://linloir.github.io/LiMR/downloads/limr-use.zip)、[limr-plugin-development.zip](https://linloir.github.io/LiMR/downloads/limr-plugin-development.zip)。本地 Docs 的 AI Skills 页面也有下载按钮。ZIP 是便于下载的归档,不代表所有 AI 客户端都支持一键 ZIP 导入;不支持时解压并复制完整目录。
|
|
40
|
+
|
|
41
|
+
## Codex 的位置与调用
|
|
42
|
+
|
|
43
|
+
Codex 的项目级目录是 `.agents/skills/`,用户级目录是 `~/.agents/skills/`。选择一个作用域,避免重复安装同名 Skill。客户端仍使用旧目录时,按该版本支持的路径导入。Codex 通常自动发现变化,未显示时重启;可通过 `/skills` 或 `$skill-name` 调用。依据:[OpenAI 官方 Skills 文档](https://developers.openai.com/codex/skills/)。
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
$limr-use 在这个 React 项目中接入 LiMR,使用中文界面、流式回答和受控标注。
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
$limr-plugin-development 创建术语解释插件包,包含术语块、选区动作、可展开卡片和侧栏摘要,再引入当前应用。
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
其他支持 SKILL.md 的 AI 工具,使用其实际支持的项目/用户目录;没有 Skill 自动发现能力时,可以要求 AI 阅读 SKILL.md,并按其中链接加载 references 和 assets。无需假定某个客户端专属命令可在所有工具上工作。
|
|
54
|
+
|
|
55
|
+
## 期望产物
|
|
56
|
+
|
|
57
|
+
使用 Skill 应交付可运行的集成、稳定配置和验证结果;开发 Skill 应交付模块源码、包导出/类型/CSS、宿主引入示例及真实包消费验证。它们都要求以当前安装版本为准,不虚构解析能力,不删除未知标注的持久化数据,也不在未获指示时发布 npm 或修改外部服务。
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# 标注与选区
|
|
2
|
+
|
|
3
|
+
> 阅读提示:本文包含 LiMR 扩展语法和交互示例。部分内容在 GitHub 等普通 Markdown 阅读器中无法完整展示;前往 [GitHub Pages 文档](https://linloir.github.io/LiMR/#/docs/zh-CN/annotations) 可获得最佳阅读体验。
|
|
4
|
+
|
|
5
|
+
[文档目录](README.md) · [English](../en/annotations.md)
|
|
6
|
+
|
|
7
|
+
## 数据模型
|
|
8
|
+
|
|
9
|
+
`Annotation` 是数据,`AnnotationType` 是插件注册的呈现和加载逻辑,`AnnotationOccurrence` 是一次出现位置。一个标注可以通过 anchors 出现在多处;一个引用角标可以关联多条标注。
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import type { Annotation } from '@linloir/limr';
|
|
13
|
+
|
|
14
|
+
export const annotations: readonly Annotation[] = [{
|
|
15
|
+
id: 'paper-reference',
|
|
16
|
+
type: 'citation',
|
|
17
|
+
data: { title: 'Paper', url: 'https://example.com/paper' },
|
|
18
|
+
anchors: [{
|
|
19
|
+
range: { start: 0, end: 4 },
|
|
20
|
+
documentId: 'article',
|
|
21
|
+
quote: 'LiMR',
|
|
22
|
+
}],
|
|
23
|
+
}, {
|
|
24
|
+
id: 'highlight-1',
|
|
25
|
+
type: 'highlight',
|
|
26
|
+
range: { start: 0, end: 4 },
|
|
27
|
+
data: { color: '#F2C744', style: 'background' },
|
|
28
|
+
}];
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
这个示例要求 source 的前四个 UTF-16 单元为 `LiMR`,documentId 为 article。range 是单次锚点的简写;传 anchors 后以 anchors 为准。范围均指向**未经改写的输入**,采用 UTF-16、右端不包含,不是 UTF-8 字节或 Unicode 码点。
|
|
32
|
+
|
|
33
|
+
持久化时保存原始 source、稳定 documentId、annotation.id、type、data、anchors,并在有需要时记录应用文档版本。anchor.revision 对应当前引擎修订号,不是跨会话持久 ID。quote 与原范围不符时,只在全文有唯一匹配时迁移;无匹配、多个匹配或 documentId 不一致会跳过该锚点。没有 quote 且 revision 不匹配的锚点也会跳过。这不是协同编辑的自动位置转换系统。
|
|
34
|
+
|
|
35
|
+
## 三种选区
|
|
36
|
+
|
|
37
|
+
| 字段 | 含义 |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `text` | 可读的选中文本 |
|
|
40
|
+
| `raw` | 映射得到的原始范围和源码 |
|
|
41
|
+
| `syntax` | 仅吸收两端紧邻的标准 Markdown 标记,不扩选未选文字或特殊块外层标签 |
|
|
42
|
+
| `blocks` | 选区触及的块范围与源码 |
|
|
43
|
+
| `quality` | exact、atomic 或 unmapped |
|
|
44
|
+
| `settled` | 指针仍在拖选时为 false |
|
|
45
|
+
| `documentId` / `revision` | 选区所属文档快照 |
|
|
46
|
+
|
|
47
|
+
每种结果包含 ranges 和 sourceText。一般笔记使用 syntax.ranges,并为**每个范围**保存 `document.source.slice(start, end)` 作为 quote。代码支持部分选择;公式和图片作为原子内容。不要用 DOM textContent 长度倒推原文范围,实体、转义和 emoji 会让两者不同。
|
|
48
|
+
|
|
49
|
+
## 高亮和命令
|
|
50
|
+
|
|
51
|
+
`highlight` 不需要安装额外的 AnnotationType,data 支持 color、style(background / underline / dotted / wavy)、hidden。删除内容标注与隐藏高亮是不同操作。
|
|
52
|
+
|
|
53
|
+
| 命令 | 行为 |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| `addAnnotation(annotation, options?)` | 添加/替换同 ID 数据;普通内容标注默认同时补充共享高亮 |
|
|
56
|
+
| `updateAnnotation(id, partial)` | 浅合并标注字段;data 是整体替换,更新时保留需要的字段 |
|
|
57
|
+
| `removeAnnotation(id)` | 移除这一条标注,其他标注和共享高亮保留 |
|
|
58
|
+
| `removeAnnotationsAt(ranges)` | 移除精确匹配片段上的标注及高亮;保留它们其他位置的锚点 |
|
|
59
|
+
| `editAnnotation(id / null)` | 切换共享编辑状态;设置 ID 时也激活卡片 |
|
|
60
|
+
| `activateAnnotation(id / null)` | 激活标注的首个 occurrence,也接受 occurrence ID |
|
|
61
|
+
|
|
62
|
+
`addAnnotation` 的 `{ highlight: false }` 关闭自动持久高亮,显式 HighlightData 指定样式;`{ edit: true }` 进入编辑。类型配置 `highlight: 'hover'` 时默认不创建持久高亮,但显式传入高亮样式仍可创建。默认选区工具栏为调色板、添加/隐藏高亮、复制、删除;actions 覆盖内置列表,插件动作仍会合并进去。
|
|
63
|
+
|
|
64
|
+
## Citation 的临时高亮
|
|
65
|
+
|
|
66
|
+
Citation 默认 `highlight: 'hover'`。角标或侧栏条目悬浮、或引用处于 activate 状态时,用类型 color 的 18% 底色高亮关联文本。底色绘制在文字下方;点击激活后,移开鼠标仍保留,取消激活且不再悬浮后才隐藏。同一段落的激活与悬浮引用不会叠加加深颜色。该效果不更新 annotations,也不改变已保存高亮的 hidden 设置。嵌入 ref 使用最近的段落、标题、列表项或表格单元格;外部范围引用使用自身范围,并以该范围首行对齐侧栏。
|
|
67
|
+
|
|
68
|
+
侧栏联动使用正文位移动画,不改变页面滚动范围。绘制层在动画过程中及结束、取消时更新可见片段,因此从视口外移入的文本也会同步获得当前悬浮或激活高亮。
|
|
69
|
+
|
|
70
|
+
使用 `replaceExtension(standard(), citation({ highlight: false }))` 关闭该效果。其他类型也可显式启用 highlight: 'hover'。
|
|
71
|
+
|
|
72
|
+
## 缺少插件时
|
|
73
|
+
|
|
74
|
+
当前实现**不会静默忽略未知 annotation 类型**。数据和范围仍保留,可能显示通用圆点角标;没有 Content 时卡片显示本地化的“不可用”及类型名称。缺失 citation 定义也可能显示不可用提示。要保证呈现,应安装对应插件,或由应用决定暂时隐藏哪些标注。
|
|
75
|
+
|
|
76
|
+
若应用过滤不支持的类型,保留完整的持久化原始数组,并在写回时合并仍隐藏的数据,避免卸载插件导致数据丢失。Playground 的插件勾选目前只启用/关闭动作入口,仍保留卡片渲染器,因此不会模拟完整卸载插件。
|
|
77
|
+
|
|
78
|
+
## 卡片与异步资源
|
|
79
|
+
|
|
80
|
+
卡片 UI 由模块注册:Content 渲染内容,overlay.Card 负责完整浮层内部,sidebar.Preview 负责收起时的本地摘要。`AnnotationMarkdown` 在隔离选区作用域内复用 Markdown 配置。
|
|
81
|
+
|
|
82
|
+
`load(annotation, { signal })` 在内容显示时才调用,同一阅读器内复用请求和有限缓存,不在不同 Reader 间共享。Preview 不调用 load。Content 接收 data、loading、error、retry、editing、presentation、expanded;处理加载和错误 UI 是模块的职责。可通过 useLiMR().invalidateAnnotation(id) 刷新。
|
|
83
|
+
|
|
84
|
+
动作的 signal 在阅读器销毁时取消,关闭菜单不会取消动作。调用 updateAnnotation 更新流式答案时同时保留问题字段;“停止生成”、重试、认证、会话和保存由应用 adapter 管理。参考[助手示例](../../examples/assistant.tsx)和[扩展开发](extensions.md)。
|