{"_id":"@aurouscia/au-undo-redo","_rev":"11-51e0131b676b3a423c9c545df9190251","name":"@aurouscia/au-undo-redo","dist-tags":{"latest":"1.1.0"},"versions":{"0.0.0":{"name":"@aurouscia/au-undo-redo","version":"0.0.0","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@0.0.0","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"e40b1be4d7981be1a5bee3c481630707df7c9e85","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-0.0.0.tgz","fileCount":6,"integrity":"sha512-drJ1io3oa74i1aMkaDfR2ry4cwtvANXmbhvMyIuC3rRB4om62OE6AH0k2Q7ec/E8vEJTKHvGLcbepwpQbl2Uew==","signatures":[{"sig":"MEUCIF/Xwc1MGWqpilkalay+RSDnVntVHFE2fEoLS+6M00nYAiEA36WdKE3LKshuuiTIoy6/fc9YGqPc1fkLnHwmLq8woAU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17838},"main":"index.js","type":"module","types":"./index.d.ts","gitHead":"b2be7a9afe1a3cfca921936634d7dcc6f75e7ed9","scripts":{"test":"vitest"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"_npmVersion":"10.2.3","description":"一个简易\"撤销/重做\"小工具","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.1.3","typescript":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_0.0.0_1704810405473_0.12458772034609744","host":"s3://npm-registry-packages"}},"0.0.1":{"name":"@aurouscia/au-undo-redo","version":"0.0.1","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@0.0.1","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"b6af10ec86e4a5a97af54545b2e09d7c0aa212f2","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-0.0.1.tgz","fileCount":6,"integrity":"sha512-21mgze4yN4lp5YlUoQ+Z/w2HScmh0t0zxh4VXjdgMye8i2/QlDT8DaL9bNYfz6AMl0yFyhjekagvGaBufYqaJA==","signatures":[{"sig":"MEUCIQDFyqKwGffn7AqntlrYauFe3q5VqMxYNIDfI/XAyefZxQIgHJdpeD1RVwbx0hZSu1912+u32lz3OuTTOXMJ1E3wF28=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18458},"main":"index.js","type":"module","types":"./index.d.ts","gitHead":"5818990ebb6d0728e15fe7ceddb46c203adb34ab","scripts":{"test":"vitest"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-undo-redo-util.git"},"_npmVersion":"10.2.3","description":"一个简易\"撤销/重做\"小工具","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.1.3","typescript":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_0.0.1_1704813013922_0.23786805153911894","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@aurouscia/au-undo-redo","version":"0.0.2","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@0.0.2","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"b7f9244f13b5ed97f427c1d28099655543ca9a01","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-0.0.2.tgz","fileCount":6,"integrity":"sha512-Pl6TLbVE1jsagaivJi40a9x6UwOHkedYY5LDJr43P0GB6fLpiwHR3cpvjeXZYblHTNaClA0lqFoJ7SRWaQkwgg==","signatures":[{"sig":"MEQCIAkz5XN4hHL/xLdd/jyu6UxcMOEtZGY4q0WOYERWgRe7AiBgjXYxQzaB5E50cjyDWkZK3GzWAe1Z7Q3IKSiY7hobWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21648},"main":"index.js","type":"module","types":"./index.d.ts","gitHead":"751d6bcc9ca508142e99bcce4ad401b4b3568edf","scripts":{"test":"vitest"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-undo-redo-util"},"_npmVersion":"10.2.3","description":"一个简易\"撤销/重做\"小工具","directories":{},"_nodeVersion":"20.10.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.1.3","typescript":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_0.0.2_1704884845680_0.3553338924996665","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@aurouscia/au-undo-redo","version":"0.1.0","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@0.1.0","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"28c5197875fa2bbbf3f4628d4a15fe55c1ed6304","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-0.1.0.tgz","fileCount":5,"integrity":"sha512-d9Mwwdbe+B/HuHtQibA46+Q+w+dyGg0/uurAZJQOyXjtZz7YYJ3ylRcbg3pm+KGFLNitdVKm7eozlJmffrqPKA==","signatures":[{"sig":"MEUCIQCzDLtyrMTUA/zOwqQ7BITyPcsaISXpVt39QAyTxzzljAIgDHljVvxUGPxKwKiaxmBeMjqtB4+mjy/wB+RsEAoEq/0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15730},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ba4299141a6cf32e491dac99b97ed2cc43b60f0b","scripts":{"test":"vitest"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-undo-redo-util"},"_npmVersion":"10.2.3","description":"一个简易\"撤销/重做\"小工具","directories":{},"_nodeVersion":"20.10.0","dependencies":{"lodash":"^4.17.21"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.1.3","typescript":"^5.3.3","@types/lodash":"^4.14.202"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_0.1.0_1706857614287_0.6730330276361021","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@aurouscia/au-undo-redo","version":"0.2.0","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@0.2.0","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"534969b7004b72ea0a1fce5c1ab5540c43f7ef73","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-0.2.0.tgz","fileCount":5,"integrity":"sha512-QIHaZymI5voaT44pBhqBnxQGS4TEHVleYx8uHl2lCAjPuz0Za9ih17IviDKJ/AoP6v+/ROR1cVwyIc08IEbFtw==","signatures":[{"sig":"MEUCIGc5rEF6yLBzhxRKNDIV5MN/f/nrACvCbbAD67WypSVvAiEAmslkioXnXvPWAvipXtS+vmojesRDw1pKiibkDQeX2Nk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16119},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9548dcca8d4710fa14ed284e9dede4950c6e650a","scripts":{"test":"vitest","build":"tsc","prepack":"npm run build"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-undo-redo-util","type":"git"},"_npmVersion":"10.5.0","description":"一个简易\"撤销/重做\"小工具","directories":{},"_nodeVersion":"20.11.1","dependencies":{"rfdc":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.1.3","typescript":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_0.2.0_1710678429128_0.5600480047443996","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@aurouscia/au-undo-redo","version":"0.2.1","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@0.2.1","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"258abc316950f17ce30fb564498b923dac90a6e1","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-0.2.1.tgz","fileCount":5,"integrity":"sha512-WbAV28te+PPzihf4pIFg62dyBkwH9to4rWPdLoZe/t99LXLU0JfKesUInoxWJMzdeTotqe1vo9pnHy0qCrcLCw==","signatures":[{"sig":"MEUCIQD08hQo2u9t2nsVR3h0+VfRH8fNtdlIuYS7MoObm7B6HAIgPZfzWLpe06bxA7wH/wVa6Vt1BNuwmFUB4xgAQc16kOg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15983},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f9d379226a2741b1ed8014277c5b14899c1da1f6","scripts":{"test":"vitest","build":"tsc","prepack":"npm run build"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-undo-redo-util","type":"git"},"_npmVersion":"10.8.1","description":"一个简易\"撤销/重做\"小工具","directories":{},"_nodeVersion":"20.11.1","dependencies":{"rfdc":"^1.4.1"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.1","typescript":"^5.5.3"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_0.2.1_1720457954121_0.5688275774883294","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@aurouscia/au-undo-redo","version":"0.3.0","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@0.3.0","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"49ae3fd3c5f6556138004db28b0a0cea614afe2f","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-0.3.0.tgz","fileCount":5,"integrity":"sha512-pZ0dL58L4bV/81iACKSuJBMS7h7Mw6eD+MgECjz87aTr2hziUVok2jQXl/w+sCukCsWpKfvqdNhvOV58lLQ7mg==","signatures":[{"sig":"MEQCIAOiquDSacTDYhw6pwh0EGo30n9SjLcwPB1HBWoMrUblAiBgqp04JwKI8pZcfmE9KOAx1j8N2bQ2aGu7u3Ab8uczfA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19536},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"60aadd0d72bcbc6205bfc515e3f9be3555438d27","scripts":{"test":"vitest","build":"vite build","prepack":"npm run build","test-watch":"vitest --watch"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-npm-pkgs","type":"git","directory":"packages/au-undo-redo"},"_npmVersion":"11.0.0","description":"一个简易\"撤销/重做\"小工具","directories":{},"_nodeVersion":"22.10.0","dependencies":{"rfdc":"^1.4.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.2.3","vitest":"^3.0.9","typescript":"^5.8.2","vite-plugin-dts":"^4.5.3"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_0.3.0_1742821362693_0.878932155358868","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@aurouscia/au-undo-redo","version":"1.0.0","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@1.0.0","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"54bf3fb51154ccf3c60b73535dbdc4060f98dc55","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-1.0.0.tgz","fileCount":5,"integrity":"sha512-lCGJRGfdNC+iQLjyBRpk492MWZu6C3G3toL0rvvfsu5VBVpJaSSsaeKJqOlP79AhUJxcJQtMPiPmPIKlpPbdVA==","signatures":[{"sig":"MEUCIQCf4YFUdQDerEiH8gphXWOulipJ0b/gI5R2cyLeiSLZwQIgVGL730n4RDpr72wmyJzJMlxSmZLHY3J/ZilB9Dym7vw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30653},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"0fae80e899b5539d66738019c1dad1274b8b1386","scripts":{"test":"vitest","build":"vite build","prepack":"npm run build","test-watch":"vitest --watch"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-npm-pkgs","type":"git","directory":"packages/au-undo-redo"},"_npmVersion":"11.6.2","description":"一个轻量级的撤销/重做（Undo/Redo）状态管理工具，支持两种存储模式：完整状态存储和增量补丁存储。","directories":{},"_nodeVersion":"24.13.0","dependencies":{"rfdc":"^1.4.1","fast-deep-equal":"^3.1.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","vitest":"^4.0.18","typescript":"^5.9.3","vite-plugin-dts":"^4.5.4"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_1.0.0_1770731207066_0.41336558301927084","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aurouscia/au-undo-redo","version":"1.0.1","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@1.0.1","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"38a50d3cfb28efdb955e316446b21d31aa3bab3a","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-1.0.1.tgz","fileCount":5,"integrity":"sha512-Wrw0K24zp4CtVxgsXS19B53zgA6L2cgOAvLJvrKy0ZTysuljYUJVKkwkzDw3rG/jdGtUIInogVY0sn2L64Dlhw==","signatures":[{"sig":"MEUCIAhhJjWoitcFJzzQLxZSBxSlNwxOHfaZHZz5YWK+D8K7AiEAp8S4vEXVLXm1znwUMFOyihAO7In9752P4BEnxpiIMVY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32117},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"7f3c9159dc9d6bbda9f1aacfff523eb8a4511dca","scripts":{"test":"vitest","build":"vite build","prepack":"npm run build","test-watch":"vitest --watch"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-npm-pkgs","type":"git","directory":"packages/au-undo-redo"},"_npmVersion":"11.8.0","description":"一个轻量级的撤销/重做（Undo/Redo）状态管理工具，支持两种存储模式：完整状态存储和增量补丁存储。","directories":{},"_nodeVersion":"24.13.1","dependencies":{"rfdc":"^1.4.1","fast-deep-equal":"^3.1.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","vitest":"^4.0.18","typescript":"^5.9.3","vite-plugin-dts":"^4.5.4"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_1.0.1_1771418202048_0.7880495209914891","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aurouscia/au-undo-redo","version":"1.0.2","author":{"name":"Au"},"license":"Apache-2.0","_id":"@aurouscia/au-undo-redo@1.0.2","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"dist":{"shasum":"c913880c358e2bccde7508a92928a6deb4255ad4","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-1.0.2.tgz","fileCount":9,"integrity":"sha512-qj4RCsz2vTPDPi9lkuHWdTXjiN/RIedbA0GPIE0C79wX7/t56rBV5W/j3T/GltyNLr2wkcq+Xx1uGcLawmxLbw==","signatures":[{"sig":"MEUCIDKEOYxqP+BbYoUGVDbAIZ0JUkC/H20gEdYerw6KETY5AiEAhJZD+qL9q/3gS2T/hrAqhaU/RH3Fdm2DKydTUra1hOA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32578},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"78ddff8752aa24f102e695b73453b015781227e8","scripts":{"test":"vitest","build":"vite build","prepack":"npm run build","test:run":"vitest","test-watch":"vitest --watch"},"_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-npm-pkgs","type":"git","directory":"packages/au-undo-redo"},"_npmVersion":"11.13.0","description":"一个轻量级的撤销/重做（Undo/Redo）状态管理工具，支持两种存储模式：完整状态存储和增量补丁存储。","directories":{},"_nodeVersion":"24.16.0","dependencies":{"rfdc":"^1.4.1","fast-deep-equal":"^3.1.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.4","vitest":"^4.1.10","typescript":"^7.0.2","vite-plugin-dts":"^5.0.3","@typescript/typescript6":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/au-undo-redo_1.0.2_1783791919031_0.8541463903554376","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"_id":"@aurouscia/au-undo-redo@1.1.0","dist":{"shasum":"987194be15fb8d93a99457987c0c965e34fc4c41","tarball":"https://registry.npmjs.org/@aurouscia/au-undo-redo/-/au-undo-redo-1.1.0.tgz","fileCount":5,"integrity":"sha512-MQG9hnl6IbJiZpoK0pem1Pj9Nmo9lr9J6vIYXEyCaROUh9ngbPEABI2zRbYN+hmMBh74WmPDFgrqzoG2tyRl9Q==","signatures":[{"sig":"MEUCIQDkG/Usgd4oiOJBuuqAd6Q3daRgXliC5OzJjfskXqvw8gIgU2f4xcsuRZd+SLWZBt0Qz740WJ89xAX9rHf9oz40ZE4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCgDdD5TgG9X4zM4Wvd8HceX8/1suavrj1ZoyeGYm8tngIhAJ8WaWLljwLWTUdhHLTaoEgEq4dh/E73wrVPOWbXlLff"}],"unpackedSize":33039},"main":"dist/index.js","name":"@aurouscia/au-undo-redo","type":"module","types":"./dist/index.d.ts","author":{"name":"Au"},"module":"./dist/index.js","gitHead":"52d4fa5fb4da7b9b65cfff5d56486c68be221abc","license":"Apache-2.0","scripts":{"test":"vitest","build":"vite build","prepack":"npm run build","test:run":"vitest","test-watch":"vitest --watch"},"version":"1.1.0","_npmUser":{"name":"aurouscia","email":"18971501210@189.cn"},"repository":{"url":"https://gitee.com/au114514/au-npm-pkgs","type":"git","directory":"packages/au-undo-redo"},"_npmVersion":"11.13.0","description":"一个轻量级的撤销/重做（Undo/Redo）状态管理工具，支持两种存储模式：完整状态存储和增量补丁存储。","directories":{},"maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"_nodeVersion":"24.16.0","dependencies":{"rfdc":"^1.4.1","fast-deep-equal":"^3.1.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","vite-plugin-dts":"^5.0.3","@typescript/typescript6":"^6.0.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/au-undo-redo_1.1.0_1789630616313_0.5745721105187611"}}},"time":{"created":"2024-01-09T14:26:45.330Z","modified":"2026-09-17T07:36:56.573Z","0.0.0":"2024-01-09T14:26:45.625Z","0.0.1":"2024-01-09T15:10:14.096Z","0.0.2":"2024-01-10T11:07:25.860Z","0.1.0":"2024-02-02T07:06:54.463Z","0.2.0":"2024-03-17T12:27:09.314Z","0.2.1":"2024-07-08T16:59:14.267Z","0.3.0":"2025-03-24T13:02:42.885Z","1.0.0":"2026-02-10T13:46:47.208Z","1.0.1":"2026-02-18T12:36:42.185Z","1.0.2":"2026-07-11T17:45:19.170Z","1.1.0":"2026-09-17T07:36:56.398Z"},"author":{"name":"Au"},"license":"Apache-2.0","repository":{"url":"https://gitee.com/au114514/au-npm-pkgs","type":"git","directory":"packages/au-undo-redo"},"description":"一个轻量级的撤销/重做（Undo/Redo）状态管理工具，支持两种存储模式：完整状态存储和增量补丁存储。","maintainers":[{"name":"aurouscia","email":"18971501210@189.cn"}],"readme":"# au-undo-redo\n\n一个轻量级的撤销/重做（Undo/Redo）状态管理工具，支持两种存储模式：完整状态存储和增量补丁存储。\n\n## 安装\n\n```bash\nnpm install @aurouscia/au-undo-redo\n```\n\n## 特性\n\n- 🔄 **两种存储模式**：完整状态存储（StateStore）和增量补丁存储（PatchStore）\n- 🧠 **智能去重**：自动跳过无变化的状态记录\n- 🗂️ **带 ID 数组支持**：对带有 `id` 属性的数组进行智能差异计算\n- 📦 **深拷贝保护**：使用 `rfdc` 进行高性能深拷贝，防止外部修改影响历史记录\n- ⚡ **轻量快速**：使用 `fast-deep-equal` 进行高效的深度比较\n- 🎯 **TypeScript 支持**：完整的类型定义\n\n## 快速开始\n\n### AurStateStore - 完整状态存储\n\n适用于状态对象较小，或需要简单实现的场景。\n\n```typescript\nimport { AurStateStore } from '@aurouscia/au-undo-redo'\n\ninterface EditorState {\n  title: string\n  content: string\n  settings: { fontSize: number }\n}\n\n// 创建 store，容量为 20（默认），可选回调函数\nconst store = new AurStateStore<EditorState>(20, (canUndo, canRedo) => {\n  console.log('Can undo:', canUndo, 'Can redo:', canRedo)\n})\n\n// 写入状态\nstore.push({ title: 'Hello', content: 'World', settings: { fontSize: 14 } })\nstore.push({ title: 'Hello', content: 'World!', settings: { fontSize: 14 } })\n\n// 撤销\nconst prevState = store.undo()\n\n// 重做\nconst nextState = store.redo()\n```\n\n### AurPatchStore - 增量补丁存储\n\n适用于大型状态对象，只存储差异补丁，节省内存。\n\n```typescript\nimport { AurPatchStore } from '@aurouscia/au-undo-redo'\n\ninterface AppState {\n  user: { name: string; email: string }\n  items: Array<{ id: number; text: string; done: boolean }>\n  settings: { theme: 'light' | 'dark' }\n}\n\nconst initialState: AppState = {\n  user: { name: 'John', email: 'john@example.com' },\n  items: [\n    { id: 1, text: 'Task 1', done: false },\n    { id: 2, text: 'Task 2', done: true }\n  ],\n  settings: { theme: 'light' }\n}\n\nconst store = new AurPatchStore<AppState>(initialState, 50)\n\n// 修改普通属性\nstore.push({\n  ...store.currentState,\n  user: { name: 'Jane', email: 'john@example.com' }\n})\n\n// 修改带 id 的数组（智能差异计算）\nstore.push({\n  ...store.currentState,\n  items: [\n    { id: 1, text: 'Task 1 modified', done: true },  // 修改\n    { id: 2, text: 'Task 2', done: true },           // 不变\n    { id: 3, text: 'Task 3', done: false }           // 新增\n  ]\n})\n\n// 撤销会恢复到之前的状态\nconst prevState = store.undo()\n```\n\n## API 参考\n\n### 构造函数\n\n```typescript\nnew AurStateStore<T>(historyMaxLength?: number, callBack?: AurAvailabilityCallBack)\nnew AurPatchStore<T>(initialState: T, historyMaxLength?: number, callBack?: AurAvailabilityCallBack)\n```\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| `initialState` | `T` | - | PatchStore 需要初始状态 |\n| `historyMaxLength` | `number` | `20` | 历史记录最大容量，超出后丢弃最老的记录 |\n| `callBack` | `(canUndo: boolean, canRedo: boolean) => void` | - | 状态可用性变化时的回调 |\n\n### 方法\n\n| 方法 | 返回值 | 说明 |\n|------|--------|------|\n| `push(state)` | `void` | 写入新状态 |\n| `undo()` | `T \\| undefined` | 撤销到上一步，返回状态或 `undefined`（如果没有可撤销的） |\n| `redo()` | `T \\| undefined` | 重做到下一步，返回状态或 `undefined`（如果没有可重做的） |\n\n### 属性\n\n| 属性 | 类型 | 说明 |\n|------|------|------|\n| `currentState` | `T` | PatchStore 特有，获取当前状态 |\n| `history` | `T[]` | 历史记录数组（只读） |\n\n## 高级特性\n\n### 带 ID 的数组处理\n\nPatchStore 对带有 `id` 属性的数组会进行智能差异计算：\n\n- 根据 `id` 匹配数组元素\n- 支持新增、删除、修改操作\n- 如果数组中有重复 `id` 或部分元素没有 `id`，会自动退化为普通数组处理\n\n```typescript\ninterface State {\n  items: Array<{ id: number; name: string }>\n}\n\n// 这种数组会走智能差异计算\nconst state1 = { items: [{ id: 1, name: 'A' }, { id: 2, name: 'B' }] }\n\n// 这种数组会退化为普通属性处理（因为有重复 id）\nconst state2 = { items: [{ id: 1, name: 'A' }, { id: 1, name: 'B' }] }\n```\n\n### 无变化自动跳过\n\n两个 Store 都会自动检测状态是否真正发生变化：\n\n- 引用相同（`===`）的对象不会记录\n- 深度相等（内容相同）的对象不会记录\n\n```typescript\nconst store = new AurStateStore<Data>(20)\n\nconst data = { x: 1 }\nstore.push(data)  // 记录\nstore.push(data)  // 不记录（引用相同）\nstore.push({ x: 1 })  // 不记录（深度相等）\nstore.push({ x: 2 })  // 记录（有变化）\n```\n\n## 选择合适的 Store\n\n| 场景 | 推荐 Store |\n|------|-----------|\n| 状态对象较小（< 100KB） | `AurStateStore` |\n| 状态对象较大或历史记录多 | `AurPatchStore` |\n| 需要频繁保存状态 | `AurPatchStore` |\n| 简单的使用场景 | `AurStateStore` |\n| 带 ID 的数组需要精确 diff | `AurPatchStore` |\n\n## 技术细节\n\n- **深拷贝**：使用 `rfdc`（Really Fast Deep Clone）进行高性能深拷贝\n- **深度比较**：使用 `fast-deep-equal` 进行高效的深度相等性检查\n- **内存管理**：历史记录超出容量后自动丢弃最老的记录\n\n## 更新日志\n\n### 1.1.0\n- 新增同步基线（syncBaseline）API\n\n### 1.0.2\n- README 中补上 Release Note 部分\n- 更新 vite, vitest, ts 等开发依赖项\n\n### 1.0.1\n- 无功能变更（仅版本号更新）。\n\n### 1.0.0\n- **新增** `AurPatchStore`：基于增量补丁的撤销/重做存储，支持带 `id` 数组的智能差异计算，适用于大状态对象。\n- **破坏性变更**：`AurStateStore.push()` 不再记录与当前状态引用相同（`===`）或深度相等的状态。\n- **破坏性变更**：`AurStateStore` 的公共 `clone` 属性已移除（现为内部私有字段）。\n- 引入 `fast-deep-equal` 依赖，用于高效的深度相等比较。\n- `AurStateStore` 与 `AurPatchStore` 共享内部抽象基类 `AurHistoryBase`（不对外导出）。\n- 重写 README，补充完整 API 说明与使用示例。\n\n### 0.3.0\n- 初始版本，提供 `AurStateStore` 完整状态存储。\n- 基于 `rfdc` 深拷贝保护历史记录。\n- 默认历史容量 20，支持撤销/重做可用性回调。\n","readmeFilename":"README.md"}