@vmz/plugin-katex 0.3.5 → 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.
@@ -0,0 +1,2 @@
1
+ /** Optional helpers for apps that want KaTeX outside the materialized component. */
2
+ export declare function renderKatex(tex: string, display?: boolean): Promise<string>;
@@ -1,6 +1,5 @@
1
1
  /** Optional helpers for apps that want KaTeX outside the materialized component. */
2
-
3
- export async function renderKatex(tex: string, display = false): Promise<string> {
2
+ export async function renderKatex(tex, display = false) {
4
3
  const mod = await import('katex');
5
4
  const katex = mod.default ?? mod;
6
5
  return katex.renderToString(tex ?? '', {
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@vmz/plugin").VmzPlugin;
2
+ export default _default;
@@ -1,7 +1,5 @@
1
1
  import { definePlugin, loadPluginSource } from '@vmz/plugin';
2
-
3
- const source = loadPluginSource(import.meta.url, 'components/Katex.vmz');
4
-
2
+ const source = loadPluginSource(import.meta.url, '../components/Katex.vmz');
5
3
  export default definePlugin({
6
4
  name: '@vmz/plugin-katex',
7
5
  version: '0.1.0',
package/package.json CHANGED
@@ -1,19 +1,31 @@
1
1
  {
2
2
  "dependencies": {
3
- "@vmz/plugin": "0.3.5",
3
+ "@vmz/plugin": "0.3.7",
4
4
  "katex": "0.18.4"
5
5
  },
6
6
  "description": "VMZ KaTeX adapter - <Katex> + math engine registration",
7
+ "devDependencies": {
8
+ "@types/node": "^22.15.0",
9
+ "typescript": "^5.8.3"
10
+ },
11
+ "engines": {
12
+ "node": ">=24.12.0"
13
+ },
7
14
  "exports": {
8
15
  ".": {
9
- "default": "./vmz.plugin.ts",
10
- "types": "./vmz.plugin.ts"
16
+ "default": "./dist/vmz.plugin.js",
17
+ "types": "./dist/vmz.plugin.d.ts"
11
18
  },
12
19
  "./runtime": {
13
- "default": "./runtime.ts",
14
- "types": "./runtime.ts"
20
+ "default": "./dist/runtime.js",
21
+ "types": "./dist/runtime.d.ts"
15
22
  }
16
23
  },
24
+ "files": [
25
+ "dist",
26
+ "components",
27
+ "README.md"
28
+ ],
17
29
  "keywords": [
18
30
  "vmz",
19
31
  "plugin",
@@ -21,7 +33,7 @@
21
33
  "math"
22
34
  ],
23
35
  "license": "MIT",
24
- "main": "./vmz.plugin.ts",
36
+ "main": "./dist/vmz.plugin.js",
25
37
  "name": "@vmz/plugin-katex",
26
38
  "peerDependencies": {
27
39
  "katex": ">=0.16"
@@ -39,7 +51,10 @@
39
51
  "type": "git",
40
52
  "url": "git+https://github.com/doki-land/vmz-framework.git"
41
53
  },
54
+ "scripts": {
55
+ "build": "tsc -p tsconfig.json"
56
+ },
42
57
  "type": "module",
43
- "types": "./vmz.plugin.ts",
44
- "version": "0.3.5"
58
+ "types": "./dist/vmz.plugin.d.ts",
59
+ "version": "0.3.7"
45
60
  }