Skip to content

Commit ebc575c

Browse files
committed
feat: remove unused language support from input components
1 parent ad8165a commit ebc575c

3 files changed

Lines changed: 3 additions & 31 deletions

File tree

src/packages/ce/src/ai/components/AIChatComponent.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,7 @@ export const AIChatComponent: React.FC<AIChatComponentProps> = (props) => {
178178
boxShadow: "none"
179179
}
180180
}}
181-
placeholder={"Describe what you want to edit..."}
182-
language={StreamLanguage.define({
183-
token(stream) {
184-
stream.next()
185-
return null;
186-
}
187-
})}/>
181+
placeholder={"Describe what you want to edit..."}/>
188182
)
189183
}
190184
<Spacing spacing={"xxs"}/>

src/packages/ce/src/datatype/components/inputs/number/DataTypeNumberInputComponent.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from "react";
22
import {DataTypeInputComponentProps} from "../DataTypeInputComponent";
3-
import {EditorInput, hashToColor, InputDescription, InputLabel} from "@code0-tech/pictor";
4-
import {StreamLanguage} from "@codemirror/language";
5-
import {tags} from "@lezer/highlight";
3+
import {EditorInput, InputDescription, InputLabel} from "@code0-tech/pictor";
64
import {useDebouncedCallback} from "use-debounce";
75
import {
86
LiteralValue,
@@ -55,15 +53,6 @@ export const DataTypeNumberInputComponent: React.FC<DataTypeNumberInputComponent
5553
formValidation={{...formValidation, setValue: undefined}}
5654
maw={"100%"}
5755
placeholder={String(title) ?? ""}
58-
language={StreamLanguage.define({
59-
token(stream) {
60-
stream.next()
61-
return null;
62-
}
63-
})}
64-
tokenStyles={[
65-
{tag: tags.keyword, color: hashToColor("bracket")},
66-
]}
6756
right={
6857
<DataTypeInputControlsComponent suggestions={suggestions} onSelect={value => {
6958
formValidation?.setValue?.(value)

src/packages/ce/src/datatype/components/inputs/text/DataTypeTextInputComponent.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from "react";
22
import {DataTypeInputComponentProps} from "../DataTypeInputComponent";
3-
import {EditorInput, hashToColor, InputDescription, InputLabel} from "@code0-tech/pictor";
4-
import {StreamLanguage} from "@codemirror/language";
5-
import {tags} from "@lezer/highlight";
3+
import {EditorInput, InputDescription, InputLabel} from "@code0-tech/pictor";
64
import {useDebouncedCallback} from "use-debounce";
75
import {
86
LiteralValue,
@@ -48,15 +46,6 @@ export const DataTypeTextInputComponent: React.FC<DataTypeTextInputComponentProp
4846
formValidation={{...formValidation, setValue: undefined}}
4947
maw={"100%"}
5048
placeholder={String(title) ?? ""}
51-
language={StreamLanguage.define({
52-
token(stream) {
53-
stream.next()
54-
return null;
55-
}
56-
})}
57-
tokenStyles={[
58-
{tag: tags.keyword, color: hashToColor("bracket")},
59-
]}
6049
right={
6150
<DataTypeInputControlsComponent suggestions={suggestions} onSelect={value => {
6251
formValidation?.setValue?.(value)

0 commit comments

Comments
 (0)