astro-dgmo 0.3.3 → 0.3.4

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.
Files changed (2) hide show
  1. package/README.md +19 -13
  2. package/package.json +14 -1
package/README.md CHANGED
@@ -76,16 +76,16 @@ A -> B
76
76
  ```
77
77
  ````
78
78
 
79
- | Token | Effect |
80
- |---|---|
81
- | `diagram` / `showcase` | Set `mode` for this block |
82
- | `palette=<name>` | Override palette |
83
- | `theme=light` / `theme=dark` / `theme=transparent` | Override theme (single-render only) |
84
- | `colorMode=auto` / `colorMode=light` / `colorMode=dark` | Override color-mode strategy |
85
- | `title="…"` | Add a caption (`<figcaption>`) |
86
- | `source` / `noSource` | Force source listing on/off |
87
- | `copy` / `noCopy` | Force copy button on/off |
88
- | `openInEditor` / `noOpenInEditor` | Force editor link on/off |
79
+ | Token | Effect |
80
+ | ------------------------------------------------------- | ----------------------------------- |
81
+ | `diagram` / `showcase` | Set `mode` for this block |
82
+ | `palette=<name>` | Override palette |
83
+ | `theme=light` / `theme=dark` / `theme=transparent` | Override theme (single-render only) |
84
+ | `colorMode=auto` / `colorMode=light` / `colorMode=dark` | Override color-mode strategy |
85
+ | `title="…"` | Add a caption (`<figcaption>`) |
86
+ | `source` / `noSource` | Force source listing on/off |
87
+ | `copy` / `noCopy` | Force copy button on/off |
88
+ | `openInEditor` / `noOpenInEditor` | Force editor link on/off |
89
89
 
90
90
  See the [`remark-dgmo` README](https://github.com/diagrammo/remark-dgmo) for the full option matrix.
91
91
 
@@ -113,9 +113,15 @@ A small client script (~600 bytes) is injected via `injectScript('page', …)`.
113
113
  The shipped `remark-dgmo/client.css` keys on `[data-theme="dark"]`. For Tailwind-style sites that use a `.dark` class on `<html>`, don't import that stylesheet — inline these three rules in your own CSS instead:
114
114
 
115
115
  ```css
116
- .dgmo-dark { display: none; }
117
- html.dark .dgmo-light { display: none; }
118
- html.dark .dgmo-dark { display: block; }
116
+ .dgmo-dark {
117
+ display: none;
118
+ }
119
+ html.dark .dgmo-light {
120
+ display: none;
121
+ }
122
+ html.dark .dgmo-dark {
123
+ display: block;
124
+ }
119
125
  ```
120
126
 
121
127
  For other selectors (`data-color-scheme="dark"`, `:root[data-mode="dark"]`, etc.), same three rules with the selector swapped.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-dgmo",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Astro integration to render DGMO diagrams from fenced code blocks at build time. Powered by @diagrammo/dgmo.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,6 +25,9 @@
25
25
  "remark"
26
26
  ],
27
27
  "type": "module",
28
+ "engines": {
29
+ "node": ">=20.6"
30
+ },
28
31
  "main": "./dist/index.js",
29
32
  "module": "./dist/index.js",
30
33
  "types": "./dist/index.d.ts",
@@ -51,6 +54,11 @@
51
54
  "test": "vitest run",
52
55
  "test:watch": "vitest",
53
56
  "test:e2e": "pnpm build && cd tests/fixture && pnpm install --no-frozen-lockfile && pnpm exec astro build && node ../../scripts/assert-build-output.mjs",
57
+ "lint": "eslint .",
58
+ "lint:fix": "eslint . --fix",
59
+ "format": "prettier --write .",
60
+ "format:check": "prettier --check .",
61
+ "check:deadcode": "knip",
54
62
  "prepublishOnly": "pnpm build && pnpm test"
55
63
  },
56
64
  "peerDependencies": {
@@ -62,10 +70,15 @@
62
70
  },
63
71
  "devDependencies": {
64
72
  "@diagrammo/dgmo": "^0.15.0",
73
+ "@eslint/js": "^10.0.1",
65
74
  "@types/node": "^22.10.0",
66
75
  "astro": "^6.1.10",
76
+ "eslint": "^10.4.0",
77
+ "knip": "^6.14.1",
78
+ "prettier": "^3.8.3",
67
79
  "tsup": "^8.5.1",
68
80
  "typescript": "^6.0.2",
81
+ "typescript-eslint": "^8.59.3",
69
82
  "vitest": "^4.1.4"
70
83
  }
71
84
  }