jiangxujin 1 mês atrás
pai
commit
e7000c46ef

+ 1 - 1
apps/demo-free-layout/src/components/node-panel/index.tsx

@@ -6,8 +6,8 @@
 import { useRef } from 'react';
 
 import { NodePanelRenderProps as NodePanelRenderPropsDefault } from '@flowgram.ai/free-node-panel-plugin';
+import { WorkflowPortEntity } from '@flowgram.ai/free-layout-editor';
 import { Popover } from '@douyinfe/semi-ui';
-import { WorkflowPortEntity } from '@flowgram.ai/free-layout-editor'
 
 import { NodePlaceholder } from './node-placeholder';
 import { NodeList } from './node-list';

+ 3 - 0
apps/demo-nextjs-antd/.eslintrc.js

@@ -18,6 +18,9 @@ module.exports = defineConfig({
   rules: {
     'no-console': 'off',
     'react/prop-types': 'off',
+    'react-hooks/exhaustive-deps': 'off',
+    '@next/next/no-img-element': 'off',
+    'jsx-a11y/alt-text': 'off'
   },
   plugins: ['json'],
   extends: ['next', 'next/core-web-vitals'],

+ 9 - 9
apps/demo-nextjs-antd/src/editor/components/line-add-button/index.tsx

@@ -3,10 +3,13 @@
  * SPDX-License-Identifier: MIT
  */
 
-import { IconPlusCircle } from './button';
-import './index.scss';
-import { useVisible } from './use-visible';
+import { useCallback } from 'react';
 
+import {
+  WorkflowNodePanelService,
+  WorkflowNodePanelUtils,
+} from '@flowgram.ai/free-node-panel-plugin';
+import { LineRenderProps } from '@flowgram.ai/free-lines-plugin';
 import {
   HistoryService,
   WorkflowDocument,
@@ -17,14 +20,11 @@ import {
   delay,
   useService,
 } from '@flowgram.ai/free-layout-editor';
-import { LineRenderProps } from '@flowgram.ai/free-lines-plugin';
-import {
-  WorkflowNodePanelService,
-  WorkflowNodePanelUtils,
-} from '@flowgram.ai/free-node-panel-plugin';
 
-import { useCallback } from 'react';
+import { useVisible } from './use-visible';
+import { IconPlusCircle } from './button';
 
+import './index.scss';
 export const LineAddButton = (props: LineRenderProps) => {
   const { line, selected, hovered, color } = props;
   const visible = useVisible({ line, selected, hovered });

+ 4 - 3
apps/demo-nextjs-antd/src/editor/form-components/form-item/index.tsx

@@ -3,12 +3,13 @@
  * SPDX-License-Identifier: MIT
  */
 
-import { TypeTag } from '../type-tag';
+import React, { useCallback } from 'react';
 
-import './index.css';
 import { Tooltip, Typography } from 'antd';
 
-import React, { useCallback } from 'react';
+import { TypeTag } from '../type-tag';
+
+import './index.css';
 
 const { Text } = Typography;
 

+ 6 - 2
apps/demo-nextjs-antd/src/editor/nodes/default-form-meta.tsx

@@ -4,7 +4,11 @@
  */
 
 import { FormMeta, FormRenderProps, ValidateTrigger } from '@flowgram.ai/free-layout-editor';
-import { autoRenameRefEffect, syncVariableTitle, provideJsonSchemaOutputs } from '@flowgram.ai/form-antd-materials';
+import {
+  autoRenameRefEffect,
+  syncVariableTitle,
+  provideJsonSchemaOutputs,
+} from '@flowgram.ai/form-antd-materials';
 
 import { FormContent, FormHeader, FormInputs, FormOutputs } from '@editor/form-components';
 import { FlowNodeJSON } from '../typings';
@@ -36,7 +40,7 @@ export const defaultFormMeta: FormMeta<FlowNodeJSON> = {
       return undefined;
     },
   },
-   effect: {
+  effect: {
     title: syncVariableTitle,
     outputs: provideJsonSchemaOutputs,
     inputsValues: autoRenameRefEffect,

+ 5 - 1
apps/demo-nextjs-antd/src/editor/nodes/start/form-meta.tsx

@@ -12,7 +12,11 @@ import {
   FormRenderProps,
   ValidateTrigger,
 } from '@flowgram.ai/free-layout-editor';
-import { JsonSchemaEditor, syncVariableTitle, provideJsonSchemaOutputs } from '@flowgram.ai/form-antd-materials';
+import {
+  JsonSchemaEditor,
+  syncVariableTitle,
+  provideJsonSchemaOutputs,
+} from '@flowgram.ai/form-antd-materials';
 
 import { FlowNodeJSON, JsonSchema } from '@editor/typings';
 import { useIsSidebar } from '@editor/hooks';

+ 1 - 0
apps/docs/components/materials.tsx

@@ -4,6 +4,7 @@
  */
 
 // @ts-expect-error
+// eslint-disable-next-line import/no-unresolved
 import { PackageManagerTabs, SourceCode } from '@theme';
 
 export function MaterialDisplay(props: any) {