@incremark/react 0.1.2 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incremark/react",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "license": "MIT",
5
5
  "description": "Incremark React integration - Incremental Markdown parser for AI streaming",
6
6
  "type": "module",
@@ -12,17 +12,22 @@
12
12
  "import": "./dist/index.js",
13
13
  "types": "./dist/index.d.ts"
14
14
  },
15
- "./styles.css": "./dist/styles.css"
15
+ "./styles.css": "@incremark/theme/styles.css"
16
16
  },
17
17
  "files": [
18
18
  "dist"
19
19
  ],
20
20
  "peerDependencies": {
21
+ "mermaid": "^10.0.0 || ^11.0.0",
22
+ "katex": "^0.16.0",
21
23
  "react": ">=18.0.0",
22
- "@incremark/core": "0.1.2"
24
+ "@incremark/core": "0.2.1"
23
25
  },
24
26
  "dependencies": {
25
- "@incremark/devtools": "0.1.2"
27
+ "shiki": "^3.20.0",
28
+ "@incremark/devtools": "0.2.1",
29
+ "@incremark/shared": "0.2.1",
30
+ "@incremark/theme": "0.2.1"
26
31
  },
27
32
  "devDependencies": {
28
33
  "@types/mdast": "^4.0.0",
@@ -38,7 +43,7 @@
38
43
  },
39
44
  "homepage": "https://www.incremark.com/",
40
45
  "scripts": {
41
- "build": "tsup && cp src/styles.css dist/styles.css",
46
+ "build": "tsup",
42
47
  "dev": "tsup --watch"
43
48
  }
44
49
  }
package/dist/styles.css DELETED
@@ -1,206 +0,0 @@
1
- /* Incremark React 样式 */
2
-
3
- /* 主容器 */
4
- .incremark {
5
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
6
- line-height: 1.6;
7
- color: #333;
8
- }
9
-
10
- /* 块状态显示 */
11
- .incremark-block.pending {
12
- border-left: 3px solid #a855f7;
13
- padding-left: 12px;
14
- opacity: 0.8;
15
- }
16
-
17
- /* 标题 */
18
- .incremark-heading {
19
- margin: 0.5em 0;
20
- font-weight: 600;
21
- line-height: 1.3;
22
- }
23
-
24
- .incremark-heading h1 {
25
- font-size: 2em;
26
- border-bottom: 1px solid #eee;
27
- padding-bottom: 0.3em;
28
- }
29
-
30
- .incremark-heading h2 {
31
- font-size: 1.5em;
32
- }
33
-
34
- .incremark-heading h3 {
35
- font-size: 1.25em;
36
- }
37
-
38
- .incremark-heading h4 {
39
- font-size: 1em;
40
- }
41
-
42
- .incremark-heading h5 {
43
- font-size: 0.875em;
44
- }
45
-
46
- .incremark-heading h6 {
47
- font-size: 0.85em;
48
- color: #666;
49
- }
50
-
51
- /* 段落 */
52
- .incremark-paragraph {
53
- margin: 0.75em 0;
54
- line-height: 1.6;
55
- }
56
-
57
- /* 行内代码 */
58
- .incremark-inline-code {
59
- padding: 0.2em 0.4em;
60
- background: rgba(0, 0, 0, 0.06);
61
- border-radius: 4px;
62
- font-family: 'Fira Code', 'SF Mono', Consolas, monospace;
63
- font-size: 0.9em;
64
- }
65
-
66
- /* 代码块 */
67
- .incremark-code {
68
- margin: 1em 0;
69
- border-radius: 8px;
70
- overflow: hidden;
71
- background: #24292e;
72
- }
73
-
74
- .incremark-code .code-header {
75
- display: flex;
76
- justify-content: space-between;
77
- align-items: center;
78
- padding: 8px 16px;
79
- background: #1f2428;
80
- border-bottom: 1px solid #30363d;
81
- font-size: 12px;
82
- }
83
-
84
- .incremark-code .language {
85
- color: #8b949e;
86
- text-transform: uppercase;
87
- font-weight: 500;
88
- letter-spacing: 0.5px;
89
- }
90
-
91
- .incremark-code pre {
92
- margin: 0;
93
- padding: 16px;
94
- overflow-x: auto;
95
- background: transparent;
96
- }
97
-
98
- .incremark-code code {
99
- font-family: 'Fira Code', 'SF Mono', 'Monaco', 'Consolas', monospace;
100
- font-size: 14px;
101
- line-height: 1.6;
102
- color: #c9d1d9;
103
- }
104
-
105
- /* 列表 */
106
- .incremark-list {
107
- margin: 0.75em 0;
108
- padding-left: 2em;
109
- }
110
-
111
- .incremark-list li {
112
- margin: 0.25em 0;
113
- line-height: 1.6;
114
- }
115
-
116
- /* 引用块 */
117
- .incremark-blockquote {
118
- margin: 1em 0;
119
- padding: 0.5em 1em;
120
- border-left: 4px solid #3b82f6;
121
- background: #f0f7ff;
122
- border-radius: 0 4px 4px 0;
123
- }
124
-
125
- .incremark-blockquote p {
126
- margin: 0.5em 0;
127
- }
128
-
129
- .incremark-blockquote p:first-child {
130
- margin-top: 0;
131
- }
132
-
133
- .incremark-blockquote p:last-child {
134
- margin-bottom: 0;
135
- }
136
-
137
- /* 表格 */
138
- .incremark-table-wrapper {
139
- overflow-x: auto;
140
- margin: 1em 0;
141
- }
142
-
143
- .incremark-table {
144
- width: 100%;
145
- border-collapse: collapse;
146
- font-size: 14px;
147
- }
148
-
149
- .incremark-table th,
150
- .incremark-table td {
151
- border: 1px solid #ddd;
152
- padding: 10px 14px;
153
- }
154
-
155
- .incremark-table th {
156
- background: #f8f9fa;
157
- font-weight: 600;
158
- }
159
-
160
- .incremark-table tr:nth-child(even) {
161
- background: #fafafa;
162
- }
163
-
164
- .incremark-table tr:hover {
165
- background: #f0f0f0;
166
- }
167
-
168
- /* 分隔线 */
169
- .incremark-hr {
170
- margin: 2em 0;
171
- border: none;
172
- border-top: 2px solid #e5e5e5;
173
- }
174
-
175
- /* 未知类型 */
176
- .incremark-unknown {
177
- margin: 0.5em 0;
178
- padding: 10px;
179
- background: #fff3cd;
180
- border: 1px solid #ffc107;
181
- border-radius: 4px;
182
- font-size: 12px;
183
- }
184
-
185
- .incremark-unknown pre {
186
- margin: 0;
187
- white-space: pre-wrap;
188
- word-break: break-all;
189
- font-size: 11px;
190
- }
191
-
192
- /* ============ 渐入动画效果 ============ */
193
-
194
- .incremark-fade-in {
195
- animation: incremark-fade-in 0.4s ease-out;
196
- }
197
-
198
- @keyframes incremark-fade-in {
199
- from {
200
- opacity: 0;
201
- }
202
- to {
203
- opacity: 1;
204
- }
205
- }
206
-