@vmz/plugin-shiki 0.3.6 → 0.3.7

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 +53 -53
  2. package/package.json +6 -3
package/README.md CHANGED
@@ -1,53 +1,53 @@
1
- # @vmz/plugin-shiki
2
-
3
- ## Code examples that are part of the reading experience
4
-
5
- `@vmz/plugin-shiki` brings Shiki's high-quality syntax highlighting to VMZ applications. It is designed for guides, API
6
- reference, technical blogs, source browsers, tutorials, and any product surface where code is meant to be read
7
- carefully.
8
-
9
- ## Why Shiki fits VMZ documents
10
-
11
- Code snippets should remain useful before a page becomes interactive. Shiki supports a content-first experience: source
12
- can be highlighted as part of the rendered document instead of relying on a browser-only code viewer to make a page
13
- readable.
14
-
15
- For VMZ examples, the plugin can share the same language presentation used by VMZ editor tooling. That consistency helps
16
- readers move from documentation to a real `.vmz` file without relearning the visual grammar.
17
-
18
- It is especially useful for:
19
-
20
- - product documentation that must be readable before interaction starts;
21
- - API and configuration references where source is the main content;
22
- - tutorials that move between prose and real VMZ components;
23
- - source browsers that need trustworthy language presentation.
24
-
25
- ## Third-party TextMate grammar (VMZ-2)
26
-
27
- By default the runtime loads `vmz-textmate/shiki`. For other languages (e.g. VOS), pass a peer adapter:
28
-
29
- ```ts
30
- import shiki from '@vmz/plugin-shiki';
31
-
32
- export default defineConfig({
33
- plugins: [shiki({ textmate: '@game-gpt/vos-textmate/shiki' })],
34
- engines: { code: 'shiki' },
35
- });
36
- ```
37
-
38
- The plugin writes `dist/_vmz/plugin-shiki.config.json`; the runtime reads it in SSR (`VMZ_DIST`) and in the browser (`fetch`).
39
-
40
- ## VMZ boundary
41
-
42
- Shiki owns source presentation. VMZ owns document structure, SSR, optional interaction, testing, and delivery. The
43
- plugin should make code easier to understand without becoming a parallel application runtime.
44
-
45
- ## A content-first feature set 🎨
46
-
47
- - **Readable SSR:** highlighted source can arrive with the page instead of flashing into place later.
48
- - **VMZ consistency:** examples can share the grammar readers see in their editor.
49
- - **Theme-aware presentation:** technical content can belong to the surrounding design.
50
- - **Graceful fallback:** source remains readable when rich highlighting is unavailable.
51
-
52
- Use Shiki where code itself is part of the product. If users are meant to edit the code, pair the reading experience
53
- with CodeMirror or Monaco rather than stretching a highlighter into an editor.
1
+ # @vmz/plugin-shiki
2
+
3
+ ## Code examples that are part of the reading experience
4
+
5
+ `@vmz/plugin-shiki` brings Shiki's high-quality syntax highlighting to VMZ applications. It is designed for guides, API
6
+ reference, technical blogs, source browsers, tutorials, and any product surface where code is meant to be read
7
+ carefully.
8
+
9
+ ## Why Shiki fits VMZ documents
10
+
11
+ Code snippets should remain useful before a page becomes interactive. Shiki supports a content-first experience: source
12
+ can be highlighted as part of the rendered document instead of relying on a browser-only code viewer to make a page
13
+ readable.
14
+
15
+ For VMZ examples, the plugin can share the same language presentation used by VMZ editor tooling. That consistency helps
16
+ readers move from documentation to a real `.vmz` file without relearning the visual grammar.
17
+
18
+ It is especially useful for:
19
+
20
+ - product documentation that must be readable before interaction starts;
21
+ - API and configuration references where source is the main content;
22
+ - tutorials that move between prose and real VMZ components;
23
+ - source browsers that need trustworthy language presentation.
24
+
25
+ ## Third-party TextMate grammar (VMZ-2)
26
+
27
+ By default the runtime loads `vmz-textmate/shiki`. For other languages (e.g. VOS), pass a peer adapter:
28
+
29
+ ```ts
30
+ import shiki from '@vmz/plugin-shiki';
31
+
32
+ export default defineConfig({
33
+ plugins: [shiki({ textmate: '@game-gpt/vos-textmate/shiki' })],
34
+ engines: { code: 'shiki' },
35
+ });
36
+ ```
37
+
38
+ The plugin writes `dist/_vmz/plugin-shiki.config.json`; the runtime reads it in SSR (`VMZ_DIST`) and in the browser (`fetch`).
39
+
40
+ ## VMZ boundary
41
+
42
+ Shiki owns source presentation. VMZ owns document structure, SSR, optional interaction, testing, and delivery. The
43
+ plugin should make code easier to understand without becoming a parallel application runtime.
44
+
45
+ ## A content-first feature set 🎨
46
+
47
+ - **Readable SSR:** highlighted source can arrive with the page instead of flashing into place later.
48
+ - **VMZ consistency:** examples can share the grammar readers see in their editor.
49
+ - **Theme-aware presentation:** technical content can belong to the surrounding design.
50
+ - **Graceful fallback:** source remains readable when rich highlighting is unavailable.
51
+
52
+ Use Shiki where code itself is part of the product. If users are meant to edit the code, pair the reading experience
53
+ with CodeMirror or Monaco rather than stretching a highlighter into an editor.
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "dependencies": {
3
- "@vmz/plugin": "0.3.6"
3
+ "@vmz/plugin": "0.3.7"
4
4
  },
5
5
  "description": "VMZ Shiki adapter - <Shiki> + code engine registration",
6
6
  "devDependencies": {
7
7
  "@types/node": "^22.15.0",
8
8
  "shiki": "^3.12.2",
9
9
  "typescript": "^5.8.3",
10
- "vmz-textmate": "0.3.6"
10
+ "vmz-textmate": "0.3.7"
11
+ },
12
+ "engines": {
13
+ "node": ">=24.12.0"
11
14
  },
12
15
  "exports": {
13
16
  ".": {
@@ -58,5 +61,5 @@
58
61
  },
59
62
  "type": "module",
60
63
  "types": "./dist/vmz.plugin.d.ts",
61
- "version": "0.3.6"
64
+ "version": "0.3.7"
62
65
  }