@ovnonvo/abc-editor 0.3.0 → 0.3.2

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.
@@ -1,122 +1,122 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-ease:initial}}}@layer theme{:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-600:oklch(54.6% .245 262.881);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-950:oklch(12.9% .042 264.695);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1)}}@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.block{display:block}.flex{display:flex}.inline{display:inline}.table{display:table}.h-full{height:100%}.h-screen{height:100vh}.w-full{width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.bg-blue-600{background-color:var(--color-blue-600)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-950{background-color:var(--color-slate-950)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.pr-3{padding-right:calc(var(--spacing)*3)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-slate-200{color:var(--color-slate-200)}.text-slate-500{color:var(--color-slate-500)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[foo\\:bar\\]{foo:bar}@media(hover:hover){.hover\\:bg-slate-700:hover{background-color:var(--color-slate-700)}}}*{box-sizing:border-box}body{margin:0;padding:0}:root{--abc-ink:#1a1a1a;--abc-key:#06c;--abc-value:#996300;--abc-lyrics-key:#c06;--abc-lyrics-value:#b30059;--abc-note:#000;--abc-octave-high:#00994d;--abc-octave-low:#60c;--abc-rest:#666;--abc-rest-muted:#999;--abc-accidental:#b35900;--abc-duration-long:#cc5200;--abc-duration-short:#09c;--abc-duration-fraction:#c90;--abc-broken:#00b359;--abc-bar:#0080cc;--abc-bar-double:#06c;--abc-chord:#c09;--abc-slur-0:#cc004d;--abc-slur-1:#cc8000;--abc-slur-2:#0080cc;--abc-slur-3:#00b359;--abc-slur-4:#70c;--abc-tuplet:#00b359;--abc-tie:#c06;--abc-tie-dotted:#cc0080;--abc-ornament:#56c;--abc-chord-symbol:#00997a;--abc-annotation:#c80;--abc-decoration:#86c;--abc-grace:#66b300;--abc-volta:#c60;--abc-inline-bracket:#666;--abc-inline-key:#06c;--abc-inline-value:#960;--abc-comment:#999}[data-theme=dark]{--abc-ink:#e8f1ff;--abc-key:#7ad7ff;--abc-value:#ffd48a;--abc-lyrics-key:#ff7ba1;--abc-lyrics-value:#ffc8d8;--abc-note:#f8fbff;--abc-octave-high:#73f8c4;--abc-octave-low:#c7b3ff;--abc-rest:#8ca3b8;--abc-rest-muted:#596779;--abc-accidental:#f2c079;--abc-duration-long:#ffa25f;--abc-duration-short:#6edff6;--abc-duration-fraction:#ffe38f;--abc-broken:#7be495;--abc-bar:#79cfff;--abc-bar-double:#4aafff;--abc-chord:#ff8ccf;--abc-slur-0:#ff92b2;--abc-slur-1:#ffd77a;--abc-slur-2:#7ed4ff;--abc-slur-3:#92f3c6;--abc-slur-4:#c6a9ff;--abc-tuplet:#82f0a2;--abc-tie:#f07fb3;--abc-tie-dotted:#ff9ecf;--abc-ornament:#9fb0ff;--abc-chord-symbol:#63f5d3;--abc-annotation:#ffd88a;--abc-decoration:#d1a6ff;--abc-grace:#a4f28f;--abc-volta:#f9a15a;--abc-inline-bracket:#8ca7c0;--abc-inline-key:#7ad7ff;--abc-inline-value:#ffdcb2;--abc-comment:#7b8797}.abc-preview svg text{fill:#000!important}.abc-preview[data-theme=dark] svg text{fill:#fff!important}textarea::placeholder{color:#999;opacity:1}[data-theme=dark] textarea::placeholder{color:#64748b}.abc-meta-key{color:var(--abc-key);font-weight:600}.abc-meta-value{color:var(--abc-value)}.abc-lyrics-key{color:var(--abc-lyrics-key);font-weight:600}.abc-lyrics-value{color:var(--abc-lyrics-value)}.abc-note{color:var(--abc-note)}.abc-octave-high{color:var(--abc-octave-high);font-weight:600}.abc-octave-low{color:var(--abc-octave-low);font-weight:600}.abc-rest{color:var(--abc-rest)}.abc-rest-invisible{color:var(--abc-rest-muted);opacity:.5}.abc-accidental{color:var(--abc-accidental)}.abc-duration{font-weight:600}.abc-duration-long{color:var(--abc-duration-long)}.abc-duration-short{color:var(--abc-duration-short)}.abc-duration-fraction{color:var(--abc-duration-fraction)}.abc-broken-rhythm{color:var(--abc-broken);font-weight:700}.abc-bar{color:var(--abc-bar);font-weight:600}.abc-bar-double{color:var(--abc-bar-double);font-weight:900}.abc-chord{color:var(--abc-chord)}.abc-slur{font-weight:700}.abc-slur-level-0{color:var(--abc-slur-0)}.abc-slur-level-1{color:var(--abc-slur-1)}.abc-slur-level-2{color:var(--abc-slur-2)}.abc-slur-level-3{color:var(--abc-slur-3)}.abc-slur-level-4{color:var(--abc-slur-4)}.abc-tuplet{color:var(--abc-tuplet);font-weight:700}.abc-tie{color:var(--abc-tie);font-weight:600}.abc-tie-dotted{color:var(--abc-tie-dotted)}.abc-ornament{color:var(--abc-ornament);font-weight:700}.abc-chord-symbol{color:var(--abc-chord-symbol);font-weight:700}.abc-annotation{color:var(--abc-annotation);font-style:italic;font-weight:600}.abc-decoration{color:var(--abc-decoration);font-weight:700}.abc-grace-note{color:var(--abc-grace);font-weight:600}.abc-volta-bracket{color:var(--abc-volta);font-weight:700}.abc-inline-field-bracket{color:var(--abc-inline-bracket)}.abc-inline-field-key{color:var(--abc-inline-key);font-weight:600}.abc-inline-field-value{color:var(--abc-inline-value)}.abc-comment{color:var(--abc-comment);font-style:italic}.abc-text{color:var(--abc-ink)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { jsx as u, jsxs as v } from "react/jsx-runtime";
3
- import { useState as M, useCallback as A, useEffect as P, useRef as C, useMemo as K } from "react";
4
- const V = (e) => e.split(`
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-600:oklch(54.6% .245 262.881);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-950:oklch(12.9% .042 264.695);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1)}}@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.table{display:table}.h-full{height:100%}.h-screen{height:100vh}.w-full{width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.bg-blue-600{background-color:var(--color-blue-600)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-950{background-color:var(--color-slate-950)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.text-slate-200{color:var(--color-slate-200)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.select-none{-webkit-user-select:none;user-select:none}.\\[foo\\:bar\\]{foo:bar}@media(hover:hover){.hover\\:bg-slate-700:hover{background-color:var(--color-slate-700)}}}*{box-sizing:border-box}body{margin:0;padding:0}:root{--abc-ink:#1a1a1a;--abc-key:#06c;--abc-value:#996300;--abc-lyrics-key:#c06;--abc-lyrics-value:#b30059;--abc-note:#000;--abc-octave-high:#00994d;--abc-octave-low:#60c;--abc-rest:#666;--abc-rest-muted:#999;--abc-accidental:#b35900;--abc-duration-long:#cc5200;--abc-duration-short:#09c;--abc-duration-fraction:#c90;--abc-broken:#00b359;--abc-bar:#0080cc;--abc-bar-double:#06c;--abc-chord:#c09;--abc-slur-0:#cc004d;--abc-slur-1:#cc8000;--abc-slur-2:#0080cc;--abc-slur-3:#00b359;--abc-slur-4:#70c;--abc-tuplet:#00b359;--abc-tie:#c06;--abc-tie-dotted:#cc0080;--abc-ornament:#56c;--abc-chord-symbol:#00997a;--abc-annotation:#c80;--abc-decoration:#86c;--abc-grace:#66b300;--abc-volta:#c60;--abc-inline-bracket:#666;--abc-inline-key:#06c;--abc-inline-value:#960;--abc-comment:#999}[data-theme=dark]{--abc-ink:#e8f1ff;--abc-key:#7ad7ff;--abc-value:#ffd48a;--abc-lyrics-key:#ff7ba1;--abc-lyrics-value:#ffc8d8;--abc-note:#f8fbff;--abc-octave-high:#73f8c4;--abc-octave-low:#c7b3ff;--abc-rest:#8ca3b8;--abc-rest-muted:#596779;--abc-accidental:#f2c079;--abc-duration-long:#ffa25f;--abc-duration-short:#6edff6;--abc-duration-fraction:#ffe38f;--abc-broken:#7be495;--abc-bar:#79cfff;--abc-bar-double:#4aafff;--abc-chord:#ff8ccf;--abc-slur-0:#ff92b2;--abc-slur-1:#ffd77a;--abc-slur-2:#7ed4ff;--abc-slur-3:#92f3c6;--abc-slur-4:#c6a9ff;--abc-tuplet:#82f0a2;--abc-tie:#f07fb3;--abc-tie-dotted:#ff9ecf;--abc-ornament:#9fb0ff;--abc-chord-symbol:#63f5d3;--abc-annotation:#ffd88a;--abc-decoration:#d1a6ff;--abc-grace:#a4f28f;--abc-volta:#f9a15a;--abc-inline-bracket:#8ca7c0;--abc-inline-key:#7ad7ff;--abc-inline-value:#ffdcb2;--abc-comment:#7b8797}.abc-preview svg text{fill:#000!important}.abc-preview[data-theme=dark] svg text{fill:#fff!important}textarea::placeholder{color:#999;opacity:1}[data-theme=dark] textarea::placeholder{color:#64748b}.abc-meta-key{color:var(--abc-key);font-weight:600}.abc-meta-value{color:var(--abc-value)}.abc-lyrics-key{color:var(--abc-lyrics-key);font-weight:600}.abc-lyrics-value{color:var(--abc-lyrics-value)}.abc-note{color:var(--abc-note)}.abc-octave-high{color:var(--abc-octave-high);font-weight:600}.abc-octave-low{color:var(--abc-octave-low);font-weight:600}.abc-rest{color:var(--abc-rest)}.abc-rest-invisible{color:var(--abc-rest-muted);opacity:.5}.abc-accidental{color:var(--abc-accidental)}.abc-duration{font-weight:600}.abc-duration-long{color:var(--abc-duration-long)}.abc-duration-short{color:var(--abc-duration-short)}.abc-duration-fraction{color:var(--abc-duration-fraction)}.abc-broken-rhythm{color:var(--abc-broken);font-weight:700}.abc-bar{color:var(--abc-bar);font-weight:600}.abc-bar-double{color:var(--abc-bar-double);font-weight:900}.abc-chord{color:var(--abc-chord)}.abc-slur{font-weight:700}.abc-slur-level-0{color:var(--abc-slur-0)}.abc-slur-level-1{color:var(--abc-slur-1)}.abc-slur-level-2{color:var(--abc-slur-2)}.abc-slur-level-3{color:var(--abc-slur-3)}.abc-slur-level-4{color:var(--abc-slur-4)}.abc-tuplet{color:var(--abc-tuplet);font-weight:700}.abc-tie{color:var(--abc-tie);font-weight:600}.abc-tie-dotted{color:var(--abc-tie-dotted)}.abc-ornament{color:var(--abc-ornament);font-weight:700}.abc-chord-symbol{color:var(--abc-chord-symbol);font-weight:700}.abc-annotation{color:var(--abc-annotation);font-style:italic;font-weight:600}.abc-decoration{color:var(--abc-decoration);font-weight:700}.abc-grace-note{color:var(--abc-grace);font-weight:600}.abc-volta-bracket{color:var(--abc-volta);font-weight:700}.abc-inline-field-bracket{color:var(--abc-inline-bracket)}.abc-inline-field-key{color:var(--abc-inline-key);font-weight:600}.abc-inline-field-value{color:var(--abc-inline-value)}.abc-comment{color:var(--abc-comment);font-style:italic}.abc-text{color:var(--abc-ink)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ import { jsx as p, jsxs as v } from "react/jsx-runtime";
3
+ import { useState as P, useCallback as N, useEffect as R, useRef as w, useMemo as V } from "react";
4
+ const G = (e) => e.split(`
5
5
  `).map((r, n) => n + 1).join(`
6
- `), w = /^([ABCDFGHIKLMmNOPQRrSsTUVWwXZ]:)(.*)$/, E = /[A-Ga-g]/, G = /[\^_=]/, Q = /[',]/, z = /\|[:|\]]?|:?\|/, X = /[\\[\]]/, Y = /[()]/, J = /^\(\d+$/, R = /^\/?\d+(\/\d+)?$/, O = /[zZx]/, $ = /^\.?-$/, Z = /[.~HLMOPSTuv]/, q = /^"[^"]*"$/, D = /^"[\^_<>@][^"]*"$/, ee = /^![^!]+!$/, te = /^\{[^}]+\}$/, ne = /^\[\d+$/, re = /^\[([ABCDFGHIKLMmNOPQRrSsTUVWwXZ]):([^\]]*)\]$/, se = /^[<>]+$/, le = /^%.*$/, p = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;"), oe = (e, t) => {
6
+ `), k = /^([ABCDFGHIKLMmNOPQRrSsTUVWwXZ]:)(.*)$/, E = /[A-Ga-g]/, z = /[\^_=]/, Q = /[',]/, X = /\|[:|\]]?|:?\|/, Y = /[\\[\]]/, J = /[()]/, Z = /^\(\d+$/, O = /^\/?\d+(\/\d+)?$/, D = /[zZx]/, M = /^\.?-$/, q = /[.~HLMOPSTuv]/, ee = /^"[^"]*"$/, W = /^"[\^_<>@][^"]*"$/, te = /^![^!]+!$/, ne = /^\{[^}]+\}$/, re = /^\[\d+$/, se = /^\[([ABCDFGHIKLMmNOPQRrSsTUVWwXZ]):([^\]]*)\]$/, oe = /^[<>]+$/, le = /^%.*$/, d = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;"), ae = (e, t) => {
7
7
  const r = e[t];
8
8
  if (r !== "|" && r !== ":")
9
9
  return null;
10
- let n = r, l = t + 1;
11
- for (; l < e.length && (e[l] === "|" || e[l] === ":" || e[l] === "]"); )
12
- n += e[l], l++;
13
- return z.test(n) ? {
14
- html: `<span class="${n === "||" ? "abc-bar-double" : "abc-bar"}">${p(n)}</span>`,
15
- nextIndex: l
10
+ let n = r, o = t + 1;
11
+ for (; o < e.length && (e[o] === "|" || e[o] === ":" || e[o] === "]"); )
12
+ n += e[o], o++;
13
+ return X.test(n) ? {
14
+ html: `<span class="${n === "||" ? "abc-bar-double" : "abc-bar"}">${d(n)}</span>`,
15
+ nextIndex: o
16
16
  } : null;
17
- }, ae = (e, t) => {
17
+ }, ie = (e, t) => {
18
18
  const r = e[t];
19
- return G.test(r) ? {
20
- html: `<span class="abc-accidental">${p(r)}</span>`,
19
+ return z.test(r) ? {
20
+ html: `<span class="abc-accidental">${d(r)}</span>`,
21
21
  nextIndex: t + 1
22
22
  } : null;
23
- }, ie = (e, t, r) => {
23
+ }, ce = (e, t, r) => {
24
24
  const n = e[t];
25
- if (!Y.test(n))
25
+ if (!J.test(n))
26
26
  return null;
27
27
  if (n === "(") {
28
28
  if (t + 1 < e.length && /\d/.test(e[t + 1])) {
29
- let l = n, s = t + 1;
29
+ let o = n, s = t + 1;
30
30
  for (; s < e.length && /\d/.test(e[s]); )
31
- l += e[s], s++;
32
- if (J.test(l))
31
+ o += e[s], s++;
32
+ if (Z.test(o))
33
33
  return {
34
- html: `<span class="abc-tuplet">${p(l)}</span>`,
34
+ html: `<span class="abc-tuplet">${d(o)}</span>`,
35
35
  nextIndex: s,
36
36
  slurLevelDelta: 0
37
37
  };
38
38
  }
39
39
  return {
40
- html: `<span class="abc-slur abc-slur-level-${r % 5}">${p(n)}</span>`,
40
+ html: `<span class="abc-slur abc-slur-level-${r % 5}">${d(n)}</span>`,
41
41
  nextIndex: t + 1,
42
42
  slurLevelDelta: 1
43
43
  };
44
44
  } else if (n === ")")
45
45
  return {
46
- html: `<span class="abc-slur abc-slur-level-${Math.max(0, r - 1) % 5}">${p(n)}</span>`,
46
+ html: `<span class="abc-slur abc-slur-level-${Math.max(0, r - 1) % 5}">${d(n)}</span>`,
47
47
  nextIndex: t + 1,
48
48
  slurLevelDelta: -1
49
49
  };
50
50
  return null;
51
- }, ce = (e, t) => {
51
+ }, ue = (e, t) => {
52
52
  const r = e[t];
53
53
  if (!E.test(r))
54
54
  return null;
55
- let n = `<span class="abc-note">${p(r)}</span>`, l = t + 1, s = "";
56
- for (; l < e.length && Q.test(e[l]); )
57
- s += e[l], l++;
55
+ let n = `<span class="abc-note">${d(r)}</span>`, o = t + 1, s = "";
56
+ for (; o < e.length && Q.test(e[o]); )
57
+ s += e[o], o++;
58
58
  if (s) {
59
59
  const i = s[0] === "'" ? "abc-octave-high" : "abc-octave-low";
60
- n += `<span class="${i}">${p(s)}</span>`;
60
+ n += `<span class="${i}">${d(s)}</span>`;
61
61
  }
62
62
  let a = "";
63
- if (l < e.length && (e[l] === "/" || /\d/.test(e[l]))) {
64
- for (e[l] === "/" && (a += e[l], l++); l < e.length && /\d/.test(e[l]); )
65
- a += e[l], l++;
66
- if (l < e.length && e[l] === "/")
67
- for (a += e[l], l++; l < e.length && /\d/.test(e[l]); )
68
- a += e[l], l++;
69
- if (a && R.test(a)) {
63
+ if (o < e.length && (e[o] === "/" || /\d/.test(e[o]))) {
64
+ for (e[o] === "/" && (a += e[o], o++); o < e.length && /\d/.test(e[o]); )
65
+ a += e[o], o++;
66
+ if (o < e.length && e[o] === "/")
67
+ for (a += e[o], o++; o < e.length && /\d/.test(e[o]); )
68
+ a += e[o], o++;
69
+ if (a && O.test(a)) {
70
70
  let i = "abc-duration";
71
- a.startsWith("/") ? i += " abc-duration-short" : a.includes("/") ? i += " abc-duration-fraction" : i += " abc-duration-long", n += `<span class="${i}">${p(a)}</span>`;
71
+ a.startsWith("/") ? i += " abc-duration-short" : a.includes("/") ? i += " abc-duration-fraction" : i += " abc-duration-long", n += `<span class="${i}">${d(a)}</span>`;
72
72
  }
73
73
  }
74
74
  return {
75
75
  html: n,
76
- nextIndex: l
76
+ nextIndex: o
77
77
  };
78
- }, ue = (e, t) => {
78
+ }, de = (e, t) => {
79
79
  const r = e[t];
80
- return X.test(r) ? {
81
- html: `<span class="abc-chord">${p(r)}</span>`,
80
+ return Y.test(r) ? {
81
+ html: `<span class="abc-chord">${d(r)}</span>`,
82
82
  nextIndex: t + 1
83
83
  } : null;
84
- }, de = (e, t) => {
84
+ }, pe = (e, t) => {
85
85
  const r = e[t];
86
- if (!O.test(r))
86
+ if (!D.test(r))
87
87
  return null;
88
- let l = `<span class="${r === "x" ? "abc-rest-invisible" : "abc-rest"}">${p(r)}</span>`, s = t + 1, a = "";
88
+ let o = `<span class="${r === "x" ? "abc-rest-invisible" : "abc-rest"}">${d(r)}</span>`, s = t + 1, a = "";
89
89
  if (s < e.length && (e[s] === "/" || /\d/.test(e[s]))) {
90
90
  for (e[s] === "/" && (a += e[s], s++); s < e.length && /\d/.test(e[s]); )
91
91
  a += e[s], s++;
92
92
  if (s < e.length && e[s] === "/")
93
93
  for (a += e[s], s++; s < e.length && /\d/.test(e[s]); )
94
94
  a += e[s], s++;
95
- if (a && R.test(a)) {
95
+ if (a && O.test(a)) {
96
96
  let i = "abc-duration";
97
- a.startsWith("/") ? i += " abc-duration-short" : a.includes("/") ? i += " abc-duration-fraction" : i += " abc-duration-long", l += `<span class="${i}">${p(a)}</span>`;
97
+ a.startsWith("/") ? i += " abc-duration-short" : a.includes("/") ? i += " abc-duration-fraction" : i += " abc-duration-long", o += `<span class="${i}">${d(a)}</span>`;
98
98
  }
99
99
  }
100
100
  return {
101
- html: l,
101
+ html: o,
102
102
  nextIndex: s
103
103
  };
104
- }, pe = (e, t) => {
104
+ }, he = (e, t) => {
105
105
  const r = e[t];
106
- return r === "." && t + 1 < e.length && e[t + 1] === "-" && $.test(".-") ? {
107
- html: `<span class="abc-tie abc-tie-dotted">${p(".-")}</span>`,
106
+ return r === "." && t + 1 < e.length && e[t + 1] === "-" && M.test(".-") ? {
107
+ html: `<span class="abc-tie abc-tie-dotted">${d(".-")}</span>`,
108
108
  nextIndex: t + 2
109
- } : r === "-" && $.test(r) ? {
110
- html: `<span class="abc-tie">${p(r)}</span>`,
109
+ } : r === "-" && M.test(r) ? {
110
+ html: `<span class="abc-tie">${d(r)}</span>`,
111
111
  nextIndex: t + 1
112
112
  } : null;
113
- }, he = (e, t) => {
113
+ }, fe = (e, t) => {
114
114
  const r = e[t];
115
- return !Z.test(r) || r === "." && t + 1 < e.length && e[t + 1] === "-" ? null : {
116
- html: `<span class="abc-ornament">${p(r)}</span>`,
115
+ return !q.test(r) || r === "." && t + 1 < e.length && e[t + 1] === "-" ? null : {
116
+ html: `<span class="abc-ornament">${d(r)}</span>`,
117
117
  nextIndex: t + 1
118
118
  };
119
- }, fe = (e, t) => {
119
+ }, ge = (e, t) => {
120
120
  if (e[t] !== '"')
121
121
  return null;
122
122
  let n = t + 1;
@@ -124,12 +124,12 @@ const V = (e) => e.split(`
124
124
  n++;
125
125
  if (n >= e.length)
126
126
  return null;
127
- const l = e.substring(t, n + 1);
128
- return D.test(l) ? {
129
- html: `<span class="abc-annotation">${p(l)}</span>`,
127
+ const o = e.substring(t, n + 1);
128
+ return W.test(o) ? {
129
+ html: `<span class="abc-annotation">${d(o)}</span>`,
130
130
  nextIndex: n + 1
131
131
  } : null;
132
- }, ge = (e, t) => {
132
+ }, me = (e, t) => {
133
133
  if (e[t] !== '"')
134
134
  return null;
135
135
  let n = t + 1;
@@ -137,12 +137,12 @@ const V = (e) => e.split(`
137
137
  n++;
138
138
  if (n >= e.length)
139
139
  return null;
140
- const l = e.substring(t, n + 1);
141
- return D.test(l) || !q.test(l) ? null : {
142
- html: `<span class="abc-chord-symbol">${p(l)}</span>`,
140
+ const o = e.substring(t, n + 1);
141
+ return W.test(o) || !ee.test(o) ? null : {
142
+ html: `<span class="abc-chord-symbol">${d(o)}</span>`,
143
143
  nextIndex: n + 1
144
144
  };
145
- }, me = (e, t) => {
145
+ }, be = (e, t) => {
146
146
  if (e[t] !== "!")
147
147
  return null;
148
148
  let n = t + 1;
@@ -150,12 +150,12 @@ const V = (e) => e.split(`
150
150
  n++;
151
151
  if (n >= e.length)
152
152
  return null;
153
- const l = e.substring(t, n + 1);
154
- return ee.test(l) ? {
155
- html: `<span class="abc-decoration">${p(l)}</span>`,
153
+ const o = e.substring(t, n + 1);
154
+ return te.test(o) ? {
155
+ html: `<span class="abc-decoration">${d(o)}</span>`,
156
156
  nextIndex: n + 1
157
157
  } : null;
158
- }, be = (e, t) => {
158
+ }, ve = (e, t) => {
159
159
  if (e[t] !== "{")
160
160
  return null;
161
161
  let n = t + 1;
@@ -163,12 +163,12 @@ const V = (e) => e.split(`
163
163
  n++;
164
164
  if (n >= e.length)
165
165
  return null;
166
- const l = e.substring(t, n + 1);
167
- return te.test(l) ? {
168
- html: `<span class="abc-grace-note">${p(l)}</span>`,
166
+ const o = e.substring(t, n + 1);
167
+ return ne.test(o) ? {
168
+ html: `<span class="abc-grace-note">${d(o)}</span>`,
169
169
  nextIndex: n + 1
170
170
  } : null;
171
- }, ve = (e, t) => {
171
+ }, xe = (e, t) => {
172
172
  if (e[t] !== "[")
173
173
  return null;
174
174
  let n = t + 1;
@@ -176,130 +176,130 @@ const V = (e) => e.split(`
176
176
  n++;
177
177
  if (n >= e.length)
178
178
  return null;
179
- const s = e.substring(t, n + 1).match(re);
179
+ const s = e.substring(t, n + 1).match(se);
180
180
  if (!s)
181
181
  return null;
182
182
  const [, a, i] = s;
183
183
  return {
184
- html: `<span class="abc-inline-field-bracket">[</span><span class="abc-inline-field-key">${p(a)}:</span><span class="abc-inline-field-value">${p(i)}</span><span class="abc-inline-field-bracket">]</span>`,
184
+ html: `<span class="abc-inline-field-bracket">[</span><span class="abc-inline-field-key">${d(a)}:</span><span class="abc-inline-field-value">${d(i)}</span><span class="abc-inline-field-bracket">]</span>`,
185
185
  nextIndex: n + 1
186
186
  };
187
- }, xe = (e, t) => {
187
+ }, ye = (e, t) => {
188
188
  if (e[t] !== "[" || t + 1 >= e.length || !/\d/.test(e[t + 1]))
189
189
  return null;
190
190
  let n = t + 1;
191
191
  for (; n < e.length && /\d/.test(e[n]); )
192
192
  n++;
193
- const l = e.substring(t, n);
194
- return ne.test(l) ? {
195
- html: `<span class="abc-volta-bracket">${p(l)}</span>`,
193
+ const o = e.substring(t, n);
194
+ return re.test(o) ? {
195
+ html: `<span class="abc-volta-bracket">${d(o)}</span>`,
196
196
  nextIndex: n
197
197
  } : null;
198
- }, ye = (e, t) => {
198
+ }, Be = (e, t) => {
199
199
  const r = e[t];
200
200
  if (r !== ">" && r !== "<")
201
201
  return null;
202
202
  let n = t + 1;
203
203
  for (; n < e.length && e[n] === r; )
204
204
  n++;
205
- const l = e.substring(t, n);
206
- return se.test(l) ? {
207
- html: `<span class="abc-broken-rhythm">${p(l)}</span>`,
205
+ const o = e.substring(t, n);
206
+ return oe.test(o) ? {
207
+ html: `<span class="abc-broken-rhythm">${d(o)}</span>`,
208
208
  nextIndex: n
209
209
  } : null;
210
- }, Be = (e) => {
210
+ }, Te = (e) => {
211
211
  let t = "", r = 0, n = 0;
212
212
  for (; r < e.length; ) {
213
- const l = oe(e, r);
214
- if (l) {
215
- t += l.html, r = l.nextIndex;
213
+ const o = ae(e, r);
214
+ if (o) {
215
+ t += o.html, r = o.nextIndex;
216
216
  continue;
217
217
  }
218
- const s = me(e, r);
218
+ const s = be(e, r);
219
219
  if (s) {
220
220
  t += s.html, r = s.nextIndex;
221
221
  continue;
222
222
  }
223
- const a = be(e, r);
223
+ const a = ve(e, r);
224
224
  if (a) {
225
225
  t += a.html, r = a.nextIndex;
226
226
  continue;
227
227
  }
228
- const i = ae(e, r);
228
+ const i = ie(e, r);
229
229
  if (i) {
230
230
  t += i.html, r = i.nextIndex;
231
231
  continue;
232
232
  }
233
- const x = he(e, r);
233
+ const x = fe(e, r);
234
234
  if (x) {
235
235
  t += x.html, r = x.nextIndex;
236
236
  continue;
237
237
  }
238
- const g = fe(e, r);
238
+ const g = ge(e, r);
239
239
  if (g) {
240
240
  t += g.html, r = g.nextIndex;
241
241
  continue;
242
242
  }
243
- const c = ge(e, r);
243
+ const c = me(e, r);
244
244
  if (c) {
245
245
  t += c.html, r = c.nextIndex;
246
246
  continue;
247
247
  }
248
- const o = ie(e, r, n);
249
- if (o) {
250
- t += o.html, r = o.nextIndex, o.slurLevelDelta && (n += o.slurLevelDelta);
248
+ const l = ce(e, r, n);
249
+ if (l) {
250
+ t += l.html, r = l.nextIndex, l.slurLevelDelta && (n += l.slurLevelDelta);
251
251
  continue;
252
252
  }
253
- const d = de(e, r);
254
- if (d) {
255
- t += d.html, r = d.nextIndex;
253
+ const u = pe(e, r);
254
+ if (u) {
255
+ t += u.html, r = u.nextIndex;
256
256
  continue;
257
257
  }
258
- const h = ce(e, r);
258
+ const h = ue(e, r);
259
259
  if (h) {
260
260
  t += h.html, r = h.nextIndex;
261
261
  continue;
262
262
  }
263
- const y = ye(e, r);
263
+ const y = Be(e, r);
264
264
  if (y) {
265
265
  t += y.html, r = y.nextIndex;
266
266
  continue;
267
267
  }
268
- const m = ve(e, r);
268
+ const m = xe(e, r);
269
269
  if (m) {
270
270
  t += m.html, r = m.nextIndex;
271
271
  continue;
272
272
  }
273
- const b = xe(e, r);
273
+ const b = ye(e, r);
274
274
  if (b) {
275
275
  t += b.html, r = b.nextIndex;
276
276
  continue;
277
277
  }
278
- const B = ue(e, r);
278
+ const B = de(e, r);
279
279
  if (B) {
280
280
  t += B.html, r = B.nextIndex;
281
281
  continue;
282
282
  }
283
- const N = pe(e, r);
284
- if (N) {
285
- t += N.html, r = N.nextIndex;
283
+ const T = he(e, r);
284
+ if (T) {
285
+ t += T.html, r = T.nextIndex;
286
286
  continue;
287
287
  }
288
- t += `<span class="abc-text">${p(e[r])}</span>`, r++;
288
+ t += `<span class="abc-text">${d(e[r])}</span>`, r++;
289
289
  }
290
290
  return t;
291
- }, S = (e) => e.split(`
291
+ }, $ = (e) => e.split(`
292
292
  `).map((r) => {
293
293
  if (le.test(r))
294
- return `<span class="abc-comment">${p(r)}</span>`;
295
- const n = r.match(w);
294
+ return `<span class="abc-comment">${d(r)}</span>`;
295
+ const n = r.match(k);
296
296
  if (n) {
297
- const [, l, s] = n;
298
- return l === "w:" || l === "W:" ? `<span class="abc-lyrics-key">${p(l)}</span><span class="abc-lyrics-value">${p(s)}</span>` : `<span class="abc-meta-key">${p(l)}</span><span class="abc-meta-value">${p(s)}</span>`;
297
+ const [, o, s] = n;
298
+ return o === "w:" || o === "W:" ? `<span class="abc-lyrics-key">${d(o)}</span><span class="abc-lyrics-value">${d(s)}</span>` : `<span class="abc-meta-key">${d(o)}</span><span class="abc-meta-value">${d(s)}</span>`;
299
299
  }
300
- return Be(r);
300
+ return Te(r);
301
301
  }).join(`
302
- `), Ne = {
302
+ `), Ae = {
303
303
  "X:": [
304
304
  { value: "1", description: "Reference number 1" },
305
305
  { value: "2", description: "Reference number 2" }
@@ -445,7 +445,7 @@ const V = (e) => e.split(`
445
445
  { value: "Your Name", description: "Transcriber name" },
446
446
  { value: "ABC transcription", description: "Transcription note" }
447
447
  ]
448
- }, Te = (e) => Ne[e] || [], Ae = [
448
+ }, Ne = (e) => Ae[e] || [], Ce = [
449
449
  {
450
450
  value: "/header",
451
451
  description: "Insert basic ABC header template",
@@ -456,14 +456,14 @@ L:1/4
456
456
  K:C
457
457
  `
458
458
  }
459
- ], Ie = (e) => e.startsWith("/") ? Ae.filter(
459
+ ], Ie = (e) => e.startsWith("/") ? Ce.filter(
460
460
  (t) => t.value.toLowerCase().startsWith(e.toLowerCase())
461
- ) : [], Ce = ({
461
+ ) : [], we = ({
462
462
  value: e,
463
463
  textareaRef: t,
464
464
  onChange: r
465
465
  }) => {
466
- const [n, l] = M({
466
+ const [n, o] = P({
467
467
  isOpen: !1,
468
468
  suggestions: [],
469
469
  selectedIndex: 0,
@@ -471,108 +471,108 @@ K:C
471
471
  fieldKey: null,
472
472
  inputValue: "",
473
473
  isCommand: !1
474
- }), s = A(() => {
474
+ }), s = N(() => {
475
475
  if (!t.current)
476
476
  return null;
477
- const c = t.current.selectionStart, o = e.substring(0, c).split(`
478
- `), d = o[o.length - 1];
479
- if (d.startsWith("/"))
477
+ const c = t.current.selectionStart, l = e.substring(0, c).split(`
478
+ `), u = l[l.length - 1];
479
+ if (u.startsWith("/"))
480
480
  return {
481
481
  fieldKey: null,
482
- inputValue: d,
483
- line: d,
484
- lineStartPos: c - d.length,
482
+ inputValue: u,
483
+ line: u,
484
+ lineStartPos: c - u.length,
485
485
  isCommand: !0
486
486
  };
487
- const h = d.match(w);
487
+ const h = u.match(k);
488
488
  if (h) {
489
489
  const [, y, m] = h;
490
490
  return {
491
491
  fieldKey: y,
492
492
  inputValue: m,
493
- line: d,
494
- lineStartPos: c - d.length,
493
+ line: u,
494
+ lineStartPos: c - u.length,
495
495
  isCommand: !1
496
496
  };
497
497
  }
498
498
  return null;
499
- }, [e, t]), a = A(() => {
499
+ }, [e, t]), a = N(() => {
500
500
  if (!t.current)
501
501
  return { top: 0, left: 0 };
502
- const c = t.current, o = c.selectionStart, h = e.substring(0, o).split(`
502
+ const c = t.current, l = c.selectionStart, h = e.substring(0, l).split(`
503
503
  `).length - 1, y = parseFloat(getComputedStyle(c).lineHeight) || 24;
504
504
  return { top: (parseFloat(getComputedStyle(c).paddingTop) || 16) + (h + 1) * y - c.scrollTop, left: 60 };
505
505
  }, [e, t]);
506
- P(() => {
506
+ R(() => {
507
507
  const c = s();
508
508
  if (!c) {
509
- l((d) => ({ ...d, isOpen: !1 }));
509
+ o((u) => ({ ...u, isOpen: !1 }));
510
510
  return;
511
511
  }
512
- let o = [];
513
- if (c.isCommand ? o = Ie(c.inputValue) : c.fieldKey && (o = Te(c.fieldKey).filter(
512
+ let l = [];
513
+ if (c.isCommand ? l = Ie(c.inputValue) : c.fieldKey && (l = Ne(c.fieldKey).filter(
514
514
  (h) => h.value.toLowerCase().startsWith(c.inputValue.toLowerCase())
515
- )), o.length > 0) {
516
- const d = a();
517
- l({
515
+ )), l.length > 0) {
516
+ const u = a();
517
+ o({
518
518
  isOpen: !0,
519
- suggestions: o,
519
+ suggestions: l,
520
520
  selectedIndex: 0,
521
- position: d,
521
+ position: u,
522
522
  fieldKey: c.fieldKey,
523
523
  inputValue: c.inputValue,
524
524
  isCommand: c.isCommand
525
525
  });
526
526
  } else
527
- l((d) => ({ ...d, isOpen: !1 }));
527
+ o((u) => ({ ...u, isOpen: !1 }));
528
528
  }, [e, s, a]);
529
- const i = A(
529
+ const i = N(
530
530
  (c) => {
531
531
  if (!t.current)
532
532
  return;
533
- const o = t.current.selectionStart, d = e.substring(0, o).split(`
534
- `), h = d[d.length - 1];
533
+ const l = t.current.selectionStart, u = e.substring(0, l).split(`
534
+ `), h = u[u.length - 1];
535
535
  let y, m;
536
536
  if (n.isCommand && c.template) {
537
- const b = e.substring(0, o - h.length), B = e.substring(o);
537
+ const b = e.substring(0, l - h.length), B = e.substring(l);
538
538
  y = b + c.template + B, m = b.length + c.template.length;
539
539
  } else if (n.fieldKey) {
540
- const b = n.fieldKey + c.value, B = e.substring(0, o - h.length), N = e.substring(o);
541
- y = B + b + N, m = B.length + b.length;
540
+ const b = n.fieldKey + c.value, B = e.substring(0, l - h.length), T = e.substring(l);
541
+ y = B + b + T, m = B.length + b.length;
542
542
  } else
543
543
  return;
544
544
  r(y), setTimeout(() => {
545
545
  t.current && (t.current.selectionStart = m, t.current.selectionEnd = m, t.current.focus());
546
- }, 0), l((b) => ({ ...b, isOpen: !1 }));
546
+ }, 0), o((b) => ({ ...b, isOpen: !1 }));
547
547
  },
548
548
  [t, n.fieldKey, n.isCommand, e, r]
549
- ), x = A(
549
+ ), x = N(
550
550
  (c) => {
551
551
  if (n.isOpen)
552
552
  switch (c.key) {
553
553
  case "ArrowDown":
554
- c.preventDefault(), l((o) => ({
555
- ...o,
556
- selectedIndex: Math.min(o.selectedIndex + 1, o.suggestions.length - 1)
554
+ c.preventDefault(), o((l) => ({
555
+ ...l,
556
+ selectedIndex: Math.min(l.selectedIndex + 1, l.suggestions.length - 1)
557
557
  }));
558
558
  break;
559
559
  case "ArrowUp":
560
- c.preventDefault(), l((o) => ({
561
- ...o,
562
- selectedIndex: Math.max(o.selectedIndex - 1, 0)
560
+ c.preventDefault(), o((l) => ({
561
+ ...l,
562
+ selectedIndex: Math.max(l.selectedIndex - 1, 0)
563
563
  }));
564
564
  break;
565
565
  case "Enter":
566
566
  n.suggestions.length > 0 && (c.preventDefault(), i(n.suggestions[n.selectedIndex]));
567
567
  break;
568
568
  case "Escape":
569
- c.preventDefault(), l((o) => ({ ...o, isOpen: !1 }));
569
+ c.preventDefault(), o((l) => ({ ...l, isOpen: !1 }));
570
570
  break;
571
571
  }
572
572
  },
573
573
  [n.isOpen, n.suggestions, n.selectedIndex, i]
574
- ), g = A((c) => {
575
- l((o) => ({ ...o, selectedIndex: c }));
574
+ ), g = N((c) => {
575
+ o((l) => ({ ...l, selectedIndex: c }));
576
576
  }, []);
577
577
  return {
578
578
  isOpen: n.isOpen,
@@ -583,20 +583,20 @@ K:C
583
583
  selectSuggestion: i,
584
584
  handleMouseEnter: g
585
585
  };
586
- }, we = ({
586
+ }, ke = ({
587
587
  suggestions: e,
588
588
  selectedIndex: t,
589
589
  position: r,
590
590
  onSelect: n,
591
- onMouseEnter: l
591
+ onMouseEnter: o
592
592
  }) => {
593
- const s = C(null);
594
- return P(() => {
593
+ const s = w(null);
594
+ return R(() => {
595
595
  s.current?.scrollIntoView({
596
596
  block: "nearest",
597
597
  behavior: "smooth"
598
598
  });
599
- }, [t]), e.length === 0 ? null : /* @__PURE__ */ u(
599
+ }, [t]), e.length === 0 ? null : /* @__PURE__ */ p(
600
600
  "div",
601
601
  {
602
602
  className: "absolute z-50 bg-slate-800 rounded-md shadow-xl overflow-hidden",
@@ -614,17 +614,17 @@ K:C
614
614
  ref: i === t ? s : null,
615
615
  className: `px-3 py-2 cursor-pointer ${i === t ? "bg-blue-600 text-white" : "text-slate-200 hover:bg-slate-700"}`,
616
616
  onClick: () => n(a),
617
- onMouseEnter: () => l(i),
617
+ onMouseEnter: () => o(i),
618
618
  children: [
619
- /* @__PURE__ */ u("div", { className: "font-mono text-sm", children: a.value }),
620
- a.description && /* @__PURE__ */ u("div", { className: "text-xs opacity-75 mt-1", children: a.description })
619
+ /* @__PURE__ */ p("div", { className: "font-mono text-sm", children: a.value }),
620
+ a.description && /* @__PURE__ */ p("div", { className: "text-xs opacity-75 mt-1", children: a.description })
621
621
  ]
622
622
  },
623
623
  `${a.value}-${i}`
624
624
  ))
625
625
  }
626
626
  );
627
- }, ke = (e) => {
627
+ }, Se = (e) => {
628
628
  const t = e.trim();
629
629
  if (t === "C")
630
630
  return { beatsPerMeasure: 4, beatUnit: 4 };
@@ -642,11 +642,11 @@ K:C
642
642
  const t = e.split(`
643
643
  `);
644
644
  let r = { beatsPerMeasure: 4, beatUnit: 4 }, n = 1 / 8;
645
- for (const l of t) {
646
- const s = l.match(w);
645
+ for (const o of t) {
646
+ const s = o.match(k);
647
647
  if (s) {
648
648
  const [, a, i] = s;
649
- a === "M:" ? r = ke(i) : a === "L:" && (n = Le(i));
649
+ a === "M:" ? r = Se(i) : a === "L:" && (n = Le(i));
650
650
  }
651
651
  }
652
652
  return { meter: r, unitNoteLength: n };
@@ -660,27 +660,27 @@ K:C
660
660
  return parseInt(t, 10) / parseInt(r, 10);
661
661
  }
662
662
  return parseInt(e, 10);
663
- }, $e = (e, t) => {
663
+ }, Me = (e, t) => {
664
664
  let r = 0, n = 0;
665
665
  for (; n < e.length; ) {
666
- const l = e[n];
667
- if (E.test(l) || O.test(l)) {
666
+ const o = e[n];
667
+ if (E.test(o) || D.test(o)) {
668
668
  let s = n + 1;
669
669
  for (; s < e.length && (e[s] === "'" || e[s] === ","); )
670
670
  s++;
671
671
  let a = "";
672
672
  if (s < e.length && (e[s] === "/" || /\d/.test(e[s]))) {
673
- const o = s;
673
+ const l = s;
674
674
  for (e[s] === "/" && s++; s < e.length && /\d/.test(e[s]); )
675
675
  s++;
676
676
  if (s < e.length && e[s] === "/")
677
677
  for (s++; s < e.length && /\d/.test(e[s]); )
678
678
  s++;
679
- a = e.substring(o, s);
679
+ a = e.substring(l, s);
680
680
  }
681
681
  const i = _(a), x = t.unitNoteLength * i, g = 1 / t.meter.beatUnit, c = x / g;
682
682
  r += c, n = s;
683
- } else if (l === "[") {
683
+ } else if (o === "[") {
684
684
  let s = n + 1;
685
685
  for (; s < e.length && e[s] !== "]"; ) {
686
686
  const a = e[s];
@@ -696,13 +696,13 @@ K:C
696
696
  s++;
697
697
  let a = "";
698
698
  if (s < e.length && (e[s] === "/" || /\d/.test(e[s]))) {
699
- const o = s;
699
+ const l = s;
700
700
  for (e[s] === "/" && s++; s < e.length && /\d/.test(e[s]); )
701
701
  s++;
702
702
  if (s < e.length && e[s] === "/")
703
703
  for (s++; s < e.length && /\d/.test(e[s]); )
704
704
  s++;
705
- a = e.substring(o, s);
705
+ a = e.substring(l, s);
706
706
  }
707
707
  const i = _(a), x = t.unitNoteLength * i, g = 1 / t.meter.beatUnit, c = x / g;
708
708
  r += c;
@@ -712,41 +712,66 @@ K:C
712
712
  n++;
713
713
  }
714
714
  return r;
715
- }, Se = (e) => {
715
+ }, $e = (e) => {
716
716
  const t = [], r = e.split(`
717
717
  `), n = Ee(e);
718
- return r.forEach((l, s) => {
719
- if (!(l.trim().startsWith("%") || w.test(l)) && l.includes("|")) {
718
+ return r.forEach((o, s) => {
719
+ if (!(o.trim().startsWith("%") || k.test(o)) && o.includes("|")) {
720
720
  let a = 0;
721
- const i = l.split("|");
721
+ const i = o.split("|");
722
722
  let x = 0;
723
723
  i.forEach((g, c) => {
724
724
  if (c === i.length - 1 && g.trim() === "")
725
725
  return;
726
- const o = g.trim();
727
- if (o.startsWith(":") || o.startsWith("[") || o === "") {
726
+ const l = g.trim();
727
+ if (l.startsWith(":") || l.startsWith("[") || l === "") {
728
728
  a += g.length + 1;
729
729
  return;
730
730
  }
731
- const d = $e(o, n), h = n.meter.beatsPerMeasure;
732
- if (Math.abs(d - h) > 0.01) {
733
- const m = l.indexOf(o, a), b = m + o.length;
731
+ const u = Me(l, n), h = n.meter.beatsPerMeasure;
732
+ if (Math.abs(u - h) > 0.01) {
733
+ const m = o.indexOf(l, a), b = m + l.length;
734
734
  t.push({
735
735
  line: s,
736
736
  measureIndex: x,
737
737
  startCol: m,
738
738
  endCol: b,
739
739
  expected: h,
740
- actual: d,
741
- message: `Expected ${h} beats, got ${d.toFixed(2)}`
740
+ actual: u,
741
+ message: `Expected ${h} beats, got ${u.toFixed(2)}`
742
742
  });
743
743
  }
744
744
  x++, a += g.length + 1;
745
745
  });
746
746
  }
747
747
  }), t;
748
- }, Pe = ({ value: e, onChange: t, theme: r = "light" }) => {
749
- const n = C(null), l = C(null), s = C(null), [a, i] = M(null), x = V(e), g = S(e), c = K(() => Se(e), [e]), o = r === "dark" ? {
748
+ }, I = {
749
+ margin: 0,
750
+ padding: "16px",
751
+ border: "none",
752
+ outline: "none",
753
+ fontSize: "14px",
754
+ fontFamily: 'SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
755
+ fontWeight: 400,
756
+ fontStyle: "normal",
757
+ fontVariant: "normal",
758
+ fontStretch: "normal",
759
+ lineHeight: "24px",
760
+ letterSpacing: "normal",
761
+ wordSpacing: "normal",
762
+ textAlign: "left",
763
+ textIndent: 0,
764
+ textTransform: "none",
765
+ whiteSpace: "pre-wrap",
766
+ wordBreak: "break-all",
767
+ wordWrap: "break-word",
768
+ overflowWrap: "break-word",
769
+ tabSize: 4,
770
+ boxSizing: "border-box",
771
+ WebkitFontSmoothing: "antialiased",
772
+ MozOsxFontSmoothing: "grayscale"
773
+ }, Re = ({ value: e, onChange: t, theme: r = "light" }) => {
774
+ const n = w(null), o = w(null), s = w(null), [a, i] = P(null), x = G(e), g = $(e), c = V(() => $e(e), [e]), l = r === "dark" ? {
750
775
  bg: "#1a1a1a",
751
776
  editorBg: "#262626",
752
777
  lineNumBg: "#0f0f0f",
@@ -781,121 +806,136 @@ K:C
781
806
  errorHoverBg: "rgba(254, 202, 202, 0.4)",
782
807
  errorItemBorder: "rgba(220, 38, 38, 0.1)"
783
808
  }, {
784
- isOpen: d,
809
+ isOpen: u,
785
810
  suggestions: h,
786
811
  selectedIndex: y,
787
812
  position: m,
788
813
  handleKeyDown: b,
789
814
  selectSuggestion: B,
790
- handleMouseEnter: N
791
- } = Ce({ value: e, textareaRef: n, onChange: t }), H = () => {
792
- n.current && l.current && s.current && (l.current.scrollTop = n.current.scrollTop, s.current.scrollTop = n.current.scrollTop);
793
- }, W = (f) => {
815
+ handleMouseEnter: T
816
+ } = we({ value: e, textareaRef: n, onChange: t }), H = () => {
817
+ n.current && o.current && s.current && (o.current.scrollTop = n.current.scrollTop, s.current.scrollTop = n.current.scrollTop);
818
+ }, U = (f) => {
794
819
  if (n.current) {
795
- const T = e.split(`
796
- `), I = T.slice(0, f.line).join(`
820
+ const A = e.split(`
821
+ `), C = A.slice(0, f.line).join(`
797
822
  `).length + (f.line > 0 ? 1 : 0);
798
- n.current.focus(), n.current.setSelectionRange(I, I), n.current.scrollTop = n.current.scrollHeight * (f.line / T.length);
823
+ n.current.focus(), n.current.setSelectionRange(C, C), n.current.scrollTop = n.current.scrollHeight * (f.line / A.length);
799
824
  }
800
825
  };
801
- return /* @__PURE__ */ u("div", { className: "w-full h-full flex flex-col p-4", "data-theme": r, style: { backgroundColor: o.bg }, children: /* @__PURE__ */ v("div", { className: "w-full flex-1 flex flex-col rounded-lg overflow-hidden shadow-lg", style: { backgroundColor: o.editorBg }, children: [
826
+ return /* @__PURE__ */ p("div", { className: "w-full h-full flex flex-col p-4", "data-theme": r, style: { backgroundColor: l.bg }, children: /* @__PURE__ */ v("div", { className: "w-full flex-1 flex flex-col rounded-lg overflow-hidden shadow-lg", style: { backgroundColor: l.editorBg }, children: [
802
827
  /* @__PURE__ */ v("div", { className: "flex-1 flex overflow-hidden", children: [
803
- /* @__PURE__ */ u(
828
+ /* @__PURE__ */ p(
804
829
  "div",
805
830
  {
806
- ref: l,
807
- className: "overflow-hidden text-right text-sm font-mono leading-relaxed text-slate-500 select-none",
831
+ ref: o,
832
+ className: "overflow-hidden text-right select-none",
808
833
  style: {
809
- backgroundColor: o.lineNumBg,
810
- minWidth: "2.5rem",
811
- borderRight: `1px solid ${o.lineNumBorder}`
834
+ backgroundColor: l.lineNumBg,
835
+ minWidth: "3rem",
836
+ borderRight: `1px solid ${l.lineNumBorder}`,
837
+ ...I,
838
+ padding: "16px 8px 16px 8px",
839
+ color: "#6b7280"
812
840
  },
813
- children: /* @__PURE__ */ u("pre", { className: "m-0 pl-1 pr-3 py-4", children: x })
841
+ children: x
814
842
  }
815
843
  ),
816
844
  /* @__PURE__ */ v("div", { className: "flex-1 relative", children: [
817
- /* @__PURE__ */ u(
845
+ /* @__PURE__ */ p(
818
846
  "div",
819
847
  {
820
848
  ref: s,
821
- className: "absolute inset-0 overflow-hidden px-4 py-4 text-sm font-mono leading-relaxed pointer-events-none",
849
+ className: "absolute inset-0 overflow-hidden pointer-events-none",
822
850
  style: {
823
- backgroundColor: o.editorBg,
851
+ ...I,
852
+ backgroundColor: l.editorBg,
824
853
  opacity: a ? 0.3 : 1,
825
854
  transition: "opacity 0.2s"
826
855
  },
827
- children: /* @__PURE__ */ u(
828
- "pre",
829
- {
830
- className: "m-0",
831
- dangerouslySetInnerHTML: { __html: g }
832
- }
833
- )
856
+ dangerouslySetInnerHTML: { __html: g }
834
857
  }
835
858
  ),
836
859
  a && (() => {
837
860
  const f = e.split(`
838
- `), I = (f[a.line] || "").substring(a.startCol, a.endCol), U = S(I);
839
- return /* @__PURE__ */ u(
861
+ `), C = (f[a.line] || "").substring(a.startCol, a.endCol), F = $(C);
862
+ return /* @__PURE__ */ p(
840
863
  "div",
841
864
  {
842
- className: "absolute inset-0 overflow-hidden px-4 py-4 text-sm font-mono leading-relaxed pointer-events-none",
843
- style: { backgroundColor: "transparent" },
844
- children: /* @__PURE__ */ u("pre", { className: "m-0", children: f.map((k, L) => {
865
+ className: "absolute inset-0 overflow-hidden pointer-events-none",
866
+ style: {
867
+ ...I,
868
+ backgroundColor: "transparent"
869
+ },
870
+ children: f.map((S, L) => {
845
871
  if (L === a.line) {
846
- const j = k.substring(0, a.startCol), F = k.substring(a.endCol);
872
+ const j = S.substring(0, a.startCol), K = S.substring(a.endCol);
847
873
  return /* @__PURE__ */ v("div", { children: [
848
- /* @__PURE__ */ u("span", { style: { opacity: 0 }, children: j }),
849
- /* @__PURE__ */ u(
874
+ /* @__PURE__ */ p("span", { style: { visibility: "hidden" }, children: j }),
875
+ /* @__PURE__ */ p(
850
876
  "span",
851
877
  {
852
- className: "px-1 rounded",
853
- style: { backgroundColor: o.errorHighlight },
854
- dangerouslySetInnerHTML: { __html: U }
878
+ style: {
879
+ backgroundColor: l.errorHighlight,
880
+ borderRadius: "2px",
881
+ padding: "1px 2px"
882
+ },
883
+ dangerouslySetInnerHTML: { __html: F }
855
884
  }
856
885
  ),
857
- /* @__PURE__ */ u("span", { style: { opacity: 0 }, children: F })
886
+ /* @__PURE__ */ p("span", { style: { visibility: "hidden" }, children: K })
858
887
  ] }, L);
859
888
  }
860
- return /* @__PURE__ */ u("div", { style: { opacity: 0 }, children: k }, L);
861
- }) })
889
+ return /* @__PURE__ */ p("div", { style: { visibility: "hidden" }, children: S || "​" }, L);
890
+ })
862
891
  }
863
892
  );
864
893
  })(),
865
- /* @__PURE__ */ u(
894
+ /* @__PURE__ */ p(
866
895
  "textarea",
867
896
  {
868
897
  ref: n,
869
- className: "absolute inset-0 w-full h-full resize-none px-4 py-4 text-sm font-mono leading-relaxed outline-none border-0",
870
- style: { backgroundColor: "transparent", color: "transparent", caretColor: o.caretColor },
898
+ className: "absolute inset-0 w-full h-full resize-none",
899
+ style: {
900
+ ...I,
901
+ backgroundColor: "transparent",
902
+ color: "transparent",
903
+ caretColor: l.caretColor,
904
+ // ブラウザ固有のスタイルをリセット
905
+ WebkitAppearance: "none",
906
+ appearance: "none"
907
+ },
871
908
  value: e,
872
909
  onChange: (f) => t(f.target.value),
873
910
  onScroll: H,
874
911
  onKeyDown: b,
875
912
  spellCheck: !1,
913
+ autoCapitalize: "off",
914
+ autoComplete: "off",
915
+ autoCorrect: "off",
876
916
  placeholder: "Type /header to insert template..."
877
917
  }
878
918
  ),
879
- d && /* @__PURE__ */ u(
880
- we,
919
+ u && /* @__PURE__ */ p(
920
+ ke,
881
921
  {
882
922
  suggestions: h,
883
923
  selectedIndex: y,
884
924
  position: m,
885
925
  onSelect: B,
886
- onMouseEnter: N
926
+ onMouseEnter: T
887
927
  }
888
928
  )
889
929
  ] })
890
930
  ] }),
891
931
  c.length > 0 && /* @__PURE__ */ v("div", { className: "flex", children: [
892
- /* @__PURE__ */ u(
932
+ /* @__PURE__ */ p(
893
933
  "div",
894
934
  {
895
935
  style: {
896
- backgroundColor: o.lineNumBg,
897
- minWidth: "2.5rem",
898
- borderRight: `1px solid ${o.lineNumBorder}`
936
+ backgroundColor: l.lineNumBg,
937
+ minWidth: "3rem",
938
+ borderRight: `1px solid ${l.lineNumBorder}`
899
939
  }
900
940
  }
901
941
  ),
@@ -904,11 +944,11 @@ K:C
904
944
  {
905
945
  className: "flex-1 px-4 py-3 text-xs font-mono overflow-auto border-t",
906
946
  style: {
907
- backgroundColor: o.errorBg,
908
- borderColor: o.errorBorder,
947
+ backgroundColor: l.errorBg,
948
+ borderColor: l.errorBorder,
909
949
  maxHeight: "12rem",
910
950
  scrollbarWidth: "thin",
911
- scrollbarColor: `${o.errorIcon} transparent`
951
+ scrollbarColor: `${l.errorIcon} transparent`
912
952
  },
913
953
  children: [
914
954
  /* @__PURE__ */ v("div", { className: "flex items-center gap-2 mb-3", children: [
@@ -924,41 +964,41 @@ K:C
924
964
  strokeWidth: "2",
925
965
  strokeLinecap: "round",
926
966
  strokeLinejoin: "round",
927
- style: { color: o.errorIcon },
967
+ style: { color: l.errorIcon },
928
968
  children: [
929
- /* @__PURE__ */ u("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
930
- /* @__PURE__ */ u("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
931
- /* @__PURE__ */ u("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
969
+ /* @__PURE__ */ p("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
970
+ /* @__PURE__ */ p("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
971
+ /* @__PURE__ */ p("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
932
972
  ]
933
973
  }
934
974
  ),
935
- /* @__PURE__ */ u("span", { className: "text-[11px] font-semibold uppercase tracking-wide", style: { color: o.errorHeader }, children: "Validation Issues" })
975
+ /* @__PURE__ */ p("span", { className: "text-[11px] font-semibold uppercase tracking-wide", style: { color: l.errorHeader }, children: "Validation Issues" })
936
976
  ] }),
937
- /* @__PURE__ */ u(
977
+ /* @__PURE__ */ p(
938
978
  "div",
939
979
  {
940
980
  className: "px-2 py-0.5 rounded-full text-[10px] font-bold",
941
981
  style: {
942
- backgroundColor: o.errorBadgeBg,
943
- color: o.errorBadgeText
982
+ backgroundColor: l.errorBadgeBg,
983
+ color: l.errorBadgeText
944
984
  },
945
985
  children: c.length
946
986
  }
947
987
  )
948
988
  ] }),
949
- /* @__PURE__ */ u("div", { className: "space-y-1", children: c.map((f, T) => /* @__PURE__ */ v(
989
+ /* @__PURE__ */ p("div", { className: "space-y-1", children: c.map((f, A) => /* @__PURE__ */ v(
950
990
  "div",
951
991
  {
952
992
  className: "flex items-start gap-3 px-3 py-2 rounded-md border cursor-pointer",
953
993
  style: {
954
- backgroundColor: a === f ? o.errorHoverBg : "transparent",
955
- borderColor: a === f ? o.errorIcon : o.errorItemBorder,
994
+ backgroundColor: a === f ? l.errorHoverBg : "transparent",
995
+ borderColor: a === f ? l.errorIcon : l.errorItemBorder,
956
996
  transition: "all 0.15s ease-in-out",
957
997
  transform: a === f ? "translateX(2px)" : "translateX(0)"
958
998
  },
959
999
  onMouseEnter: () => i(f),
960
1000
  onMouseLeave: () => i(null),
961
- onClick: () => W(f),
1001
+ onClick: () => U(f),
962
1002
  children: [
963
1003
  /* @__PURE__ */ v(
964
1004
  "svg",
@@ -972,21 +1012,21 @@ K:C
972
1012
  strokeLinecap: "round",
973
1013
  strokeLinejoin: "round",
974
1014
  className: "shrink-0 mt-0.5",
975
- style: { color: o.errorIcon },
1015
+ style: { color: l.errorIcon },
976
1016
  children: [
977
- /* @__PURE__ */ u("circle", { cx: "12", cy: "12", r: "10" }),
978
- /* @__PURE__ */ u("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
979
- /* @__PURE__ */ u("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
1017
+ /* @__PURE__ */ p("circle", { cx: "12", cy: "12", r: "10" }),
1018
+ /* @__PURE__ */ p("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
1019
+ /* @__PURE__ */ p("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
980
1020
  ]
981
1021
  }
982
1022
  ),
983
1023
  /* @__PURE__ */ v("div", { className: "flex-1 flex flex-col gap-1", children: [
984
- /* @__PURE__ */ u("div", { className: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ v(
1024
+ /* @__PURE__ */ p("div", { className: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ v(
985
1025
  "span",
986
1026
  {
987
1027
  className: "font-semibold text-[11px] px-1.5 py-0.5 rounded",
988
1028
  style: {
989
- color: o.errorLocation,
1029
+ color: l.errorLocation,
990
1030
  backgroundColor: r === "dark" ? "rgba(34, 211, 238, 0.1)" : "rgba(8, 145, 178, 0.1)"
991
1031
  },
992
1032
  children: [
@@ -997,7 +1037,7 @@ K:C
997
1037
  ]
998
1038
  }
999
1039
  ) }),
1000
- /* @__PURE__ */ u("span", { className: "text-[11px] leading-relaxed", style: { color: o.errorMessage }, children: f.message })
1040
+ /* @__PURE__ */ p("span", { className: "text-[11px] leading-relaxed", style: { color: l.errorMessage }, children: f.message })
1001
1041
  ] }),
1002
1042
  /* @__PURE__ */ v(
1003
1043
  "svg",
@@ -1012,19 +1052,19 @@ K:C
1012
1052
  strokeLinejoin: "round",
1013
1053
  className: "shrink-0 mt-1 opacity-50",
1014
1054
  style: {
1015
- color: o.errorIcon,
1055
+ color: l.errorIcon,
1016
1056
  opacity: a === f ? 1 : 0.3,
1017
1057
  transition: "opacity 0.15s ease-in-out"
1018
1058
  },
1019
1059
  children: [
1020
- /* @__PURE__ */ u("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
1021
- /* @__PURE__ */ u("polyline", { points: "12 5 19 12 12 19" })
1060
+ /* @__PURE__ */ p("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
1061
+ /* @__PURE__ */ p("polyline", { points: "12 5 19 12 12 19" })
1022
1062
  ]
1023
1063
  }
1024
1064
  )
1025
1065
  ]
1026
1066
  },
1027
- T
1067
+ A
1028
1068
  )) })
1029
1069
  ]
1030
1070
  }
@@ -1033,32 +1073,32 @@ K:C
1033
1073
  ] }) });
1034
1074
  };
1035
1075
  export {
1036
- G as ABC_ACCIDENTAL_PATTERN,
1037
- D as ABC_ANNOTATION_PATTERN,
1038
- z as ABC_BAR_PATTERN,
1039
- se as ABC_BROKEN_RHYTHM_PATTERN,
1040
- X as ABC_CHORD_BRACKET_PATTERN,
1041
- q as ABC_CHORD_SYMBOL_PATTERN,
1042
- Ae as ABC_COMMANDS,
1076
+ z as ABC_ACCIDENTAL_PATTERN,
1077
+ W as ABC_ANNOTATION_PATTERN,
1078
+ X as ABC_BAR_PATTERN,
1079
+ oe as ABC_BROKEN_RHYTHM_PATTERN,
1080
+ Y as ABC_CHORD_BRACKET_PATTERN,
1081
+ ee as ABC_CHORD_SYMBOL_PATTERN,
1082
+ Ce as ABC_COMMANDS,
1043
1083
  le as ABC_COMMENT_PATTERN,
1044
- ee as ABC_DECORATION_PATTERN,
1045
- R as ABC_DURATION_PATTERN,
1046
- w as ABC_FIELD_PATTERN,
1047
- te as ABC_GRACE_NOTE_PATTERN,
1048
- re as ABC_INLINE_FIELD_PATTERN,
1084
+ te as ABC_DECORATION_PATTERN,
1085
+ O as ABC_DURATION_PATTERN,
1086
+ k as ABC_FIELD_PATTERN,
1087
+ ne as ABC_GRACE_NOTE_PATTERN,
1088
+ se as ABC_INLINE_FIELD_PATTERN,
1049
1089
  E as ABC_NOTE_PATTERN,
1050
1090
  Q as ABC_OCTAVE_PATTERN,
1051
- Z as ABC_ORNAMENT_PATTERN,
1052
- O as ABC_REST_PATTERN,
1053
- Y as ABC_SLUR_PATTERN,
1054
- Ne as ABC_SUGGESTIONS,
1055
- $ as ABC_TIE_PATTERN,
1056
- J as ABC_TUPLET_PATTERN,
1057
- ne as ABC_VOLTA_BRACKET_PATTERN,
1058
- Pe as AbcEditor,
1059
- we as SuggestionList,
1060
- S as highlightAbc,
1061
- Ce as useAbcAutoComplete,
1062
- V as useLineNumbers,
1063
- Se as validateAbc
1091
+ q as ABC_ORNAMENT_PATTERN,
1092
+ D as ABC_REST_PATTERN,
1093
+ J as ABC_SLUR_PATTERN,
1094
+ Ae as ABC_SUGGESTIONS,
1095
+ M as ABC_TIE_PATTERN,
1096
+ Z as ABC_TUPLET_PATTERN,
1097
+ re as ABC_VOLTA_BRACKET_PATTERN,
1098
+ Re as AbcEditor,
1099
+ ke as SuggestionList,
1100
+ $ as highlightAbc,
1101
+ we as useAbcAutoComplete,
1102
+ G as useLineNumbers,
1103
+ $e as validateAbc
1064
1104
  };