@twohash/expressive-code 0.1.0-alpha.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/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +91 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +728 -0
- package/dist/plugin.js.map +1 -0
- package/package.json +31 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type TwohashOptions } from '@twohash/core';
|
|
2
|
+
import type { ExpressiveCodeBlock } from '@expressive-code/core';
|
|
3
|
+
export interface PluginTwohashOptions extends TwohashOptions {
|
|
4
|
+
project?: string;
|
|
5
|
+
region?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function pluginTwohash(options?: PluginTwohashOptions): {
|
|
8
|
+
name: string;
|
|
9
|
+
baseStyles: string;
|
|
10
|
+
styleSettings: {
|
|
11
|
+
popupBackground: {
|
|
12
|
+
dark: string;
|
|
13
|
+
light: string;
|
|
14
|
+
};
|
|
15
|
+
popupForeground: {
|
|
16
|
+
dark: string;
|
|
17
|
+
light: string;
|
|
18
|
+
};
|
|
19
|
+
popupBorder: {
|
|
20
|
+
dark: string;
|
|
21
|
+
light: string;
|
|
22
|
+
};
|
|
23
|
+
errorUnderline: {
|
|
24
|
+
dark: string;
|
|
25
|
+
light: string;
|
|
26
|
+
};
|
|
27
|
+
errorBackground: {
|
|
28
|
+
dark: string;
|
|
29
|
+
light: string;
|
|
30
|
+
};
|
|
31
|
+
warningUnderline: {
|
|
32
|
+
dark: string;
|
|
33
|
+
light: string;
|
|
34
|
+
};
|
|
35
|
+
warningBackground: {
|
|
36
|
+
dark: string;
|
|
37
|
+
light: string;
|
|
38
|
+
};
|
|
39
|
+
infoUnderline: {
|
|
40
|
+
dark: string;
|
|
41
|
+
light: string;
|
|
42
|
+
};
|
|
43
|
+
infoBackground: {
|
|
44
|
+
dark: string;
|
|
45
|
+
light: string;
|
|
46
|
+
};
|
|
47
|
+
highlightBackground: {
|
|
48
|
+
dark: string;
|
|
49
|
+
light: string;
|
|
50
|
+
};
|
|
51
|
+
focusDimOpacity: {
|
|
52
|
+
dark: string;
|
|
53
|
+
light: string;
|
|
54
|
+
};
|
|
55
|
+
diffAddBackground: {
|
|
56
|
+
dark: string;
|
|
57
|
+
light: string;
|
|
58
|
+
};
|
|
59
|
+
diffRemoveBackground: {
|
|
60
|
+
dark: string;
|
|
61
|
+
light: string;
|
|
62
|
+
};
|
|
63
|
+
diffAddBorder: {
|
|
64
|
+
dark: string;
|
|
65
|
+
light: string;
|
|
66
|
+
};
|
|
67
|
+
diffRemoveBorder: {
|
|
68
|
+
dark: string;
|
|
69
|
+
light: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
hooks: {
|
|
73
|
+
preprocessCode({ codeBlock }: {
|
|
74
|
+
codeBlock: ExpressiveCodeBlock;
|
|
75
|
+
}): Promise<void>;
|
|
76
|
+
annotateCode({ codeBlock }: {
|
|
77
|
+
codeBlock: {
|
|
78
|
+
code: string;
|
|
79
|
+
getLines: () => Array<{
|
|
80
|
+
addAnnotation: (ann: unknown) => void;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
}): void;
|
|
84
|
+
postprocessRenderedBlock({ renderData }: {
|
|
85
|
+
renderData: {
|
|
86
|
+
blockAst: unknown;
|
|
87
|
+
};
|
|
88
|
+
}): void;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAA4M,MAAM,eAAe,CAAA;AAC5Q,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAgRD,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAUtB;YAAE,SAAS,EAAE,mBAAmB,CAAA;SAAE;oCA0B1C;YAAE,SAAS,EAAE;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,QAAQ,EAAE,MAAM,KAAK,CAAC;oBAAE,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;iBAAE,CAAC,CAAA;aAAE,CAAA;SAAE;iDAoFpF;YAAE,UAAU,EAAE;gBAAE,QAAQ,EAAE,OAAO,CAAA;aAAE,CAAA;SAAE;;EAMnF"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
import { createTwohash } from '@twohash/core';
|
|
2
|
+
// Style settings for theme-aware colors
|
|
3
|
+
const styleSettings = {
|
|
4
|
+
popupBackground: { dark: '#1e1e1e', light: '#f3f3f3' },
|
|
5
|
+
popupForeground: { dark: '#d4d4d4', light: '#1e1e1e' },
|
|
6
|
+
popupBorder: { dark: '#3c3c3c', light: '#c8c8c8' },
|
|
7
|
+
errorUnderline: { dark: '#f44747', light: '#e51400' },
|
|
8
|
+
errorBackground: { dark: 'rgba(244, 71, 71, 0.1)', light: 'rgba(229, 20, 0, 0.1)' },
|
|
9
|
+
warningUnderline: { dark: '#d29922', light: '#9a6700' },
|
|
10
|
+
warningBackground: { dark: 'rgba(210, 153, 34, 0.15)', light: 'rgba(154, 103, 0, 0.15)' },
|
|
11
|
+
infoUnderline: { dark: '#539bf5', light: '#0969da' },
|
|
12
|
+
infoBackground: { dark: 'rgba(83, 155, 245, 0.15)', light: 'rgba(9, 105, 218, 0.15)' },
|
|
13
|
+
highlightBackground: { dark: 'rgba(173, 124, 255, 0.15)', light: 'rgba(139, 90, 230, 0.12)' },
|
|
14
|
+
focusDimOpacity: { dark: '0.4', light: '0.4' },
|
|
15
|
+
diffAddBackground: { dark: 'rgba(46, 160, 67, 0.15)', light: 'rgba(46, 160, 67, 0.12)' },
|
|
16
|
+
diffRemoveBackground: { dark: 'rgba(248, 81, 73, 0.15)', light: 'rgba(248, 81, 73, 0.12)' },
|
|
17
|
+
diffAddBorder: { dark: '#2ea043', light: '#2ea043' },
|
|
18
|
+
diffRemoveBorder: { dark: '#f85149', light: '#f85149' },
|
|
19
|
+
};
|
|
20
|
+
// Part kind colors (VS Code-like)
|
|
21
|
+
const partColors = {
|
|
22
|
+
keyword: { dark: '#569cd6', light: '#0000ff' },
|
|
23
|
+
className: { dark: '#4ec9b0', light: '#267f99' },
|
|
24
|
+
structName: { dark: '#4ec9b0', light: '#267f99' },
|
|
25
|
+
interfaceName: { dark: '#b8d7a3', light: '#267f99' },
|
|
26
|
+
enumName: { dark: '#b8d7a3', light: '#267f99' },
|
|
27
|
+
delegateName: { dark: '#4ec9b0', light: '#267f99' },
|
|
28
|
+
typeParameterName: { dark: '#b8d7a3', light: '#267f99' },
|
|
29
|
+
methodName: { dark: '#dcdcaa', light: '#795e26' },
|
|
30
|
+
propertyName: { dark: '#9cdcfe', light: '#001080' },
|
|
31
|
+
fieldName: { dark: '#9cdcfe', light: '#001080' },
|
|
32
|
+
eventName: { dark: '#9cdcfe', light: '#001080' },
|
|
33
|
+
localName: { dark: '#9cdcfe', light: '#001080' },
|
|
34
|
+
parameterName: { dark: '#9cdcfe', light: '#001080' },
|
|
35
|
+
namespaceName: { dark: '#d4d4d4', light: '#1e1e1e' },
|
|
36
|
+
punctuation: { dark: '#d4d4d4', light: '#1e1e1e' },
|
|
37
|
+
operator: { dark: '#d4d4d4', light: '#1e1e1e' },
|
|
38
|
+
text: { dark: '#d4d4d4', light: '#1e1e1e' },
|
|
39
|
+
};
|
|
40
|
+
function buildBaseStyles() {
|
|
41
|
+
const partColorRules = Object.entries(partColors)
|
|
42
|
+
.map(([kind, colors]) => `.twohash-${kind} { color: var(--twohash-${kind}-dark, ${colors.dark}); }
|
|
43
|
+
[data-theme="light"] .twohash-${kind} { color: var(--twohash-${kind}-light, ${colors.light}); }`)
|
|
44
|
+
.join('\n');
|
|
45
|
+
return `
|
|
46
|
+
.twohash-hover {
|
|
47
|
+
position: relative;
|
|
48
|
+
border-bottom: 1px dotted transparent;
|
|
49
|
+
transition: border-color 0.3s ease;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (prefers-reduced-motion: reduce) {
|
|
54
|
+
.twohash-hover { transition: none; }
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Container hover: subtle underline on all hoverable tokens */
|
|
58
|
+
.expressive-code:hover .twohash-hover:not(:hover):not(.twohash-hover-persistent) {
|
|
59
|
+
border-bottom-color: color-mix(in srgb, currentColor 40%, transparent);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Token hover: strong underline */
|
|
63
|
+
.twohash-hover:hover {
|
|
64
|
+
border-bottom-color: currentColor;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.twohash-hover-persistent {
|
|
68
|
+
border-bottom-color: currentColor;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.twohash-popup {
|
|
72
|
+
display: none;
|
|
73
|
+
position: fixed;
|
|
74
|
+
position-area: top;
|
|
75
|
+
margin-bottom: 4px;
|
|
76
|
+
z-index: 100;
|
|
77
|
+
max-width: 500px;
|
|
78
|
+
padding: 8px 12px;
|
|
79
|
+
border: 1px solid var(--twohash-popup-border, ${styleSettings.popupBorder.dark});
|
|
80
|
+
border-radius: 4px;
|
|
81
|
+
background: var(--twohash-popup-bg, ${styleSettings.popupBackground.dark});
|
|
82
|
+
color: var(--twohash-popup-fg, ${styleSettings.popupForeground.dark});
|
|
83
|
+
font-size: 0.875em;
|
|
84
|
+
line-height: 1.5;
|
|
85
|
+
white-space: pre-wrap;
|
|
86
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.twohash-hover:hover > .twohash-popup,
|
|
90
|
+
.twohash-popup:hover {
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.twohash-hover-persistent > .twohash-popup {
|
|
95
|
+
display: block;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.twohash-popup-code {
|
|
99
|
+
font-family: inherit;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.twohash-popup-docs {
|
|
103
|
+
margin-top: 6px;
|
|
104
|
+
padding-top: 6px;
|
|
105
|
+
border-top: 1px solid var(--twohash-popup-border, ${styleSettings.popupBorder.dark});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.twohash-popup-summary {
|
|
109
|
+
font-style: italic;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.twohash-popup-params,
|
|
113
|
+
.twohash-popup-returns,
|
|
114
|
+
.twohash-popup-remarks,
|
|
115
|
+
.twohash-popup-example,
|
|
116
|
+
.twohash-popup-exceptions {
|
|
117
|
+
margin-top: 4px;
|
|
118
|
+
padding-top: 4px;
|
|
119
|
+
border-top: 1px solid var(--twohash-popup-border, ${styleSettings.popupBorder.dark});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.twohash-popup-section-label {
|
|
123
|
+
font-size: 0.8em;
|
|
124
|
+
opacity: 0.7;
|
|
125
|
+
text-transform: uppercase;
|
|
126
|
+
letter-spacing: 0.05em;
|
|
127
|
+
margin-bottom: 2px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.twohash-popup-param {
|
|
131
|
+
display: flex;
|
|
132
|
+
gap: 6px;
|
|
133
|
+
margin: 1px 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.twohash-popup-param-name {
|
|
137
|
+
font-family: inherit;
|
|
138
|
+
font-weight: bold;
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.twohash-popup-exception {
|
|
143
|
+
display: flex;
|
|
144
|
+
gap: 6px;
|
|
145
|
+
margin: 1px 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.twohash-popup-exception-type {
|
|
149
|
+
font-family: inherit;
|
|
150
|
+
font-weight: bold;
|
|
151
|
+
white-space: nowrap;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.twohash-popup-example pre {
|
|
155
|
+
margin: 2px 0;
|
|
156
|
+
padding: 4px 6px;
|
|
157
|
+
background: rgba(128, 128, 128, 0.1);
|
|
158
|
+
border-radius: 2px;
|
|
159
|
+
font-size: 0.9em;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.twohash-error-underline {
|
|
163
|
+
border-bottom: 2px wavy var(--twohash-error-underline, ${styleSettings.errorUnderline.dark});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.twohash-error-underline.twohash-severity-warning {
|
|
167
|
+
border-bottom-color: var(--twohash-warning-underline, ${styleSettings.warningUnderline.dark});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.twohash-error-underline.twohash-severity-info {
|
|
171
|
+
border-bottom-color: var(--twohash-info-underline, ${styleSettings.infoUnderline.dark});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.twohash-error-message {
|
|
175
|
+
display: block;
|
|
176
|
+
padding: 2px 8px;
|
|
177
|
+
margin-top: 2px;
|
|
178
|
+
background: var(--twohash-error-bg, ${styleSettings.errorBackground.dark});
|
|
179
|
+
border-left: 3px solid var(--twohash-error-underline, ${styleSettings.errorUnderline.dark});
|
|
180
|
+
color: var(--twohash-error-underline, ${styleSettings.errorUnderline.dark});
|
|
181
|
+
font-size: 0.85em;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.twohash-error-message.twohash-severity-warning {
|
|
185
|
+
background: var(--twohash-warning-bg, ${styleSettings.warningBackground.dark});
|
|
186
|
+
border-left-color: var(--twohash-warning-underline, ${styleSettings.warningUnderline.dark});
|
|
187
|
+
color: var(--twohash-warning-underline, ${styleSettings.warningUnderline.dark});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.twohash-error-message.twohash-severity-info {
|
|
191
|
+
background: var(--twohash-info-bg, ${styleSettings.infoBackground.dark});
|
|
192
|
+
border-left-color: var(--twohash-info-underline, ${styleSettings.infoUnderline.dark});
|
|
193
|
+
color: var(--twohash-info-underline, ${styleSettings.infoUnderline.dark});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.twohash-error-code {
|
|
197
|
+
font-weight: bold;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
a.twohash-error-code {
|
|
201
|
+
color: inherit;
|
|
202
|
+
text-decoration: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
a.twohash-error-code:hover {
|
|
206
|
+
text-decoration: underline;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.twohash-completion-list {
|
|
210
|
+
list-style: none;
|
|
211
|
+
margin: 4px 0 0 0;
|
|
212
|
+
padding: 4px 0;
|
|
213
|
+
border: 1px solid var(--twohash-popup-border, ${styleSettings.popupBorder.dark});
|
|
214
|
+
border-radius: 4px;
|
|
215
|
+
background: var(--twohash-popup-bg, ${styleSettings.popupBackground.dark});
|
|
216
|
+
font-size: 0.875em;
|
|
217
|
+
max-height: 200px;
|
|
218
|
+
overflow-y: auto;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.twohash-completion-item {
|
|
222
|
+
display: flex;
|
|
223
|
+
gap: 8px;
|
|
224
|
+
padding: 2px 8px;
|
|
225
|
+
align-items: center;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.twohash-completion-kind {
|
|
229
|
+
font-size: 0.75em;
|
|
230
|
+
opacity: 0.7;
|
|
231
|
+
min-width: 60px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.twohash-completion-label {
|
|
235
|
+
color: var(--twohash-popup-fg, ${styleSettings.popupForeground.dark});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.twohash-completion-detail {
|
|
239
|
+
opacity: 0.6;
|
|
240
|
+
font-size: 0.85em;
|
|
241
|
+
margin-left: auto;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.twohash-highlight {
|
|
245
|
+
background: var(--twohash-highlight-bg, ${styleSettings.highlightBackground.dark});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.twohash-focus-dim {
|
|
249
|
+
opacity: var(--twohash-focus-dim-opacity, ${styleSettings.focusDimOpacity.dark});
|
|
250
|
+
transition: opacity 0.2s;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.twohash-diff-add {
|
|
254
|
+
background: var(--twohash-diff-add-bg, ${styleSettings.diffAddBackground.dark});
|
|
255
|
+
border-left: 3px solid var(--twohash-diff-add-border, ${styleSettings.diffAddBorder.dark});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.twohash-diff-remove {
|
|
259
|
+
background: var(--twohash-diff-remove-bg, ${styleSettings.diffRemoveBackground.dark});
|
|
260
|
+
border-left: 3px solid var(--twohash-diff-remove-border, ${styleSettings.diffRemoveBorder.dark});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
${partColorRules}
|
|
264
|
+
`;
|
|
265
|
+
}
|
|
266
|
+
export function pluginTwohash(options = {}) {
|
|
267
|
+
const twohash = createTwohash(options);
|
|
268
|
+
const resultCache = new WeakMap();
|
|
269
|
+
return {
|
|
270
|
+
name: 'twohash',
|
|
271
|
+
baseStyles: buildBaseStyles(),
|
|
272
|
+
styleSettings,
|
|
273
|
+
hooks: {
|
|
274
|
+
async preprocessCode({ codeBlock }) {
|
|
275
|
+
const lang = codeBlock.language;
|
|
276
|
+
if (lang !== 'csharp' && lang !== 'cs' && lang !== 'c#')
|
|
277
|
+
return;
|
|
278
|
+
try {
|
|
279
|
+
const result = await twohash.process({ code: codeBlock.code, project: options.project, region: options.region });
|
|
280
|
+
resultCache.set(codeBlock, result);
|
|
281
|
+
// Replace code with cleaned version (markers removed)
|
|
282
|
+
// EC blocks don't allow setting .code directly, so replace line by line
|
|
283
|
+
const cleaned = result.code.replace(/\n$/, '');
|
|
284
|
+
const newLines = cleaned === '' ? [] : cleaned.split('\n');
|
|
285
|
+
const oldLines = codeBlock.getLines();
|
|
286
|
+
// Delete all old lines
|
|
287
|
+
const indicesToDelete = Array.from({ length: oldLines.length }, (_, i) => i).reverse();
|
|
288
|
+
if (indicesToDelete.length > 0) {
|
|
289
|
+
codeBlock.deleteLines(indicesToDelete);
|
|
290
|
+
}
|
|
291
|
+
// Insert the new cleaned lines
|
|
292
|
+
if (newLines.length > 0) {
|
|
293
|
+
codeBlock.insertLines(0, newLines);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
catch {
|
|
297
|
+
// Silently pass through if CLI fails
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
annotateCode({ codeBlock }) {
|
|
301
|
+
// codeBlock is the same object passed to preprocessCode (an ExpressiveCodeBlock)
|
|
302
|
+
const result = resultCache.get(codeBlock);
|
|
303
|
+
if (!result)
|
|
304
|
+
return;
|
|
305
|
+
const lines = codeBlock.getLines();
|
|
306
|
+
// Add hover annotations
|
|
307
|
+
for (const hover of result.hovers) {
|
|
308
|
+
const line = lines[hover.line];
|
|
309
|
+
if (!line)
|
|
310
|
+
continue;
|
|
311
|
+
line.addAnnotation(new TwohashHoverAnnotation(hover));
|
|
312
|
+
}
|
|
313
|
+
// Add error annotations
|
|
314
|
+
for (const error of result.errors) {
|
|
315
|
+
if (error.expected)
|
|
316
|
+
continue;
|
|
317
|
+
if (error.endLine != null && error.endLine > error.line) {
|
|
318
|
+
// Multi-line error: underline annotations on each affected line
|
|
319
|
+
for (let lineIdx = error.line; lineIdx <= error.endLine; lineIdx++) {
|
|
320
|
+
const line = lines[lineIdx];
|
|
321
|
+
if (!line)
|
|
322
|
+
continue;
|
|
323
|
+
// Create underline-only annotation for each line (no message)
|
|
324
|
+
const lineError = { ...error };
|
|
325
|
+
if (lineIdx === error.line) {
|
|
326
|
+
// First line: from character to end
|
|
327
|
+
line.addAnnotation(new TwohashErrorAnnotation(lineError));
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
// Continuation lines: full line underline
|
|
331
|
+
const contError = { ...error, character: 0, length: 1000 };
|
|
332
|
+
line.addAnnotation(new TwohashErrorAnnotation(contError));
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
// Place message on last affected line
|
|
336
|
+
const lastLine = lines[error.endLine];
|
|
337
|
+
if (lastLine) {
|
|
338
|
+
lastLine.addAnnotation(new TwohashErrorAnnotation(error, { messageOnly: true }));
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
// Single-line error
|
|
343
|
+
const line = lines[error.line];
|
|
344
|
+
if (!line)
|
|
345
|
+
continue;
|
|
346
|
+
line.addAnnotation(new TwohashErrorAnnotation(error));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
// Add completion annotations
|
|
350
|
+
for (const completion of result.completions) {
|
|
351
|
+
const line = lines[completion.line];
|
|
352
|
+
if (!line)
|
|
353
|
+
continue;
|
|
354
|
+
line.addAnnotation(new TwohashCompletionAnnotation(completion));
|
|
355
|
+
}
|
|
356
|
+
// Add highlight and diff annotations
|
|
357
|
+
const hasFocus = result.highlights.some(h => h.kind === 'focus');
|
|
358
|
+
const focusedLines = new Set(result.highlights.filter(h => h.kind === 'focus').map(h => h.line));
|
|
359
|
+
for (const highlight of result.highlights) {
|
|
360
|
+
const line = lines[highlight.line];
|
|
361
|
+
if (!line)
|
|
362
|
+
continue;
|
|
363
|
+
switch (highlight.kind) {
|
|
364
|
+
case 'highlight':
|
|
365
|
+
line.addAnnotation(new TwohashHighlightAnnotation());
|
|
366
|
+
break;
|
|
367
|
+
case 'add':
|
|
368
|
+
case 'remove':
|
|
369
|
+
line.addAnnotation(new TwohashDiffAnnotation(highlight.kind));
|
|
370
|
+
break;
|
|
371
|
+
// focus lines stay at full opacity — no annotation needed
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
// If any focus entries exist, dim all non-focused lines
|
|
375
|
+
if (hasFocus) {
|
|
376
|
+
for (let i = 0; i < lines.length; i++) {
|
|
377
|
+
if (!focusedLines.has(i)) {
|
|
378
|
+
lines[i].addAnnotation(new TwohashFocusDimAnnotation());
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
postprocessRenderedBlock({ renderData }) {
|
|
384
|
+
// The annotations handle rendering via their render() methods
|
|
385
|
+
// Additional post-processing can be added here if needed
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
// Annotation classes
|
|
391
|
+
class TwohashHoverAnnotation {
|
|
392
|
+
hover;
|
|
393
|
+
inlineRange;
|
|
394
|
+
constructor(hover) {
|
|
395
|
+
this.hover = hover;
|
|
396
|
+
this.inlineRange = {
|
|
397
|
+
columnStart: hover.character,
|
|
398
|
+
columnEnd: hover.character + hover.length,
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
render({ nodesToTransform }) {
|
|
402
|
+
const anchorName = `--th-${Math.random().toString(36).slice(2, 8)}`;
|
|
403
|
+
const partNodes = this.hover.parts.map((part) => ({
|
|
404
|
+
type: 'element',
|
|
405
|
+
tagName: 'span',
|
|
406
|
+
properties: { class: `twohash-${part.kind}` },
|
|
407
|
+
children: [{ type: 'text', value: part.text }],
|
|
408
|
+
}));
|
|
409
|
+
const popupChildren = [{
|
|
410
|
+
type: 'element',
|
|
411
|
+
tagName: 'code',
|
|
412
|
+
properties: { class: 'twohash-popup-code' },
|
|
413
|
+
children: partNodes,
|
|
414
|
+
}];
|
|
415
|
+
if (this.hover.docs) {
|
|
416
|
+
popupChildren.push(...this.renderDocs(this.hover.docs));
|
|
417
|
+
}
|
|
418
|
+
const hoverClass = this.hover.persistent
|
|
419
|
+
? 'twohash-hover twohash-hover-persistent'
|
|
420
|
+
: 'twohash-hover';
|
|
421
|
+
return nodesToTransform.map(node => ({
|
|
422
|
+
type: 'element',
|
|
423
|
+
tagName: 'span',
|
|
424
|
+
properties: {
|
|
425
|
+
class: hoverClass,
|
|
426
|
+
style: `anchor-name: ${anchorName}`,
|
|
427
|
+
},
|
|
428
|
+
children: [
|
|
429
|
+
node,
|
|
430
|
+
{
|
|
431
|
+
type: 'element',
|
|
432
|
+
tagName: 'div',
|
|
433
|
+
properties: {
|
|
434
|
+
class: 'twohash-popup',
|
|
435
|
+
style: `position-anchor: ${anchorName}`,
|
|
436
|
+
},
|
|
437
|
+
children: popupChildren,
|
|
438
|
+
},
|
|
439
|
+
],
|
|
440
|
+
}));
|
|
441
|
+
}
|
|
442
|
+
renderDocs(docs) {
|
|
443
|
+
const sections = [];
|
|
444
|
+
// Wrapper div for all docs
|
|
445
|
+
const docsChildren = [];
|
|
446
|
+
if (docs.summary) {
|
|
447
|
+
docsChildren.push({
|
|
448
|
+
type: 'element',
|
|
449
|
+
tagName: 'div',
|
|
450
|
+
properties: { class: 'twohash-popup-summary' },
|
|
451
|
+
children: [{ type: 'text', value: docs.summary }],
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
if (docs.params && docs.params.length > 0) {
|
|
455
|
+
const paramItems = docs.params.map((p) => ({
|
|
456
|
+
type: 'element',
|
|
457
|
+
tagName: 'div',
|
|
458
|
+
properties: { class: 'twohash-popup-param' },
|
|
459
|
+
children: [
|
|
460
|
+
{
|
|
461
|
+
type: 'element',
|
|
462
|
+
tagName: 'span',
|
|
463
|
+
properties: { class: 'twohash-popup-param-name' },
|
|
464
|
+
children: [{ type: 'text', value: p.name }],
|
|
465
|
+
},
|
|
466
|
+
{ type: 'text', value: ` — ${p.text}` },
|
|
467
|
+
],
|
|
468
|
+
}));
|
|
469
|
+
docsChildren.push({
|
|
470
|
+
type: 'element',
|
|
471
|
+
tagName: 'div',
|
|
472
|
+
properties: { class: 'twohash-popup-params' },
|
|
473
|
+
children: [
|
|
474
|
+
{
|
|
475
|
+
type: 'element',
|
|
476
|
+
tagName: 'div',
|
|
477
|
+
properties: { class: 'twohash-popup-section-label' },
|
|
478
|
+
children: [{ type: 'text', value: 'Parameters' }],
|
|
479
|
+
},
|
|
480
|
+
...paramItems,
|
|
481
|
+
],
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
if (docs.returns) {
|
|
485
|
+
docsChildren.push({
|
|
486
|
+
type: 'element',
|
|
487
|
+
tagName: 'div',
|
|
488
|
+
properties: { class: 'twohash-popup-returns' },
|
|
489
|
+
children: [
|
|
490
|
+
{
|
|
491
|
+
type: 'element',
|
|
492
|
+
tagName: 'div',
|
|
493
|
+
properties: { class: 'twohash-popup-section-label' },
|
|
494
|
+
children: [{ type: 'text', value: 'Returns' }],
|
|
495
|
+
},
|
|
496
|
+
{ type: 'text', value: docs.returns },
|
|
497
|
+
],
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
if (docs.remarks) {
|
|
501
|
+
docsChildren.push({
|
|
502
|
+
type: 'element',
|
|
503
|
+
tagName: 'div',
|
|
504
|
+
properties: { class: 'twohash-popup-remarks' },
|
|
505
|
+
children: [
|
|
506
|
+
{
|
|
507
|
+
type: 'element',
|
|
508
|
+
tagName: 'div',
|
|
509
|
+
properties: { class: 'twohash-popup-section-label' },
|
|
510
|
+
children: [{ type: 'text', value: 'Remarks' }],
|
|
511
|
+
},
|
|
512
|
+
{ type: 'text', value: docs.remarks },
|
|
513
|
+
],
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
if (docs.examples && docs.examples.length > 0) {
|
|
517
|
+
const exampleNodes = docs.examples.map((ex) => ({
|
|
518
|
+
type: 'element',
|
|
519
|
+
tagName: 'pre',
|
|
520
|
+
properties: {},
|
|
521
|
+
children: [{ type: 'text', value: ex }],
|
|
522
|
+
}));
|
|
523
|
+
docsChildren.push({
|
|
524
|
+
type: 'element',
|
|
525
|
+
tagName: 'div',
|
|
526
|
+
properties: { class: 'twohash-popup-example' },
|
|
527
|
+
children: [
|
|
528
|
+
{
|
|
529
|
+
type: 'element',
|
|
530
|
+
tagName: 'div',
|
|
531
|
+
properties: { class: 'twohash-popup-section-label' },
|
|
532
|
+
children: [{ type: 'text', value: 'Examples' }],
|
|
533
|
+
},
|
|
534
|
+
...exampleNodes,
|
|
535
|
+
],
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
if (docs.exceptions && docs.exceptions.length > 0) {
|
|
539
|
+
const exceptionItems = docs.exceptions.map((e) => ({
|
|
540
|
+
type: 'element',
|
|
541
|
+
tagName: 'div',
|
|
542
|
+
properties: { class: 'twohash-popup-exception' },
|
|
543
|
+
children: [
|
|
544
|
+
{
|
|
545
|
+
type: 'element',
|
|
546
|
+
tagName: 'span',
|
|
547
|
+
properties: { class: 'twohash-popup-exception-type' },
|
|
548
|
+
children: [{ type: 'text', value: e.type }],
|
|
549
|
+
},
|
|
550
|
+
{ type: 'text', value: ` — ${e.text}` },
|
|
551
|
+
],
|
|
552
|
+
}));
|
|
553
|
+
docsChildren.push({
|
|
554
|
+
type: 'element',
|
|
555
|
+
tagName: 'div',
|
|
556
|
+
properties: { class: 'twohash-popup-exceptions' },
|
|
557
|
+
children: [
|
|
558
|
+
{
|
|
559
|
+
type: 'element',
|
|
560
|
+
tagName: 'div',
|
|
561
|
+
properties: { class: 'twohash-popup-section-label' },
|
|
562
|
+
children: [{ type: 'text', value: 'Exceptions' }],
|
|
563
|
+
},
|
|
564
|
+
...exceptionItems,
|
|
565
|
+
],
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
if (docsChildren.length > 0) {
|
|
569
|
+
sections.push({
|
|
570
|
+
type: 'element',
|
|
571
|
+
tagName: 'div',
|
|
572
|
+
properties: { class: 'twohash-popup-docs' },
|
|
573
|
+
children: docsChildren,
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
return sections;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
const CS_CODE_REGEX = /^CS\d+$/;
|
|
580
|
+
function buildErrorCodeNode(code) {
|
|
581
|
+
if (CS_CODE_REGEX.test(code)) {
|
|
582
|
+
return {
|
|
583
|
+
type: 'element',
|
|
584
|
+
tagName: 'a',
|
|
585
|
+
properties: {
|
|
586
|
+
class: 'twohash-error-code',
|
|
587
|
+
href: `https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/${code.toLowerCase()}`,
|
|
588
|
+
target: '_blank',
|
|
589
|
+
rel: 'noopener',
|
|
590
|
+
},
|
|
591
|
+
children: [{ type: 'text', value: code }],
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
return {
|
|
595
|
+
type: 'element',
|
|
596
|
+
tagName: 'span',
|
|
597
|
+
properties: { class: 'twohash-error-code' },
|
|
598
|
+
children: [{ type: 'text', value: code }],
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
class TwohashErrorAnnotation {
|
|
602
|
+
error;
|
|
603
|
+
inlineRange;
|
|
604
|
+
isMessageOnly;
|
|
605
|
+
constructor(error, opts) {
|
|
606
|
+
this.error = error;
|
|
607
|
+
this.isMessageOnly = opts?.messageOnly ?? false;
|
|
608
|
+
this.inlineRange = {
|
|
609
|
+
columnStart: error.character,
|
|
610
|
+
columnEnd: error.character + error.length,
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
render({ nodesToTransform }) {
|
|
614
|
+
const severityClass = `twohash-severity-${this.error.severity}`;
|
|
615
|
+
if (this.isMessageOnly) {
|
|
616
|
+
// Message-only annotation for multi-line errors (placed on last line)
|
|
617
|
+
return [
|
|
618
|
+
...nodesToTransform,
|
|
619
|
+
{
|
|
620
|
+
type: 'element',
|
|
621
|
+
tagName: 'div',
|
|
622
|
+
properties: { class: `twohash-error-message ${severityClass}` },
|
|
623
|
+
children: [
|
|
624
|
+
buildErrorCodeNode(this.error.code),
|
|
625
|
+
{ type: 'text', value: `: ${this.error.message}` },
|
|
626
|
+
],
|
|
627
|
+
},
|
|
628
|
+
];
|
|
629
|
+
}
|
|
630
|
+
return nodesToTransform.map(node => ({
|
|
631
|
+
type: 'element',
|
|
632
|
+
tagName: 'span',
|
|
633
|
+
properties: { class: `twohash-error-underline ${severityClass}` },
|
|
634
|
+
children: [
|
|
635
|
+
node,
|
|
636
|
+
{
|
|
637
|
+
type: 'element',
|
|
638
|
+
tagName: 'div',
|
|
639
|
+
properties: { class: `twohash-error-message ${severityClass}` },
|
|
640
|
+
children: [
|
|
641
|
+
buildErrorCodeNode(this.error.code),
|
|
642
|
+
{ type: 'text', value: `: ${this.error.message}` },
|
|
643
|
+
],
|
|
644
|
+
},
|
|
645
|
+
],
|
|
646
|
+
}));
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
class TwohashCompletionAnnotation {
|
|
650
|
+
completion;
|
|
651
|
+
inlineRange;
|
|
652
|
+
constructor(completion) {
|
|
653
|
+
this.completion = completion;
|
|
654
|
+
this.inlineRange = {
|
|
655
|
+
columnStart: completion.character,
|
|
656
|
+
columnEnd: completion.character,
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
render({ nodesToTransform }) {
|
|
660
|
+
const items = this.completion.items.map(item => ({
|
|
661
|
+
type: 'element',
|
|
662
|
+
tagName: 'li',
|
|
663
|
+
properties: { class: `twohash-completion-item twohash-completion-kind-${item.kind}` },
|
|
664
|
+
children: [
|
|
665
|
+
{
|
|
666
|
+
type: 'element',
|
|
667
|
+
tagName: 'span',
|
|
668
|
+
properties: { class: 'twohash-completion-kind' },
|
|
669
|
+
children: [{ type: 'text', value: item.kind }],
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
type: 'element',
|
|
673
|
+
tagName: 'span',
|
|
674
|
+
properties: { class: 'twohash-completion-label' },
|
|
675
|
+
children: [{ type: 'text', value: item.label }],
|
|
676
|
+
},
|
|
677
|
+
...(item.detail ? [{
|
|
678
|
+
type: 'element',
|
|
679
|
+
tagName: 'span',
|
|
680
|
+
properties: { class: 'twohash-completion-detail' },
|
|
681
|
+
children: [{ type: 'text', value: item.detail }],
|
|
682
|
+
}] : []),
|
|
683
|
+
],
|
|
684
|
+
}));
|
|
685
|
+
const completionList = {
|
|
686
|
+
type: 'element',
|
|
687
|
+
tagName: 'ul',
|
|
688
|
+
properties: { class: 'twohash-completion-list' },
|
|
689
|
+
children: items,
|
|
690
|
+
};
|
|
691
|
+
return [...nodesToTransform, completionList];
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
class TwohashHighlightAnnotation {
|
|
695
|
+
render({ nodesToTransform }) {
|
|
696
|
+
return nodesToTransform.map(node => ({
|
|
697
|
+
type: 'element',
|
|
698
|
+
tagName: 'div',
|
|
699
|
+
properties: { class: 'twohash-highlight' },
|
|
700
|
+
children: [node],
|
|
701
|
+
}));
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
class TwohashDiffAnnotation {
|
|
705
|
+
diffKind;
|
|
706
|
+
constructor(diffKind) {
|
|
707
|
+
this.diffKind = diffKind;
|
|
708
|
+
}
|
|
709
|
+
render({ nodesToTransform }) {
|
|
710
|
+
return nodesToTransform.map(node => ({
|
|
711
|
+
type: 'element',
|
|
712
|
+
tagName: 'div',
|
|
713
|
+
properties: { class: `twohash-diff-${this.diffKind}` },
|
|
714
|
+
children: [node],
|
|
715
|
+
}));
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
class TwohashFocusDimAnnotation {
|
|
719
|
+
render({ nodesToTransform }) {
|
|
720
|
+
return nodesToTransform.map(node => ({
|
|
721
|
+
type: 'element',
|
|
722
|
+
tagName: 'div',
|
|
723
|
+
properties: { class: 'twohash-focus-dim' },
|
|
724
|
+
children: [node],
|
|
725
|
+
}));
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiO,MAAM,eAAe,CAAA;AAQ5Q,wCAAwC;AACxC,MAAM,aAAa,GAAG;IACpB,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtD,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IAClD,cAAc,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACrD,eAAe,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,uBAAuB,EAAE;IACnF,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACvD,iBAAiB,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,yBAAyB,EAAE;IACzF,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACpD,cAAc,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,yBAAyB,EAAE;IACtF,mBAAmB,EAAE,EAAE,IAAI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,EAAE,KAAK;YACd,UAAU,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE;YAC1C,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB,CAAC,CAAC,CAAA;IACL,CAAC;CACF;AAED,MAAM,qBAAqB;IAChB,QAAQ,CAAkB;IAEnC,YAAY,QAA0B;QACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,MAAM,CAAC,EAAE,gBAAgB,EAAoC;QAC3D,OAAO,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,EAAE,SAAkB;YACxB,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,EAAE,KAAK,EAAE,gBAAgB,IAAI,CAAC,QAAQ,EAAE,EAAE;YACtD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB,CAAC,CAAC,CAAA;IACL,CAAC;CACF;AAED,MAAM,yBAAyB;IAC7B,MAAM,CAAC,EAAE,gBAAgB,EAAoC;QAC3D,OAAO,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,EAAE,SAAkB;YACxB,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE;YAC1C,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB,CAAC,CAAC,CAAA;IACL,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@twohash/expressive-code",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "Expressive Code plugin for twohash C# type information",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@twohash/core": "0.1.0-alpha.1"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@expressive-code/core": "^0.38.0 || ^0.41.0"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^25.3.5",
|
|
28
|
+
"typescript": "^5.9.3",
|
|
29
|
+
"vitest": "^4.0.18"
|
|
30
|
+
}
|
|
31
|
+
}
|