@vmz/plugin 0.3.9 → 0.3.11

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 +18 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -34,6 +34,24 @@ Use this package when you are creating a native VMZ integration, not when you si
34
34
  library in application code. The latter should remain a normal dependency unless it needs to participate in VMZ's
35
35
  compiler-visible boundaries.
36
36
 
37
+ ## Registration shape
38
+
39
+ Official plugins export a factory: `pluginName(optional config)`, with the same function as `export default`.
40
+ `pluginName()` must behave exactly like the plugin's default configuration.
41
+
42
+ ```ts
43
+ import { defineConfig } from '@vmz/plugin';
44
+ import katex from '@vmz/plugin-katex';
45
+
46
+ export default defineConfig({
47
+ plugins: [katex()],
48
+ engines: { math: 'katex' },
49
+ });
50
+ ```
51
+
52
+ `definePlugin` still accepts a plugin object for the protocol itself and for conformance fixtures. The author-facing
53
+ rule for official packages is the factory call: `plugins: [katex()]`, not `plugins: [katex]`.
54
+
37
55
  ## What a strong plugin can unlock 🚀
38
56
 
39
57
  - A content engine can contribute deterministic rendered output and diagnostics.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "dependencies": {
3
- "@vmz/protocol": "0.3.9"
3
+ "@vmz/protocol": "0.3.11"
4
4
  },
5
5
  "description": "VMZ plugin protocol types and definePlugin / defineConfig helpers (no N-API)",
6
6
  "exports": {
@@ -31,5 +31,5 @@
31
31
  },
32
32
  "type": "module",
33
33
  "types": "./index.d.ts",
34
- "version": "0.3.9"
34
+ "version": "0.3.11"
35
35
  }