chore: format all frontend files (#430)

This commit is contained in:
tecvan
2025-07-31 23:15:48 +08:00
committed by GitHub
parent 8b078ff013
commit 6995cec404
8787 changed files with 11975 additions and 10924 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { EmptyVariableContent } from './variable-panel/variable-panel';
import type { BotProjectVariableSelectProps } from './types';
import BotProjectVariableSelect from './select';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import cls from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import cls from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useQuery } from '@tanstack/react-query';
import {
IntelligenceStatus,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { debounce } from 'lodash-es';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useCallback, useRef, useState } from 'react';
import cls from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type CSSProperties, type ReactNode } from 'react';
import { type IntelligenceType } from '@coze-arch/idl/intelligence_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useMemo } from 'react';
import { isGlobalVariableKey } from '@coze-workflow/variable';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useMemo } from 'react';
import cls from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { debounce } from 'lodash-es';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { JsonViewer } from '@coze-common/json-viewer';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable complexity */
import React from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { type PropsWithChildren } from 'react';
import styles from './item.module.less';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { Table } from '@coze-arch/bot-semi';
import { type BotTable } from '@coze-arch/bot-api/memory';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//Backend undefined, derived from workflow_info profile_memory in bot_info
import { type IntelligenceType } from '@coze-arch/idl/intelligence_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useQuery } from '@tanstack/react-query';
import { IntelligenceType } from '@coze-arch/idl/intelligence_api';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useQuery } from '@tanstack/react-query';
import { Scene } from '@coze-arch/bot-api/developer_api';
import { DeveloperApi } from '@coze-arch/bot-api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useMemo } from 'react';
import { IntelligenceType } from '@coze-arch/idl/intelligence_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import get from 'lodash-es/get';
import { TimeCapsuleMode } from '@coze-arch/idl/playground_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useQuery } from '@tanstack/react-query';
import { IntelligenceType } from '@coze-arch/idl/intelligence_api';
import { intelligenceApi, MemoryApi } from '@coze-arch/bot-api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useProjectInfo } from './use-project-info';
export const useProjectVariables = (projectID?: string) => {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type BotTable, BotTableRWMode } from '@coze-arch/bot-api/memory';
import { transformBotInfo, useBotInfo } from './use-bot-info';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type Variable } from '@coze-arch/bot-api/playground_api';
import { transformBotInfo, useBotInfo } from './use-bot-info';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { IntelligenceType } from '@coze-arch/idl/intelligence_api';
export const isItemDisabled = (

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type Variable } from '@coze-arch/bot-api/playground_api';
import { TagList } from '../tag-list';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { debounce } from 'lodash-es';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { JsonViewer } from '@coze-common/json-viewer';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable complexity */
import React from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { type PropsWithChildren } from 'react';
import styles from './item.module.less';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Table } from '@coze-arch/bot-semi';
import { type BotTable } from '@coze-arch/bot-api/memory';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//Backend undefined, derived from workflow_info profile_memory in bot_info
export interface Variable {
key: string;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useQuery } from '@tanstack/react-query';
import {
type GetDraftBotInfoAgwData,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useQuery } from '@tanstack/react-query';
import { Scene } from '@coze-arch/bot-api/developer_api';
import { DeveloperApi } from '@coze-arch/bot-api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useMemo } from 'react';
import { transformBotInfo, useBotInfo } from './use-bot-info';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import get from 'lodash-es/get';
import { TimeCapsuleMode } from '@coze-arch/idl/playground_api';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type BotTable, BotTableRWMode } from '@coze-arch/bot-api/memory';
import { transformBotInfo, useBotInfo } from './use-bot-info';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type Variable } from '@coze-arch/bot-api/playground_api';
import { transformBotInfo, useBotInfo } from './use-bot-info';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type Variable } from '@coze-arch/bot-api/playground_api';
import { TagList } from '../tag-list';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useState, useEffect } from 'react';
// import { useMutation } from '@tanstack/react-query';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC, useRef } from 'react';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface MessageFormValue {
// eslint-disable-next-line @typescript-eslint/naming-convention
Messages: Array<MessageValue>;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useGetSceneFlowRoleList } from '../../hooks/use-get-scene-flow-params';
import { type SpeakerMessageSetValue } from '../../form-extensions/setters/speaker-message-set-array/types';
import { type MessageValue } from './types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createRenderer, option } from '@coze-editor/editor/react';
import preset, { languages, themes } from '@coze-editor/editor/preset-code';
import { shell } from '@coze-editor/editor/language-shell';
@@ -46,16 +46,16 @@ const minHeightOption = (value?: string | number) =>
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
'&.cm-editor': {
minHeight:
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
});
@@ -66,8 +66,8 @@ const maxHeightOption = (value?: string | number) =>
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
});
@@ -78,8 +78,8 @@ const heightOption = (value?: string | number) =>
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
});
@@ -90,8 +90,8 @@ const paddingOption = (value?: string | number) =>
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
});
@@ -102,8 +102,8 @@ const borderRadiusOption = (value?: string | number) =>
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
});
@@ -114,8 +114,8 @@ const lineHeightOption = (value?: string | number) =>
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
});

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { EditorProvider } from '@coze-editor/editor/react';
export { CodeEditor } from './code-editor';
export { TextEditor } from './text-editor';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createRenderer, option } from '@coze-editor/editor/react';
import universal from '@coze-editor/editor/preset-universal';
import { mixLanguages } from '@coze-editor/editor';
@@ -36,8 +36,8 @@ const minHeightOption = (value?: string | number) =>
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
});
@@ -48,8 +48,8 @@ const lineHeightOption = (value?: string | number) =>
typeof value === 'number'
? `${value}px`
: typeof value === 'string'
? value
: 'unset',
? value
: 'unset',
},
});

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createTheme, tags as t } from '@coze-editor/editor/preset-code';
import { EditorView } from '@codemirror/view';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createTheme, tags as t } from '@coze-editor/editor/preset-code';
import { EditorView } from '@codemirror/view';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorBlock } from '../../type';
import { getCozeCom, getCozeCn } from './util';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { getCozeCom, getCozeCn } from './util';
export const commentEditorMockHTML = `<h1><u><strong>Workflow Comment</strong></u></h1><p><strong>[Format]</strong></p><p><strong>Bold</strong> <em>Italic</em> <u>Underline</u> <del>Strikethrough</del> <del><u><em><strong>Mixed</strong></em></u></del></p><p><strong>[Quote]</strong></p><blockquote><p>This line should be displayed as a quote.</p></blockquote><blockquote><p>Line 2: content.</p></blockquote><blockquote><p>Line 3: content.</p></blockquote><p><strong>[Bullet List]</strong></p><ul><li>item order 1</li><li>item order 2</li><li>item order 3</li></ul><p><strong>[Numbered List]</strong></p><ol><li>item order 1</li><li>item order 2</li><li>item order 3</li></ol><p><strong>[Hyper Link]</strong></p><p>Coze 👉🏻 <a href="${getCozeCom()}">coze.com</a></p><p>Coze for CN 👉🏻 <a href="${getCozeCn()}">coze.cn</a></p><p><strong>[Heading]</strong></p><h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><h3><u><em><strong>Heading Formatted</strong></em></u></h3>`;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { commentEditorMockMarkdown } from './markdown';
export { commentEditorMockText } from './text';
export { commentEditorMockBlocks } from './blocks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { commentEditorMockBlocks } from './blocks';
export const commentEditorMockJSON = JSON.stringify(commentEditorMockBlocks);

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { getCozeCom, getCozeCn } from './util';
export const commentEditorMockMarkdown = `# __**Workflow Comment**__

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const commentEditorMockText = `Workflow Comment
[Format]
Bold Italic Underline Strikethrough Mixed

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const getCozeCom = () => ['https://', 'coze.com'].join('');
export const getCozeCn = () => ['https://', 'coze.cn'].join('');

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, it, expect } from 'vitest';
import { CommentEditorParser } from '../parsers';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Editor } from 'slate';
import type { CommentEditorCommand } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorCommand } from '../type';
import { CommentEditorLeafFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorCommand } from '../type';
import { CommentEditorBlockFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorCommand } from '../type';
import { CommentEditorBlockFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { selectAllCommand } from './select-all';
export { boldCommand } from './bold';
export { italicCommand } from './italic';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorCommand } from '../type';
import { CommentEditorLeafFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorCommand } from '../type';
import { CommentEditorBlockFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorCommand } from '../type';
import { CommentEditorBlockFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Editor, Transforms } from 'slate';
import type { CommentEditorCommand } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorCommand } from '../type';
import { CommentEditorLeafFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorCommand } from '../type';
import { CommentEditorLeafFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { FC } from 'react';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import classNames from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ReactNode, type FC, type CSSProperties } from 'react';
import classNames from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC, useState, useEffect, type WheelEventHandler } from 'react';
import classNames from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import classNames from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CommentEditorBlockFormat } from '../../constant';
export const Block = ({ attributes, children, element }) => {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, {
type FC,
useCallback,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CommentEditorLeafFormat, CommentDefaultLink } from '../../constant';
export const Leaf = ({ attributes, children, leaf }) => {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { type RenderPlaceholderProps } from 'slate-react';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { CommentRender } from './render';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ErrorBoundary } from 'react-error-boundary';
import { type FC } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import classNames from 'classnames';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC, type RefObject, useRef } from 'react';
import { CommentToolbar } from '../toolbar';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ReactDOM from 'react-dom';
import { type ReactNode } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/naming-convention -- inner value */
/* eslint-disable react-hooks/exhaustive-deps -- init */
import { type RefObject, useCallback, useEffect, useState } from 'react';

View File

@@ -13,11 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type RefObject, useState, useCallback, useEffect } from 'react';
import { ReactEditor } from 'slate-react';
import { type PositionSchema, usePlayground } from '@flowgram-adapter/free-layout-editor';
import {
type PositionSchema,
usePlayground,
} from '@flowgram-adapter/free-layout-editor';
import type { CommentEditorModel } from '../../model';
import { CommentEditorEvent } from '../../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable max-lines-per-function -- no need to split */
import { type RefObject, type FC } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/naming-convention -- enum */
export enum CommentEditorFormField {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { useModel } from './use-model';
export { useSize } from './use-size';
export { useOverflow } from './use-overflow';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useEffect, useMemo } from 'react';
import { type FormModelV2 } from '@flowgram-adapter/free-layout-editor';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCallback, useState, useEffect } from 'react';
import { usePlayground } from '@flowgram-adapter/free-layout-editor';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable max-lines-per-function -- no need fix */
/* eslint-disable @typescript-eslint/no-magic-numbers -- no need fix */
import { useCallback, useState, useEffect } from 'react';
@@ -24,7 +24,10 @@ import {
HistoryService,
} from '@flowgram-adapter/free-layout-editor';
import { FlowNodeFormData } from '@flowgram-adapter/free-layout-editor';
import { TransformData, usePlayground } from '@flowgram-adapter/free-layout-editor';
import {
TransformData,
usePlayground,
} from '@flowgram-adapter/free-layout-editor';
import {
useCurrentEntity,
useService,

View File

@@ -13,6 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { CommentRender } from './components';
export { CommentEditorParser } from './parsers';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/require-await -- async to avoid block slate render */
import type { KeyboardEventHandler, ClipboardEvent } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-magic-numbers -- no need */
/* eslint-disable @typescript-eslint/no-namespace -- namespace is necessary */
@@ -71,8 +71,8 @@ export namespace CommentEditorHTMLParser {
block.type === CommentEditorBlockFormat.HeadingOne
? 1
: block.type === CommentEditorBlockFormat.HeadingTwo
? 2
: 3;
? 2
: 3;
return `<h${level}>${content}</h${level}>`;
};

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-namespace -- namespace is necessary */
import { CommentEditorTextParser } from './text';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-namespace -- namespace is necessary */
import type { CommentEditorBlock } from '../type';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-magic-numbers -- no need */
/* eslint-disable @typescript-eslint/no-namespace -- namespace is necessary */
import type { CommentEditorBlock, CommentEditorLeaf } from '../type';
@@ -70,8 +70,8 @@ export namespace CommentEditorMarkdownParser {
block.type === CommentEditorBlockFormat.HeadingOne
? 1
: block.type === CommentEditorBlockFormat.HeadingTwo
? 2
: 3;
? 2
: 3;
return `${'#'.repeat(level)} ${content}\n\n`;
};

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-namespace -- namespace is necessary */
import type { CommentEditorBlock, CommentEditorLeaf } from '../type';
import { CommentEditorBlockFormat } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { KeyboardEventHandler } from 'react';
import type { Node as SlateNode, Element as SlateElement } from 'slate';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { ConditionLogic } from '@coze-workflow/base';

Some files were not shown because too many files have changed in this diff Show More