Skip to content

Commit 9c67211

Browse files
authored
feat: support jsx folding (#134)
1 parent 6af7edf commit 9c67211

30 files changed

Lines changed: 1114 additions & 20 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze-editor/code-language-typescript",
5+
"comment": "support jsx folding",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@coze-editor/code-language-typescript",
10+
"email": "hanchayi@163.com"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze-editor/lang-javascript",
5+
"comment": "support jsx folding",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@coze-editor/lang-javascript",
10+
"email": "hanchayi@163.com"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze-editor/preset-code-languages",
5+
"comment": "support jsx folding",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@coze-editor/preset-code-languages",
10+
"email": "hanchayi@163.com"
11+
}

common/config/subspaces/default/pnpm-lock.yaml

Lines changed: 50 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/text-editor/code-language-typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"lint": "eslint && tsc --noEmit"
1818
},
1919
"dependencies": {
20-
"@codemirror/lang-javascript": "^6.2.1",
20+
"@coze-editor/lang-javascript": "workspace:*",
2121
"@lukeed/uuid": "^2.0.1",
2222
"@typescript/vfs": "^1.6.1",
2323
"comlink": "^4.4.2",

packages/text-editor/code-language-typescript/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2025 coze-dev
22
// SPDX-License-Identifier: MIT
33

4-
import { typescriptLanguage } from '@codemirror/lang-javascript';
4+
import { typescriptLanguage } from '@coze-editor/lang-javascript';
55

66
import {
77
TypeScriptLanguageService,

packages/text-editor/code-language-typescript/tsconfig.build.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
},
2222
{
2323
"path": "../eslint-config/tsconfig.build.json"
24+
},
25+
{
26+
"path": "../lang-javascript/tsconfig.build.json"
2427
}
2528
]
2629
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createRoot } from 'react-dom/client';
2-
import Page from './pages/chat';
2+
import Page from './pages/highlight';
33
import './index.css';
44

55
createRoot(document.getElementById('app')!).render(<Page />);

packages/text-editor/dev/src/pages/highlight/examples.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ import React from 'react';
1515
1616
function App() {
1717
return (
18-
<div>
19-
<h1>Hello World</h1>
20-
{/* hello() */}
21-
</div>
18+
<>
19+
<div
20+
a="sdf"
21+
>
22+
<h1>Hello World</h1>
23+
{/* hello() */}
24+
</div>
25+
<a
26+
href="https://www.baidu.com"
27+
/>
28+
</>
2229
);
2330
}
2431
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}

0 commit comments

Comments
 (0)