chore: format all frontend files (#430)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { useRef, useState } from 'react';
|
||||
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { type FC, lazy, Suspense, useMemo } from 'react';
|
||||
|
||||
import { type EditorOtherProps, type EditorProps } from '../../interface';
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
export { Editor } from './editor';
|
||||
export { BizEditor } from './biz-editor';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { api, type InferEditorAPIFromPlugins } from '@coze-editor/editor/react';
|
||||
import preset from '@coze-editor/editor/preset-code';
|
||||
import { type EditorView } from '@codemirror/view';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { Renderer, EditorProvider } from '@coze-editor/editor/react';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { ViewVariableType } from '@coze-workflow/base';
|
||||
import { languages } from '@coze-editor/editor/preset-code';
|
||||
import { typescript } from '@coze-editor/editor/language-typescript';
|
||||
@@ -101,7 +101,10 @@ export function generateTypeDefinition(output: Output, indent = ' '): string {
|
||||
definition += `${indent}${output.name}: {\n`;
|
||||
if (output.children && output.children.length > 0) {
|
||||
output.children.forEach(child => {
|
||||
definition += `${indent} ${generateTypeDefinition(child, `${indent} `)}`;
|
||||
definition += `${indent} ${generateTypeDefinition(
|
||||
child,
|
||||
`${indent} `,
|
||||
)}`;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -114,7 +117,10 @@ export function generateTypeDefinition(output: Output, indent = ' '): string {
|
||||
definition += `${indent}${output.name}: {\n`;
|
||||
if (output.children && output.children.length > 0) {
|
||||
output.children.forEach(child => {
|
||||
definition += `${indent} ${generateTypeDefinition(child, `${indent} `)}`;
|
||||
definition += `${indent} ${generateTypeDefinition(
|
||||
child,
|
||||
`${indent} `,
|
||||
)}`;
|
||||
});
|
||||
definition += `${indent}}[]\n`;
|
||||
}
|
||||
@@ -148,7 +154,9 @@ export const initInputAndOutput = async (
|
||||
}
|
||||
|
||||
interface Output {
|
||||
${outputs.map(output => generateTypeDefinition(output, ' ')).join('\n')}
|
||||
${outputs
|
||||
.map(output => generateTypeDefinition(output, ' '))
|
||||
.join('\n')}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import { Renderer, EditorProvider } from '@coze-editor/editor/react';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { useMemo, type ReactNode } from 'react';
|
||||
|
||||
import { concatTestId, useNodeTestId } from '@coze-workflow/base';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
|
||||
import { type EditorAPI } from '../editor/preset';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { createTheme } from '@coze-editor/editor/preset-code';
|
||||
import { type Extension } from '@codemirror/state';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { themes } from '@coze-editor/editor/preset-code';
|
||||
|
||||
import { convertSchema } from './utils';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type ReactNode } from 'react';
|
||||
|
||||
import type {
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/// <reference types='@coze-arch/bot-typings' />
|
||||
declare const IS_OVERSEA: boolean;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
interface ParamSchemaType {
|
||||
name: string;
|
||||
type: number;
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
export { convertSchema } from './convert-schema';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { DemoComponent } from '../src';
|
||||
|
||||
export default {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { defineConfig } from '@coze-arch/vitest-config';
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
Reference in New Issue
Block a user