{"_id":"@agent-arts/editor","_rev":"10-4c127131ea60f56521f2c154b3c4dada","name":"@agent-arts/editor","dist-tags":{"latest":"0.2.2"},"versions":{"0.0.1":{"name":"@agent-arts/editor","version":"0.0.1","_id":"@agent-arts/editor@0.0.1","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"dist":{"shasum":"5a962bcafb9a249a59c7c40236d69bc6ad5a18d3","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.0.1.tgz","fileCount":5,"integrity":"sha512-dEjApHhe9jGBm9JNIrH/sXx1Izm6Gy8zW9V6tKiFVc5G5jdUn74n4hvDd/Phyl17D7FO8Bnl3eX5Z2bOncy6WQ==","signatures":[{"sig":"MEYCIQCCeUdMpiJG3scM/uCQMPlreDVPrSQ/ReVyhcqthvLpfAIhAPVqcVG6TjVwsg/JeFqvQSBgj5MFDo2tEe/NHXF4fyNd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17566},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/core.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/core.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"gitHead":"c3f32d2e8974f452d04b861702e133b9276e2765","scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"_npmVersion":"11.7.0","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3","@codemirror/lang-markdown":"^6.2.3","@codemirror/language-data":"^6.3.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.0.1_1773661254379_0.7407801747540297","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@agent-arts/editor","version":"0.0.2","_id":"@agent-arts/editor@0.0.2","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"dist":{"shasum":"8ac43b79cc34956a722b0bfacf4f55c97c232911","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.0.2.tgz","fileCount":4,"integrity":"sha512-dsjiYzbhIuwROZLy535lW9SpVan+g6/WTFFt8X2Pt+T0Qot+/GOEd04BkGTsyFBSMwum3jRtU851SD5Y8sad1A==","signatures":[{"sig":"MEQCID0ad63De/e/9VXiTLR7qn2BnylmmVbRA1DW4xR1BXTMAiBPbJs2g2PN+oniTKDTYpyHV8Nl57KL76X2/ldhNaEcYw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27085},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"gitHead":"c749dcb7c73afb2381360617da8bbbad32ba2ce9","scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"_npmVersion":"11.7.0","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3","@codemirror/lang-markdown":"^6.2.3","@codemirror/language-data":"^6.3.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.0.2_1773712578235_0.4839879584814326","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@agent-arts/editor","version":"0.0.3","keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"author":{"name":"AgentArts Team"},"license":"MIT","_id":"@agent-arts/editor@0.0.3","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"homepage":"https://agent-arts.github.io/editor/","bugs":{"url":"https://github.com/agent-arts/editor"},"dist":{"shasum":"f22874ca19c074ea6deef8be84113d9a5b7eae2a","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.0.3.tgz","fileCount":5,"integrity":"sha512-QafP/dSjMFfJ1uYrHOPlixG+/KF6tZSeq00KZmr1SCdi1uTUOUwtARjx6hP1JCDI8qezhHdPt1zjZlOZRWRIfg==","signatures":[{"sig":"MEUCIF53nksjc/IM5k3Qv7+EbYR2v6KyC66/0hmXBrREOFnNAiEAkmYuPvb9dk4W6EMfuYNJain5NzER2k+OIKHkh/tqqvI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29905},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"repository":{"url":"git+ssh://git@github.com/agent-arts/editor.git","type":"git"},"_npmVersion":"10.8.2","description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","directories":{},"_nodeVersion":"20.20.1","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3","@codemirror/lang-markdown":"^6.2.3","@codemirror/language-data":"^6.3.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.0.3_1773730463966_0.05723238350398874","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@agent-arts/editor","version":"0.0.4","keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"author":{"name":"AgentArts Team"},"license":"MIT","_id":"@agent-arts/editor@0.0.4","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"homepage":"https://agent-arts.github.io/editor/","bugs":{"url":"https://github.com/agent-arts/editor"},"dist":{"shasum":"2286ad5613158e79c97eb3ccbe39b0cc10e0a6e5","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.0.4.tgz","fileCount":6,"integrity":"sha512-KB2KLG5P6k0JWIMPCzRbShRiaT4C/FkKu/CPWdT0dHMbVLuhoBDtaYCLTNqkJFeJxR3UZIcklBDg9K5VjkqKsw==","signatures":[{"sig":"MEUCIBz3JnJxxYh+ZE7D+yttXMHoXEgRcXiVHszuTPaN8FvIAiEAoXHIIvUU4ZPTcAtIl1tzOpihY63MP2sO/XHbQVxTwhU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":966843},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"repository":{"url":"git+ssh://git@github.com/agent-arts/editor.git","type":"git"},"_npmVersion":"10.8.2","description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","directories":{},"_nodeVersion":"20.20.1","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3","@codemirror/lang-markdown":"^6.2.3","@codemirror/language-data":"^6.3.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.0.4_1773730803625_0.6938046602055783","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@agent-arts/editor","version":"0.0.5","keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"author":{"name":"AgentArts Team"},"license":"MIT","_id":"@agent-arts/editor@0.0.5","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"homepage":"https://agent-arts.github.io/editor/","bugs":{"url":"https://github.com/agent-arts/editor"},"dist":{"shasum":"7f87b7bf43427e7dafd42cc1a9363e1a948e3acf","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.0.5.tgz","fileCount":6,"integrity":"sha512-mNbunMRmjBSdHpHuDFs3AkOcFRfMdOdlDGldXxoBe3/7jWHoekbtUdT9DAkxcLO0Xe2EWLveEP/x4tAbrGXNTw==","signatures":[{"sig":"MEUCIQD/ainWBbmP7YKkyFBmMHhc7qCw6QrfE3hs1IHwgqgm6QIgBopf4Bd2zMLKKra3w4ULmo+Hs4aw+jb3tP1iSToCQd0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":966843},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"repository":{"url":"git+ssh://git@github.com/agent-arts/editor.git","type":"git"},"_npmVersion":"10.8.2","description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","directories":{},"_nodeVersion":"20.20.1","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3","@codemirror/lang-markdown":"^6.2.3","@codemirror/language-data":"^6.3.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.0.5_1773731387232_0.6173130889727227","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@agent-arts/editor","version":"0.1.0","keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"author":{"name":"AgentArts Team"},"license":"MIT","_id":"@agent-arts/editor@0.1.0","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"homepage":"https://agent-arts.github.io/editor/","bugs":{"url":"https://github.com/agent-arts/editor"},"dist":{"shasum":"6a02bb299f2883058f6d188f464730147146af29","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.1.0.tgz","fileCount":6,"integrity":"sha512-UDFPh6taD/5CTCmg43lHlsKL9FUQ44r46kxcCR36LfIrRoLcQlzK9lZV5ZeUrOFrVWT82DRnvRugHPcnqkcIbA==","signatures":[{"sig":"MEYCIQCVnRAIm+s9/AKiaBTE04yay2ftKV3trztrtYbezkCGPgIhAKRAW1ettkeBLefNxCWmjGcZ3eJnuyd5VT4yzdC4ah9P","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":979997},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview","build:watch":"vite build --watch"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"repository":{"url":"git+ssh://git@github.com/agent-arts/editor.git","type":"git"},"_npmVersion":"10.8.2","description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.1.0_1773791895377_0.9252494346176046","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agent-arts/editor","version":"0.1.1","keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"author":{"name":"AgentArts Team"},"license":"MIT","_id":"@agent-arts/editor@0.1.1","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"homepage":"https://agent-arts.github.io/editor/","bugs":{"url":"https://github.com/agent-arts/editor"},"dist":{"shasum":"d07f3ec7434e02c8bd963ab378ed6684742e875a","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.1.1.tgz","fileCount":6,"integrity":"sha512-8c3cQ5KiXhQmxHcWhTH7MOu9G863CoA3wLrR+EDbqBtk18qsHJLrFBPzAPz3TB5cHaz2UHyUx+54Xv/1UjbizA==","signatures":[{"sig":"MEYCIQCCKR1Gj9ihUCwTXDAzxt4eqKaw+ZVd0FrHtvS78rIHJAIhANZQ6DmFMqgSvLm9Afz9fCRkN6U/CuspJy+wpHrX9E2F","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":968966},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview","build:watch":"vite build --watch"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"repository":{"url":"git+ssh://git@github.com/agent-arts/editor.git","type":"git"},"_npmVersion":"10.8.2","description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.1.1_1773793896619_0.646708120904814","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agent-arts/editor","version":"0.2.0","keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"author":{"name":"AgentArts Team"},"license":"MIT","_id":"@agent-arts/editor@0.2.0","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"homepage":"https://agent-arts.github.io/editor/","bugs":{"url":"https://github.com/agent-arts/editor"},"dist":{"shasum":"e4d24d370c1ee640739f7a9c64e86d2f9cf28d6e","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.2.0.tgz","fileCount":6,"integrity":"sha512-bX2ALVwmi5uQx8lScJn+lyLDWnE57Env8nw6oPAf8pQqLgMbqhJDVpqW1kgrpZAIw6/wFNeQFn3uJTz0OfMOug==","signatures":[{"sig":"MEYCIQCHs/yZX1FgHpx1Swwl1lbM7jLdSU9uGV4Kb/6/5RIW/gIhAIcAnB3HlS4rqv+9bUOtJLgX5hVaAJDa3nUAEB3s6K0d","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":979405},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview","build:watch":"vite build --watch"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"repository":{"url":"git+ssh://git@github.com/agent-arts/editor.git","type":"git"},"_npmVersion":"10.8.2","description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.2.0_1774005598817_0.8662043628824163","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@agent-arts/editor","version":"0.2.1","keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"author":{"name":"AgentArts Team"},"license":"MIT","_id":"@agent-arts/editor@0.2.1","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"homepage":"https://agent-arts.github.io/editor/","bugs":{"url":"https://github.com/agent-arts/editor"},"dist":{"shasum":"3acafba9765a7876cbc48d53696fe8533b55a65c","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.2.1.tgz","fileCount":6,"integrity":"sha512-LFAFKVndfOZhl7cYUxY4/R7s3FlDtMYLD8GgkqPLYSygvmMPUSACLMg31Izd9G5He7YmlUrWsZ1b+hhX+DeLmw==","signatures":[{"sig":"MEYCIQCZX44pTB9CsRgtZ98yz7iSqnccBTUPzJqRGFsQrwZtBQIhAOyKwgvGKOA8bT/lGV/bIjOZSPlF11DTkCzbCSL/g7yo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":998811},"main":"./dist/editor.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/editor.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview","build:watch":"vite build --watch"},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"repository":{"url":"git+ssh://git@github.com/agent-arts/editor.git","type":"git"},"_npmVersion":"10.8.2","description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","dependencies":{"@codemirror/view":"^6.23.0","@codemirror/state":"^6.4.0","@codemirror/commands":"^6.3.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","typescript":"^5.2.2","@types/node":"^20.11.0","vite-plugin-dts":"^3.7.0"},"_npmOperationalInternal":{"tmp":"tmp/editor_0.2.1_1774342993126_0.4037885676680555","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@agent-arts/editor","version":"0.2.2","description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","author":{"name":"AgentArts Team"},"license":"MIT","homepage":"https://agent-arts.github.io/editor/","repository":{"type":"git","url":"git+ssh://git@github.com/agent-arts/editor.git"},"bugs":{"url":"https://github.com/agent-arts/editor"},"keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"type":"module","sideEffects":false,"main":"./dist/editor.umd.cjs","module":"./dist/editor.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/editor.js","require":"./dist/editor.umd.cjs"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"dev":"vite","build":"vite build","build:watch":"vite build --watch","preview":"vite preview"},"dependencies":{"@codemirror/commands":"^6.3.3","@codemirror/state":"^6.4.0","@codemirror/view":"^6.23.0"},"devDependencies":{"typescript":"^5.2.2","@types/node":"^20.11.0","vite":"^5.0.8","vite-plugin-dts":"^3.7.0"},"_id":"@agent-arts/editor@0.2.2","_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-HL8XG89r12LXdXso9yE54dMChRwKFweA53uhGGDXF/uCYBzo+i4XWZ7t2iAYmKVqpR4z6IqKytu9q2oBzWM5XQ==","shasum":"bbb26504b22d5bd3a6fd915a8e99a4a89b6dd0ff","tarball":"https://registry.npmjs.org/@agent-arts/editor/-/editor-0.2.2.tgz","fileCount":6,"unpackedSize":1001658,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICw3MaSxrLzv104W1LeYzQsGkD8eLCe9RMb6Lsl291TsAiAawNKBZy4gfBcACpCyDd+Ivf6SRCqyiMFqXVi1qLAHxw=="}]},"_npmUser":{"name":"kagol","email":"kagol@qq.com"},"directories":{},"maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/editor_0.2.2_1774350589008_0.14612701021248142"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T11:40:54.209Z","modified":"2026-03-24T11:09:49.358Z","0.0.1":"2026-03-16T11:40:54.533Z","0.0.2":"2026-03-17T01:56:18.423Z","0.0.3":"2026-03-17T06:54:24.125Z","0.0.4":"2026-03-17T07:00:03.879Z","0.0.5":"2026-03-17T07:09:47.391Z","0.1.0":"2026-03-17T23:58:15.596Z","0.1.1":"2026-03-18T00:31:36.874Z","0.2.0":"2026-03-20T11:19:59.025Z","0.2.1":"2026-03-24T09:03:13.293Z","0.2.2":"2026-03-24T11:09:49.219Z"},"bugs":{"url":"https://github.com/agent-arts/editor"},"author":{"name":"AgentArts Team"},"license":"MIT","homepage":"https://agent-arts.github.io/editor/","keywords":["prompt","editor","codemirror","agent-arts","typescript","ai","ai-agent"],"repository":{"type":"git","url":"git+ssh://git@github.com/agent-arts/editor.git"},"description":"A prompt editor based on CodeMirror 6, support Vue.js 3 and Angular.","maintainers":[{"name":"kagol","email":"kagol@qq.com"}],"readme":"# @agent-arts/editor\n\n一个基于 CodeMirror 6 的提示词编辑器，框架无关，支持 Vue.js、Angular、React。\n\n## 特性\n\n- 编辑块 edit-block：可编辑\n- 插件块 plugin-block：不可编辑，通过大括号 `{` 呼起，用户插入插件、工作流、变量等\n- AI 对话 ai-dialog：通过斜线 `/` 或拖选内容呼起\n\n## 演示动画\n\n![演示动画](./product-animation.gif)\n\n## 使用\n\n### 安装\n\n```bash\nnpm install @agent-arts/editor\n```\n\n### 快速上手\n\n```typescript\nimport { CustomEditor, type CustomEditorOptions } from '@agent-arts/editor';\n\nconst options: CustomEditorOptions = {\n  parent: document.querySelector('#editor')!,\n  initialDoc: '# 欢迎使用 AgentArts Editor\\n\\n在这里输入提示词，支持 Markdown。\\n\\n在下面插入一个编辑块：{#EditorBlock id=\"block-1\" placeholder=\"请输入...\"#}智能助手{#/EditorBlock#}\\n\\n也可以输入 { 呼起插件块弹窗，输入 / 或框选文本呼起 AI。',\n  onOpenPopup: (id, rect) => {\n    // 处理编辑块弹窗\n  },\n  onTriggerPluginPopup: (pos) => {\n    // 输入 '{' 时触发\n  },\n  onHidePluginPopup: () => {\n    // 当触发字符被删除/修改时隐藏插件弹窗（可选）\n  },\n  onTriggerAIDialog: (pos) => {\n    // 输入 '/' 或点击选区按钮时触发\n  },\n  onHideAIDialog: () => {\n    // 当触发字符被删除/修改时隐藏 AI 对话框（可选）\n  },\n  onChange: (data) => {\n    // data 是字符串模板（见“数据格式”）\n  }\n};\n\nconst editor = new CustomEditor(options);\n```\n\n### 数据格式\n\n`editor.getData()` 和 `onChange(data)` 返回的都是字符串（`EditorData = string`），其中包含两类块标记：\n\n- 编辑块（可编辑）：\n\n```txt\n{#EditorBlock id=\"block-1\" placeholder=\"请输入...\"#}预设内容{#/EditorBlock#}\n```\n\n- 插件块（不可编辑）：\n\n```txt\n{#PluginBlock id=\"plugin-1\" type=\"plugin\"#}MCP服务01{#/PluginBlock#}\n{#PluginBlock id=\"workflow-1\" type=\"workflow\"#}Bing搜索{#/PluginBlock#}\n```\n\n- 变量块：直接使用 `{{name}}`（可通过 `editor.addVariableBlock(pos, name)` 插入）。\n\n### 接入弹窗（编辑块 / 插件块 / AI）\n\n本包只负责在编辑器内部“触发时机”和“坐标信息”的回调；UI（弹窗、列表、AI 对话框）需要你在业务侧实现。\n\n```typescript\nimport { CustomEditor, type EditorBlock, type PluginBlock } from '@agent-arts/editor';\n\nlet pluginTriggerPos = 0;\n\nconst editor = new CustomEditor({\n  parent: document.querySelector('#editor')!,\n  initialDoc: '',\n  onOpenPopup: (id, rect) => {\n    const block = editor.getBlock(id);\n    if (!block) return;\n\n    // rect 是块在屏幕上的 DOMRect，你可以据此定位弹窗\n    // 打开弹窗后，用户修改 placeholder / presetText，调用 editor.syncBlock(updated)\n  },\n  onTriggerPluginPopup: (pos) => {\n    pluginTriggerPos = pos;\n    const coords = editor.coordsAtPos(pos);\n    // coords 可用于定位弹窗；插件列表 UI 由业务侧实现\n  },\n  onHidePluginPopup: () => {\n    // 关闭插件列表弹窗（可选）\n  },\n  onTriggerAIDialog: (pos) => {\n    const coords = editor.coordsAtPos(pos);\n    // 打开 AI 对话框（UI 与请求逻辑由业务侧实现）\n  },\n  onHideAIDialog: () => {\n    // 关闭 AI 对话框（可选）\n  }\n});\n\nfunction insertPluginBlock(item: PluginBlock) {\n  editor.addPluginBlock(pluginTriggerPos, item);\n}\n\nfunction insertVariableBlock(name: string) {\n  editor.addVariableBlock(pluginTriggerPos, name);\n}\n\nfunction updateEditBlock(block: EditorBlock) {\n  editor.syncBlock(block);\n}\n```\n\n### 核心 API\n\n- `new CustomEditor(options)`: 创建编辑器实例。\n- `editor.addBlock()`: 在当前光标处插入一个编辑块，并返回该块数据。\n- `editor.addPluginBlock(pos, block)`: 在 `pos` 位置插入插件块（通常 `pos` 来自 `onTriggerPluginPopup`）。\n- `editor.addVariableBlock(pos, name)`: 在 `pos` 位置插入变量块 `{{name}}`。\n- `editor.syncBlock(block)`: 同步外部更新后的编辑块数据（placeholder / presetText）。\n- `editor.getBlock(id)`: 获取某个编辑块的当前数据。\n- `editor.coordsAtPos(pos)`: 获取文档位置对应的坐标（用于定位弹窗）。\n- `editor.getData()`: 获取当前内容字符串（包含块标记）。\n- `editor.destroy()`: 销毁编辑器实例。\n\n### 复制 / 剪切 / 粘贴\n\n- 复制/剪切时，会把选区内的编辑块与插件块序列化为 `{#EditorBlock ...#}` / `{#PluginBlock ...#}` 的文本形式写入剪贴板。\n- 粘贴时，如果检测到上述块标记，会自动解析并还原为对应的块。\n\n### 类型\n\n```ts\nexport interface EditorBlock {\n  id: string;\n  placeholder: string;\n  presetText: string;\n}\n\nexport interface PluginBlock {\n  id: string;\n  name: string;\n  type: 'plugin' | 'workflow' | 'variable';\n}\n\nexport type InitialBlock = {\n  pos: number;\n  len?: number;\n  block: EditorBlock | PluginBlock;\n};\n\nexport type EditorData = string;\n```\n","readmeFilename":"README.md"}