typewright 0.2.1

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 (40) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +168 -0
  3. package/SPEC.md +327 -0
  4. package/dist/chunk-CZQO7TTL.js +1533 -0
  5. package/dist/chunk-CZQO7TTL.js.map +1 -0
  6. package/dist/chunk-KNEKNZXK.js +286 -0
  7. package/dist/chunk-KNEKNZXK.js.map +1 -0
  8. package/dist/chunk-M6IVEMXO.js +1398 -0
  9. package/dist/chunk-M6IVEMXO.js.map +1 -0
  10. package/dist/chunk-NJ7PJKHN.js +652 -0
  11. package/dist/chunk-NJ7PJKHN.js.map +1 -0
  12. package/dist/commands-Z3ndUSza.d.cts +221 -0
  13. package/dist/commands-Z3ndUSza.d.ts +221 -0
  14. package/dist/core/index.cjs +2952 -0
  15. package/dist/core/index.cjs.map +1 -0
  16. package/dist/core/index.d.cts +410 -0
  17. package/dist/core/index.d.ts +410 -0
  18. package/dist/core/index.js +4 -0
  19. package/dist/core/index.js.map +1 -0
  20. package/dist/mdx/index.cjs +662 -0
  21. package/dist/mdx/index.cjs.map +1 -0
  22. package/dist/mdx/index.d.cts +252 -0
  23. package/dist/mdx/index.d.ts +252 -0
  24. package/dist/mdx/index.js +3 -0
  25. package/dist/mdx/index.js.map +1 -0
  26. package/dist/react/index.cjs +7439 -0
  27. package/dist/react/index.cjs.map +1 -0
  28. package/dist/react/index.d.cts +140 -0
  29. package/dist/react/index.d.ts +140 -0
  30. package/dist/react/index.js +3644 -0
  31. package/dist/react/index.js.map +1 -0
  32. package/dist/streaming/index.cjs +1494 -0
  33. package/dist/streaming/index.cjs.map +1 -0
  34. package/dist/streaming/index.d.cts +64 -0
  35. package/dist/streaming/index.d.ts +64 -0
  36. package/dist/streaming/index.js +4 -0
  37. package/dist/streaming/index.js.map +1 -0
  38. package/dist/types-CX1GOx0Y.d.cts +319 -0
  39. package/dist/types-CX1GOx0Y.d.ts +319 -0
  40. package/package.json +128 -0
package/package.json ADDED
@@ -0,0 +1,128 @@
1
+ {
2
+ "name": "typewright",
3
+ "version": "0.2.1",
4
+ "description": "A blazing-fast, from-scratch GitHub Flavored Markdown + MDX editor and streaming previewer for the web. Zero-runtime-dependency engine, Obsidian-style unified live preview, semantic folding, in-place tables, and LLM token-stream rendering that anticipates formatting as it arrives.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Luke Rhodes (@lprhodes)",
8
+ "homepage": "https://github.com/lprhodes/typewright#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/lprhodes/typewright.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/lprhodes/typewright/issues"
15
+ },
16
+ "keywords": [
17
+ "markdown",
18
+ "mdx",
19
+ "editor",
20
+ "gfm",
21
+ "github-flavored-markdown",
22
+ "wysiwyg",
23
+ "live-preview",
24
+ "streaming",
25
+ "llm",
26
+ "ai",
27
+ "react",
28
+ "code-editor",
29
+ "obsidian",
30
+ "mermaid",
31
+ "syntax-highlighting"
32
+ ],
33
+ "sideEffects": [
34
+ "*.css"
35
+ ],
36
+ "files": [
37
+ "dist",
38
+ "SPEC.md",
39
+ "README.md",
40
+ "LICENSE"
41
+ ],
42
+ "main": "./dist/react/index.cjs",
43
+ "module": "./dist/react/index.js",
44
+ "types": "./dist/react/index.d.ts",
45
+ "exports": {
46
+ ".": {
47
+ "types": "./dist/react/index.d.ts",
48
+ "import": "./dist/react/index.js",
49
+ "require": "./dist/react/index.cjs"
50
+ },
51
+ "./core": {
52
+ "types": "./dist/core/index.d.ts",
53
+ "import": "./dist/core/index.js",
54
+ "require": "./dist/core/index.cjs"
55
+ },
56
+ "./streaming": {
57
+ "types": "./dist/streaming/index.d.ts",
58
+ "import": "./dist/streaming/index.js",
59
+ "require": "./dist/streaming/index.cjs"
60
+ },
61
+ "./mdx": {
62
+ "types": "./dist/mdx/index.d.ts",
63
+ "import": "./dist/mdx/index.js",
64
+ "require": "./dist/mdx/index.cjs"
65
+ },
66
+ "./package.json": "./package.json"
67
+ },
68
+ "scripts": {
69
+ "build": "tsup",
70
+ "dev": "tsup --watch",
71
+ "typecheck": "tsc --noEmit",
72
+ "test": "vitest run",
73
+ "test:watch": "vitest",
74
+ "demo": "vite",
75
+ "demo:build": "vite build && cp demo/dist/index.html demo/standalone.html",
76
+ "e2e": "playwright test",
77
+ "bench": "vitest bench --run bench/",
78
+ "size": "tsup && node --experimental-strip-types bench/size.ts",
79
+ "prepublishOnly": "pnpm run build"
80
+ },
81
+ "//bench": "The CodeMirror-6 baseline in docs/BENCHMARKS.md is bench-only and NEVER shipped. bench/cm6-baseline.bench.ts runs a real cold-parse comparison (Typewright parse() vs @codemirror/lang-markdown's Lezer parser) from the devDependencies `codemirror`, `@codemirror/lang-markdown`, `@codemirror/state`, `@codemirror/view`. Keep them in devDependencies only — never dependencies/peerDependencies. The bench guards its import in try/catch: if a contributor prunes those devDeps, it registers a skipped placeholder so `pnpm bench` stays green. The full in-browser keystroke-to-paint (INP) comparison against the live CodeMirror view is separate and uses the same devDeps via the Playwright method in bench/keystroke.md.",
82
+ "peerDependencies": {
83
+ "@swc/wasm-web": "*",
84
+ "esbuild-wasm": "*",
85
+ "react": ">=18",
86
+ "react-dom": ">=18"
87
+ },
88
+ "peerDependenciesMeta": {
89
+ "react": {
90
+ "optional": true
91
+ },
92
+ "react-dom": {
93
+ "optional": true
94
+ },
95
+ "esbuild-wasm": {
96
+ "optional": true
97
+ },
98
+ "@swc/wasm-web": {
99
+ "optional": true
100
+ }
101
+ },
102
+ "devDependencies": {
103
+ "@axe-core/playwright": "^4.12.1",
104
+ "@codemirror/lang-markdown": "^6.5.0",
105
+ "@codemirror/state": "^6.7.1",
106
+ "@codemirror/view": "^6.43.6",
107
+ "@playwright/test": "^1.49.1",
108
+ "@types/react": "^19.0.0",
109
+ "@types/react-dom": "^19.0.0",
110
+ "@vitejs/plugin-react": "^4.3.4",
111
+ "codemirror": "^6.0.2",
112
+ "jsdom": "^29.1.0",
113
+ "react": "^19.0.0",
114
+ "react-dom": "^19.0.0",
115
+ "tsup": "^8.3.5",
116
+ "typescript": "^5.7.2",
117
+ "vite": "^6.0.7",
118
+ "vite-plugin-singlefile": "^2.1.0",
119
+ "vitest": "^3.0.5"
120
+ },
121
+ "engines": {
122
+ "node": ">=18"
123
+ },
124
+ "packageManager": "pnpm@10.14.0",
125
+ "publishConfig": {
126
+ "access": "public"
127
+ }
128
+ }