@linloir/limr 0.0.0-stage → 0.1.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.md +197 -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 +451 -0
- package/dist/chunk-65V5OZ4G.js +3070 -0
- package/dist/chunk-65V5OZ4G.js.map +1 -0
- package/dist/chunk-6N6TFHEN.js +83 -0
- package/dist/chunk-6N6TFHEN.js.map +1 -0
- package/dist/chunk-7JF5HHVF.js +465 -0
- package/dist/chunk-7JF5HHVF.js.map +1 -0
- package/dist/chunk-ETHLPBKQ.js +1193 -0
- package/dist/chunk-ETHLPBKQ.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 +54 -0
- package/dist/core/index.js +37 -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 +132 -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 +112 -0
- package/dist/react/index.js +57 -0
- package/dist/react/index.js.map +1 -0
- package/dist/styles.css +451 -0
- package/dist/translations-BliabrPd.d.ts +310 -0
- package/docs/api.md +161 -0
- package/docs/extensions.md +309 -0
- package/docs/implementation.md +79 -0
- package/docs/performance.md +84 -0
- package/docs/styles.md +103 -0
- package/docs/visual-upgrade.md +148 -0
- package/examples/assistant.tsx +52 -0
- package/examples/notes.tsx +73 -0
- package/package.json +110 -3
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Visual and extension refinement
|
|
2
|
+
|
|
3
|
+
This checklist records the requested acceptance scope. An item is complete only
|
|
4
|
+
after its implementation and relevant browser/package evidence are recorded.
|
|
5
|
+
|
|
6
|
+
- [x] Third-party pnpm plugins add to defaults with a small public API; a real
|
|
7
|
+
separate package consumer verifies syntax, actions and annotation content.
|
|
8
|
+
- [x] CSS packages override the default skin, including portals and multiple
|
|
9
|
+
readers. Document stable tokens, layers, selectors and packaging.
|
|
10
|
+
- [x] Local Maple Mono NF CN with ligatures, CJK/Nerd/multilingual glyphs, small
|
|
11
|
+
on-demand font subsets, swap fallback, versioned cacheable URLs and licenses.
|
|
12
|
+
- [x] Rounded copy/check icons: frosted math button, transparent code button,
|
|
13
|
+
background hover/press and nonlinear success/reset; code header/body same
|
|
14
|
+
font, both themes. Hover/press translation was removed after review.
|
|
15
|
+
- [x] Compact symmetric block spacing, question type label, animated diamond
|
|
16
|
+
choices, multiline underline, color feedback, single submit/retry, expandable
|
|
17
|
+
hint/answer sections with animated result and answer reveal.
|
|
18
|
+
- [x] Reusable nonlinear multiline underline on TOC, extras, options and links.
|
|
19
|
+
- [x] Nonlinear TOC/sidebar alignment, card expansion/collapse; reduced motion.
|
|
20
|
+
- [x] Anchored overlay enter/exit and continuous preview-to-expanded transition,
|
|
21
|
+
animated content reveal, no remount/repeated request, focus/viewport handling.
|
|
22
|
+
- [x] Square centered markers with independent hover/press animations.
|
|
23
|
+
- [x] Unified line geometry for selection and highlights: text, partial inline
|
|
24
|
+
code, atomic inline/display math, partial fenced code with inline markers,
|
|
25
|
+
special blocks. Marker paint only when text on both sides is spanned; preserve
|
|
26
|
+
marker background/motion. No adjacent-code-line overlap.
|
|
27
|
+
- [x] Mobile selection visual parity where browser APIs permit; document native
|
|
28
|
+
handles/platform limitations with evidence rather than removing accessibility.
|
|
29
|
+
- [x] Playground common navigation and plugin styling, live two-column editor
|
|
30
|
+
and bidirectional source-aware scroll matching, responsive narrow layout.
|
|
31
|
+
- [x] Unit/browser/package tests, visual evidence in light/dark/mobile, updated
|
|
32
|
+
performance checks for long documents and streams without unbounded repaint.
|
|
33
|
+
|
|
34
|
+
Additional review requirements:
|
|
35
|
+
|
|
36
|
+
- [x] Continuous drag regression: publish and paint during the gesture; measure
|
|
37
|
+
an 878k-character document, select-all/scroll, and 1,000 tokenized code lines.
|
|
38
|
+
The three browser regressions passed with one worker on 2026-10-12.
|
|
39
|
+
- [x] All annotation buttons use the same fixed slot at 80% of the previous
|
|
40
|
+
citation size; active state must not persistently enlarge plugin markers;
|
|
41
|
+
oversized SVG/image/nested plugin content stays inside the slot.
|
|
42
|
+
- [x] Whole collapsed sidebar card is clickable, localized expand/collapse text
|
|
43
|
+
and hover/state motion, balanced bottom spacing in nested Markdown.
|
|
44
|
+
- [x] Standard blockquotes use a Note/注释 title and special-block background.
|
|
45
|
+
- [x] Definition/extras have more bottom breathing room; question disclosures
|
|
46
|
+
sit farther below submit, with symmetric collapsed/expanded bottom spacing.
|
|
47
|
+
- [x] Original pointed diamond paths and center-fill animation, now 15px;
|
|
48
|
+
first-line center alignment; empty space beside choices has no hover effect.
|
|
49
|
+
- [x] Math/code copy buttons never translate on hover/press; code button is
|
|
50
|
+
smaller with visually balanced header insets.
|
|
51
|
+
- [x] Atomic formula selection/highlights retain the painted surface's corners.
|
|
52
|
+
|
|
53
|
+
Initial refinement validation on 2026-10-12:
|
|
54
|
+
|
|
55
|
+
- `pnpm check`: TypeScript, 40 unit/SSR tests and library build passed.
|
|
56
|
+
- `pnpm test:browser`: 23 Chromium tests passed, including continuous long
|
|
57
|
+
document/code drag, select-all/scroll, formula corners, adversarial plugin
|
|
58
|
+
icon sizes, question/sidebar controls, copy transitions, footnote selection,
|
|
59
|
+
overlay continuity, mobile viewport and bidirectional editor scrolling.
|
|
60
|
+
- `pnpm test:package`: actual LiMR, syntax/action/annotation plugin and CSS
|
|
61
|
+
package tarballs install and work in independent React 18.3.1 and React 19
|
|
62
|
+
applications, including TypeScript, SSR, portals and theme isolation. Core
|
|
63
|
+
also imports when React imports are deliberately denied.
|
|
64
|
+
- Production browser, selection and Node measurements are retained in
|
|
65
|
+
`benchmarks/results/`; see [performance.md](performance.md) for measured
|
|
66
|
+
budgets, slower cases and limits. Do not infer equal selection-processing
|
|
67
|
+
cost or a long-document SSR advantage from the browser frame statistics.
|
|
68
|
+
- Inspected production screenshots are saved locally in `artifacts/visual/`:
|
|
69
|
+
`light.png`, `dark.png`, `question-collapsed.png`, `question-expanded.png`,
|
|
70
|
+
`sidebar-expanded.png`, `markers.png`, `math-selected.png`,
|
|
71
|
+
`math-highlighted.png`, `mobile.png` and `mobile-overlay.png`.
|
|
72
|
+
`evidence.json` records measured 15px diamonds, six equal 14.71875px marker
|
|
73
|
+
buttons, 4px formula selection corners, code themes and font requests.
|
|
74
|
+
|
|
75
|
+
Physical iOS/Android selection handles and finger dragging were not tested.
|
|
76
|
+
The mobile evidence covers Chromium touch emulation and programmatic Selection
|
|
77
|
+
API geometry; platform controls remain native. Font cache headers belong to the
|
|
78
|
+
host application; see [styles.md](styles.md). Plugin slots contain oversized
|
|
79
|
+
elements but cannot repair an incorrectly centered intrinsic SVG drawing.
|
|
80
|
+
|
|
81
|
+
Narrow-overlay follow-up on 2026-10-12:
|
|
82
|
+
|
|
83
|
+
- The final card bounds and text width stay stable during a clip reveal. The
|
|
84
|
+
horizontal origin follows the current marker; vertical reveal follows the
|
|
85
|
+
resolved top/bottom placement. Positioning no longer measures animated widths
|
|
86
|
+
or heights, and a changed marker cannot reuse the previous positioning result.
|
|
87
|
+
Preview height is capped to available space on the resolved side; this cap is
|
|
88
|
+
released when switching to the expanded dialog.
|
|
89
|
+
- Native scrollbars are hidden. A 3px overlaid thumb appears only while scrolling,
|
|
90
|
+
fades after 800ms of inactivity, supports dragging, and stays hidden throughout
|
|
91
|
+
card motion. It never reserves text width.
|
|
92
|
+
- `pnpm check` passed (40 tests, TypeScript and build). The 16 tests in
|
|
93
|
+
`motion-playground.spec.ts` and `reader.spec.ts` passed, including motion frame
|
|
94
|
+
geometry, right/bottom edge placement, rapid reference changes, interrupted
|
|
95
|
+
exit/reopening, scrollbar behavior, touch viewport, focus restoration and
|
|
96
|
+
annotation request reuse.
|
|
97
|
+
|
|
98
|
+
References reviewed: the previous renderer's Extras/Question/Citation styles,
|
|
99
|
+
selection and highlight hooks, the web app's QuestionnaireView multiline
|
|
100
|
+
gradient underline and diamond control, and UniDevice's rounded copy control. The new
|
|
101
|
+
implementation keeps LiMR independent of those applications.
|
|
102
|
+
|
|
103
|
+
Module-controlled cards and follow-up refinements on 2026-10-12:
|
|
104
|
+
|
|
105
|
+
- Annotation modules opt into anchored content-height expansion or a centered
|
|
106
|
+
size such as 80dvh. Citation stays a pinnable preview; conversation and reading
|
|
107
|
+
plugin examples opt into their own expansion. Sidebar content-click collapse
|
|
108
|
+
is also opt-in; Citation items instead underline and follow their links.
|
|
109
|
+
- Preview reveal/content animations sample their live frame on each direction
|
|
110
|
+
change, including repeated interruption. Retained overlays remeasure on reopening;
|
|
111
|
+
Floating UI's closed positioning state otherwise stranded the retained card.
|
|
112
|
+
Exit completion, rather than a fixed unmount timer, releases the subtree.
|
|
113
|
+
The painted shell connects preview and expanded bounds independently of text
|
|
114
|
+
and controls. Direct opening measures the module's preview first; closing
|
|
115
|
+
returns to that preview geometry while fading out. Preview entry/exit both
|
|
116
|
+
take 560ms, and preview/dialog transformations both take 480ms.
|
|
117
|
+
- Modules own the full floating UI through `overlay.Card`, optionally reusing
|
|
118
|
+
`AnnotationCard`. Centered dialogs use the page viewport and module-specified
|
|
119
|
+
widths. Initial focus lands on the dialog container, with visible focus cues
|
|
120
|
+
retained for keyboard navigation. Mobile TOC toggles animate continuously.
|
|
121
|
+
- Sidebar hover applies across the whole card and survives header collapse.
|
|
122
|
+
Close controls have background feedback. Attribute titles support source
|
|
123
|
+
selection/highlights. Question correct diamonds are filled green; the submit
|
|
124
|
+
label is shorter. Nested definition formula backgrounds have stronger contrast.
|
|
125
|
+
- Citation spacing now follows the supplied screenshots: the preview item gap
|
|
126
|
+
is 6px smaller and trailing space 2px smaller; collapsed sidebar trailing
|
|
127
|
+
space grows 2px. Expanded sidebar heading space shrinks 2px, separator spacing
|
|
128
|
+
moves 2px from above to below, and trailing space shrinks 3px. The final
|
|
129
|
+
Markdown paragraph no longer overrides these gaps through margin collapse.
|
|
130
|
+
- Video providers mount near the viewport, normalize watch/short/embed and BV/av
|
|
131
|
+
links, retain click-loading as an option, and share the math copy primitive.
|
|
132
|
+
YouTube uses the previous renderer's youtube.com/embed address with origin
|
|
133
|
+
referrer information. In the local real-network comparison, dQw4w9WgXcQ failed
|
|
134
|
+
with an auth player error even in the previous renderer's bare iframe setup;
|
|
135
|
+
M7lc1UVf-VE loaded its player. This is not evidence that the user's specific
|
|
136
|
+
video now plays. Automated provider tests intercept network responses.
|
|
137
|
+
- Validation: TypeScript, all 50 unit/SSR cases, and all 33 browser cases passed.
|
|
138
|
+
After the final animation fix, the 20 motion/reader cases were rerun; the other
|
|
139
|
+
13 cases include video, visual selection and the three selection performance
|
|
140
|
+
checks. React 18.3.1 and React 19 tarball consumers passed types, SSR and browser
|
|
141
|
+
plugin/theme checks. The local tarball and production demo were rebuilt.
|
|
142
|
+
- Production screenshots inspected: question-refined.png,
|
|
143
|
+
definition-math-refined-light.png, definition-math-refined-dark.png,
|
|
144
|
+
citation-overlay-refined.png, video-provider-refined.png in artifacts/visual/.
|
|
145
|
+
refinement-evidence.json records the compact retry button, filled correct
|
|
146
|
+
diamond, nested formula colors and the real official YouTube player's loaded
|
|
147
|
+
title/isPlayable state. Loading that player does not prove the reported Rick
|
|
148
|
+
Astley video plays in the user's browser.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AnnotationCard, AnnotationMarkdown, defineExtension, type AnnotationContentProps, type AnnotationOverlayCardProps, type AnnotationSidebarPreviewProps, type RendererExtension, type SelectionSnapshot } from '@linloir/limr';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
/** Your application owns transport, authentication and conversation storage. */
|
|
5
|
+
export interface AssistantAdapter {
|
|
6
|
+
answer: (request: { selection: SelectionSnapshot; question: string; signal: AbortSignal }) => AsyncIterable<string>;
|
|
7
|
+
}
|
|
8
|
+
interface AnswerData { text: string; question?: string; status: 'streaming' | 'complete' | 'error'; error?: string }
|
|
9
|
+
const assistantIcon = <svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="m8 2 1.8 4.2L14 8l-4.2 1.8L8 14l-1.8-4.2L2 8l4.2-1.8L8 2Z" fill="currentColor" /></svg>;
|
|
10
|
+
|
|
11
|
+
/** Example application plugin. This is deliberately not a LiMR default module. */
|
|
12
|
+
export function assistant({ adapter, type = 'assistant', label = 'Ask assistant', icon = assistantIcon, color = '#8b5cf6', prompt = selection => `Explain “${selection.text}”` }: {
|
|
13
|
+
adapter: AssistantAdapter; type?: string; label?: string; icon?: ReactNode; color?: string; prompt?: (selection: SelectionSnapshot) => string;
|
|
14
|
+
}): RendererExtension {
|
|
15
|
+
function Card(props: AnnotationOverlayCardProps<AnswerData>) {
|
|
16
|
+
return <AnnotationCard {...props} title={label} />;
|
|
17
|
+
}
|
|
18
|
+
function Answer({ data }: AnnotationContentProps<AnswerData>) {
|
|
19
|
+
return <div aria-busy={data?.status === 'streaming'}>
|
|
20
|
+
<AnnotationMarkdown source={data?.text || '…'} streaming={data?.status === 'streaming'} />
|
|
21
|
+
{data?.status === 'error' && <p role="alert">{data.error}</p>}
|
|
22
|
+
</div>;
|
|
23
|
+
}
|
|
24
|
+
function Preview({ data, referenceText }: AnnotationSidebarPreviewProps<AnswerData>) {
|
|
25
|
+
const question = data?.question || referenceText;
|
|
26
|
+
return question ? <span title={question}>{question}</span> : null;
|
|
27
|
+
}
|
|
28
|
+
return defineExtension({
|
|
29
|
+
name: type,
|
|
30
|
+
annotationTypes: [{ type, label, icon, color, Content: Answer, sidebar: { Preview }, overlay: { Card, expand: { placement: 'center', width: 680, height: '80dvh' } } }],
|
|
31
|
+
actions: [{ id: `${type}:ask`, label, icon: icon ?? assistantIcon, async run(context) {
|
|
32
|
+
const id = `${type}-${crypto.randomUUID()}`;
|
|
33
|
+
const question = prompt(context.selection);
|
|
34
|
+
let text = '';
|
|
35
|
+
context.addAnnotation({ id, type, data: { text, question, status: 'streaming' } satisfies AnswerData, anchors: context.selection.syntax.ranges.map(range => ({
|
|
36
|
+
range, documentId: context.document.id, quote: context.document.source.slice(range.start, range.end),
|
|
37
|
+
})) });
|
|
38
|
+
context.activateAnnotation(id);
|
|
39
|
+
context.clearSelection();
|
|
40
|
+
try {
|
|
41
|
+
for await (const chunk of adapter.answer({ selection: context.selection, question, signal: context.signal })) {
|
|
42
|
+
if (context.signal.aborted) return;
|
|
43
|
+
text += chunk;
|
|
44
|
+
context.updateAnnotation(id, { data: { text, question, status: 'streaming' } satisfies AnswerData });
|
|
45
|
+
}
|
|
46
|
+
if (!context.signal.aborted) context.updateAnnotation(id, { data: { text, question, status: 'complete' } satisfies AnswerData });
|
|
47
|
+
} catch (error) {
|
|
48
|
+
if (!context.signal.aborted) context.updateAnnotation(id, { data: { text, question, status: 'error', error: error instanceof Error ? error.message : String(error) } satisfies AnswerData });
|
|
49
|
+
}
|
|
50
|
+
} }],
|
|
51
|
+
});
|
|
52
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import { AnnotationMarkdown, ToolIcon, defineExtension, useLiMR, type AnnotationContentProps, type RendererExtension } from '@linloir/limr';
|
|
3
|
+
|
|
4
|
+
interface NoteData { text: string; draft?: string }
|
|
5
|
+
const kinds = [
|
|
6
|
+
{ type: 'margin-note', label: '旁注', icon: 'comment', color: '#81B29A', hint: '在段落旁留下一个想法' },
|
|
7
|
+
{ type: 'reading-note', label: '笔记', icon: 'note', color: '#6B9BD2', hint: '整理这一段的阅读笔记' },
|
|
8
|
+
{ type: 'reader-question', label: '提问', icon: 'question', color: '#E5A06E', hint: '写下还想进一步理解的问题' },
|
|
9
|
+
{ type: 'reader-footnote', label: '脚注', icon: 'footnote', color: '#B39DDB', hint: '补充解释或参考来源' },
|
|
10
|
+
] as const;
|
|
11
|
+
|
|
12
|
+
function NoteContent({ annotation, data, editing, presentation }: AnnotationContentProps<NoteData>) {
|
|
13
|
+
const commands = useLiMR();
|
|
14
|
+
const text = data?.draft ?? data?.text ?? '';
|
|
15
|
+
const isEditing = editing || data?.draft !== undefined;
|
|
16
|
+
const input = useRef<HTMLTextAreaElement>(null);
|
|
17
|
+
const kind = kinds.find(kind => kind.type === annotation.type)!;
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (!isEditing) return;
|
|
20
|
+
if (presentation === 'preview') return;
|
|
21
|
+
const frame = requestAnimationFrame(() => {
|
|
22
|
+
const field = input.current;
|
|
23
|
+
if (field) { field.focus({ preventScroll: true }); field.selectionStart = field.selectionEnd = field.value.length; }
|
|
24
|
+
});
|
|
25
|
+
return () => cancelAnimationFrame(frame);
|
|
26
|
+
}, [isEditing, presentation]);
|
|
27
|
+
useLayoutEffect(() => {
|
|
28
|
+
const field = input.current;
|
|
29
|
+
if (!field) return;
|
|
30
|
+
const resize = () => { field.style.height = 'auto'; field.style.height = `${field.scrollHeight}px`; };
|
|
31
|
+
resize();
|
|
32
|
+
// The same draft can move between a narrow card and the wider sidebar.
|
|
33
|
+
let width = field.clientWidth;
|
|
34
|
+
const observer = new ResizeObserver(() => { if (field.clientWidth !== width) { width = field.clientWidth; resize(); } });
|
|
35
|
+
observer.observe(field.parentElement!);
|
|
36
|
+
return () => observer.disconnect();
|
|
37
|
+
}, [isEditing, text]);
|
|
38
|
+
const save = () => {
|
|
39
|
+
if (!text.trim()) return;
|
|
40
|
+
commands.updateAnnotation(annotation.id, { data: { text } }); commands.editAnnotation(null);
|
|
41
|
+
};
|
|
42
|
+
const cancel = () => {
|
|
43
|
+
if (!data?.text.trim()) commands.removeAnnotation(annotation.id);
|
|
44
|
+
else { commands.updateAnnotation(annotation.id, { data: { text: data.text } }); commands.editAnnotation(null); }
|
|
45
|
+
};
|
|
46
|
+
return <div className="demo-note-content" data-limr-card-interactive="true">
|
|
47
|
+
{isEditing ? <form onSubmit={event => { event.preventDefault(); save(); }}>
|
|
48
|
+
<textarea className="demo-note-editor" ref={input} aria-label={`${kind.label}内容`} rows={1} value={text} onChange={event => commands.updateAnnotation(annotation.id, { data: { text: data?.text ?? '', draft: event.target.value } })} placeholder={kind.hint} onKeyDown={event => {
|
|
49
|
+
if (event.nativeEvent.isComposing) return;
|
|
50
|
+
if (event.key === 'Escape') { event.preventDefault(); event.stopPropagation(); cancel(); }
|
|
51
|
+
else if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) { event.preventDefault(); save(); }
|
|
52
|
+
}} />
|
|
53
|
+
<div className="demo-note-actions"><button type="button" onClick={cancel}><ToolIcon name="close" /><span className="limr-underline">取消</span></button><button type="submit" className="demo-note-submit" disabled={!text.trim()}><ToolIcon name="check" /><span className="limr-underline">提交</span></button></div>
|
|
54
|
+
</form> : <><AnnotationMarkdown source={data?.text || '还没有内容。'} /><div className="demo-note-actions"><button type="button" onClick={() => { commands.updateAnnotation(annotation.id, { data: { text: data?.text ?? '', draft: data?.text ?? '' } }); commands.editAnnotation(annotation.id); }}><ToolIcon name="edit" /><span className="limr-underline">修改</span></button><button type="button" className="demo-note-delete" onClick={() => commands.removeAnnotation(annotation.id)}><ToolIcon name="trash" /><span className="limr-underline">删除</span></button></div></>}
|
|
55
|
+
</div>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Modules bind every footnote/note/question through the same annotation API. */
|
|
59
|
+
export function readingNotes(): RendererExtension {
|
|
60
|
+
return defineExtension({
|
|
61
|
+
name: 'reading-notes',
|
|
62
|
+
annotationTypes: kinds.map(kind => ({ type: kind.type, label: kind.label, color: kind.color, icon: <ToolIcon name={kind.icon} />, Content: NoteContent,
|
|
63
|
+
sidebar: { Preview: ({ data }: { data?: NoteData }) => <span>{data?.text || '正在编辑…'}</span> },
|
|
64
|
+
overlay: { previewWidth: 300, expand: { placement: 'center' as const, width: 400, maxHeight: '75dvh' } },
|
|
65
|
+
})),
|
|
66
|
+
actions: kinds.map(kind => ({ id: `reading-notes:${kind.type}`, label: kind.label, icon: <ToolIcon name={kind.icon} />, run: context => {
|
|
67
|
+
context.addAnnotation({ id: `note-${crypto.randomUUID()}`, type: kind.type, data: { text: '', draft: '' } satisfies NoteData,
|
|
68
|
+
anchors: context.selection.syntax.ranges.map(range => ({ range, documentId: context.document.id, quote: context.document.source.slice(range.start, range.end) })),
|
|
69
|
+
}, { edit: true });
|
|
70
|
+
context.clearSelection();
|
|
71
|
+
} })),
|
|
72
|
+
});
|
|
73
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,113 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linloir/limr",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Linloir's limr Is a Markdown Renderer — extensible reading and streaming components for React",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Linloir",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Linloir/LiMR.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://linloir.github.io/LiMR/",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Linloir/LiMR/issues"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public",
|
|
18
|
+
"registry": "https://registry.npmjs.org/"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"**/*.css"
|
|
22
|
+
],
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"docs/*.md",
|
|
28
|
+
"examples/*.tsx",
|
|
29
|
+
"benchmarks/results/*.json"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./core": {
|
|
37
|
+
"types": "./dist/core/index.d.ts",
|
|
38
|
+
"import": "./dist/core/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./react": {
|
|
41
|
+
"types": "./dist/react/index.d.ts",
|
|
42
|
+
"import": "./dist/react/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./extensions": {
|
|
45
|
+
"types": "./dist/extensions/index.d.ts",
|
|
46
|
+
"import": "./dist/extensions/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./styles.css": "./dist/styles.css",
|
|
49
|
+
"./styles/base.css": "./dist/base.css",
|
|
50
|
+
"./fonts.css": "./dist/fonts/maple.css",
|
|
51
|
+
"./math.css": "./dist/math.css",
|
|
52
|
+
"./package.json": "./package.json"
|
|
53
|
+
},
|
|
54
|
+
"main": "./dist/index.js",
|
|
55
|
+
"types": "./dist/index.d.ts",
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"react": "^18.3.0 || ^19.0.0",
|
|
58
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
59
|
+
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=20"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@floating-ui/react": "^0.27.20",
|
|
65
|
+
"katex": "^0.19.0",
|
|
66
|
+
"mdast-util-directive": "^3.1.1",
|
|
67
|
+
"mdast-util-from-markdown": "^2.1.0",
|
|
68
|
+
"mdast-util-gfm": "^3.1.0",
|
|
69
|
+
"mdast-util-math": "^3.0.0",
|
|
70
|
+
"mdast-util-mdx-jsx": "^3.2.0",
|
|
71
|
+
"micromark-extension-directive": "^4.0.0",
|
|
72
|
+
"micromark-extension-gfm": "^3.0.0",
|
|
73
|
+
"micromark-extension-math": "^3.1.0",
|
|
74
|
+
"micromark-extension-mdx-jsx": "^3.0.2",
|
|
75
|
+
"micromark-util-decode-string": "^2.0.1",
|
|
76
|
+
"micromark-util-types": "^2.0.3",
|
|
77
|
+
"shiki": "^4.5.0"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@fontsource-variable/noto-serif-sc": "^5.3.1",
|
|
81
|
+
"@playwright/test": "^1.64.0",
|
|
82
|
+
"@types/katex": "^0.16.8",
|
|
83
|
+
"@types/node": "^22.20.5",
|
|
84
|
+
"@types/react": "^19.3.0",
|
|
85
|
+
"@types/react-dom": "^19.3.0",
|
|
86
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
87
|
+
"react": "^19",
|
|
88
|
+
"react-dom": "^19",
|
|
89
|
+
"react-markdown": "^10.1.0",
|
|
90
|
+
"rehype-katex": "^7.0.1",
|
|
91
|
+
"remark-gfm": "^4.0.1",
|
|
92
|
+
"remark-math": "^6.0.0",
|
|
93
|
+
"tsup": "^8.5.1",
|
|
94
|
+
"tsx": "^4.23.15",
|
|
95
|
+
"typescript": "^5.9.3",
|
|
96
|
+
"vite": "^7.3.7",
|
|
97
|
+
"vitest": "^3.2.7"
|
|
98
|
+
},
|
|
99
|
+
"scripts": {
|
|
100
|
+
"dev": "vite --host 127.0.0.1",
|
|
101
|
+
"build": "tsup && node scripts/build-assets.mjs",
|
|
102
|
+
"build:playground": "vite build --base=/LiMR/",
|
|
103
|
+
"preview:playground": "vite preview --host 127.0.0.1 --base=/LiMR/",
|
|
104
|
+
"typecheck": "tsc --noEmit",
|
|
105
|
+
"test": "vitest run",
|
|
106
|
+
"test:browser": "playwright test",
|
|
107
|
+
"test:package": "node scripts/package-smoke.mjs",
|
|
108
|
+
"bench": "tsx benchmarks/run.ts",
|
|
109
|
+
"bench:browser": "tsx benchmarks/browser.ts",
|
|
110
|
+
"bench:selection": "tsx benchmarks/selection.ts",
|
|
111
|
+
"check": "pnpm typecheck && pnpm test && pnpm build"
|
|
112
|
+
}
|
|
6
113
|
}
|