jpfun 0.2.0 → 0.3.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/README.md +69 -11
- package/dist/diagnostic.js +5 -2
- package/dist/fraction.d.ts +24 -0
- package/dist/fraction.js +132 -0
- package/dist/functions/ASTtypes.d.ts +24 -7
- package/dist/functions/ASTtypes.js +35 -16
- package/dist/functions/adjust/index.d.ts +2 -0
- package/dist/functions/adjust/index.js +193 -0
- package/dist/functions/bar/index.d.ts +8 -0
- package/dist/functions/bar/index.js +39 -10
- package/dist/functions/beam/auto.js +32 -15
- package/dist/functions/beam/index.js +10 -6
- package/dist/functions/beam/layout.d.ts +3 -2
- package/dist/functions/beam/layout.js +42 -64
- package/dist/functions/box/index.js +35 -34
- package/dist/functions/br/index.js +9 -7
- package/dist/functions/dash/index.js +33 -1
- package/dist/functions/default.js +14 -7
- package/dist/functions/div/index.d.ts +16 -0
- package/dist/functions/div/index.js +45 -17
- package/dist/functions/dot/index.js +11 -3
- package/dist/functions/grace/index.d.ts +8 -11
- package/dist/functions/grace/index.js +82 -76
- package/dist/functions/head/index.d.ts +2 -0
- package/dist/functions/head/index.js +492 -0
- package/dist/functions/key/index.js +97 -3
- package/dist/functions/meter/index.d.ts +2 -0
- package/dist/functions/meter/index.js +154 -0
- package/dist/functions/note/accidentals.d.ts +24 -3
- package/dist/functions/note/accidentals.js +31 -1
- package/dist/functions/note/index.js +45 -65
- package/dist/functions/page/index.d.ts +9 -2
- package/dist/functions/page/index.js +50 -4
- package/dist/functions/set/index.js +37 -29
- package/dist/functions/stack/index.js +26 -22
- package/dist/functions/symbol/index.d.ts +21 -0
- package/dist/functions/symbol/index.js +94 -0
- package/dist/functions/symbol/ornament.d.ts +15 -0
- package/dist/functions/symbol/ornament.js +73 -0
- package/dist/functions/symbol/shape.d.ts +22 -0
- package/dist/functions/symbol/shape.js +48 -0
- package/dist/functions/symbol/symbols/accent.d.ts +2 -0
- package/dist/functions/symbol/symbols/accent.js +24 -0
- package/dist/functions/symbol/symbols/f.d.ts +2 -0
- package/dist/functions/symbol/symbols/f.js +55 -0
- package/dist/functions/symbol/symbols/fermata.d.ts +2 -0
- package/dist/functions/symbol/symbols/fermata.js +24 -0
- package/dist/functions/symbol/symbols/mordent.d.ts +2 -0
- package/dist/functions/symbol/symbols/mordent.js +43 -0
- package/dist/functions/symbol/symbols/p.d.ts +2 -0
- package/dist/functions/symbol/symbols/p.js +61 -0
- package/dist/functions/symbol/symbols/tr.d.ts +2 -0
- package/dist/functions/symbol/symbols/tr.js +75 -0
- package/dist/functions/tempo/glyph.d.ts +12 -0
- package/dist/functions/tempo/glyph.js +30 -0
- package/dist/functions/tempo/index.js +53 -2
- package/dist/functions/text/index.js +76 -24
- package/dist/functions/tie/index.js +102 -127
- package/dist/functions/tuplet/index.d.ts +2 -0
- package/dist/functions/tuplet/index.js +211 -0
- package/dist/functions/up/index.d.ts +1 -0
- package/dist/functions/up/index.js +245 -171
- package/dist/functions/voice/index.js +86 -68
- package/dist/functions/volta/index.d.ts +2 -0
- package/dist/functions/volta/index.js +227 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/jpfun.min.js +143 -0
- package/dist/layout/engine.d.ts +4 -11
- package/dist/layout/engine.js +65 -59
- package/dist/layout/model.d.ts +8 -1
- package/dist/layout/model.js +16 -6
- package/dist/layout/path.d.ts +19 -0
- package/dist/layout/path.js +101 -0
- package/dist/layout/types.d.ts +51 -18
- package/dist/layout/types.js +3 -1
- package/dist/lowering/loweringContext.d.ts +18 -20
- package/dist/lowering/loweringContext.js +132 -94
- package/dist/lowering/track.d.ts +1 -1
- package/dist/lowering/track.js +1 -1
- package/dist/lowering/types.d.ts +49 -12
- package/dist/lowering/types.js +9 -3
- package/dist/parser/parse-utils/call-utils.d.ts +0 -2
- package/dist/parser/parse-utils/call-utils.js +0 -6
- package/dist/parser/parse-utils/note-utils.d.ts +8 -0
- package/dist/parser/parse-utils/note-utils.js +35 -13
- package/dist/parser/parse-utils/string-utils.d.ts +8 -0
- package/dist/parser/parse-utils/string-utils.js +20 -0
- package/dist/parser/parserContext.d.ts +8 -5
- package/dist/parser/parserContext.js +38 -33
- package/dist/parser/preprocess.js +17 -11
- package/dist/playback/compile.d.ts +18 -0
- package/dist/playback/compile.js +401 -0
- package/dist/playback/event.d.ts +91 -0
- package/dist/playback/event.js +87 -0
- package/dist/playback/time.d.ts +14 -0
- package/dist/playback/time.js +81 -0
- package/dist/playback/types.d.ts +128 -0
- package/dist/playback/types.js +3 -0
- package/dist/render/canvas.d.ts +4 -4
- package/dist/render/canvas.js +20 -5
- package/dist/render/index.d.ts +1 -0
- package/dist/render/index.js +1 -0
- package/dist/render/paint.d.ts +8 -0
- package/dist/render/paint.js +101 -0
- package/dist/render/svg.d.ts +3 -3
- package/dist/render/svg.js +10 -8
- package/dist/render/text.d.ts +17 -0
- package/dist/render/text.js +35 -0
- package/dist/render/types.d.ts +1 -1
- package/grammar.md +93 -10
- package/package.json +10 -6
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jpfun",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A functional numbered musical notation typesetting engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"unpkg": "./dist/jpfun.min.js",
|
|
9
|
+
"jsdelivr": "./dist/jpfun.min.js",
|
|
8
10
|
"exports": {
|
|
9
11
|
".": {
|
|
10
12
|
"types": "./dist/index.d.ts",
|
|
@@ -36,12 +38,12 @@
|
|
|
36
38
|
},
|
|
37
39
|
"scripts": {
|
|
38
40
|
"clean": "node -e \"for (const path of ['dist', 'tsconfig.tsbuildinfo']) require('node:fs').rmSync(path, { recursive: true, force: true })\"",
|
|
39
|
-
"build": "pnpm run clean && tsc -p tsconfig.json",
|
|
41
|
+
"build": "pnpm run clean && tsc -p tsconfig.json && pnpm run build:bundle",
|
|
42
|
+
"build:bundle": "esbuild dist/index.js --bundle --minify --format=iife --global-name=jpfun --target=es2022 --legal-comments=none --banner:js=\"/*! jpfun | Apache-2.0 | github.com/madderscientist/jpFun */\" --outfile=dist/jpfun.min.js",
|
|
40
43
|
"prepack": "pnpm run build",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"test_render": "node --import tsx test/test_render.ts"
|
|
44
|
+
"typecheck": "tsc -p test/tsconfig.json",
|
|
45
|
+
"test": "node --import tsx --test \"test/*.test.ts\"",
|
|
46
|
+
"test:update": "node --import tsx --test \"test/*.test.ts\""
|
|
45
47
|
},
|
|
46
48
|
"keywords": [
|
|
47
49
|
"numbered-musical-notation",
|
|
@@ -53,6 +55,8 @@
|
|
|
53
55
|
"author": "madderscientist",
|
|
54
56
|
"license": "Apache-2.0",
|
|
55
57
|
"devDependencies": {
|
|
58
|
+
"@types/node": "^26.2.0",
|
|
59
|
+
"esbuild": "^0.25.0",
|
|
56
60
|
"tsx": "^4.23.12",
|
|
57
61
|
"typescript": "^7.0.2"
|
|
58
62
|
}
|