@incremark/devtools 0.0.1 โ†’ 0.0.3

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 (3) hide show
  1. package/README.en.md +103 -0
  2. package/README.md +2 -0
  3. package/package.json +8 -2
package/README.en.md ADDED
@@ -0,0 +1,103 @@
1
+ # @incremark/devtools
2
+
3
+ Developer tools for Incremark, framework agnostic.
4
+
5
+ **[๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡](./README.md)** | ๐Ÿ‡บ๐Ÿ‡ธ English
6
+
7
+ ## Features
8
+
9
+ - ๐Ÿ” **Real-time State** - View parsing state, block list, AST
10
+ - ๐Ÿ“Š **Timeline** - Record each append operation
11
+ - ๐ŸŽจ **Themes** - Supports dark/light themes
12
+ - ๐Ÿ“ฆ **Framework Agnostic** - Works with Vue, React, or vanilla JS
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ pnpm add @incremark/devtools
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ### With Vue
23
+
24
+ ```ts
25
+ import { useIncremark, useDevTools } from '@incremark/vue'
26
+
27
+ const incremark = useIncremark()
28
+ useDevTools(incremark)
29
+ ```
30
+
31
+ ### With React
32
+
33
+ ```tsx
34
+ import { useIncremark, useDevTools } from '@incremark/react'
35
+
36
+ function App() {
37
+ const incremark = useIncremark()
38
+ useDevTools(incremark)
39
+ }
40
+ ```
41
+
42
+ ### Standalone Usage
43
+
44
+ ```ts
45
+ import { createIncremarkParser } from '@incremark/core'
46
+ import { mountDevTools } from '@incremark/devtools'
47
+
48
+ const parser = createIncremarkParser()
49
+ parser.setOnChange(mountDevTools())
50
+ ```
51
+
52
+ ## API
53
+
54
+ ### mountDevTools(options?, target?)
55
+
56
+ Create and mount DevTools, returns onChange callback.
57
+
58
+ ```ts
59
+ const callback = mountDevTools({
60
+ open: false,
61
+ position: 'bottom-right',
62
+ theme: 'dark'
63
+ })
64
+
65
+ parser.setOnChange(callback)
66
+ ```
67
+
68
+ ### IncremarkDevTools
69
+
70
+ DevTools class for fine-grained control.
71
+
72
+ ```ts
73
+ const devtools = new IncremarkDevTools(options)
74
+ devtools.mount()
75
+ devtools.update(parserState)
76
+ devtools.unmount()
77
+ ```
78
+
79
+ ## Configuration Options
80
+
81
+ ```ts
82
+ interface DevToolsOptions {
83
+ open?: boolean // Initially open
84
+ position?: Position // Position
85
+ theme?: 'dark' | 'light' // Theme
86
+ }
87
+
88
+ type Position = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
89
+ ```
90
+
91
+ ## Feature Panels
92
+
93
+ | Panel | Function |
94
+ |-------|----------|
95
+ | Overview | Shows character count, block count, etc. |
96
+ | Blocks | View all parsed blocks |
97
+ | AST | Complete AST in JSON format |
98
+ | Timeline | History of append operations |
99
+
100
+ ## License
101
+
102
+ MIT
103
+
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Incremark ็š„ๅผ€ๅ‘่€…ๅทฅๅ…ท๏ผŒๆก†ๆžถๆ— ๅ…ณใ€‚
4
4
 
5
+ ๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ | **[๐Ÿ‡บ๐Ÿ‡ธ English](./README.en.md)**
6
+
5
7
  ## ็‰นๆ€ง
6
8
 
7
9
  - ๐Ÿ” **ๅฎžๆ—ถ็Šถๆ€** - ๆŸฅ็œ‹่งฃๆž็Šถๆ€ใ€ๅ—ๅˆ—่กจใ€AST
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incremark/devtools",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "license": "MIT",
5
5
  "description": "Incremark DevTools - Framework-agnostic debugging panel",
6
6
  "type": "module",
@@ -18,12 +18,18 @@
18
18
  "dist"
19
19
  ],
20
20
  "peerDependencies": {
21
- "@incremark/core": "0.0.1"
21
+ "@incremark/core": "0.0.3"
22
22
  },
23
23
  "devDependencies": {
24
24
  "tsup": "^8.0.0",
25
25
  "typescript": "^5.3.0"
26
26
  },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/kingshuaishuai/incremark.git",
30
+ "directory": "packages/devtools"
31
+ },
32
+ "homepage": "https://incremark-docs.vercel.app/",
27
33
  "scripts": {
28
34
  "build": "tsup",
29
35
  "dev": "tsup --watch"