astro-lilypond 0.1.0 → 0.2.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/components/LilyPond.astro +18 -0
- package/components/virtual.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/render.js +1 -2
- package/dist/render.js.map +1 -1
- package/package.json +17 -26
- package/README.md +0 -45
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
/// <reference path="./virtual.d.ts" />
|
|
3
|
+
import { escapeHtml } from "../src/util.js";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
content: string;
|
|
7
|
+
class?: string;
|
|
8
|
+
style?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { content, class: className, style } = Astro.props;
|
|
12
|
+
|
|
13
|
+
let html = content;
|
|
14
|
+
if (className) html = html.replace('class="lilypond"', `class="lilypond ${className}"`);
|
|
15
|
+
if (style) html = html.replace(/<(svg|img)\b/, `<$1 style="${escapeHtml(style)}"`);
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<Fragment set:html={html} />
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAS9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI9C,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,WAAW,eAAe;IAC/B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;CACtB;AAiBD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,gBAAgB,CAwFhF"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,24 @@ import { promisify } from "util";
|
|
|
3
3
|
import { remarkLilypondPlugin } from "./remark-plugin.js";
|
|
4
4
|
import { rehypeLilypondPlugin } from "./rehype-plugin.js";
|
|
5
5
|
import { satteriLilypondPlugin } from "./satteri-plugin.js";
|
|
6
|
+
import { render } from "./render.js";
|
|
7
|
+
import { prependVersion, renderToHtml, resolveFormat } from "./util.js";
|
|
6
8
|
const execFileAsync = promisify(execFile);
|
|
9
|
+
function lyFilePlugin(options) {
|
|
10
|
+
return {
|
|
11
|
+
name: "vite-plugin-astro-lilypond-ly",
|
|
12
|
+
enforce: "pre",
|
|
13
|
+
async transform(source, id) {
|
|
14
|
+
if (!id.endsWith(".ly") && !id.endsWith(".lilypond"))
|
|
15
|
+
return;
|
|
16
|
+
const src = options.version ? prependVersion(source, options.version) : source;
|
|
17
|
+
const { format, resolution } = resolveFormat(options.format ?? "svg");
|
|
18
|
+
const buf = await render(src, { format, resolution });
|
|
19
|
+
const html = renderToHtml(buf, format);
|
|
20
|
+
return { code: `export default ${JSON.stringify(html)}` };
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
7
24
|
export default function lilypond(options = {}) {
|
|
8
25
|
return {
|
|
9
26
|
name: "astro-lilypond",
|
|
@@ -14,6 +31,9 @@ export default function lilypond(options = {}) {
|
|
|
14
31
|
logger?.warn("astro-lilypond: `lilypond` binary not found — LilyPond blocks will render as errors. Install LilyPond and ensure it is on PATH.");
|
|
15
32
|
}
|
|
16
33
|
});
|
|
34
|
+
updateConfig({
|
|
35
|
+
vite: { plugins: [lyFilePlugin(options)] },
|
|
36
|
+
});
|
|
17
37
|
const existingProcessor = config.markdown?.processor;
|
|
18
38
|
if (existingProcessor?.name === "satteri") {
|
|
19
39
|
const { satteri, isSatteriProcessor } = await import("@astrojs/markdown-satteri");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGxE,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAsB1C,SAAS,YAAY,CAAC,OAAwB;IAC7C,OAAO;QACN,IAAI,EAAE,+BAA+B;QACrC,OAAO,EAAE,KAAK;QACd,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE;YACzB,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;gBAAE,OAAO;YAC7D,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC/E,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,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AE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;iCAC5E;6BACD,CAAC;yBACF;qBACD,CAAC,CAAC;oBACH,MAAM,EAAE,IAAI,CAAC,0DAA0D,CAAC,CAAC;oBACzE,OAAO;gBACR,CAAC;gBAED,MAAM,IAAI,KAAK,CACd,mEAAmE;oBAClE,gEAAgE;oBAChE,2EAA2E;oBAC3E,uBAAuB,iBAAiB,EAAE,IAAI,IAAI,MAAM,GAAG,CAC5D,CAAC;YACH,CAAC;SACD;KACD,CAAC;AACH,CAAC"}
|
package/dist/render.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { execFile } from "child_process";
|
|
2
|
-
import { mkdtemp, rm, writeFile } from "fs/promises";
|
|
2
|
+
import { mkdtemp, readFile, rm, writeFile } from "fs/promises";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
import { tmpdir } from "os";
|
|
5
5
|
import { promisify } from "util";
|
|
@@ -50,7 +50,6 @@ export async function render(source, options = {}) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
async function readOutputFile(base, format, crop) {
|
|
53
|
-
const { readFile } = await import("fs/promises");
|
|
54
53
|
// --define-default crop writes <base>.cropped.<format> alongside <base>.<format>
|
|
55
54
|
if (crop) {
|
|
56
55
|
try {
|
package/dist/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,E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,EAAE,CAAC,CAAC;IAC9C,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-lilypond",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "An Astro integration for rendering Lilypond scores to images in Markdown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.js"
|
|
12
|
-
}
|
|
12
|
+
},
|
|
13
|
+
"./component": "./components/LilyPond.astro"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"components"
|
|
16
18
|
],
|
|
17
19
|
"keywords": [
|
|
18
20
|
"astro",
|
|
@@ -23,43 +25,32 @@
|
|
|
23
25
|
"score",
|
|
24
26
|
"engraving"
|
|
25
27
|
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/kydecker/astro-lilypond"
|
|
31
|
+
},
|
|
26
32
|
"author": "Ky Decker",
|
|
27
33
|
"license": "MIT",
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"astro": ">=7.0.0"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"unist-util-visit": "^5.1.0"
|
|
39
|
+
},
|
|
28
40
|
"devDependencies": {
|
|
29
41
|
"@astrojs/markdown-remark": "^7.2.1",
|
|
30
42
|
"@astrojs/markdown-satteri": "^0.3.4",
|
|
31
|
-
"@changesets/cli": "^2.31.0",
|
|
32
43
|
"@types/mdast": "^4.0.4",
|
|
33
44
|
"@types/node": "^26.1.1",
|
|
34
45
|
"astro": "^7.0.8",
|
|
35
|
-
"biome": "^0.3.3",
|
|
36
|
-
"nano-staged": "^1.0.2",
|
|
37
46
|
"satteri": "^0.9.5",
|
|
38
|
-
"simple-git-hooks": "^2.13.1",
|
|
39
47
|
"typescript": "^7.0.2",
|
|
40
48
|
"unified": "^11.0.5",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
},
|
|
44
|
-
"peerDependencies": {
|
|
45
|
-
"astro": ">=7.0.0"
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"unist-util-visit": "^5.1.0"
|
|
49
|
-
},
|
|
50
|
-
"simple-git-hooks": {
|
|
51
|
-
"pre-commit": "./node_modules/.bin/nano-staged"
|
|
52
|
-
},
|
|
53
|
-
"nano-staged": {
|
|
54
|
-
"*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,json,jsonc,css,astro}": [
|
|
55
|
-
"biome check --write"
|
|
56
|
-
]
|
|
49
|
+
"vite": "^8.0.0",
|
|
50
|
+
"vitest": "^4.1.10"
|
|
57
51
|
},
|
|
58
52
|
"scripts": {
|
|
59
53
|
"build": "tsc --project tsconfig.json",
|
|
60
|
-
"release": "changeset publish",
|
|
61
|
-
"check": "biome check",
|
|
62
|
-
"check:fix": "biome check --write",
|
|
63
54
|
"test": "vitest"
|
|
64
55
|
}
|
|
65
56
|
}
|
package/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# astro-lilypond
|
|
2
|
-
|
|
3
|
-
An [Astro](https://astro.build) integration for rendering [LilyPond](https://lilypond.org) music notation to images.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
### Prerequisites
|
|
8
|
-
|
|
9
|
-
Install the LilyPond binary directly from [lilypond.org](https://lilypond.org/download.html) or with a package manager like [Homebrew](https://formulae.brew.sh/formula/lilypond).
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
brew install lilypond
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Installation
|
|
16
|
-
|
|
17
|
-
#### 1. Install `astro-lilypond`:
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
pnpm add astro-lilypond
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
#### 2. Add the integration to your Astro config:
|
|
24
|
-
|
|
25
|
-
```js
|
|
26
|
-
// astro.config.mjs
|
|
27
|
-
import { defineConfig } from 'astro/config';
|
|
28
|
-
import lilypond from 'astro-lilypond';
|
|
29
|
-
|
|
30
|
-
export default defineConfig({
|
|
31
|
-
integrations: [lilypond()]
|
|
32
|
-
});
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
#### 3. Use in Markdown:
|
|
36
|
-
|
|
37
|
-
````md
|
|
38
|
-
```lilypond
|
|
39
|
-
\\score ...
|
|
40
|
-
```
|
|
41
|
-
````
|
|
42
|
-
|
|
43
|
-
## Docs
|
|
44
|
-
|
|
45
|
-
Learn more at the [`astro-lilypond` docs](https://lilypond.ky.fyi).
|