doc: 添加文档
@@ -1 +1,47 @@
|
|||||||
# 一个基于svg构建的Web简谱编辑器
|
# Web简谱编辑器
|
||||||
|
一个Web版简谱编辑器,支持一键转调和图片导出。
|
||||||
|
|
||||||
|
## 在线Demo
|
||||||
|
[Github Page](https://github.io/mattuylee/numerical-notation-editor/)
|
||||||
|
[编辑器](https://github.io/mattuylee/numerical-notation-editor/editor/)
|
||||||
|
[示例曲子:烟雨](https://github.io/mattuylee/numerical-notation-editor/editor/?loadExample)
|
||||||
|
|
||||||
|
## 功能
|
||||||
|
* 所见即所得,支持常见简谱元素
|
||||||
|
* 全键盘输入音符,高效快速
|
||||||
|
* 一键转调,避免出错
|
||||||
|
* 高清图片导出
|
||||||
|
|
||||||
|
## 使用
|
||||||
|
暂时未兼容移动端,要使用此程序的完整功能,必须连接键盘。详情的使用介绍请见[Wiki](https://github.com/mattuylee/numerical-notation-editor/wiki/%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B)。
|
||||||
|
|
||||||
|
## RoadMap
|
||||||
|
- [x] 转调
|
||||||
|
- [ ] 歌词
|
||||||
|
- [ ] 分节符
|
||||||
|
- [ ] 滑音符号
|
||||||
|
- [ ] 伴奏
|
||||||
|
- [ ] 自动保存
|
||||||
|
- [ ] PWA
|
||||||
|
|
||||||
|
不会支持的特性:
|
||||||
|
- 五线谱
|
||||||
|
|
||||||
|
已经存在很多专业还免费的五线谱编辑器,请移步[MuseScore](https://musescore.org)。
|
||||||
|
|
||||||
|
## 构建
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/mattuylee/numerical-notation-editor
|
||||||
|
cd numerical-notation-editor && npm install
|
||||||
|
# 运行
|
||||||
|
npm run start
|
||||||
|
# 编译
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
要部署Github Page,将编译的`build`目录放到`docs`下并重命名为`editor`。
|
||||||
|
|
||||||
|
## Q&A
|
||||||
|
[Wiki](https://github.com/mattuylee/numerical-notation-editor/wiki)
|
||||||
|
|
||||||
|
## 贡献
|
||||||
|
欢迎提交[issue](https://github.com/mattuylee/numerical-notation-editor/issues/new)或PR。
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"files": {
|
||||||
|
"main.css": "./static/css/main.886a1ecf.chunk.css",
|
||||||
|
"main.js": "./static/js/main.e0740145.chunk.js",
|
||||||
|
"main.js.map": "./static/js/main.e0740145.chunk.js.map",
|
||||||
|
"runtime-main.js": "./static/js/runtime-main.9a7f4847.js",
|
||||||
|
"runtime-main.js.map": "./static/js/runtime-main.9a7f4847.js.map",
|
||||||
|
"static/css/2.786ae0dd.chunk.css": "./static/css/2.786ae0dd.chunk.css",
|
||||||
|
"static/js/2.c5caa065.chunk.js": "./static/js/2.c5caa065.chunk.js",
|
||||||
|
"static/js/2.c5caa065.chunk.js.map": "./static/js/2.c5caa065.chunk.js.map",
|
||||||
|
"static/js/3.c09cd1f8.chunk.js": "./static/js/3.c09cd1f8.chunk.js",
|
||||||
|
"static/js/3.c09cd1f8.chunk.js.map": "./static/js/3.c09cd1f8.chunk.js.map",
|
||||||
|
"static/js/4.95ad59a7.chunk.js": "./static/js/4.95ad59a7.chunk.js",
|
||||||
|
"static/js/4.95ad59a7.chunk.js.map": "./static/js/4.95ad59a7.chunk.js.map",
|
||||||
|
"index.html": "./index.html",
|
||||||
|
"static/css/2.786ae0dd.chunk.css.map": "./static/css/2.786ae0dd.chunk.css.map",
|
||||||
|
"static/css/main.886a1ecf.chunk.css.map": "./static/css/main.886a1ecf.chunk.css.map",
|
||||||
|
"static/js/2.c5caa065.chunk.js.LICENSE.txt": "./static/js/2.c5caa065.chunk.js.LICENSE.txt"
|
||||||
|
},
|
||||||
|
"entrypoints": [
|
||||||
|
"static/js/runtime-main.9a7f4847.js",
|
||||||
|
"static/css/2.786ae0dd.chunk.css",
|
||||||
|
"static/js/2.c5caa065.chunk.js",
|
||||||
|
"static/css/main.886a1ecf.chunk.css",
|
||||||
|
"static/js/main.e0740145.chunk.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<!doctype html><html lang="zh_CN"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>简单简谱编辑器</title><link href="./static/css/2.786ae0dd.chunk.css" rel="stylesheet"><link href="./static/css/main.886a1ecf.chunk.css" rel="stylesheet"></head><body><noscript>要使用本程序,请启用JavaScript。</noscript><a href="https://github.com/mattuylee/numerical-notation-editor" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513;color:#fff;position:absolute;top:0;border:0;right:0" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin:130px 106px" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style><div id="root"></div><script>!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],s=0,p=[];s<a.length;s++)i=a[s],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"c09cd1f8",4:"95ad59a7"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i.oe=function(e){throw console.error(e),e};var a=this["webpackJsonpnumerical-notation-editor"]=this["webpackJsonpnumerical-notation-editor"]||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([])</script><script src="./static/js/2.c5caa065.chunk.js"></script><script src="./static/js/main.e0740145.chunk.js"></script></body></html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1633531383358" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1380" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M848.649122 61.88217H175.387003c-61.990545 0-112.168207 50.177662-112.168207 112.168207V735.144288c0 61.918295 50.177662 112.204332 112.168207 112.204333h673.262119c61.990545 0 112.168207-50.286037 112.168207-112.204333V174.050377c0-61.990545-50.177662-112.168207-112.168207-112.168207z m56.138291 673.262118c0 30.959148-25.179143 56.066041-56.138291 56.066041H175.387003c-30.959148 0-56.138291-25.106893-56.138291-56.066041V174.050377c0-30.959148 25.179143-56.138291 56.138291-56.138291h673.262119c30.959148 0 56.138291 25.179143 56.138291 56.138291V735.144288z" fill="#231815" p-id="1381"></path><path d="M848.649122 510.663374c0.252875-1.517251 0-308.616101 0-308.616101 0-15.497636-12.535384-28.033021-28.033021-28.033021L455.861709 230.188669c-15.497636 0-28.033021 12.535384-28.033021 28.03302v237.341424c-43.313907-19.83264-104.437451-16.725887-159.672617 13.330135-78.210682 42.519156-114.155084 121.705214-80.342058 176.940379 33.885275 55.235165 133.807098 63.688422 211.981655 21.169266 60.94292-33.090524 87.639314-91.179567 84.171311-140.201228 0.252875-1.589501 0-284.845834 0-284.845833l308.507726-47.50441v204.9734c-43.313907-19.83264-104.437451-16.617512-159.672617 13.330135-78.210682 42.519156-114.155084 121.777464-80.233683 177.048754 33.813025 55.235165 133.698723 63.688422 211.909405 21.169266 61.01517-33.162774 87.639314-91.251817 84.171312-140.309603zM375.0139 662.532985c-49.021661 27.563395-109.494955 23.409017-133.265223-5.707754-23.661892-29.080646-2.420377-73.658929 47.43216-99.632823 49.816411-25.901644 94.394694-25.901644 122.75284-3.395752 35.113526 27.780145 5.852254 84.532562-36.919777 108.736329z m364.826642-56.318916c-48.913286 27.74402-109.422705 23.734142-133.156848-5.238129-23.842517-29.008396-2.745502-73.658929 46.962535-99.741198 49.816411-26.082269 93.130318-24.637268 122.75284-3.829253 38.256403 26.87702 7.911381 83.629436-36.558527 108.80858zM147.353983 903.450787h729.328159c15.569886 0 28.105271 12.535384 28.105271 28.03302 0 15.497636-12.535384 28.033021-28.105271 28.033021H147.353983c-15.461511 0-28.105271-12.535384-28.105271-28.033021 0-15.497636 12.607634-28.033021 28.105271-28.03302z" fill="#231815" p-id="1382"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"short_name": "React App",
|
||||||
|
"name": "Create React App Sample",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "favicon.ico",
|
||||||
|
"sizes": "64x64 32x32 24x24 16x16",
|
||||||
|
"type": "image/x-icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#000000",
|
||||||
|
"background_color": "#ffffff"
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# https://www.robotstxt.org/robotstxt.html
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
.Canvas_svg__2w1z4{border:1px solid #f8f8ff;box-shadow:0 0 10px #f8f8ff;font-size:16px}.Canvas_svg__2w1z4 text{-webkit-user-select:none;-ms-user-select:none;user-select:none}.PopoverOnSvg_popover__3bN4H{position:absolute;border-radius:4px;box-shadow:0 1px 8px rgba(0,0,0,.15);background-color:#fff;min-width:32px}.dark.PopoverOnSvg_popover__3bN4H{background-color:#000;color:#fff}.PopoverOnSvg_arrow__22-aj{display:block;position:absolute;z-index:-1;border:8px solid #fff;background-color:#fff;width:8px;height:8px}.dark.PopoverOnSvg_arrow__22-aj{border-color:#000;background-color:#000}.left.PopoverOnSvg_arrow__22-aj{right:-12px;-webkit-transform:translate(-50%,-50%) rotate(135deg);transform:translate(-50%,-50%) rotate(135deg);box-shadow:-2px -2px 6px -2px rgba(0,0,0,.06)}.right.PopoverOnSvg_arrow__22-aj{left:4px;-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg);box-shadow:-2px -2px 6px -2px rgba(0,0,0,.06)}.top.PopoverOnSvg_arrow__22-aj{bottom:-12px;box-shadow:3px 3px 7px -2px rgba(0,0,0,.07)}.bottom.PopoverOnSvg_arrow__22-aj,.top.PopoverOnSvg_arrow__22-aj{-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.bottom.PopoverOnSvg_arrow__22-aj{top:4px;box-shadow:-3px -3px 8px -2px rgba(0,0,0,.07)}.PopoverOnSvg_content__1rAgR{padding:4px 8px}.PopoverOnSvg_header__URzxW{border-bottom:1px solid rgba(0,0,0,.08);padding:4px 8px;line-height:22px}.dark.PopoverOnSvg_header__URzxW{border-bottom:1px solid hsla(0,0%,100%,.35)}.EditableContent_buttonGroup__2qXGn{margin:8px 0 4px;width:300px;max-width:100%;text-align:right}.EditableContent_button__6qyvP{margin-right:8px}.EditableContent_menu__2ah_9{max-height:320px;overflow:auto}.EditableContent_menuItem__3P1Eu:hover{background-color:#f5f5f5;color:#000!important;-webkit-user-select:none;-ms-user-select:none;user-select:none}.selected.EditableContent_menuItem__3P1Eu{background-color:#f5f5f5}.HelpModal_list__syZn2{padding:0;list-style:none}.HelpModal_listItem__34m_q{display:inline-block;margin-top:8px;margin-right:16px;min-width:260px}.HelpModal_kbd__RCRud{display:inline-block;margin-right:8px;border-radius:4px;background-color:#d3d3d3;padding:4px;width:120px;text-align:center}.Notation_selectedNotation__3wsjJ{color:coral}.Editor_headerWrapper__2rEBR{margin-bottom:16px;border-bottom:1px solid #f5f5f5;width:100%}.Editor_header__2Qcr4{margin:auto;padding:8px 0}.Editor_container__3rhfS{display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:#fff;min-width:100%;height:100%}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}
|
||||||
|
/*# sourceMappingURL=main.886a1ecf.chunk.css.map */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":["webpack://src/view/Canvas/index.module.css","webpack://src/component/PopoverOnSvg/index.module.css","webpack://src/component/EditableContent/index.module.css","webpack://src/view/HelpModal/index.module.css","webpack://src/view/Notation/index.module.css","webpack://src/view/Editor/index.module.css","webpack://src/index.css"],"names":[],"mappings":"AAAA,mBACE,wBAA4B,CAC5B,2BAAmC,CACnC,cACF,CACA,wBACE,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CCPA,6BACE,iBAAkB,CAClB,iBAAkB,CAClB,oCAAyC,CACzC,qBAAuB,CACvB,cACF,CACA,kCACE,qBAAuB,CACvB,UACF,CACA,2BACE,aAAc,CACd,iBAAkB,CAClB,UAAW,CACX,qBAAuB,CACvB,qBAAuB,CACvB,SAAU,CACV,UACF,CACA,gCACE,iBAAmB,CACnB,qBACF,CACA,gCACE,WAAY,CACZ,qDAA+C,CAA/C,6CAA+C,CAC/C,6CACF,CACA,iCACE,QAAS,CACT,qDAA+C,CAA/C,6CAA+C,CAC/C,6CACF,CACA,+BACE,YAAa,CAEb,2CACF,CACA,iEAHE,oDAA8C,CAA9C,4CAOF,CAJA,kCACE,OAAQ,CAER,6CACF,CACA,6BACE,eACF,CACA,4BACE,uCAA4C,CAC5C,eAAgB,CAChB,gBACF,CACA,iCACE,2CACF,CCtDA,oCACE,gBAAmB,CACnB,WAAY,CACZ,cAAe,CACf,gBACF,CACA,+BACE,gBACF,CACA,6BACE,gBAAiB,CACjB,aACF,CACA,uCACE,wBAA4B,CAC5B,oBAAuB,CACvB,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,0CACE,wBACF,CCpBA,uBACA,SAAU,CACV,eACA,CACA,2BACE,oBAAqB,CACrB,cAAe,CACf,iBAAkB,CAClB,eACF,CACA,sBACE,oBAAqB,CACrB,gBAAiB,CACjB,iBAAkB,CAClB,wBAA2B,CAC3B,WAAY,CACZ,WAAY,CACZ,iBACF,CClBA,kCACE,WACF,CCFA,6BACE,kBAAmB,CACnB,+BAAmC,CACnC,UACF,CACA,sBACG,WAAY,CACZ,aACH,CACA,yBACE,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,qBAAuB,CACvB,cAAe,CACf,WACF,CCjBA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF","file":"main.886a1ecf.chunk.css","sourcesContent":[".svg {\n border: 1px solid ghostwhite;\n box-shadow: ghostwhite 0px 0px 10px;\n font-size: 16px;\n}\n.svg :global(text) {\n user-select: none;\n}",".popover {\n position: absolute;\n border-radius: 4px;\n box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);\n background-color: white;\n min-width: 32px;\n}\n:global(.dark).popover {\n background-color: black;\n color: white;\n}\n.arrow {\n display: block;\n position: absolute;\n z-index: -1;\n border: 8px solid white;\n background-color: white;\n width: 8px;\n height: 8px;\n}\n:global(.dark).arrow {\n border-color: black;\n background-color: black;\n}\n:global(.left).arrow {\n right: -12px;\n transform: translate(-50%, -50%) rotate(135deg);\n box-shadow: -2px -2px 6px -2px rgba(0, 0, 0, 0.06);\n}\n:global(.right).arrow {\n left: 4px;\n transform: translate(-50%, -50%) rotate(-45deg);\n box-shadow: -2px -2px 6px -2px rgba(0, 0, 0, 0.06);\n}\n:global(.top).arrow {\n bottom: -12px;\n transform: translate(-50%, -50%) rotate(45deg);\n box-shadow: 3px 3px 7px -2px rgba(0, 0, 0, 0.07);\n}\n:global(.bottom).arrow {\n top: 4px;\n transform: translate(-50%, -50%) rotate(45deg);\n box-shadow: -3px -3px 8px -2px rgba(0, 0, 0, 0.07);\n}\n.content {\n padding: 4px 8px;\n}\n.header {\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n padding: 4px 8px;\n line-height: 22px;\n}\n:global(.dark).header {\n border-bottom: 1px solid rgba(255, 255, 255, 0.35);\n}\n",".buttonGroup {\n margin: 8px 0 4px 0;\n width: 300px;\n max-width: 100%;\n text-align: right;\n}\n.button {\n margin-right: 8px;\n}\n.menu {\n max-height: 320px;\n overflow: auto;\n}\n.menuItem:hover {\n background-color: whitesmoke;\n color: black !important;\n user-select: none;\n}\n:global(.selected).menuItem {\n background-color: whitesmoke;\n}",".list {\npadding: 0;\nlist-style: none;\n}\n.listItem {\n display: inline-block;\n margin-top: 8px;\n margin-right: 16px;\n min-width: 260px;\n}\n.kbd {\n display: inline-block;\n margin-right: 8px;\n border-radius: 4px;\n background-color: lightgray;\n padding: 4px;\n width: 120px;\n text-align: center;\n}\n",".selectedNotation {\n color: coral;\n}",".headerWrapper {\n margin-bottom: 16px;\n border-bottom: 1px solid whitesmoke;\n width: 100%;\n}\n.header {\n margin: auto;\n padding: 8px 0;\n}\n.container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background-color: white;\n min-width: 100%;\n height: 100%;\n}\n","body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n"]}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
object-assign
|
||||||
|
(c) Sindre Sorhus
|
||||||
|
@license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Copyright (c) 2018 Jed Watson.
|
||||||
|
Licensed under the MIT License (MIT), see
|
||||||
|
http://jedwatson.github.io/classnames
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v0.20.2
|
||||||
|
* scheduler.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v16.13.1
|
||||||
|
* react-is.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react-dom.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react-jsx-runtime.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
(this["webpackJsonpnumerical-notation-editor"]=this["webpackJsonpnumerical-notation-editor"]||[]).push([[3],{253:function(t,e,n){"use strict";n.r(e),n.d(e,"getCLS",(function(){return p})),n.d(e,"getFCP",(function(){return S})),n.d(e,"getFID",(function(){return F})),n.d(e,"getLCP",(function(){return k})),n.d(e,"getTTFB",(function(){return C}));var i,a,r,o,u=function(t,e){return{name:t,value:void 0===e?-1:e,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}));return n.observe({type:t,buffered:!0}),n}}catch(t){}},f=function(t,e){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(t){addEventListener("pageshow",(function(e){e.persisted&&t(e)}),!0)},m="function"==typeof WeakSet?new WeakSet:new Set,d=function(t,e,n){var i;return function(){e.value>=0&&(n||m.has(e)||"hidden"===document.visibilityState)&&(e.delta=e.value-(i||0),(e.delta||void 0===i)&&(i=e.value,t(e)))}},p=function(t,e){var n,i=u("CLS",0),a=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),n())},r=c("layout-shift",a);r&&(n=d(t,i,e),f((function(){r.takeRecords().map(a),n()})),s((function(){i=u("CLS",0),n=d(t,i,e)})))},v=-1,l=function(){return"hidden"===document.visibilityState?0:1/0},h=function(){f((function(t){var e=t.timeStamp;v=e}),!0)},g=function(){return v<0&&(v=l(),h(),s((function(){setTimeout((function(){v=l(),h()}),0)}))),{get timeStamp(){return v}}},S=function(t,e){var n,i=g(),a=u("FCP"),r=function(t){"first-contentful-paint"===t.name&&(f&&f.disconnect(),t.startTime<i.timeStamp&&(a.value=t.startTime,a.entries.push(t),m.add(a),n()))},o=performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",r);(o||f)&&(n=d(t,a,e),o&&r(o),s((function(i){a=u("FCP"),n=d(t,a,e),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,m.add(a),n()}))}))})))},y={passive:!0,capture:!0},E=new Date,w=function(t,e){i||(i=e,a=t,r=new Date,b(removeEventListener),L())},L=function(){if(a>=0&&a<r-E){var t={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+a};o.forEach((function(e){e(t)})),o=[]}},T=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){w(t,e),a()},i=function(){a()},a=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(e,t):w(e,t)}},b=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,T,y)}))},F=function(t,e){var n,r=g(),p=u("FID"),v=function(t){t.startTime<r.timeStamp&&(p.value=t.processingStart-t.startTime,p.entries.push(t),m.add(p),n())},l=c("first-input",v);n=d(t,p,e),l&&f((function(){l.takeRecords().map(v),l.disconnect()}),!0),l&&s((function(){var r;p=u("FID"),n=d(t,p,e),o=[],a=-1,i=null,b(addEventListener),r=v,o.push(r),L()}))},k=function(t,e){var n,i=g(),a=u("LCP"),r=function(t){var e=t.startTime;e<i.timeStamp&&(a.value=e,a.entries.push(t)),n()},o=c("largest-contentful-paint",r);if(o){n=d(t,a,e);var p=function(){m.has(a)||(o.takeRecords().map(r),o.disconnect(),m.add(a),n())};["keydown","click"].forEach((function(t){addEventListener(t,p,{once:!0,capture:!0})})),f(p,!0),s((function(i){a=u("LCP"),n=d(t,a,e),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,m.add(a),n()}))}))}))}},C=function(t){var e,n=u("TTFB");e=function(){try{var e=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,e={entryType:"navigation",startTime:0};for(var n in t)"navigationStart"!==n&&"toJSON"!==n&&(e[n]=Math.max(t[n]-t.navigationStart,0));return e}();if(n.value=n.delta=e.responseStart,n.value<0)return;n.entries=[e],t(n)}catch(t){}},"complete"===document.readyState?setTimeout(e,0):addEventListener("pageshow",e)}}}]);
|
||||||
|
//# sourceMappingURL=3.c09cd1f8.chunk.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"sources":[],"names":[],"mappings":"","file":"static/js/4.95ad59a7.chunk.js","sourceRoot":""}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],s=0,p=[];s<a.length;s++)i=a[s],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"c09cd1f8",4:"95ad59a7"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i.oe=function(e){throw console.error(e),e};var a=this["webpackJsonpnumerical-notation-editor"]=this["webpackJsonpnumerical-notation-editor"]||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([]);
|
||||||
|
//# sourceMappingURL=runtime-main.9a7f4847.js.map
|
||||||
@@ -2,6 +2,17 @@
|
|||||||
"name": "numerical-notation-editor",
|
"name": "numerical-notation-editor",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"homepage": "./",
|
||||||
|
"author": {
|
||||||
|
"name": "Haven Mattuy",
|
||||||
|
"email": "mattuylee@outlook.com"
|
||||||
|
},
|
||||||
|
"description": "基于svg技术的简谱编辑器",
|
||||||
|
"keywords": [
|
||||||
|
"简谱",
|
||||||
|
"编辑器",
|
||||||
|
"转调"
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/icons": "^4.7.0",
|
"@ant-design/icons": "^4.7.0",
|
||||||
"@testing-library/jest-dom": "^5.14.1",
|
"@testing-library/jest-dom": "^5.14.1",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 14 KiB |
@@ -1,8 +1,13 @@
|
|||||||
|
import { useEffect } from "react";
|
||||||
import Editor from "./view/Editor";
|
import Editor from "./view/Editor";
|
||||||
import globalStore, { GlobalContext } from "./store/global";
|
import globalStore, { GlobalContext } from "./store/global";
|
||||||
|
import { loadExample } from "./util/load-example";
|
||||||
|
|
||||||
// ENHANCE: 替换掉antd组件库。。一堆莫名其妙的毛病
|
// ENHANCE: 替换掉antd组件库。。一堆莫名其妙的毛病
|
||||||
function App() {
|
function App() {
|
||||||
|
useEffect(() => {
|
||||||
|
loadExample();
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<GlobalContext.Provider value={globalStore}>
|
<GlobalContext.Provider value={globalStore}>
|
||||||
<Editor></Editor>
|
<Editor></Editor>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1633531383358" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1380" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M848.649122 61.88217H175.387003c-61.990545 0-112.168207 50.177662-112.168207 112.168207V735.144288c0 61.918295 50.177662 112.204332 112.168207 112.204333h673.262119c61.990545 0 112.168207-50.286037 112.168207-112.204333V174.050377c0-61.990545-50.177662-112.168207-112.168207-112.168207z m56.138291 673.262118c0 30.959148-25.179143 56.066041-56.138291 56.066041H175.387003c-30.959148 0-56.138291-25.106893-56.138291-56.066041V174.050377c0-30.959148 25.179143-56.138291 56.138291-56.138291h673.262119c30.959148 0 56.138291 25.179143 56.138291 56.138291V735.144288z" fill="#231815" p-id="1381"></path><path d="M848.649122 510.663374c0.252875-1.517251 0-308.616101 0-308.616101 0-15.497636-12.535384-28.033021-28.033021-28.033021L455.861709 230.188669c-15.497636 0-28.033021 12.535384-28.033021 28.03302v237.341424c-43.313907-19.83264-104.437451-16.725887-159.672617 13.330135-78.210682 42.519156-114.155084 121.705214-80.342058 176.940379 33.885275 55.235165 133.807098 63.688422 211.981655 21.169266 60.94292-33.090524 87.639314-91.179567 84.171311-140.201228 0.252875-1.589501 0-284.845834 0-284.845833l308.507726-47.50441v204.9734c-43.313907-19.83264-104.437451-16.617512-159.672617 13.330135-78.210682 42.519156-114.155084 121.777464-80.233683 177.048754 33.813025 55.235165 133.698723 63.688422 211.909405 21.169266 61.01517-33.162774 87.639314-91.251817 84.171312-140.309603zM375.0139 662.532985c-49.021661 27.563395-109.494955 23.409017-133.265223-5.707754-23.661892-29.080646-2.420377-73.658929 47.43216-99.632823 49.816411-25.901644 94.394694-25.901644 122.75284-3.395752 35.113526 27.780145 5.852254 84.532562-36.919777 108.736329z m364.826642-56.318916c-48.913286 27.74402-109.422705 23.734142-133.156848-5.238129-23.842517-29.008396-2.745502-73.658929 46.962535-99.741198 49.816411-26.082269 93.130318-24.637268 122.75284-3.829253 38.256403 26.87702 7.911381 83.629436-36.558527 108.80858zM147.353983 903.450787h729.328159c15.569886 0 28.105271 12.535384 28.105271 28.03302 0 15.497636-12.535384 28.033021-28.105271 28.033021H147.353983c-15.461511 0-28.105271-12.535384-28.105271-28.033021 0-15.497636 12.607634-28.033021 28.105271-28.03302z" fill="#231815" p-id="1382"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,11 @@
|
|||||||
|
import { resetGlobalData } from "./editor";
|
||||||
|
|
||||||
|
async function loadExample() {
|
||||||
|
const regex = /(\?|&)loadExample(&|$)/;
|
||||||
|
if (regex.test(window.location.search)) {
|
||||||
|
const data = await import("../example/烟雨.json");
|
||||||
|
resetGlobalData(data.default);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { loadExample };
|
||||||
@@ -6,6 +6,7 @@ import { getDefaultGlobalData } from "../../util/editor";
|
|||||||
import { unwrappedAction } from "../../store/history";
|
import { unwrappedAction } from "../../store/history";
|
||||||
|
|
||||||
const ImmediateNumberConfigInput = observer(({ propertyName, ...props }) => {
|
const ImmediateNumberConfigInput = observer(({ propertyName, ...props }) => {
|
||||||
|
// ENHANCE: 防抖处理
|
||||||
const handleChange = unwrappedAction((ev) => {
|
const handleChange = unwrappedAction((ev) => {
|
||||||
const v = Number(ev.target.value) | 0;
|
const v = Number(ev.target.value) | 0;
|
||||||
store[propertyName] = v;
|
store[propertyName] = v;
|
||||||
|
|||||||