@hosanna/chordpro 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +201 -0
- package/README.md +177 -0
- package/dist/chunk-6VAMM7S3.mjs +388 -0
- package/dist/chunk-CTBAE2XK.mjs +1154 -0
- package/dist/chunk-PENNIH4J.mjs +1143 -0
- package/dist/chunk-QZY7KJWK.mjs +749 -0
- package/dist/chunk-TUKJQWXG.mjs +50 -0
- package/dist/editor/index.d.mts +44 -0
- package/dist/editor/index.d.ts +44 -0
- package/dist/editor/index.js +789 -0
- package/dist/editor/index.mjs +16 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3459 -0
- package/dist/index.mjs +54 -0
- package/dist/parser/index.d.mts +185 -0
- package/dist/parser/index.d.ts +185 -0
- package/dist/parser/index.js +1567 -0
- package/dist/parser/index.mjs +32 -0
- package/dist/renderer/index.d.mts +52 -0
- package/dist/renderer/index.d.ts +52 -0
- package/dist/renderer/index.js +2237 -0
- package/dist/renderer/index.mjs +15 -0
- package/package.json +74 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
convertToChordProDetailed,
|
|
3
|
+
detectSourceFormat,
|
|
4
|
+
slugifyTitle,
|
|
5
|
+
toChordPro
|
|
6
|
+
} from "../chunk-6VAMM7S3.mjs";
|
|
7
|
+
import {
|
|
8
|
+
DefaultChordDictionary,
|
|
9
|
+
buildChordProText,
|
|
10
|
+
chordDictionary,
|
|
11
|
+
getNoteValue,
|
|
12
|
+
getSuggestedCapo,
|
|
13
|
+
parseChordPro,
|
|
14
|
+
parseLineSegments,
|
|
15
|
+
transposeChord,
|
|
16
|
+
transposeNote
|
|
17
|
+
} from "../chunk-PENNIH4J.mjs";
|
|
18
|
+
export {
|
|
19
|
+
DefaultChordDictionary,
|
|
20
|
+
buildChordProText,
|
|
21
|
+
chordDictionary,
|
|
22
|
+
convertToChordProDetailed,
|
|
23
|
+
detectSourceFormat,
|
|
24
|
+
getNoteValue,
|
|
25
|
+
getSuggestedCapo,
|
|
26
|
+
parseChordPro,
|
|
27
|
+
parseLineSegments,
|
|
28
|
+
slugifyTitle,
|
|
29
|
+
toChordPro,
|
|
30
|
+
transposeChord,
|
|
31
|
+
transposeNote
|
|
32
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
interface ChordProPreviewProps {
|
|
10
|
+
content: string;
|
|
11
|
+
showChords: boolean;
|
|
12
|
+
transposeVal?: number;
|
|
13
|
+
capoVal?: number;
|
|
14
|
+
onTransposeChange?: (val: number) => void;
|
|
15
|
+
onCapoChange?: (val: number) => void;
|
|
16
|
+
twoColumnLayout?: boolean;
|
|
17
|
+
fontSize?: number;
|
|
18
|
+
instrument?: "guitar" | "piano";
|
|
19
|
+
showDiagrams?: boolean;
|
|
20
|
+
fileName?: string;
|
|
21
|
+
showYoutubePlayer?: boolean;
|
|
22
|
+
onShowYoutubePlayerChange?: (show: boolean) => void;
|
|
23
|
+
scrollContainerRef?: React__default.RefObject<HTMLDivElement | null>;
|
|
24
|
+
}
|
|
25
|
+
declare const ChordProRenderer: React__default.MemoExoticComponent<({ content, showChords, transposeVal, capoVal, onTransposeChange, onCapoChange, twoColumnLayout, fontSize, instrument, showDiagrams, fileName, showYoutubePlayer: showYoutubePlayerProp, onShowYoutubePlayerChange, scrollContainerRef, }: ChordProPreviewProps) => React__default.JSX.Element>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Guitar dynamic SVG drawer
|
|
29
|
+
*/
|
|
30
|
+
declare function GuitarDiagram({ frets, fingers, barre, }: {
|
|
31
|
+
frets: number[];
|
|
32
|
+
fingers?: number[];
|
|
33
|
+
barre?: number;
|
|
34
|
+
}): React.JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Piano keys dynamic SVG drawer
|
|
37
|
+
*/
|
|
38
|
+
declare function PianoDiagram({ highlightKeys }: {
|
|
39
|
+
highlightKeys: number[];
|
|
40
|
+
}): React.JSX.Element;
|
|
41
|
+
interface ChordRollProps {
|
|
42
|
+
uniqueChords: string[];
|
|
43
|
+
transposeVal: number;
|
|
44
|
+
capoVal?: number;
|
|
45
|
+
onChordClick?: (chord: string) => void;
|
|
46
|
+
instrument: "guitar" | "piano";
|
|
47
|
+
showDiagrams: boolean;
|
|
48
|
+
showChords: boolean;
|
|
49
|
+
}
|
|
50
|
+
declare function ChordRoll({ uniqueChords, transposeVal, capoVal, onChordClick, instrument, showDiagrams, showChords, }: ChordRollProps): React.JSX.Element | null;
|
|
51
|
+
|
|
52
|
+
export { ChordProRenderer, type ChordProPreviewProps as ChordProRendererProps, ChordRoll, type ChordRollProps, GuitarDiagram, PianoDiagram, ChordProRenderer as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
interface ChordProPreviewProps {
|
|
10
|
+
content: string;
|
|
11
|
+
showChords: boolean;
|
|
12
|
+
transposeVal?: number;
|
|
13
|
+
capoVal?: number;
|
|
14
|
+
onTransposeChange?: (val: number) => void;
|
|
15
|
+
onCapoChange?: (val: number) => void;
|
|
16
|
+
twoColumnLayout?: boolean;
|
|
17
|
+
fontSize?: number;
|
|
18
|
+
instrument?: "guitar" | "piano";
|
|
19
|
+
showDiagrams?: boolean;
|
|
20
|
+
fileName?: string;
|
|
21
|
+
showYoutubePlayer?: boolean;
|
|
22
|
+
onShowYoutubePlayerChange?: (show: boolean) => void;
|
|
23
|
+
scrollContainerRef?: React__default.RefObject<HTMLDivElement | null>;
|
|
24
|
+
}
|
|
25
|
+
declare const ChordProRenderer: React__default.MemoExoticComponent<({ content, showChords, transposeVal, capoVal, onTransposeChange, onCapoChange, twoColumnLayout, fontSize, instrument, showDiagrams, fileName, showYoutubePlayer: showYoutubePlayerProp, onShowYoutubePlayerChange, scrollContainerRef, }: ChordProPreviewProps) => React__default.JSX.Element>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Guitar dynamic SVG drawer
|
|
29
|
+
*/
|
|
30
|
+
declare function GuitarDiagram({ frets, fingers, barre, }: {
|
|
31
|
+
frets: number[];
|
|
32
|
+
fingers?: number[];
|
|
33
|
+
barre?: number;
|
|
34
|
+
}): React.JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Piano keys dynamic SVG drawer
|
|
37
|
+
*/
|
|
38
|
+
declare function PianoDiagram({ highlightKeys }: {
|
|
39
|
+
highlightKeys: number[];
|
|
40
|
+
}): React.JSX.Element;
|
|
41
|
+
interface ChordRollProps {
|
|
42
|
+
uniqueChords: string[];
|
|
43
|
+
transposeVal: number;
|
|
44
|
+
capoVal?: number;
|
|
45
|
+
onChordClick?: (chord: string) => void;
|
|
46
|
+
instrument: "guitar" | "piano";
|
|
47
|
+
showDiagrams: boolean;
|
|
48
|
+
showChords: boolean;
|
|
49
|
+
}
|
|
50
|
+
declare function ChordRoll({ uniqueChords, transposeVal, capoVal, onChordClick, instrument, showDiagrams, showChords, }: ChordRollProps): React.JSX.Element | null;
|
|
51
|
+
|
|
52
|
+
export { ChordProRenderer, type ChordProPreviewProps as ChordProRendererProps, ChordRoll, type ChordRollProps, GuitarDiagram, PianoDiagram, ChordProRenderer as default };
|